Contract: Burn Canonical Token(PeggedTokenBridge)

Contract: Burn pegged tokens and unlock original token from cBridge

Implementation

Burning is the reverse of the mintingarrow-up-right process. Canonical tokens can be burnedarrow-up-right via the PeggedTokenBridgearrow-up-right contract on the source chain, which will trigger the release of the original tokens from the OriginalTokenVaultarrow-up-right contract on the destination chain. For advanced users, the burn function can be called from smart contracts.

Here is the abi for the canonical / pegged token bridge contracts: https://github.com/celer-network/cBridge-typescript-client/tree/main/contract/abi/pegged/PeggedTokenBridge.solarrow-up-right, https://github.com/celer-network/cBridge-typescript-client/tree/main/contract/abi/pegged/OriginalTokenVault.solarrow-up-right

peggedTokenBridge!.burn(
     pegConfig.config.pegged_token.token.address, 
     value, 
     address, 
     nonce)

Request Parameters

Name
Type
Description

token

String

Pegged token address on the pegged chain

amount

UInt256

Burn amount

withdraw_account

String

User's wallet address

nonce

UInt64

Current timestamp

circle-exclamation

TransferId Generation

When you submit on-chain burn transaction, you can also generate a transfer id for future reference. For example, it is used for getTransferStatus. It should be the same as transferId inside on-chain transaction log.

circle-exclamation

Response

Since this function is an Ethereum on-chain transaction, the response is the corresponding transaction response.

Last updated