From 0a6034a9131b6c92cafc1ab12d324314714cca20 Mon Sep 17 00:00:00 2001 From: Craig M Date: Thu, 26 Oct 2023 16:27:23 +1300 Subject: [PATCH] formatting --- src/root/RootERC20Bridge.sol | 7 +++---- test/integration/root/RootERC20Bridge.t.sol | 4 +--- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/root/RootERC20Bridge.sol b/src/root/RootERC20Bridge.sol index 42bf9564..ad6a3e3d 100644 --- a/src/root/RootERC20Bridge.sol +++ b/src/root/RootERC20Bridge.sol @@ -229,7 +229,7 @@ contract RootERC20Bridge is // ETH, WETH and IMX do not need to be mapped since it should have been mapped on initialization // ETH also cannot be transferred since it was received in the payable function call // WETH is also not transferred here since it was earlier unwrapped to ETH - + // TODO We can call _mapToken here, but ordering in the GMP is not guaranteed. // Therefore, we need to decide how to handle this and it may be a UI decision to wait until map token message is executed on child chain. // Discuss this, and add this decision to the design doc. @@ -250,11 +250,11 @@ contract RootERC20Bridge is } } rootToken.safeTransferFrom(msg.sender, address(this), amount); - } + } // Deposit sig, root token address, depositor, receiver, amount bytes memory payload = abi.encode(DEPOSIT_SIG, payloadToken, msg.sender, receiver, amount); - + // TODO investigate using delegatecall to keep the axelar message sender as the bridge contract, since adaptor can change. rootBridgeAdaptor.sendMessage{value: feeAmount}(payload, msg.sender); @@ -268,5 +268,4 @@ contract RootERC20Bridge is emit ERC20Deposit(address(rootToken), childToken, msg.sender, receiver, amount); } } - } diff --git a/test/integration/root/RootERC20Bridge.t.sol b/test/integration/root/RootERC20Bridge.t.sol index c12b3c74..691791ab 100644 --- a/test/integration/root/RootERC20Bridge.t.sol +++ b/test/integration/root/RootERC20Bridge.t.sol @@ -227,9 +227,7 @@ contract RootERC20BridgeIntegrationTest is Test, IRootERC20BridgeEvents, IRootAx vm.expectEmit(address(axelarAdaptor)); emit MapTokenAxelarMessage(CHILD_CHAIN_NAME, childBridgeAdaptorString, predictedPayload); vm.expectEmit(address(rootBridge)); - emit WETHDeposit( - address(WRAPPED_ETH), address(this), address(this), tokenAmount - ); + emit WETHDeposit(address(WRAPPED_ETH), address(this), address(this), tokenAmount); vm.expectCall( address(axelarAdaptor), depositFee,