From 14d5ae2e25d7f92a25eafb6a358d9685e97da627 Mon Sep 17 00:00:00 2001 From: William Te Stroete Date: Thu, 3 Apr 2025 12:25:53 +0000 Subject: [PATCH] Revert "Merge branch 'noserene.io.polygon' into 'master'" This reverts merge request !2 --- CHANGELOG | 69 ------------------------------------------------------- 1 file changed, 69 deletions(-) delete mode 100644 CHANGELOG diff --git a/CHANGELOG b/CHANGELOG deleted file mode 100644 index 510984e..0000000 --- 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); - }); -- GitLab