Build
Architecture
protocol
contracts
evm
interfaces
IGatewayEVM.sol
Interface.igatewayevm

Git Source (opens in a new tab)

Inherits: IGatewayEVMErrors, IGatewayEVMEvents

Interface for the GatewayEVM contract.

executeWithERC20

Executes a call to a contract using ERC20 tokens.

function executeWithERC20(address token, address to, uint256 amount, bytes calldata data) external;

Parameters

NameTypeDescription
tokenaddressThe address of the ERC20 token.
toaddressThe address of the contract to call.
amountuint256The amount of tokens to transfer.
databytesThe calldata to pass to the contract call.

executeRevert

Transfers msg.value to destination contract and executes it's onRevert function.

This function can only be called by the TSS address and it is payable.

function executeRevert(
    address destination,
    bytes calldata data,
    RevertContext calldata revertContext
)
    external
    payable;

Parameters

NameTypeDescription
destinationaddressAddress to call.
databytesCalldata to pass to the call.
revertContextRevertContextRevert context to pass to onRevert.

execute

Executes a call to a contract.

function execute(address destination, bytes calldata data) external payable returns (bytes memory);

Parameters

NameTypeDescription
destinationaddressThe address of the contract to call.
databytesThe calldata to pass to the contract call.

Returns

NameTypeDescription
<none>bytesThe result of the contract call.

execute

Executes a call to a destination address without ERC20 tokens.

This function can only be called by the TSS address and it is payable.

function execute(
    MessageContext calldata messageContext,
    address destination,
    bytes calldata data
)
    external
    payable
    returns (bytes memory);

Parameters

NameTypeDescription
messageContextMessageContextMessage context containing sender and arbitrary call flag.
destinationaddressAddress to call.
databytesCalldata to pass to the call.

Returns

NameTypeDescription
<none>bytesThe result of the call.

revertWithERC20

Executes a revertable call to a contract using ERC20 tokens.

function revertWithERC20(
    address token,
    address to,
    uint256 amount,
    bytes calldata data,
    RevertContext calldata revertContext
)
    external;

Parameters

NameTypeDescription
tokenaddressThe address of the ERC20 token.
toaddressThe address of the contract to call.
amountuint256The amount of tokens to transfer.
databytesThe calldata to pass to the contract call.
revertContextRevertContextRevert context to pass to onRevert.

deposit

Deposits ETH to the TSS address.

function deposit(address receiver, RevertOptions calldata revertOptions) external payable;

Parameters

NameTypeDescription
receiveraddressAddress of the receiver.
revertOptionsRevertOptionsRevert options.

deposit

Deposits ERC20 tokens to the custody or connector contract.

function deposit(address receiver, uint256 amount, address asset, RevertOptions calldata revertOptions) external;

Parameters

NameTypeDescription
receiveraddressAddress of the receiver.
amountuint256Amount of tokens to deposit.
assetaddressAddress of the ERC20 token.
revertOptionsRevertOptionsRevert options.

depositAndCall

Deposits ETH to the TSS address and calls an omnichain smart contract.

function depositAndCall(
    address receiver,
    bytes calldata payload,
    RevertOptions calldata revertOptions
)
    external
    payable;

Parameters

NameTypeDescription
receiveraddressAddress of the receiver.
payloadbytesCalldata to pass to the call.
revertOptionsRevertOptionsRevert options.

depositAndCall

Deposits ERC20 tokens to the custody or connector contract and calls an omnichain smart contract.

function depositAndCall(
    address receiver,
    uint256 amount,
    address asset,
    bytes calldata payload,
    RevertOptions calldata revertOptions
)
    external;

Parameters

NameTypeDescription
receiveraddressAddress of the receiver.
amountuint256Amount of tokens to deposit.
assetaddressAddress of the ERC20 token.
payloadbytesCalldata to pass to the call.
revertOptionsRevertOptionsRevert options.

call

Calls an omnichain smart contract without asset transfer.

function call(address receiver, bytes calldata payload, RevertOptions calldata revertOptions) external;

Parameters

NameTypeDescription
receiveraddressAddress of the receiver.
payloadbytesCalldata to pass to the call.
revertOptionsRevertOptionsRevert options.