sendToFx
sendToFx cross chain means that the contract deployed on other chains communicates with Pundi AIFX through cross chain bridge to realize cross chain with Pundi AIFX.
supported external chains:
Ethereum
Binance Smart Chain
Polygon
Tron
Avalanche
Optimism
Arbitrum
Bridge Contract
Binance Smart Chain
Method
sendToFx
send token from external chain to Pundi AIFX
must be approved before calling this method
_tokenContract: the contract address of the token on the external chain_destination: the destination address on the Pundi AIFX chain or other cosmos chain_targetIBC: the target of the token on the Pundi AIFX chain(more details see Target)_targetIBC represents cross chain destination, such as
Pundi AIFX,Pundix,Marginxdestination Pundi AIFX: _targetIBC is empty
destination erc20 token: _targetIBC is
erc20destination other cosmos chain(example Pundix): _targetIBC is
ibc/{id}/{prefix}.idis the channel id of the target chain on Pundi AIFX(examples: Pundix: 0)prefixis the address prefix of the target chain(examples: Pundix: px)
_amount: the amount of the token to be cross chain
_destination convert address to bytes, if less than 32, fill in 0 in front, until 32 bytes
_targetIBC convert string to bytes, if less than 32, fill in 0 in behind, until 32 bytes
getBridgeTokenList
get cross chain token list
BridgeToken struct
checkAssetStatus
check if the token is supported cross chain
_tokenAddr: the contract address of the token on the external chainstatus: true means good condition
Last updated