Skip to content

Commit

Permalink
test: add ethcall derive test for vec tuples (gakonst#1144)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse authored Apr 23, 2022
1 parent 8dd7272 commit 77bd9d4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ethers-contract/tests/common/derive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down

0 comments on commit 77bd9d4

Please sign in to comment.