As a result of interacting with the TokenMessenger contract, Circle will generate a unique ID for the transaction. Starting with the returned transaction ID, you will call Circle's Attestation service to fetch an attestation that the burn took place. This attestation proves that the USDC was removed from circulation on the source chain.
The transactionId returned is a unique transaction ID generated by Circle. It is distinct from the unique identifier that is used to track the transaction on the blockchain - known as the transaction hash.
The attestation is used on the destination chain to mint new USDC. You will need to make API calls to get the transaction's transactionHash, retrieve the logs of the depositForBurn transaction, and use Circle's Attestation API to fetch the attestation signature. The steps have been broken down for you here, but you can use the Try It Out component below to run all of these steps together.
Call the Programmable Wallets API to fetch the transaction object for the depositForBurn transaction. Make a GET request using the provided code and the transaction ID. Retrieve the transaction object from the response data.
Retrieve the attestation signature from Circle's Iris API using the messageHash obtained in the previous step. Use the provided code inside a loop to query the API until the attestation status is "complete". Access the attestation signature from the response.
The attestation service is rate-limited. Please limit your requests to less than 10 per second.
message hash refers to the cryptographic value that represents the specific message related to the USDC burn transaction. It serves as a fingerprint of the transaction and helps ensure its integrity and authenticity. The message hash plays a crucial role in verifying and validating the burn transaction on the source blockchain, allowing participants to track and confirm the successful burning of tokens. As a developer, you will need to generate the message hash using the Keccak-256 hash of the bytes emitted by the MessageSent event, as shown above.