From 7921f5ef9363658984c8a99e3f50e0a3c23fd51b Mon Sep 17 00:00:00 2001 From: Oleksii Matiiasevych Date: Tue, 10 Sep 2024 04:58:02 +0700 Subject: [PATCH] Fix tests for finding 7 --- test/handlers/erc20/deposit.js | 12 ++++++------ test/handlers/xc20/deposit.js | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/test/handlers/erc20/deposit.js b/test/handlers/erc20/deposit.js index c981f1f9..d89ac045 100644 --- a/test/handlers/erc20/deposit.js +++ b/test/handlers/erc20/deposit.js @@ -152,10 +152,10 @@ contract("ERC20Handler - [Deposit ERC20]", async (accounts) => { it(`When non-contract addresses are whitelisted in the handler, deposits which the addresses are set as a token address will be failed`, async () => { - const ZERO_Address = "0x0000000000000000000000000000000000000000"; + const NonContract_Address = "0x0000000000000000000000000000000000001111"; const EOA_Address = accounts[1]; - const resourceID_ZERO_Address = Helpers.createResourceID( - ZERO_Address, + const resourceID_NonContract_Address = Helpers.createResourceID( + NonContract_Address, originDomainID ); const resourceID_EOA_Address = Helpers.createResourceID( @@ -164,8 +164,8 @@ contract("ERC20Handler - [Deposit ERC20]", async (accounts) => { ); await BridgeInstance.adminSetResource( ERC20HandlerInstance.address, - resourceID_ZERO_Address, - ZERO_Address, + resourceID_NonContract_Address, + NonContract_Address, emptySetResourceData ); await BridgeInstance.adminSetResource( @@ -181,7 +181,7 @@ contract("ERC20Handler - [Deposit ERC20]", async (accounts) => { await Helpers.reverts( BridgeInstance.deposit( destinationDomainID, - resourceID_ZERO_Address, + resourceID_NonContract_Address, Helpers.createERCDepositData( tokenAmount, lenRecipientAddress, diff --git a/test/handlers/xc20/deposit.js b/test/handlers/xc20/deposit.js index c7084ec2..cac61c88 100644 --- a/test/handlers/xc20/deposit.js +++ b/test/handlers/xc20/deposit.js @@ -149,10 +149,10 @@ contract("XC20Handler - [Deposit ERC20]", async (accounts) => { it(`When non-contract addresses are whitelisted in the handler, deposits which the addresses are set as a token address will be failed`, async () => { - const ZERO_Address = "0x0000000000000000000000000000000000000000"; + const NonContract_Address = "0x0000000000000000000000000000000000001111"; const EOA_Address = accounts[1]; - const resourceID_ZERO_Address = Helpers.createResourceID( - ZERO_Address, + const resourceID_NonContract_Address = Helpers.createResourceID( + NonContract_Address, originDomainID ); const resourceID_EOA_Address = Helpers.createResourceID( @@ -161,8 +161,8 @@ contract("XC20Handler - [Deposit ERC20]", async (accounts) => { ); await BridgeInstance.adminSetResource( XC20HandlerInstance.address, - resourceID_ZERO_Address, - ZERO_Address, + resourceID_NonContract_Address, + NonContract_Address, emptySetResourceData ); await BridgeInstance.adminSetResource( @@ -178,7 +178,7 @@ contract("XC20Handler - [Deposit ERC20]", async (accounts) => { await Helpers.reverts( BridgeInstance.deposit( destinationDomainID, - resourceID_ZERO_Address, + resourceID_NonContract_Address, Helpers.createERCDepositData( tokenAmount, lenRecipientAddress,