diff --git a/ethers-contract/tests/it/abigen.rs b/ethers-contract/tests/it/abigen.rs index 77922d1a..15658294 100644 --- a/ethers-contract/tests/it/abigen.rs +++ b/ethers-contract/tests/it/abigen.rs @@ -689,3 +689,8 @@ fn gen_complex_function() { ]"#, ); } + +#[test] +fn can_gen_large_tuple_types() { + abigen!(LargeTuple, "./tests/solidity-contracts/large_tuple.json"); +} diff --git a/ethers-contract/tests/solidity-contracts/large_tuple.json b/ethers-contract/tests/solidity-contracts/large_tuple.json new file mode 100644 index 00000000..79de5b3f --- /dev/null +++ b/ethers-contract/tests/solidity-contracts/large_tuple.json @@ -0,0 +1,88 @@ +[ + { + "inputs": [ + { + "internalType": "uint160", + "name": "input", + "type": "uint160" + } + ], + "name": "doSomething", + "outputs": [ + { + "components": [ + { + "internalType": "bytes", + "name": "output1", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "output2", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "output3", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "output4", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "output5", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "output6", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "output7", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "output8", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "output9", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "output10", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "output11", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "output12", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "output13", + "type": "bytes" + } + ], + "internalType": "struct Contract.Response", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + } +] \ No newline at end of file