Questions tagged [function-pointer]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
1 answer

External Function as Function argument

I am trying to figure out how the calldata looks, when I pass a function as a function argument. For example, function foo(function(uint) external callback) external {} I assume it is the methodId of ...
Nikoliale's user avatar
2 votes
1 answer

Modify in-place an array received as function argument

I have a function that performs some operations on an array: function foo(uint256[] myArray) public I would like this function to apply operations on myArray in-place. I tried to specify storage in ...
BiBi's user avatar
  • 141
1 vote
1 answer

Wallet transactions call functions in (ERC20) token contract to send tokens?

Firstly, thank you for helping me out in understand this. Suppose, if I have an ERC20 token contract (with all the required functions implemented including Transfer() function) deployed on the ...
Muni V K's user avatar
1 vote
1 answer

How do I pass a function pointer to a contract method from a unit test?

I'm getting this error: Error: invalid type (arg="type", value="function") when trying to call this method on the contract IntOption: function create( address target, string memory name, ...
Aaron Digulla's user avatar
1 vote
2 answers

How to store a function return in a variable?

I want to create a dynamic JSONpath in an Oraclize query. For that I wrote a function that concentrates three strings (_a = "json(http...",_b = some variable ,_c = ")].Number") to one. Calling the ...
Max.Velt's user avatar
1 vote
1 answer

How to use require() with stings

I am trying to run this code on remix IDE: pragma solidity ^0.4.24; contract Aa { string public result; function feedData(string _result) public { require(_result = "e" , "...
YulePale's user avatar
  • 1,843
1 vote
2 answers

How to type-cast a function pointer in Solidity?

I have a function that takes a parameter of type function (uint256) view returns (uint256). I want to pass it a pointer to a function of type function (uint256) pure returns (uint256). Obviously ...
Jesbus's user avatar
  • 10.5k