Skip to content

Commit

Permalink
Update mod.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
rouzwelt committed May 24, 2024
1 parent 153f94e commit 6de49c7
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions src/erc165/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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]
Expand All @@ -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);
}
}

0 comments on commit 6de49c7

Please sign in to comment.