From 748c709fae2f06f227fabc5bff210600cf43dc18 Mon Sep 17 00:00:00 2001 From: Denis Fadeev Date: Tue, 13 Aug 2024 11:35:41 +0300 Subject: [PATCH] replace src with contracts --- v2/contracts/evm/ERC20Custody.sol | 27 ++---- v2/contracts/evm/GatewayEVM.sol | 81 ++++------------ v2/contracts/evm/ZetaConnectorBase.sol | 14 +-- v2/contracts/evm/interfaces/IERC20Custody.sol | 11 ++- v2/contracts/evm/interfaces/IGatewayEVM.sol | 16 +--- .../evm/interfaces/IZetaConnector.sol | 2 +- v2/contracts/zevm/GatewayZEVM.sol | 92 +++++++------------ v2/contracts/zevm/ZRC20.sol | 9 +- v2/contracts/zevm/interfaces/IGatewayZEVM.sol | 2 +- .../zevm/interfaces/UniversalContract.sol | 8 +- 10 files changed, 85 insertions(+), 177 deletions(-) diff --git a/v2/contracts/evm/ERC20Custody.sol b/v2/contracts/evm/ERC20Custody.sol index d1317de1..ccf347db 100644 --- a/v2/contracts/evm/ERC20Custody.sol +++ b/v2/contracts/evm/ERC20Custody.sol @@ -1,10 +1,10 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.26; -import { IERC20Custody } from "./interfaces/IERC20Custody.sol"; -import { IGatewayEVM } from "./interfaces/IGatewayEVM.sol"; +import {IERC20Custody} from "./interfaces/IERC20Custody.sol"; +import {IGatewayEVM} from "./interfaces/IGatewayEVM.sol"; -import { RevertContext } from "src/Revert.sol"; +import {RevertContext} from "contracts/Revert.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; @@ -78,12 +78,7 @@ contract ERC20Custody is IERC20Custody, ReentrancyGuard, AccessControl, Pausable address to, address token, uint256 amount - ) - external - nonReentrant - onlyRole(WITHDRAWER_ROLE) - whenNotPaused - { + ) external nonReentrant onlyRole(WITHDRAWER_ROLE) whenNotPaused { if (!whitelisted[token]) revert NotWhitelisted(); IERC20(token).safeTransfer(to, amount); @@ -102,12 +97,7 @@ contract ERC20Custody is IERC20Custody, ReentrancyGuard, AccessControl, Pausable address token, uint256 amount, bytes calldata data - ) - public - nonReentrant - onlyRole(WITHDRAWER_ROLE) - whenNotPaused - { + ) public nonReentrant onlyRole(WITHDRAWER_ROLE) whenNotPaused { if (!whitelisted[token]) revert NotWhitelisted(); // Transfer the tokens to the Gateway contract @@ -133,12 +123,7 @@ contract ERC20Custody is IERC20Custody, ReentrancyGuard, AccessControl, Pausable uint256 amount, bytes calldata data, RevertContext calldata revertContext - ) - public - nonReentrant - onlyRole(WITHDRAWER_ROLE) - whenNotPaused - { + ) public nonReentrant onlyRole(WITHDRAWER_ROLE) whenNotPaused { if (!whitelisted[token]) revert NotWhitelisted(); // Transfer the tokens to the Gateway contract diff --git a/v2/contracts/evm/GatewayEVM.sol b/v2/contracts/evm/GatewayEVM.sol index 67dd0aaa..c3a91ad0 100644 --- a/v2/contracts/evm/GatewayEVM.sol +++ b/v2/contracts/evm/GatewayEVM.sol @@ -1,10 +1,10 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.26; -import { ZetaConnectorBase } from "./ZetaConnectorBase.sol"; -import { IERC20Custody } from "./interfaces/IERC20Custody.sol"; -import { IGatewayEVM } from "./interfaces/IGatewayEVM.sol"; -import { RevertContext, RevertOptions, Revertable } from "src/Revert.sol"; +import {ZetaConnectorBase} from "./ZetaConnectorBase.sol"; +import {IERC20Custody} from "./interfaces/IERC20Custody.sol"; +import {IGatewayEVM} from "./interfaces/IGatewayEVM.sol"; +import {RevertContext, RevertOptions, Revertable} from "contracts/Revert.sol"; import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; @@ -69,14 +69,14 @@ contract GatewayEVM is /// @dev Authorizes the upgrade of the contract, sender must be owner. /// @param newImplementation Address of the new implementation. - function _authorizeUpgrade(address newImplementation) internal override onlyRole(DEFAULT_ADMIN_ROLE) { } + function _authorizeUpgrade(address newImplementation) internal override onlyRole(DEFAULT_ADMIN_ROLE) {} /// @dev Internal function to execute a call to a destination address. /// @param destination Address to call. /// @param data Calldata to pass to the call. /// @return The result of the call. function _execute(address destination, bytes calldata data) internal returns (bytes memory) { - (bool success, bytes memory result) = destination.call{ value: msg.value }(data); + (bool success, bytes memory result) = destination.call{value: msg.value}(data); if (!success) revert ExecutionFailed(); return result; @@ -100,15 +100,9 @@ contract GatewayEVM is address destination, bytes calldata data, RevertContext calldata revertContext - ) - public - payable - onlyRole(TSS_ROLE) - whenNotPaused - nonReentrant - { + ) public payable onlyRole(TSS_ROLE) whenNotPaused nonReentrant { if (destination == address(0)) revert ZeroAddress(); - (bool success,) = destination.call{ value: msg.value }(""); + (bool success, ) = destination.call{value: msg.value}(""); if (!success) revert ExecutionFailed(); Revertable(destination).onRevert(revertContext); @@ -123,14 +117,7 @@ contract GatewayEVM is function execute( address destination, bytes calldata data - ) - external - payable - onlyRole(TSS_ROLE) - whenNotPaused - nonReentrant - returns (bytes memory) - { + ) external payable onlyRole(TSS_ROLE) whenNotPaused nonReentrant returns (bytes memory) { if (destination == address(0)) revert ZeroAddress(); bytes memory result = _execute(destination, data); @@ -151,12 +138,7 @@ contract GatewayEVM is address to, uint256 amount, bytes calldata data - ) - public - onlyRole(ASSET_HANDLER_ROLE) - whenNotPaused - nonReentrant - { + ) public onlyRole(ASSET_HANDLER_ROLE) whenNotPaused nonReentrant { if (amount == 0) revert InsufficientERC20Amount(); if (to == address(0)) revert ZeroAddress(); // Approve the target contract to spend the tokens @@ -190,12 +172,7 @@ contract GatewayEVM is uint256 amount, bytes calldata data, RevertContext calldata revertContext - ) - external - onlyRole(ASSET_HANDLER_ROLE) - whenNotPaused - nonReentrant - { + ) external onlyRole(ASSET_HANDLER_ROLE) whenNotPaused nonReentrant { if (amount == 0) revert InsufficientERC20Amount(); if (to == address(0)) revert ZeroAddress(); @@ -211,16 +188,11 @@ contract GatewayEVM is function deposit( address receiver, RevertOptions calldata revertOptions - ) - external - payable - whenNotPaused - nonReentrant - { + ) external payable whenNotPaused nonReentrant { if (msg.value == 0) revert InsufficientETHAmount(); if (receiver == address(0)) revert ZeroAddress(); - (bool deposited,) = tssAddress.call{ value: msg.value }(""); + (bool deposited, ) = tssAddress.call{value: msg.value}(""); if (!deposited) revert DepositFailed(); @@ -237,11 +209,7 @@ contract GatewayEVM is uint256 amount, address asset, RevertOptions calldata revertOptions - ) - external - whenNotPaused - nonReentrant - { + ) external whenNotPaused nonReentrant { if (amount == 0) revert InsufficientERC20Amount(); if (receiver == address(0)) revert ZeroAddress(); @@ -258,16 +226,11 @@ contract GatewayEVM is address receiver, bytes calldata payload, RevertOptions calldata revertOptions - ) - external - payable - whenNotPaused - nonReentrant - { + ) external payable whenNotPaused nonReentrant { if (msg.value == 0) revert InsufficientETHAmount(); if (receiver == address(0)) revert ZeroAddress(); - (bool deposited,) = tssAddress.call{ value: msg.value }(""); + (bool deposited, ) = tssAddress.call{value: msg.value}(""); if (!deposited) revert DepositFailed(); @@ -286,11 +249,7 @@ contract GatewayEVM is address asset, bytes calldata payload, RevertOptions calldata revertOptions - ) - external - whenNotPaused - nonReentrant - { + ) external whenNotPaused nonReentrant { if (amount == 0) revert InsufficientERC20Amount(); if (receiver == address(0)) revert ZeroAddress(); @@ -307,11 +266,7 @@ contract GatewayEVM is address receiver, bytes calldata payload, RevertOptions calldata revertOptions - ) - external - whenNotPaused - nonReentrant - { + ) external whenNotPaused nonReentrant { if (receiver == address(0)) revert ZeroAddress(); emit Called(msg.sender, receiver, payload, revertOptions); } diff --git a/v2/contracts/evm/ZetaConnectorBase.sol b/v2/contracts/evm/ZetaConnectorBase.sol index a916a920..0c941444 100644 --- a/v2/contracts/evm/ZetaConnectorBase.sol +++ b/v2/contracts/evm/ZetaConnectorBase.sol @@ -7,9 +7,9 @@ import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/Pausable.sol"; import "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; -import { RevertContext } from "src/Revert.sol"; -import { IGatewayEVM, IGatewayEVMErrors, IGatewayEVMEvents } from "src/evm/interfaces/IGatewayEVM.sol"; -import "src/evm/interfaces/IZetaConnector.sol"; +import {RevertContext} from "contracts/Revert.sol"; +import {IGatewayEVM, IGatewayEVMErrors, IGatewayEVMEvents} from "contracts/evm/interfaces/IGatewayEVM.sol"; +import "contracts/evm/interfaces/IZetaConnector.sol"; /// @title ZetaConnectorBase /// @notice Abstract base contract for ZetaConnector. @@ -73,9 +73,7 @@ abstract contract ZetaConnectorBase is IZetaConnectorEvents, ReentrancyGuard, Pa uint256 amount, bytes calldata data, bytes32 internalSendHash - ) - external - virtual; + ) external virtual; /// @notice Withdraw tokens and call a contract with a revert callback through Gateway. /// @param to The address to withdraw tokens to. @@ -89,9 +87,7 @@ abstract contract ZetaConnectorBase is IZetaConnectorEvents, ReentrancyGuard, Pa bytes calldata data, bytes32 internalSendHash, RevertContext calldata revertContext - ) - external - virtual; + ) external virtual; /// @notice Handle received tokens. /// @param amount The amount of tokens received. diff --git a/v2/contracts/evm/interfaces/IERC20Custody.sol b/v2/contracts/evm/interfaces/IERC20Custody.sol index 77f08ad2..b59ae8b9 100644 --- a/v2/contracts/evm/interfaces/IERC20Custody.sol +++ b/v2/contracts/evm/interfaces/IERC20Custody.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.26; -import { RevertContext } from "src/Revert.sol"; +import {RevertContext} from "contracts/Revert.sol"; /// @title IERC20CustodyEvents /// @notice Interface for the events emitted by the ERC20 custody contract. @@ -26,7 +26,11 @@ interface IERC20CustodyEvents { /// @param data The calldata passed to the contract call. /// @param revertContext Revert context to pass to onRevert. event WithdrawnAndReverted( - address indexed token, address indexed to, uint256 amount, bytes data, RevertContext revertContext + address indexed token, + address indexed to, + uint256 amount, + bytes data, + RevertContext revertContext ); /// @notice Emitted when ERC20 token is whitelisted @@ -80,6 +84,5 @@ interface IERC20Custody is IERC20CustodyEvents, IERC20CustodyErrors { uint256 amount, bytes calldata data, RevertContext calldata revertContext - ) - external; + ) external; } diff --git a/v2/contracts/evm/interfaces/IGatewayEVM.sol b/v2/contracts/evm/interfaces/IGatewayEVM.sol index e396da95..61b24314 100644 --- a/v2/contracts/evm/interfaces/IGatewayEVM.sol +++ b/v2/contracts/evm/interfaces/IGatewayEVM.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.26; -import "src/Revert.sol"; +import "contracts/Revert.sol"; /// @title IGatewayEVMEvents /// @notice Interface for the events emitted by the GatewayEVM contract. @@ -101,9 +101,7 @@ interface IGatewayEVM is IGatewayEVMErrors, IGatewayEVMEvents { address destination, bytes calldata data, RevertContext calldata revertContext - ) - external - payable; + ) external payable; /// @notice Executes a call to a contract. /// @param destination The address of the contract to call. @@ -123,8 +121,7 @@ interface IGatewayEVM is IGatewayEVMErrors, IGatewayEVMEvents { uint256 amount, bytes calldata data, RevertContext calldata revertContext - ) - external; + ) external; /// @notice Deposits ETH to the TSS address. /// @param receiver Address of the receiver. @@ -146,9 +143,7 @@ interface IGatewayEVM is IGatewayEVMErrors, IGatewayEVMEvents { address receiver, bytes calldata payload, RevertOptions calldata revertOptions - ) - external - payable; + ) external payable; /// @notice Deposits ERC20 tokens to the custody or connector contract and calls an omnichain smart contract. /// @param receiver Address of the receiver. @@ -162,8 +157,7 @@ interface IGatewayEVM is IGatewayEVMErrors, IGatewayEVMEvents { address asset, bytes calldata payload, RevertOptions calldata revertOptions - ) - external; + ) external; /// @notice Calls an omnichain smart contract without asset transfer. /// @param receiver Address of the receiver. diff --git a/v2/contracts/evm/interfaces/IZetaConnector.sol b/v2/contracts/evm/interfaces/IZetaConnector.sol index 78a3af69..da02912a 100644 --- a/v2/contracts/evm/interfaces/IZetaConnector.sol +++ b/v2/contracts/evm/interfaces/IZetaConnector.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.26; -import { RevertContext } from "src/Revert.sol"; +import {RevertContext} from "contracts/Revert.sol"; /// @title IZetaConnectorEvents /// @notice Interface for the events emitted by the ZetaConnector contracts. diff --git a/v2/contracts/zevm/GatewayZEVM.sol b/v2/contracts/zevm/GatewayZEVM.sol index a9171d97..43148913 100644 --- a/v2/contracts/zevm/GatewayZEVM.sol +++ b/v2/contracts/zevm/GatewayZEVM.sol @@ -1,15 +1,15 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.26; -import { IGatewayZEVM } from "./interfaces/IGatewayZEVM.sol"; +import {IGatewayZEVM} from "./interfaces/IGatewayZEVM.sol"; import "./interfaces/IWZETA.sol"; -import { IZRC20 } from "./interfaces/IZRC20.sol"; -import { UniversalContract, zContext } from "./interfaces/UniversalContract.sol"; +import {IZRC20} from "./interfaces/IZRC20.sol"; +import {UniversalContract, zContext} from "./interfaces/UniversalContract.sol"; import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; -import { RevertContext, RevertOptions } from "src/Revert.sol"; +import {RevertContext, RevertOptions} from "contracts/Revert.sol"; import "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol"; @@ -67,7 +67,7 @@ contract GatewayZEVM is /// @dev Authorizes the upgrade of the contract. /// @param newImplementation The address of the new implementation. - function _authorizeUpgrade(address newImplementation) internal override onlyRole(DEFAULT_ADMIN_ROLE) { } + function _authorizeUpgrade(address newImplementation) internal override onlyRole(DEFAULT_ADMIN_ROLE) {} /// @dev Receive function to receive ZETA from WETH9.withdraw(). receive() external payable whenNotPaused { @@ -119,7 +119,7 @@ contract GatewayZEVM is function _transferZETA(uint256 amount, address to) internal { if (!IWETH9(zetaToken).transferFrom(msg.sender, address(this), amount)) revert FailedZetaSent(); IWETH9(zetaToken).withdraw(amount); - (bool sent,) = to.call{ value: amount }(""); + (bool sent, ) = to.call{value: amount}(""); if (!sent) revert FailedZetaSent(); } @@ -133,17 +133,21 @@ contract GatewayZEVM is uint256 amount, address zrc20, RevertOptions calldata revertOptions - ) - external - nonReentrant - whenNotPaused - { + ) external nonReentrant whenNotPaused { if (receiver.length == 0) revert ZeroAddress(); if (amount == 0) revert InsufficientZRC20Amount(); uint256 gasFee = _withdrawZRC20(amount, zrc20); emit Withdrawn( - msg.sender, 0, receiver, zrc20, amount, gasFee, IZRC20(zrc20).PROTOCOL_FLAT_FEE(), "", revertOptions + msg.sender, + 0, + receiver, + zrc20, + amount, + gasFee, + IZRC20(zrc20).PROTOCOL_FLAT_FEE(), + "", + revertOptions ); } @@ -161,17 +165,21 @@ contract GatewayZEVM is bytes calldata message, uint256 gasLimit, RevertOptions calldata revertOptions - ) - external - nonReentrant - whenNotPaused - { + ) external nonReentrant whenNotPaused { if (receiver.length == 0) revert ZeroAddress(); if (amount == 0) revert InsufficientZRC20Amount(); uint256 gasFee = _withdrawZRC20WithGasLimit(amount, zrc20, gasLimit); emit Withdrawn( - msg.sender, 0, receiver, zrc20, amount, gasFee, IZRC20(zrc20).PROTOCOL_FLAT_FEE(), message, revertOptions + msg.sender, + 0, + receiver, + zrc20, + amount, + gasFee, + IZRC20(zrc20).PROTOCOL_FLAT_FEE(), + message, + revertOptions ); } @@ -184,11 +192,7 @@ contract GatewayZEVM is uint256 amount, uint256 chainId, RevertOptions calldata revertOptions - ) - external - nonReentrant - whenNotPaused - { + ) external nonReentrant whenNotPaused { if (receiver.length == 0) revert ZeroAddress(); if (amount == 0) revert InsufficientZetaAmount(); @@ -208,11 +212,7 @@ contract GatewayZEVM is uint256 chainId, bytes calldata message, RevertOptions calldata revertOptions - ) - external - nonReentrant - whenNotPaused - { + ) external nonReentrant whenNotPaused { if (receiver.length == 0) revert ZeroAddress(); if (amount == 0) revert InsufficientZetaAmount(); @@ -232,11 +232,7 @@ contract GatewayZEVM is bytes calldata message, uint256 gasLimit, RevertOptions calldata revertOptions - ) - external - nonReentrant - whenNotPaused - { + ) external nonReentrant whenNotPaused { if (receiver.length == 0) revert ZeroAddress(); if (message.length == 0) revert EmptyMessage(); @@ -273,11 +269,7 @@ contract GatewayZEVM is uint256 amount, address target, bytes calldata message - ) - external - onlyFungible - whenNotPaused - { + ) external onlyFungible whenNotPaused { if (zrc20 == address(0) || target == address(0)) revert ZeroAddress(); if (amount == 0) revert InsufficientZRC20Amount(); @@ -296,11 +288,7 @@ contract GatewayZEVM is uint256 amount, address target, bytes calldata message - ) - external - onlyFungible - whenNotPaused - { + ) external onlyFungible whenNotPaused { if (zrc20 == address(0) || target == address(0)) revert ZeroAddress(); if (amount == 0) revert InsufficientZRC20Amount(); if (target == FUNGIBLE_MODULE_ADDRESS || target == address(this)) revert InvalidTarget(); @@ -319,11 +307,7 @@ contract GatewayZEVM is uint256 amount, address target, bytes calldata message - ) - external - onlyFungible - whenNotPaused - { + ) external onlyFungible whenNotPaused { if (target == address(0)) revert ZeroAddress(); if (amount == 0) revert InsufficientZetaAmount(); if (target == FUNGIBLE_MODULE_ADDRESS || target == address(this)) revert InvalidTarget(); @@ -346,11 +330,7 @@ contract GatewayZEVM is address target, bytes calldata message, RevertContext calldata revertContext - ) - external - onlyFungible - whenNotPaused - { + ) external onlyFungible whenNotPaused { if (zrc20 == address(0) || target == address(0)) revert ZeroAddress(); if (amount == 0) revert InsufficientZRC20Amount(); @@ -371,11 +351,7 @@ contract GatewayZEVM is address target, bytes calldata message, RevertContext calldata revertContext - ) - external - onlyFungible - whenNotPaused - { + ) external onlyFungible whenNotPaused { if (zrc20 == address(0) || target == address(0)) revert ZeroAddress(); if (amount == 0) revert InsufficientZRC20Amount(); if (target == FUNGIBLE_MODULE_ADDRESS || target == address(this)) revert InvalidTarget(); diff --git a/v2/contracts/zevm/ZRC20.sol b/v2/contracts/zevm/ZRC20.sol index ab466e33..df14a7e0 100644 --- a/v2/contracts/zevm/ZRC20.sol +++ b/v2/contracts/zevm/ZRC20.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.26; -import "src/zevm/interfaces/ISystem.sol"; -import "src/zevm/interfaces/IZRC20.sol"; +import "contracts/zevm/interfaces/ISystem.sol"; +import "contracts/zevm/interfaces/IZRC20.sol"; /** * @dev Custom errors for ZRC20 @@ -234,8 +234,9 @@ contract ZRC20 is IZRC20Metadata, ZRC20Errors, ZRC20Events { */ function deposit(address to, uint256 amount) external override returns (bool) { if ( - msg.sender != FUNGIBLE_MODULE_ADDRESS && msg.sender != SYSTEM_CONTRACT_ADDRESS - && msg.sender != gatewayAddress + msg.sender != FUNGIBLE_MODULE_ADDRESS && + msg.sender != SYSTEM_CONTRACT_ADDRESS && + msg.sender != gatewayAddress ) revert InvalidSender(); _mint(to, amount); emit Deposit(abi.encodePacked(FUNGIBLE_MODULE_ADDRESS), to, amount); diff --git a/v2/contracts/zevm/interfaces/IGatewayZEVM.sol b/v2/contracts/zevm/interfaces/IGatewayZEVM.sol index 7dd3675b..8c772a4a 100644 --- a/v2/contracts/zevm/interfaces/IGatewayZEVM.sol +++ b/v2/contracts/zevm/interfaces/IGatewayZEVM.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.26; import "./UniversalContract.sol"; -import "src/Revert.sol"; +import "contracts/Revert.sol"; /// @title IGatewayZEVMEvents /// @notice Interface for the events emitted by the GatewayZEVM contract. diff --git a/v2/contracts/zevm/interfaces/UniversalContract.sol b/v2/contracts/zevm/interfaces/UniversalContract.sol index 02959b5f..c466dc60 100644 --- a/v2/contracts/zevm/interfaces/UniversalContract.sol +++ b/v2/contracts/zevm/interfaces/UniversalContract.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.26; -import { RevertContext } from "src/Revert.sol"; +import {RevertContext} from "contracts/Revert.sol"; struct zContext { bytes origin; @@ -17,8 +17,7 @@ interface zContract { address zrc20, uint256 amount, bytes calldata message - ) - external; + ) external; } interface UniversalContract { @@ -27,8 +26,7 @@ interface UniversalContract { address zrc20, uint256 amount, bytes calldata message - ) - external; + ) external; function onRevert(RevertContext calldata revertContext) external; }