Contract: Aptos PegBridge Burn Token Submission

Submit burn transaction from Aptos chain

Implementation

You will generate Aptos transaction payload and submit it on-chain

const burnTransactionPayload = {
    arguments: [
      amount, /// Burn token amount with decimal
      destinationChainId.toString(), /// Destination chain id
      Array.from(ethers.utils.arrayify(RECEIVER_ADDRESS)), /// Destination receiver address bytes
      nonce /// timestamp
    ],
    function: `0x${PEGGED_BRIDGE_CONTRACT_ADDRESS}::peg_bridge::burn`,
    type: 'entry_function_payload',
    type_arguments: [BURN_TOKEN_ADDRESS], /// burn token address
  };

Request Parameters

Name
Type
Description

amount

u64

Burn token amount

to_chain_id

u64

Destination chain id

to_addr

vector<U8>

Destination receiver address bytes

nonce

u64

Timestamp

TransferId Generation

Since Aptos uses Big-Endian, you may use BCS provided by Aptos to get serialized data.

Response

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

Last updated