solidity/test/libsolidity/ABIJson/view_function.sol
2022-11-04 00:25:39 +01:00

52 lines
1.1 KiB
Solidity

contract test {
function foo(uint a, uint b) public returns (uint d) { return a + b; }
function boo(uint32 a) public view returns(uint b) { return a * 4; }
}
// ----
// :test
// [
// {
// "inputs": [
// {
// "internalType": "uint32",
// "name": "a",
// "type": "uint32"
// }
// ],
// "name": "boo",
// "outputs": [
// {
// "internalType": "uint256",
// "name": "b",
// "type": "uint256"
// }
// ],
// "stateMutability": "view",
// "type": "function"
// },
// {
// "inputs": [
// {
// "internalType": "uint256",
// "name": "a",
// "type": "uint256"
// },
// {
// "internalType": "uint256",
// "name": "b",
// "type": "uint256"
// }
// ],
// "name": "foo",
// "outputs": [
// {
// "internalType": "uint256",
// "name": "d",
// "type": "uint256"
// }
// ],
// "stateMutability": "nonpayable",
// "type": "function"
// }
// ]