From 77bd9d49c88ca8bdced37f7554919e3c3d584310 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Sat, 23 Apr 2022 12:09:29 +0200 Subject: [PATCH] test: add ethcall derive test for vec tuples (#1144) --- ethers-contract/tests/common/derive.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ethers-contract/tests/common/derive.rs b/ethers-contract/tests/common/derive.rs index 25dd7aaf..95fe53c3 100644 --- a/ethers-contract/tests/common/derive.rs +++ b/ethers-contract/tests/common/derive.rs @@ -584,6 +584,15 @@ fn can_derive_array_tuples() { } } +#[test] +fn can_handle_abigen_tuples() { + #[derive(Clone, Debug, Default, Eq, PartialEq, EthCall, EthDisplay)] + #[ethcall(name = "swap", abi = "swap((uint8,uint8)[])")] + pub struct SwapCall { + pub pairs_to_swap: ::std::vec::Vec<(u8, u8)>, + } +} + #[test] fn eth_display_works_on_ethers_bytes() { #[derive(Clone, Debug, Default, Eq, PartialEq, EthCall, EthDisplay)]