solidity/test/libsolidity/ABIJson/structs_in_libraries.sol

52 lines
1.2 KiB
Solidity
Raw Normal View History

2020-11-23 18:06:44 +00:00
pragma abicoder v2;
2019-07-02 15:30:54 +00:00
library L {
struct S { uint a; T[] sub; bytes b; }
struct T { uint[2] x; }
function f(L.S storage s) public view {}
function g(L.S memory s) public view {}
}
// ----
// :L
// [
// {
// "inputs":
// [
// {
// "components":
// [
// {
2019-07-02 14:04:52 +00:00
// "internalType": "uint256",
2019-07-02 15:30:54 +00:00
// "name": "a",
// "type": "uint256"
// },
// {
// "components":
// [
// {
2019-07-02 14:04:52 +00:00
// "internalType": "uint256[2]",
2019-07-02 15:30:54 +00:00
// "name": "x",
// "type": "uint256[2]"
// }
// ],
2019-07-02 14:04:52 +00:00
// "internalType": "struct L.T[]",
2019-07-02 15:30:54 +00:00
// "name": "sub",
// "type": "tuple[]"
// },
// {
2019-07-02 14:04:52 +00:00
// "internalType": "bytes",
2019-07-02 15:30:54 +00:00
// "name": "b",
// "type": "bytes"
// }
// ],
2019-07-02 14:04:52 +00:00
// "internalType": "struct L.S",
2019-07-02 15:30:54 +00:00
// "name": "s",
// "type": "tuple"
// }
// ],
// "name": "g",
// "outputs": [],
// "stateMutability": "view",
// "type": "function"
// }
// ]