Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Commit

Permalink
chore: remove ethers-signers from ethers-contract dev-dependencies (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes authored Sep 8, 2023
1 parent e41514b commit a28c5ae
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 17 deletions.
1 change: 0 additions & 1 deletion ethers-contract/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ ethers-contract-derive = { workspace = true, optional = true }

[dev-dependencies]
ethers-providers = { workspace = true, features = ["ws"] }
ethers-signers.workspace = true

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
Expand Down
26 changes: 10 additions & 16 deletions ethers-contract/tests/it/abigen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@
use ethers_contract::{abigen, EthEvent};
use ethers_core::{
abi::{AbiDecode, AbiEncode, Tokenizable},
rand::thread_rng,
types::{Bytes, U256},
types::{Address, Bytes, U256},
};
use ethers_signers::{LocalWallet, Signer};
use std::{fmt::Debug, hash::Hash, str::FromStr};

#[cfg(feature = "providers")]
use ethers_contract::{ContractError, EthCall, EthError};
#[cfg(feature = "providers")]
use ethers_core::{abi::Address, utils::Anvil};
use ethers_core::utils::Anvil;
#[cfg(feature = "providers")]
use ethers_providers::{MockProvider, Provider};
#[cfg(feature = "providers")]
Expand Down Expand Up @@ -826,8 +824,6 @@ fn can_generate_hardhat_console() {

#[test]
fn abigen_overloaded_methods() {
let alice = LocalWallet::new(&mut thread_rng());

abigen!(
OverloadedFuncs,
r"[
Expand All @@ -843,17 +839,15 @@ fn abigen_overloaded_methods() {
myfunc(address[2],address,address[]) as myfunc4;
},
);
let f1 = Myfunc1Call(alice.address(), U256::from(10));
let _ = Myfunc2Call(alice.address(), alice.address());
let _ = Myfunc3Call(alice.address(), vec![alice.address()]);
let f4 = Myfunc4Call(
[alice.address(), alice.address()],
alice.address(),
vec![alice.address(), alice.address(), alice.address(), alice.address()],
);

let address = Address::random();
let f1 = Myfunc1Call(address, U256::from(10));
let _ = Myfunc2Call(address, address);
let _ = Myfunc3Call(address, vec![address]);
let f4 = Myfunc4Call([address, address], address, vec![address, address, address, address]);
assert_eq!(f1.1, U256::from(10));
assert_eq!(f4.0, [alice.address(), alice.address()]);
assert_eq!(f4.1, alice.address());
assert_eq!(f4.0, [address, address]);
assert_eq!(f4.1, address);
}

#[test]
Expand Down

0 comments on commit a28c5ae

Please sign in to comment.