solidity/test/libsolidity/ABIJson/pure_function.sol

56 lines
1.1 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
// [
// {
// "inputs":
// [
// {
2019-09-03 15:55:00 +00:00
// "internalType": "uint32",
2019-07-02 15:30:54 +00:00
// "name": "a",
2019-09-03 15:55:00 +00:00
// "type": "uint32"
2019-07-02 15:30:54 +00:00
// }
// ],
2019-09-03 15:55:00 +00:00
// "name": "boo",
2019-07-02 15:30:54 +00:00
// "outputs":
// [
// {
2019-07-02 14:04:52 +00:00
// "internalType": "uint256",
2019-09-03 15:55:00 +00:00
// "name": "b",
2019-07-02 15:30:54 +00:00
// "type": "uint256"
// }
// ],
2019-09-03 15:55:00 +00:00
// "stateMutability": "pure",
2019-07-02 15:30:54 +00:00
// "type": "function"
// },
// {
// "inputs":
// [
// {
2019-09-03 15:55:00 +00:00
// "internalType": "uint256",
2019-07-02 15:30:54 +00:00
// "name": "a",
2019-09-03 15:55:00 +00:00
// "type": "uint256"
// },
// {
// "internalType": "uint256",
// "name": "b",
// "type": "uint256"
2019-07-02 15:30:54 +00:00
// }
// ],
2019-09-03 15:55:00 +00:00
// "name": "foo",
2019-07-02 15:30:54 +00:00
// "outputs":
// [
// {
2019-07-02 14:04:52 +00:00
// "internalType": "uint256",
2019-09-03 15:55:00 +00:00
// "name": "d",
2019-07-02 15:30:54 +00:00
// "type": "uint256"
// }
// ],
2019-09-03 15:55:00 +00:00
// "stateMutability": "nonpayable",
2019-07-02 15:30:54 +00:00
// "type": "function"
// }
// ]