CrossChain Precompiled
Address: 0x0000000000000000000000000000000000001004
Interface: ICrossChain
ABI: ICrossChain
Introduction
use crossChain precompiled contract to call some functions of the crossChain module, such as: crossChain, cancelSendToExternal, etc.
Method
crossChain
send token from f(x)Core to other chain, like ethereum, pundix, etc.
if token is erc20, must be approved before calling this method
_token
: the token address on the f(x)Core(Tokens)if token is origin token, _token address is
0x0000000000000000000000000000000000000000
_receipt
: the receipt address on the target chain_amount
: the amount of the token to be cross chain_fee
: the fee of the token to be cross chainif cross chain to cosmos chain, _fee is
0
_target
: the target of the token on the target chain(more detail see Target_target represents cross chain destination, such as chain
ethereum
,pundix
destination ethereum: _target is
eth
destination other cosmos chain(example Pundix): _target is
ibc/{id}/{prefix}
.id
is the channel id of the target chain on f(x)Core(examples: Pundix: 0)prefix
is the address prefix of the target chain(examples: Pundix: px)
_memo
: the memo of cross chain
_target convert string to bytes, if less than 32, fill in 0 in behind, until 32 bytes
crossChain event
sender
: the sender addresstoken
: the erc20 token address on the f(x)Coredenom
: the cross chain token denomreceipt
: the receipt address on the target chainamount
: the amount of the token to be cross chainfee
: the fee of the token to be cross chaintarget
: the target of cross chainmemo
: the memo of cross chain
cancelSendToExternal
cancel cross chain to external chain, like ethereum, bsc, etc.
only cancel send to external chain(ethereum,bsc, etc.) transaction, can't cancel send to cosmos chain(pundix, cosmoshub, etc.) transaction.
_chain
: the module name of the cross chain, like eth, bsc, etc._txid
: the txid of the cross chain transaction
cancelSendToExternal event
sender
: the sender addresschain
: the module name of the cross chain, like eth, bsc, etc.txID
: the txid of the cross chain transaction
increaseBridgeFee
increase fee for send to external chain transaction
only increase fee for send to external chain transaction, can't increase fee for send to cosmos chain transaction
not necessarily the initiator of the cross chain transaction, anyone can increase the fee for the cross chain transaction
if token is erc20, must be approved before calling this method
_chain
: the chain name of the cross chain, like eth, bsc, etc(not contain cosmos chain)._txid
: the txid of the cross chain transaction_token
: the address of cross chain fee token(Tokens)if token is origin token, _token address is
0x0000000000000000000000000000000000000000
_fee
: increase fee amount
increaseBridgeFee event
sender
: the sender addresstoken
: the address of cross chain fee tokenchain
: the module name of the cross chain, like eth, bsc, etc.txID
: the txid of the cross chain transactionfee
: increase fee amount
Last updated