diff --git a/CHANGELOG b/CHANGELOG deleted file mode 100644 index 510984e57d9e1502c783ef0ae75d13b80a9d0406..0000000000000000000000000000000000000000 --- a/CHANGELOG +++ /dev/null @@ -1,69 +0,0 @@ -const { getLxLyClient, tokens, configuration, from, to } = require('./utils/utils_lxly'); - -const execute = async () => { - // Initialize the Agglayer client. - const client = await getLxLyClient(); - - // Use the bridge transaction hash from the bridgeAndCall operation. - // Replace the value below with your actual bridge transaction hash. - const bridgeTransactionHash = "0xYourBridgeTransactionHash"; - - // Define the source and destination network IDs. - // Source: Cardona (network ID: 1) - // Destination: Sepolia (network ID: 0) - const sourceNetworkId = 1; - const destinationNetworkId = 0; - - // Get an API instance of the ETH token on the destination chain (Sepolia). - const token = client.erc20(tokens[destinationNetworkId].ether, destinationNetworkId); - - // Claim the asset using the claimAsset API. - const resultToken = await token.claimAsset(bridgeTransactionHash, sourceNetworkId, { returnTransaction: false }); - console.log("Asset Claim Result:", resultToken); - - // Retrieve and log the asset claim transaction hash. - const txHashToken = await resultToken.getTransactionHash(); - console.log("Asset Claim Transaction Hash:", txHashToken); - - // Retrieve and log the asset claim receipt. - const receiptToken = await resultToken.getReceipt(); - console.log("Asset Claim Receipt:", receiptToken); - - // Build the payload required for claiming the bridged message. - const resultMessage = await client.bridgeUtil.buildPayloadForClaim(bridgeTransactionHash, sourceNetworkId, 1) - .then((payload) => { - console.log("Payload for Claim:", payload); - // Use the payload to call the claimMessage API. - return client.bridges[destinationNetworkId].claimMessage( - payload.smtProof, - payload.smtProofRollup, - BigInt(payload.globalIndex), - payload.mainnetExitRoot, - payload.rollupExitRoot, - payload.originNetwork, - payload.originTokenAddress, - payload.destinationNetwork, - payload.destinationAddress, - payload.amount, - payload.metadata - ); - }); - console.log("Message Claim Result:", resultMessage); - - // Retrieve and log the message claim transaction hash. - const txHashMessage = await resultMessage.getTransactionHash(); - console.log("Message Claim Transaction Hash:", txHashMessage); - - // Retrieve and log the message claim receipt. - const receiptMessage = await resultMessage.getReceipt(); - console.log("Message Claim Receipt:", receiptMessage); -}; - -execute() - .then(() => { /* Execution succeeded */ }) - .catch(err => { - console.error("Error occurred:", err); - }) - .finally(() => { - process.exit(0); - });