跳到主要内容

IOPStandardBridge

Git Source

Functions

bridgeERC20To

Sends ERC20 tokens to a receiver's address on the other chain. Note that if the ERC20 token on the other chain does not recognize the local token as the correct pair token, the ERC20 bridge will fail and the tokens will be returned to sender on this chain.

function bridgeERC20To(
address localToken,
address remoteToken,
address to,
uint256 amount,
uint32 minGasLimit,
bytes calldata extraData
)
external;

Parameters

NameTypeDescription
localTokenaddressAddress of the ERC20 on this chain.
remoteTokenaddressAddress of the corresponding token on the remote chain.
toaddressAddress of the receiver.
amountuint256Amount of local tokens to deposit.
minGasLimituint32Minimum amount of gas that the bridge can be relayed with.
extraDatabytesExtra data to be sent with the transaction. Note that the recipient will not be triggered with this data, but it will be emitted and can be used to identify the transaction.