solidity/test/libsolidity/ABIJson/return_param_in_abi.sol
2019-09-04 13:06:09 +02:00

43 lines
916 B
Solidity

// 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
// [
// {
// "inputs":
// [
// {
// "internalType": "enum test.ActionChoices",
// "name": "param",
// "type": "uint8"
// }
// ],
// "payable": false,
// "stateMutability": "nonpayable",
// "type": "constructor"
// },
// {
// "constant": false,
// "inputs": [],
// "name": "ret",
// "outputs":
// [
// {
// "internalType": "enum test.ActionChoices",
// "name": "",
// "type": "uint8"
// }
// ],
// "payable": false,
// "stateMutability": "nonpayable",
// "type": "function"
// }
// ]