-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
Imagine I have following contract:
pragma solidity ^0.8.0;
contract IncrementerExtended {
uint256 private value;
constructor(uint256 initialValue) {
value = initialValue;
}
function increment() public {
value += 1;
}
function increment(uint256 amount) public {
value += amount;
}
receive() external payable {}
function get() public view returns(uint256) {
return value;
}
}How can I work with both "increment" methods from Go abi module.
If I try to call abi.Pack("increment") without any arguments it returns an error. And it works for abi.Pack("increment", big.NewInt(5)).
From the code I see that methods are stored in a map. And only one element can have "increment" name:
Line 76 in f22317e
| method, exist := abi.Methods[name] |
Is it a bug or feature? How should we work with such functions?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels