From 1335e14cda40bd56094ad7af486ee7a1fa6be693 Mon Sep 17 00:00:00 2001 From: Craig M Date: Wed, 25 Oct 2023 19:05:33 +1300 Subject: [PATCH] formatting --- test/integration/root/RootERC20Bridge.t.sol | 7 +++++-- test/unit/root/RootERC20Bridge.t.sol | 14 ++++++++++---- test/utils.t.sol | 2 +- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/test/integration/root/RootERC20Bridge.t.sol b/test/integration/root/RootERC20Bridge.t.sol index 52eaaae5..cabd4285 100644 --- a/test/integration/root/RootERC20Bridge.t.sol +++ b/test/integration/root/RootERC20Bridge.t.sol @@ -32,7 +32,6 @@ contract RootERC20BridgeIntegrationTest is Test, IRootERC20BridgeEvents, IRootAx MockAxelarGasService public axelarGasService; function setUp() public { - deployCodeTo("WETH.sol", abi.encode("Wrapped ETH", "WETH"), WRAPPED_ETH); (imxToken, token, rootBridge, axelarAdaptor, mockAxelarGateway, axelarGasService) = @@ -267,7 +266,11 @@ contract RootERC20BridgeIntegrationTest is Test, IRootERC20BridgeEvents, IRootAx rootBridge.deposit{value: depositFee}(IERC20Metadata(WRAPPED_ETH), tokenAmount); // Check that tokens are transferred - assertEq(thisPreBal - tokenAmount, IERC20Metadata(WRAPPED_ETH).balanceOf(address(this)), "Tokens not transferred from user"); + assertEq( + thisPreBal - tokenAmount, + IERC20Metadata(WRAPPED_ETH).balanceOf(address(this)), + "Tokens not transferred from user" + ); assertEq(bridgePreBal + tokenAmount, address(rootBridge).balance, "ETH not transferred to Bridge"); // Check that native asset transferred to gas service assertEq(thisNativePreBal - depositFee, address(this).balance, "ETH for fee not paid from user"); diff --git a/test/unit/root/RootERC20Bridge.t.sol b/test/unit/root/RootERC20Bridge.t.sol index 4549fab2..544aebc6 100644 --- a/test/unit/root/RootERC20Bridge.t.sol +++ b/test/unit/root/RootERC20Bridge.t.sol @@ -363,9 +363,12 @@ contract RootERC20BridgeUnitTest is Test, IRootERC20BridgeEvents, IRootERC20Brid rootBridge.deposit{value: depositFee}(IERC20Metadata(WRAPPED_ETH), amount); // Check that tokens are transferred - assertEq(thisPreBal - amount, IERC20Metadata(WRAPPED_ETH).balanceOf(address(this)), "Tokens not transferred from user"); + assertEq( + thisPreBal - amount, + IERC20Metadata(WRAPPED_ETH).balanceOf(address(this)), + "Tokens not transferred from user" + ); assertEq(bridgePreBal + amount, address(rootBridge).balance, "ETH not transferred to Bridge"); - } function test_depositToWETHTransfersTokens() public { @@ -380,9 +383,12 @@ contract RootERC20BridgeUnitTest is Test, IRootERC20BridgeEvents, IRootERC20Brid rootBridge.depositTo{value: depositFee}(IERC20Metadata(WRAPPED_ETH), receiver, amount); // Check that tokens are transferred - assertEq(thisPreBal - amount, IERC20Metadata(WRAPPED_ETH).balanceOf(address(this)), "Tokens not transferred from user"); + assertEq( + thisPreBal - amount, + IERC20Metadata(WRAPPED_ETH).balanceOf(address(this)), + "Tokens not transferred from user" + ); assertEq(bridgePreBal + amount, address(rootBridge).balance, "ETH not transferred to Bridge"); - } /** diff --git a/test/utils.t.sol b/test/utils.t.sol index 2585d450..4da49b74 100644 --- a/test/utils.t.sol +++ b/test/utils.t.sol @@ -92,7 +92,7 @@ contract Utils is Test { bool saveTokenMapping ) public returns (address childToken, bytes memory predictedPayload) { predictedPayload = abi.encode(rootBridge.DEPOSIT_SIG(), token, address(this), to, tokenAmount); - + if (saveTokenMapping) { childToken = rootBridge.mapToken{value: mapTokenFee}(ERC20PresetMinterPauser(token)); }