diff --git a/contracts/src/tests/routing/test_domain_routing_ism.cairo b/contracts/src/tests/routing/test_domain_routing_ism.cairo index a0d4418..c38073e 100644 --- a/contracts/src/tests/routing/test_domain_routing_ism.cairo +++ b/contracts/src/tests/routing/test_domain_routing_ism.cairo @@ -268,7 +268,7 @@ fn test_route_ism_fails_if_origin_not_found() { ]; let (_, ism, domain_routing_ism) = setup_domain_routing_ism(); let ownable = IOwnableDispatcher { contract_address: domain_routing_ism.contract_address }; - start_prank(CheatTarget::One(ownable.contract_address), OWNER()); + start_prank(CheatTarget::One(ownable.contract_address), OWNER().try_into().unwrap()); domain_routing_ism.initialize(_domains.span(), _modules.span()); ism.route(message); } diff --git a/contracts/src/tests/test_mailbox.cairo b/contracts/src/tests/test_mailbox.cairo index d265650..7d24a18 100644 --- a/contracts/src/tests/test_mailbox.cairo +++ b/contracts/src/tests/test_mailbox.cairo @@ -18,6 +18,7 @@ use openzeppelin::token::erc20::interface::{ERC20ABI, ERC20ABIDispatcher, ERC20A use snforge_std::cheatcodes::events::EventAssertions; use snforge_std::{start_prank, CheatTarget, stop_prank}; + #[test] fn test_local_domain() { let (mailbox, _, _, _) = setup_mailbox(MAILBOX(), Option::None, Option::None); @@ -232,7 +233,7 @@ fn test_dispatch_with_protocol_fee_hook() { ); // balance check - assert_eq!(erc20_dispatcher.balanceOf(OWNER()), INITIAL_SUPPLY - PROTOCOL_FEE); + assert_eq!(erc20_dispatcher.balanceOf(OWNER().try_into().unwrap()), INITIAL_SUPPLY - PROTOCOL_FEE); assert(mailbox.get_latest_dispatched_id() == message_id, 'Failed to fetch latest id'); } @@ -300,7 +301,7 @@ fn test_dispatch_with_two_fee_hook() { ); // balance check - assert_eq!(erc20_dispatcher.balanceOf(OWNER()), INITIAL_SUPPLY - 4 * PROTOCOL_FEE); + assert_eq!(erc20_dispatcher.balanceOf(OWNER().try_into().unwrap()), INITIAL_SUPPLY - 4 * PROTOCOL_FEE); assert(mailbox.get_latest_dispatched_id() == message_id, 'Failed to fetch latest id'); } @@ -319,7 +320,7 @@ fn test_dispatch_with_protocol_fee_hook_fails_if_provided_fee_lower_than_require start_prank(CheatTarget::One(ownable.contract_address), OWNER().try_into().unwrap()); // We transfer some token to the new owner let erc20_dispatcher = ERC20ABIDispatcher { contract_address: ETH_ADDRESS() }; - erc20_dispatcher.transfer(NEW_OWNER(), PROTOCOL_FEE - 10); + erc20_dispatcher.transfer(NEW_OWNER().try_into().unwrap(), PROTOCOL_FEE - 10); // The new owner has has PROTOCOL_FEE -10 tokens so the required hook post dispatch fails let ownable = IOwnableDispatcher { contract_address: ETH_ADDRESS() }; @@ -359,7 +360,7 @@ fn test_dispatch_with_protocol_fee_hook_fails_if_user_balance_lower_than_fee_amo start_prank(CheatTarget::One(ownable.contract_address), OWNER().try_into().unwrap()); // We transfer some token to the new owner let erc20_dispatcher = ERC20ABIDispatcher { contract_address: ETH_ADDRESS() }; - erc20_dispatcher.transfer(NEW_OWNER(), PROTOCOL_FEE - 10); + erc20_dispatcher.transfer(NEW_OWNER().try_into().unwrap(), PROTOCOL_FEE - 10); // The new owner has has PROTOCOL_FEE -10 tokens so the required hook post dispatch fails let ownable = IOwnableDispatcher { contract_address: ETH_ADDRESS() }; @@ -401,7 +402,7 @@ fn test_dispatch_with_protocol_fee_hook_fails_if_insufficient_allowance() { start_prank(CheatTarget::One(ownable.contract_address), OWNER().try_into().unwrap()); // We transfer some token to the new owner let erc20_dispatcher = ERC20ABIDispatcher { contract_address: ETH_ADDRESS() }; - erc20_dispatcher.transfer(NEW_OWNER(), PROTOCOL_FEE); + erc20_dispatcher.transfer(NEW_OWNER().try_into().unwrap(), PROTOCOL_FEE); // The new owner has has PROTOCOL_FEE -10 tokens so the required hook post dispatch fails let ownable = IOwnableDispatcher { contract_address: ETH_ADDRESS() }; diff --git a/contracts/src/tests/test_validator_announce.cairo b/contracts/src/tests/test_validator_announce.cairo index 40f1c5f..0384689 100644 --- a/contracts/src/tests/test_validator_announce.cairo +++ b/contracts/src/tests/test_validator_announce.cairo @@ -71,6 +71,7 @@ fn test_double_announce() { ]; let res = validator_announce .announce(validator_address, _storage_location_2.clone(), signature); + assert_eq!(res, true); let validators = validator_announce.get_announced_validators(); assert(validators == array![validator_address].span(), 'validator array mismatch'); let storage_location = validator_announce.get_announced_storage_locations(validators);