External Calls
contract SolidityContract {
// "9a884bde": "get21()" - function signature
function get21() external pure returns (uint256) {
return 21;
}
} function externalViewCallNoArgs(address _a)
external
view
returns (uint256)
{
assembly {
mstore(0x00, 0x9a884bde)
// 000000000000000000000000000000000000000000000000000000009a884bde
// | |
// 28 32
let success := staticcall(gas(), _a, 28, 32, 0x00, 0x20)
if iszero(success) {
revert(0, 0)
}
return(0x00, 0x20)
}
}Last updated