Executor contract handles destination-side operations for cross-chain transfers, including swapping received tokens and managing ERC20/ERC721/ERC1155 token receipts.
Functions
swapAndCompleteBridgeTokens
Executes swaps on received bridge tokens and transfers them to the final receiver.Unique identifier for this transaction
Array of swap operations to execute on the received tokens
Address of the token that was received from the bridge
Final recipient of the swapped tokens
swapAndExecute
Executes swaps with a specific amount and transfers to receiver.Unique identifier for this transaction
Array of swap operations to execute
Address of the token to swap
Final recipient of the swapped tokens
Amount of tokens to swap
withdrawToken
Withdraws tokens from the executor (owner only).Address of the token to withdraw (zero address for native token)
Address to receive the withdrawn tokens
Amount to withdraw
Ownership Functions
The Executor implements a two-step ownership transfer pattern:transferOwnership
Initiates ownership transfer to a new address.Address of the new owner
confirmOwnershipTransfer
Confirms the ownership transfer (must be called by pending owner).cancelOwnershipTransfer
Cancels a pending ownership transfer (must be called by current owner).View Functions
owner
Returns the current owner address.pendingOwner
Returns the pending owner address (if any).erc20Proxy
Returns the ERC20 proxy contract address.supportsInterface
Checks if a given interface is supported.The interface identifier to check
ERC Token Receivers
The Executor implements handlers for receiving NFTs and multi-tokens:onERC721Received: Handles ERC721 token receiptsonERC1155Received: Handles single ERC1155 token receiptsonERC1155BatchReceived: Handles batch ERC1155 token receipts
Events
TokensWithdrawn
Emitted when tokens are withdrawn from the executor.Address of the withdrawn token
Address receiving the tokens
Amount withdrawn
ERC20ProxySet
Emitted when the ERC20 proxy address is set.Address of the ERC20 proxy
OwnershipTransferRequested
Emitted when ownership transfer is initiated.Current owner address
Pending new owner address
OwnershipTransferred
Emitted when ownership transfer is completed.Previous owner address
New owner address