solidity/test/libsolidity/ABIJson/return_structs_with_contracts.sol

45 lines
933 B
Solidity
Raw Normal View History

2019-07-02 15:30:54 +00:00
pragma experimental ABIEncoderV2;
contract C {
struct S { C[] x; C y; }
function f() public returns (S memory s, C c) {
}
}
// ----
// :C
// [
// {
// "constant": false,
// "inputs": [],
// "name": "f",
// "outputs":
// [
// {
// "components":
// [
// {
2019-07-02 14:04:52 +00:00
// "internalType": "contract C[]",
2019-07-02 15:30:54 +00:00
// "name": "x",
// "type": "address[]"
// },
// {
2019-07-02 14:04:52 +00:00
// "internalType": "contract C",
2019-07-02 15:30:54 +00:00
// "name": "y",
// "type": "address"
// }
// ],
2019-07-02 14:04:52 +00:00
// "internalType": "struct C.S",
2019-07-02 15:30:54 +00:00
// "name": "s",
// "type": "tuple"
// },
// {
2019-07-02 14:04:52 +00:00
// "internalType": "contract C",
2019-07-02 15:30:54 +00:00
// "name": "c",
// "type": "address"
// }
// ],
// "payable": false,
// "stateMutability": "nonpayable",
// "type": "function"
// }
// ]