Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix unknown root bug #6

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions test/foundry/ERC20Outbox.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@ contract ERC20OutboxTest is AbsOutboxTest {

function setUp() public {
// deploy token, bridge and outbox
nativeToken = new ERC20PresetFixedSupply("Appchain Token", "App", 1_000_000, address(this));

// hardcoded proof in tests assume that this contract is deployed at the repsective address
IERC20 nativeTokenCode = new ERC20PresetFixedSupply("Appchain Token", "App", 1_000_000, address(this));
nativeToken = IERC20(0xFEfC6BAF87cF3684058D62Da40Ff3A795946Ab06);
vm.etch(address(nativeToken), address(nativeTokenCode).code);
afkbyte marked this conversation as resolved.
Show resolved Hide resolved
deal(address(nativeToken), address(this), 1_000_000);

bridge = IBridge(TestUtil.deployProxy(address(new ERC20Bridge())));
erc20Bridge = ERC20Bridge(address(bridge));
outbox = IOutbox(TestUtil.deployProxy(address(new ERC20Outbox())));
Expand Down Expand Up @@ -51,7 +57,10 @@ contract ERC20OutboxTest is AbsOutboxTest {
);

// create msg receiver on L1
ERC20L2ToL1Target target = new ERC20L2ToL1Target();
// hardcoded proof in tests assume that this contract is deployed at the repsective address
ERC20L2ToL1Target targetCode = new ERC20L2ToL1Target();
ERC20L2ToL1Target target = ERC20L2ToL1Target(0x87B2d08110B7D50861141D7bBDd49326af3Ecb31);
vm.etch(address(target), address(targetCode).code);
target.setOutbox(address(outbox));

//// execute transaction
Expand Down
Loading