Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
skosito committed Oct 14, 2024
1 parent 915a2b6 commit a00918b
Show file tree
Hide file tree
Showing 14 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion v2/contracts/Revert.sol
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ interface Revertable {
interface INotSupportedMethods {
error CallOnRevertNotSupported();
error ZETANotSupported();
}
}
2 changes: 1 addition & 1 deletion v2/contracts/evm/ERC20Custody.sol
Original file line number Diff line number Diff line change
Expand Up @@ -218,4 +218,4 @@ contract ERC20Custody is
// actual received amount.
emit Deposited(recipient, asset, asset.balanceOf(address(this)) - oldBalance, message);
}
}
}
2 changes: 1 addition & 1 deletion v2/contracts/evm/GatewayEVM.sol
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
4 changes: 2 additions & 2 deletions v2/contracts/evm/ZetaConnectorBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ abstract contract ZetaConnectorBase is
_grantRole(TSS_ROLE, newTSSAddress);

emit UpdatedZetaConnectorTSSAddress(tssAddress, newTSSAddress);

tssAddress = newTSSAddress;
}

Expand Down Expand Up @@ -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;
}
}
2 changes: 1 addition & 1 deletion v2/contracts/evm/ZetaConnectorNative.sol
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,4 @@ contract ZetaConnectorNative is ZetaConnectorBase {
function receiveTokens(uint256 amount) external override whenNotPaused {
IERC20(zetaToken).safeTransferFrom(msg.sender, address(this), amount);
}
}
}
2 changes: 1 addition & 1 deletion v2/contracts/evm/ZetaConnectorNonNative.sol
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,4 @@ contract ZetaConnectorNonNative is ZetaConnectorBase {
if (amount + IERC20(zetaToken).totalSupply() > maxSupply) revert ExceedsMaxSupply();
IZetaNonEthNew(zetaToken).mint(address(to), amount, internalSendHash);
}
}
}
2 changes: 1 addition & 1 deletion v2/contracts/zevm/GatewayZEVM.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
6 changes: 3 additions & 3 deletions v2/test/ERC20Custody.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -55,15 +55,15 @@ 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");

address proxy = Upgrades.deployUUPSProxy(
"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);
Expand Down
3 changes: 2 additions & 1 deletion v2/test/GatewayZEVM.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion v2/test/ZetaConnectorNative.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion v2/test/utils/upgrades/ERC20CustodyUpgradeTest.sol
Original file line number Diff line number Diff line change
Expand Up @@ -221,4 +221,4 @@ contract ERC20CustodyUpgradeTest is
// actual received amount.
emit Deposited(recipient, asset, asset.balanceOf(address(this)) - oldBalance, message);
}
}
}
2 changes: 1 addition & 1 deletion v2/test/utils/upgrades/GatewayEVMUpgradeTest.sol
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ contract GatewayEVMUpgradeTest is
_grantRole(TSS_ROLE, newTSSAddress);

emit UpdatedGatewayTSSAddress(tssAddress, newTSSAddress);

tssAddress = newTSSAddress;
}

Expand Down
2 changes: 1 addition & 1 deletion v2/test/utils/upgrades/ZetaConnectorNativeUpgradeTest.sol
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,4 @@ contract ZetaConnectorNativeUpgradeTest is ZetaConnectorBase {
function receiveTokens(uint256 amount) external override whenNotPaused {
IERC20(zetaToken).safeTransferFrom(msg.sender, address(this), amount);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,4 @@ contract ZetaConnectorNonNativeUpgradeTest is ZetaConnectorBase {
if (amount + IERC20(zetaToken).totalSupply() > maxSupply) revert ExceedsMaxSupply();
IZetaNonEthNew(zetaToken).mint(address(to), amount, internalSendHash);
}
}
}

0 comments on commit a00918b

Please sign in to comment.