From 39e72fe8c90e2ca29b4e0ca296ad40bd0ac15f0d Mon Sep 17 00:00:00 2001 From: skosito Date: Wed, 23 Oct 2024 15:34:26 +0200 Subject: [PATCH] cleanup --- v2/contracts/evm/GatewayEVM.sol | 8 ++++---- v2/contracts/zevm/GatewayZEVM.sol | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/v2/contracts/evm/GatewayEVM.sol b/v2/contracts/evm/GatewayEVM.sol index 71dfe87a..95698c2c 100644 --- a/v2/contracts/evm/GatewayEVM.sol +++ b/v2/contracts/evm/GatewayEVM.sol @@ -110,9 +110,9 @@ contract GatewayEVM is ) public payable + nonReentrant onlyRole(TSS_ROLE) whenNotPaused - nonReentrant { if (destination == address(0)) revert ZeroAddress(); (bool success,) = destination.call{ value: msg.value }(""); @@ -135,9 +135,9 @@ contract GatewayEVM is ) external payable + nonReentrant onlyRole(TSS_ROLE) whenNotPaused - nonReentrant returns (bytes memory) { if (destination == address(0)) revert ZeroAddress(); @@ -172,9 +172,9 @@ contract GatewayEVM is bytes calldata data ) public + nonReentrant onlyRole(ASSET_HANDLER_ROLE) whenNotPaused - nonReentrant { if (amount == 0) revert InsufficientERC20Amount(); if (to == address(0)) revert ZeroAddress(); @@ -217,9 +217,9 @@ contract GatewayEVM is RevertContext calldata revertContext ) external + nonReentrant onlyRole(ASSET_HANDLER_ROLE) whenNotPaused - nonReentrant { if (amount == 0) revert InsufficientERC20Amount(); if (to == address(0)) revert ZeroAddress(); diff --git a/v2/contracts/zevm/GatewayZEVM.sol b/v2/contracts/zevm/GatewayZEVM.sol index 7b512007..8f46ce24 100644 --- a/v2/contracts/zevm/GatewayZEVM.sol +++ b/v2/contracts/zevm/GatewayZEVM.sol @@ -338,9 +338,9 @@ contract GatewayZEVM is bytes calldata message ) external + nonReentrant onlyProtocol whenNotPaused - nonReentrant { if (zrc20 == address(0) || target == address(0)) revert ZeroAddress(); @@ -361,9 +361,9 @@ contract GatewayZEVM is bytes calldata message ) external + nonReentrant onlyProtocol whenNotPaused - nonReentrant { if (zrc20 == address(0) || target == address(0)) revert ZeroAddress(); if (amount == 0) revert InsufficientZRC20Amount(); @@ -385,9 +385,9 @@ contract GatewayZEVM is bytes calldata message ) external + nonReentrant onlyProtocol whenNotPaused - nonReentrant { if (target == address(0)) revert ZeroAddress(); if (amount == 0) revert InsufficientZetaAmount(); @@ -400,7 +400,7 @@ contract GatewayZEVM is /// @notice Revert a user-specified contract on ZEVM. /// @param target The target contract to call. /// @param revertContext Revert context to pass to onRevert. - function executeRevert(address target, RevertContext calldata revertContext) external onlyProtocol whenNotPaused nonReentrant { + function executeRevert(address target, RevertContext calldata revertContext) external nonReentrant onlyProtocol whenNotPaused { if (target == address(0)) revert ZeroAddress(); Revertable(target).onRevert(revertContext); @@ -418,9 +418,9 @@ contract GatewayZEVM is RevertContext calldata revertContext ) external + nonReentrant onlyProtocol whenNotPaused - nonReentrant { if (zrc20 == address(0) || target == address(0)) revert ZeroAddress(); if (amount == 0) revert InsufficientZRC20Amount();