Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
skosito committed Oct 10, 2024
1 parent 758ea1c commit 4e1eae7
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 4 deletions.
11 changes: 10 additions & 1 deletion v2/contracts/evm/ZetaConnectorBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,16 @@ abstract contract ZetaConnectorBase is

/// @notice Initializer for ZetaConnectors.
/// @dev Set admin as default admin and pauser, and tssAddress as tss role.
function initialize(address gateway_, address zetaToken_, address tssAddress_, address admin_) public virtual initializer {
function initialize(
address gateway_,
address zetaToken_,
address tssAddress_,
address admin_
)
public
virtual
initializer
{
if (gateway_ == address(0) || zetaToken_ == address(0) || tssAddress_ == address(0) || admin_ == address(0)) {
revert ZeroAddress();
}
Expand Down
11 changes: 10 additions & 1 deletion v2/contracts/evm/ZetaConnectorNative.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,16 @@ import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
contract ZetaConnectorNative is ZetaConnectorBase {
using SafeERC20 for IERC20;

function initialize(address gateway_, address zetaToken_, address tssAddress_, address admin_) public override initializer {
function initialize(
address gateway_,
address zetaToken_,
address tssAddress_,
address admin_
)
public
override
initializer
{
super.initialize(gateway_, zetaToken_, tssAddress_, admin_);
}

Expand Down
11 changes: 10 additions & 1 deletion v2/contracts/evm/ZetaConnectorNonNative.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,16 @@ contract ZetaConnectorNonNative is ZetaConnectorBase {
/// @notice Max supply for minting.
uint256 public maxSupply;

function initialize(address gateway_, address zetaToken_, address tssAddress_, address admin_) public override initializer {
function initialize(
address gateway_,
address zetaToken_,
address tssAddress_,
address admin_
)
public
override
initializer
{
super.initialize(gateway_, zetaToken_, tssAddress_, admin_);

maxSupply = type(uint256).max;
Expand Down
4 changes: 3 additions & 1 deletion v2/test/GatewayEVMZEVM.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ contract GatewayEVMZEVMTest is
custody = ERC20Custody(proxy);
proxy = Upgrades.deployUUPSProxy(
"ZetaConnectorNonNative.sol",
abi.encodeCall(ZetaConnectorNonNative.initialize, (address(gatewayEVM), address(zeta), tssAddress, ownerEVM))
abi.encodeCall(
ZetaConnectorNonNative.initialize, (address(gatewayEVM), address(zeta), tssAddress, ownerEVM)
)
);
zetaConnector = ZetaConnectorNonNative(proxy);

Expand Down

0 comments on commit 4e1eae7

Please sign in to comment.