Questions tagged [function-pointer]
The function-pointer tag has no usage guidance.
4
questions
0
votes
0answers
21 views
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,
...
1
vote
2answers
53 views
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 ...
1
vote
1answer
162 views
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" , "...
1
vote
2answers
190 views
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 ...