From a00918b3b8ce915bfe1558e94c15888bf5da8d82 Mon Sep 17 00:00:00 2001 From: skosito Date: Mon, 14 Oct 2024 13:35:18 +0200 Subject: [PATCH] fmt --- v2/contracts/Revert.sol | 2 +- v2/contracts/evm/ERC20Custody.sol | 2 +- v2/contracts/evm/GatewayEVM.sol | 2 +- v2/contracts/evm/ZetaConnectorBase.sol | 4 ++-- v2/contracts/evm/ZetaConnectorNative.sol | 2 +- v2/contracts/evm/ZetaConnectorNonNative.sol | 2 +- v2/contracts/zevm/GatewayZEVM.sol | 2 +- v2/test/ERC20Custody.t.sol | 6 +++--- v2/test/GatewayZEVM.t.sol | 3 ++- v2/test/ZetaConnectorNative.t.sol | 2 +- v2/test/utils/upgrades/ERC20CustodyUpgradeTest.sol | 2 +- v2/test/utils/upgrades/GatewayEVMUpgradeTest.sol | 2 +- v2/test/utils/upgrades/ZetaConnectorNativeUpgradeTest.sol | 2 +- .../utils/upgrades/ZetaConnectorNonNativeUpgradeTest.sol | 2 +- 14 files changed, 18 insertions(+), 17 deletions(-) diff --git a/v2/contracts/Revert.sol b/v2/contracts/Revert.sol index 8f751722..2ad3bb99 100644 --- a/v2/contracts/Revert.sol +++ b/v2/contracts/Revert.sol @@ -36,4 +36,4 @@ interface Revertable { interface INotSupportedMethods { error CallOnRevertNotSupported(); error ZETANotSupported(); -} \ No newline at end of file +} diff --git a/v2/contracts/evm/ERC20Custody.sol b/v2/contracts/evm/ERC20Custody.sol index 62462095..d575d87a 100644 --- a/v2/contracts/evm/ERC20Custody.sol +++ b/v2/contracts/evm/ERC20Custody.sol @@ -218,4 +218,4 @@ contract ERC20Custody is // actual received amount. emit Deposited(recipient, asset, asset.balanceOf(address(this)) - oldBalance, message); } -} \ No newline at end of file +} diff --git a/v2/contracts/evm/GatewayEVM.sol b/v2/contracts/evm/GatewayEVM.sol index ad299275..2749d868 100644 --- a/v2/contracts/evm/GatewayEVM.sol +++ b/v2/contracts/evm/GatewayEVM.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.26; -import { RevertContext, RevertOptions, Revertable, INotSupportedMethods } from "../../contracts/Revert.sol"; +import { INotSupportedMethods, RevertContext, RevertOptions, Revertable } from "../../contracts/Revert.sol"; import { ZetaConnectorBase } from "./ZetaConnectorBase.sol"; import { IERC20Custody } from "./interfaces/IERC20Custody.sol"; import { IGatewayEVM } from "./interfaces/IGatewayEVM.sol"; diff --git a/v2/contracts/evm/ZetaConnectorBase.sol b/v2/contracts/evm/ZetaConnectorBase.sol index ab08cf6c..02fbd93f 100644 --- a/v2/contracts/evm/ZetaConnectorBase.sol +++ b/v2/contracts/evm/ZetaConnectorBase.sol @@ -91,7 +91,7 @@ abstract contract ZetaConnectorBase is _grantRole(TSS_ROLE, newTSSAddress); emit UpdatedZetaConnectorTSSAddress(tssAddress, newTSSAddress); - + tssAddress = newTSSAddress; } @@ -144,4 +144,4 @@ abstract contract ZetaConnectorBase is /// @notice Handle received tokens. /// @param amount The amount of tokens received. function receiveTokens(uint256 amount) external virtual; -} \ No newline at end of file +} diff --git a/v2/contracts/evm/ZetaConnectorNative.sol b/v2/contracts/evm/ZetaConnectorNative.sol index 957c3bb2..b5f35c6e 100644 --- a/v2/contracts/evm/ZetaConnectorNative.sol +++ b/v2/contracts/evm/ZetaConnectorNative.sol @@ -105,4 +105,4 @@ contract ZetaConnectorNative is ZetaConnectorBase { function receiveTokens(uint256 amount) external override whenNotPaused { IERC20(zetaToken).safeTransferFrom(msg.sender, address(this), amount); } -} \ No newline at end of file +} diff --git a/v2/contracts/evm/ZetaConnectorNonNative.sol b/v2/contracts/evm/ZetaConnectorNonNative.sol index 0feab73a..3b05f2cd 100644 --- a/v2/contracts/evm/ZetaConnectorNonNative.sol +++ b/v2/contracts/evm/ZetaConnectorNonNative.sol @@ -127,4 +127,4 @@ contract ZetaConnectorNonNative is ZetaConnectorBase { if (amount + IERC20(zetaToken).totalSupply() > maxSupply) revert ExceedsMaxSupply(); IZetaNonEthNew(zetaToken).mint(address(to), amount, internalSendHash); } -} \ No newline at end of file +} diff --git a/v2/contracts/zevm/GatewayZEVM.sol b/v2/contracts/zevm/GatewayZEVM.sol index 0f6a71e6..9115e3e0 100644 --- a/v2/contracts/zevm/GatewayZEVM.sol +++ b/v2/contracts/zevm/GatewayZEVM.sol @@ -3,7 +3,7 @@ pragma solidity 0.8.26; import { IGatewayZEVM } from "./interfaces/IGatewayZEVM.sol"; -import { RevertContext, RevertOptions, INotSupportedMethods } from "../../contracts/Revert.sol"; +import { INotSupportedMethods, RevertContext, RevertOptions } from "../../contracts/Revert.sol"; import "./interfaces/IWZETA.sol"; import { IZRC20 } from "./interfaces/IZRC20.sol"; import { UniversalContract, zContext } from "./interfaces/UniversalContract.sol"; diff --git a/v2/test/ERC20Custody.t.sol b/v2/test/ERC20Custody.t.sol index 1c44fdfb..f351fdb5 100644 --- a/v2/test/ERC20Custody.t.sol +++ b/v2/test/ERC20Custody.t.sol @@ -8,11 +8,11 @@ import "./utils/ReceiverEVM.sol"; import "./utils/TestERC20.sol"; +import "./utils/upgrades/ERC20CustodyUpgradeTest.sol"; import { ERC1967Proxy } from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import { Upgrades } from "openzeppelin-foundry-upgrades/Upgrades.sol"; -import "./utils/upgrades/ERC20CustodyUpgradeTest.sol"; import "../contracts/evm/ERC20Custody.sol"; import "../contracts/evm/GatewayEVM.sol"; @@ -55,7 +55,7 @@ contract ERC20CustodyTest is Test, IGatewayEVMErrors, IGatewayEVMEvents, IReceiv destination = address(0x1234); tssAddress = address(0x5678); foo = address(0x9876); - + token = new TestERC20("test", "TTK"); zeta = new TestERC20("zeta", "ZETA"); @@ -63,7 +63,7 @@ contract ERC20CustodyTest is Test, IGatewayEVMErrors, IGatewayEVMEvents, IReceiv "GatewayEVM.sol", abi.encodeCall(GatewayEVM.initialize, (tssAddress, address(zeta), owner)) ); gateway = GatewayEVM(proxy); - proxy = Upgrades.deployUUPSProxy( + proxy = Upgrades.deployUUPSProxy( "ERC20Custody.sol", abi.encodeCall(ERC20Custody.initialize, (address(gateway), tssAddress, owner)) ); custody = ERC20Custody(proxy); diff --git a/v2/test/GatewayZEVM.t.sol b/v2/test/GatewayZEVM.t.sol index 2d39c807..b9512ded 100644 --- a/v2/test/GatewayZEVM.t.sol +++ b/v2/test/GatewayZEVM.t.sol @@ -263,7 +263,8 @@ contract GatewayZEVMInboundTest is Test, IGatewayZEVMEvents, IGatewayZEVMErrors // uint256 chainId = 1; // vm.expectEmit(true, true, true, true, address(gateway)); - // emit Withdrawn(owner, chainId, abi.encodePacked(addr1), address(zetaToken), amount, 0, 0, "", 0, revertOptions); + // emit Withdrawn(owner, chainId, abi.encodePacked(addr1), address(zetaToken), amount, 0, 0, "", 0, + // revertOptions); // gateway.withdraw(abi.encodePacked(addr1), amount, chainId, revertOptions); // uint256 ownerBalanceAfter = zetaToken.balanceOf(owner); diff --git a/v2/test/ZetaConnectorNative.t.sol b/v2/test/ZetaConnectorNative.t.sol index dbf1f713..8e1cff4f 100644 --- a/v2/test/ZetaConnectorNative.t.sol +++ b/v2/test/ZetaConnectorNative.t.sol @@ -64,7 +64,7 @@ contract ZetaConnectorNativeTest is "GatewayEVM.sol", abi.encodeCall(GatewayEVM.initialize, (tssAddress, address(zetaToken), owner)) ); gateway = GatewayEVM(proxy); - proxy = Upgrades.deployUUPSProxy( + proxy = Upgrades.deployUUPSProxy( "ERC20Custody.sol", abi.encodeCall(ERC20Custody.initialize, (address(gateway), tssAddress, owner)) ); custody = ERC20Custody(proxy); diff --git a/v2/test/utils/upgrades/ERC20CustodyUpgradeTest.sol b/v2/test/utils/upgrades/ERC20CustodyUpgradeTest.sol index 00fcf9cc..c60b9c1a 100644 --- a/v2/test/utils/upgrades/ERC20CustodyUpgradeTest.sol +++ b/v2/test/utils/upgrades/ERC20CustodyUpgradeTest.sol @@ -221,4 +221,4 @@ contract ERC20CustodyUpgradeTest is // actual received amount. emit Deposited(recipient, asset, asset.balanceOf(address(this)) - oldBalance, message); } -} \ No newline at end of file +} diff --git a/v2/test/utils/upgrades/GatewayEVMUpgradeTest.sol b/v2/test/utils/upgrades/GatewayEVMUpgradeTest.sol index f181e3d6..4cf3c980 100644 --- a/v2/test/utils/upgrades/GatewayEVMUpgradeTest.sol +++ b/v2/test/utils/upgrades/GatewayEVMUpgradeTest.sol @@ -99,7 +99,7 @@ contract GatewayEVMUpgradeTest is _grantRole(TSS_ROLE, newTSSAddress); emit UpdatedGatewayTSSAddress(tssAddress, newTSSAddress); - + tssAddress = newTSSAddress; } diff --git a/v2/test/utils/upgrades/ZetaConnectorNativeUpgradeTest.sol b/v2/test/utils/upgrades/ZetaConnectorNativeUpgradeTest.sol index f99aa973..f4a56b2e 100644 --- a/v2/test/utils/upgrades/ZetaConnectorNativeUpgradeTest.sol +++ b/v2/test/utils/upgrades/ZetaConnectorNativeUpgradeTest.sol @@ -109,4 +109,4 @@ contract ZetaConnectorNativeUpgradeTest is ZetaConnectorBase { function receiveTokens(uint256 amount) external override whenNotPaused { IERC20(zetaToken).safeTransferFrom(msg.sender, address(this), amount); } -} \ No newline at end of file +} diff --git a/v2/test/utils/upgrades/ZetaConnectorNonNativeUpgradeTest.sol b/v2/test/utils/upgrades/ZetaConnectorNonNativeUpgradeTest.sol index 55049442..adbec1f4 100644 --- a/v2/test/utils/upgrades/ZetaConnectorNonNativeUpgradeTest.sol +++ b/v2/test/utils/upgrades/ZetaConnectorNonNativeUpgradeTest.sol @@ -131,4 +131,4 @@ contract ZetaConnectorNonNativeUpgradeTest is ZetaConnectorBase { if (amount + IERC20(zetaToken).totalSupply() > maxSupply) revert ExceedsMaxSupply(); IZetaNonEthNew(zetaToken).mint(address(to), amount, internalSendHash); } -} \ No newline at end of file +}