diff --git a/src/erc165/mod.rs b/src/erc165/mod.rs index db8e111..23968ed 100644 --- a/src/erc165/mod.rs +++ b/src/erc165/mod.rs @@ -137,24 +137,23 @@ mod tests { .send() .await .expect("failed to deploy NonERC165 test contract"); - let contract_address = ethers_address_to_alloy(contract.address()); - assert!(!supports_erc165_check1(&client, contract_address).await); + assert!( + !supports_erc165_check1(&client, ethers_address_to_alloy(contract.address())).await + ); let contract = InvalidERC165::deploy(wallet_signer.clone(), ()) .expect("failed to deploy InvalidERC165 test contract") .send() .await .expect("failed to deploy InvalidERC165 test contract"); - let contract_address = ethers_address_to_alloy(contract.address()); - assert!(supports_erc165_check1(&client, contract_address).await); + assert!(supports_erc165_check1(&client, ethers_address_to_alloy(contract.address())).await); let contract = ERC165Supported::deploy(wallet_signer.clone(), ()) .expect("failed to deploy ERC165Supported test contract") .send() .await .expect("failed to deploy ERC165Supported test contract"); - let contract_address = ethers_address_to_alloy(contract.address()); - assert!(supports_erc165_check1(&client, contract_address).await); + assert!(supports_erc165_check1(&client, ethers_address_to_alloy(contract.address())).await); } #[tokio::test] @@ -175,16 +174,16 @@ mod tests { .send() .await .expect("failed to deploy ERC165Supported test contract"); - let contract_address = ethers_address_to_alloy(contract.address()); - assert!(supports_erc165_check2(&client, contract_address).await); + assert!(supports_erc165_check2(&client, ethers_address_to_alloy(contract.address())).await); let contract = InvalidERC165::deploy(wallet_signer.clone(), ()) .expect("failed to deploy InvalidERC165 test contract") .send() .await .expect("failed to deploy InvalidERC165 test contract"); - let contract_address = ethers_address_to_alloy(contract.address()); - assert!(!supports_erc165_check2(&client, contract_address).await); + assert!( + !supports_erc165_check2(&client, ethers_address_to_alloy(contract.address())).await + ); } #[tokio::test] @@ -205,23 +204,20 @@ mod tests { .send() .await .expect("failed to deploy NonERC165 test contract"); - let contract_address = ethers_address_to_alloy(contract.address()); - assert!(!supports_erc165(&client, contract_address).await); + assert!(!supports_erc165(&client, ethers_address_to_alloy(contract.address())).await); let contract = InvalidERC165::deploy(wallet_signer.clone(), ()) .expect("failed to deploy InvalidERC165 test contract") .send() .await .expect("failed to deploy InvalidERC165 test contract"); - let contract_address = ethers_address_to_alloy(contract.address()); - assert!(!supports_erc165(&client, contract_address).await); + assert!(!supports_erc165(&client, ethers_address_to_alloy(contract.address())).await); let contract = ERC165Supported::deploy(wallet_signer.clone(), ()) .expect("failed to deploy ERC165Supported test contract") .send() .await .expect("failed to deploy ERC165Supported test contract"); - let contract_address = ethers_address_to_alloy(contract.address()); - assert!(supports_erc165(&client, contract_address).await); + assert!(supports_erc165(&client, ethers_address_to_alloy(contract.address())).await); } }