You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pragma solidity^0.8.0;
contractIncrementerExtended {
uint256private value;
constructor(uint256initialValue) {
value = initialValue;
}
function increment() public {
value +=1;
}
function increment(uint256amount) public {
value += amount;
}
receive() externalpayable {}
function get() publicviewreturns(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:
Imagine I have following contract:
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 forabi.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:
erigon/accounts/abi/abi.go
Line 76 in f22317e
Is it a bug or feature? How should we work with such functions?
The text was updated successfully, but these errors were encountered: