Contract: Pool-Based Transfer
Trigger cBridge contract `send` function to move user's assets to cBridge contract on source chain. Then cBridge gateway and Celer SGN will send assets to the user's asset on the destination chain
Last updated
Trigger cBridge contract `send` function to move user's assets to cBridge contract on source chain. Then cBridge gateway and Celer SGN will send assets to the user's asset on the destination chain
Last updated
Pool-based transfers are done via the contract, specifically via the or functions. For advanced users, these two functions can be called from smart contracts, but please read the before you proceed.
Here is the abi for Bridge:
Transfer gas token(ETH): sendNative. No need to provide token address
Transfer ERC20 token: send. Token address is needed
receiver
String
User's wallet address
token
String
Token's address on source chain
amount
BigNumber
Token amount to be sent
dst_chain_id
BigNumber
Destination chain id
nonce
BigNumber
Current timestamp
max_slippage
BigNumber
If receiver
is a smart contract and the token you are sending is a wrapped native gas token on the destination chain, make sure the contract can receive native gas token by implementing fallback
/ receive
functions.
Since this function is an Ethereum on-chain transaction, the response is the corresponding transaction response.
Use the value given by
If you want to use a max_slippage with your own calculation, please make sure it is not less than given by cBridge contract. Otherwise, the transaction will fail.
When you submit on-chain send transaction, you can also generate a transfer id for future reference. For example, it is used for and withdrawLiquidityForTransferRefund. It should be the same as transferId inside on-chain transaction log.