Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

IERC1155SinglePortal

Git Source

Inherits: IPortal

Functions

depositSingleERC1155Token

Transfer ERC-1155 tokens of a single type to an application contract and add an input to the application's input box to signal such operation. The caller must enable approval for the portal to manage all of their tokens beforehand, by calling the setApprovalForAll function in the token contract.

function depositSingleERC1155Token(
    IERC1155 token,
    address appContract,
    uint256 tokenId,
    uint256 value,
    bytes calldata baseLayerData,
    bytes calldata execLayerData
) external;

Parameters

NameTypeDescription
tokenIERC1155The ERC-1155 token contract
appContractaddressThe application contract address
tokenIduint256The identifier of the token being transferred
valueuint256Transfer amount
baseLayerDatabytesAdditional data to be interpreted by the base layer
execLayerDatabytesAdditional data to be interpreted by the execution layer