solidity/test/libsolidity/ABIJson/pure_function.sol

60 lines
1.2 KiB
Solidity
Raw Normal View History

2019-07-02 15:30:54 +00:00
contract test {
function foo(uint a, uint b) public returns (uint d) { return a + b; }
function boo(uint32 a) public pure returns (uint b) { return a * 4; }
}
// ----
// :test
// [
// {
// "constant": false,
// "inputs":
// [
// {
2019-07-02 14:04:52 +00:00
// "internalType": "uint256",
2019-07-02 15:30:54 +00:00
// "name": "a",
// "type": "uint256"
// },
// {
2019-07-02 14:04:52 +00:00
// "internalType": "uint256",
2019-07-02 15:30:54 +00:00
// "name": "b",
// "type": "uint256"
// }
// ],
// "name": "foo",
// "outputs":
// [
// {
2019-07-02 14:04:52 +00:00
// "internalType": "uint256",
2019-07-02 15:30:54 +00:00
// "name": "d",
// "type": "uint256"
// }
// ],
// "payable": false,
// "stateMutability": "nonpayable",
// "type": "function"
// },
// {
// "constant": true,
// "inputs":
// [
// {
2019-07-02 14:04:52 +00:00
// "internalType": "uint32",
2019-07-02 15:30:54 +00:00
// "name": "a",
// "type": "uint32"
// }
// ],
// "name": "boo",
// "outputs":
// [
// {
2019-07-02 14:04:52 +00:00
// "internalType": "uint256",
2019-07-02 15:30:54 +00:00
// "name": "b",
// "type": "uint256"
// }
// ],
// "payable": false,
// "stateMutability": "pure",
// "type": "function"
// }
// ]