Skip to main content

ERC20Portal

The ERC20Portal allows anyone to perform transfers of ERC-20 tokens to a dApp while informing the off-chain machine.

depositERC20Tokens()

function depositERC20Tokens(IERC20 token, address appContract, uint256 value, bytes calldata execLayerData) external;

Transfer ERC-20 tokens to a dApp and add an input to the dApp's input box to signal such operation.

The caller must allow the portal to withdraw at least _amount tokens from their account beforehand, by calling the approve function in the token contract.

Parameters

NameTypeDescription
tokenIERC20The ERC-20 token contract address
appContractaddressThe address of the dApp
valueuint256The amount of tokens to be transferred
execLayerDatabytesAdditional data to be interpreted by the execution layer

On this page

Useful resources to learn more

We use cookies to ensure that we give you the best experience on our website. By using the website, you agree to the use of cookies.