solidity/test/libsolidity/ABIJson/return_param_in_abi.sol

40 lines
840 B
Solidity
Raw Normal View History

2019-07-02 15:30:54 +00:00
// bug #1801
contract test {
enum ActionChoices { GoLeft, GoRight, GoStraight, Sit }
constructor(ActionChoices param) public {}
function ret() public returns (ActionChoices) {
ActionChoices action = ActionChoices.GoLeft;
return action;
}
}
// ----
// :test
// [
// {
2019-09-03 15:55:00 +00:00
// "inputs":
2019-07-02 15:30:54 +00:00
// [
// {
2019-07-02 14:04:52 +00:00
// "internalType": "enum test.ActionChoices",
2019-09-03 15:55:00 +00:00
// "name": "param",
2019-07-02 15:30:54 +00:00
// "type": "uint8"
// }
// ],
// "stateMutability": "nonpayable",
2019-09-03 15:55:00 +00:00
// "type": "constructor"
2019-07-02 15:30:54 +00:00
// },
// {
2019-09-03 15:55:00 +00:00
// "inputs": [],
// "name": "ret",
// "outputs":
2019-07-02 15:30:54 +00:00
// [
// {
2019-07-02 14:04:52 +00:00
// "internalType": "enum test.ActionChoices",
2019-09-03 15:55:00 +00:00
// "name": "",
2019-07-02 15:30:54 +00:00
// "type": "uint8"
// }
// ],
// "stateMutability": "nonpayable",
2019-09-03 15:55:00 +00:00
// "type": "function"
2019-07-02 15:30:54 +00:00
// }
// ]