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
function sendToFx(address _tokenContract, bytes32 _destination, bytes32 _targetIBC, uint256 _amount) external;_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
getBridgeTokenList
get cross chain token list
function getBridgeTokenList() external view returns (BridgeToken[] memory);BridgeToken struct
struct BridgeToken {
address addr;
string name;
string symbol;
uint8 decimals;
}checkAssetStatus
check if the token is supported cross chain
function checkAssetStatus(address _tokenAddr) external view returns (bool status);_tokenAddr: the contract address of the token on the external chainstatus: true means good condition
Last updated