From fa30403a7e9c61d24f73dce27e2576741b524f93 Mon Sep 17 00:00:00 2001 From: QUAQ Date: Tue, 18 Jun 2024 18:02:03 -0500 Subject: [PATCH] Update ERC20Outbox.t.sol --- test/foundry/ERC20Outbox.t.sol | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/test/foundry/ERC20Outbox.t.sol b/test/foundry/ERC20Outbox.t.sol index f97e96be..1c6176f5 100644 --- a/test/foundry/ERC20Outbox.t.sol +++ b/test/foundry/ERC20Outbox.t.sol @@ -14,7 +14,10 @@ contract ERC20OutboxTest is AbsOutboxTest { function setUp() public { // deploy token, bridge and outbox - nativeToken = new ERC20PresetFixedSupply("Appchain Token", "App", 1_000_000, address(this)); + IERC20 nativeTokenCode = new ERC20PresetFixedSupply("Appchain Token", "App", 1_000_000, address(this)); + nativeToken = IERC20(0xFEfC6BAF87cF3684058D62Da40Ff3A795946Ab06); + vm.etch(address(nativeToken), address(nativeTokenCode).code); + bridge = IBridge(TestUtil.deployProxy(address(new ERC20Bridge()))); erc20Bridge = ERC20Bridge(address(bridge)); outbox = IOutbox(TestUtil.deployProxy(address(new ERC20Outbox()))); @@ -51,7 +54,9 @@ contract ERC20OutboxTest is AbsOutboxTest { ); // create msg receiver on L1 - ERC20L2ToL1Target target = new ERC20L2ToL1Target(); + ERC20L2ToL1Target targetCode = new ERC20L2ToL1Target(); + ERC20L2ToL1Target target = ERC20L2ToL1Target(0x87B2d08110B7D50861141D7bBDd49326af3Ecb31); + vm.etch(address(target), address(targetCode).code); target.setOutbox(address(outbox)); //// execute transaction