My contract like this, the question is why foo(uint256 n)
not working(no value return). If the contract just hava foo(uint256 n)
, it works.
contract OverloadContract {
// working
function foo(uint256 n, uint256 m) public pure returns (uint256) {
return n + m;
}
// not working ?
function foo(uint256 n) public pure returns (uint256) {
return n;
}
// working
function foo() public pure returns (uint256) {
return 1;
}
// working
function foo(uint256 i, uint256 n, uint256 m) public pure returns (uint256) {
return i + n + m;
}
}
eth_call
(JSON-RPC interface), the function is working properly. – user94559ganache
instance, I can see the right value coming back in the network tab, so this looks like a bug in the UI layer. – user94559