From fd748b816721604252e5f1468c2751e052dbcc9e Mon Sep 17 00:00:00 2001 From: kevin-pv01 <134313281+kevin-pv01@users.noreply.github.com> Date: Mon, 5 Feb 2024 11:06:16 +0000 Subject: [PATCH 1/3] Update index.js correct the USDC address for Sepolia --- docs/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.js b/docs/index.js index cea5edf..d5fdab6 100644 --- a/docs/index.js +++ b/docs/index.js @@ -28,7 +28,7 @@ const main = async() => { // Testnet Contract Addresses const ETH_TOKEN_MESSENGER_CONTRACT_ADDRESS = "0xd0c3da58f55358142b8d3e06c1c30c5c6114efe8"; - const USDC_ETH_CONTRACT_ADDRESS = "0x07865c6e87b9f70255377e024ace6630c1eaa37f"; + const USDC_ETH_CONTRACT_ADDRESS = "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238"; const ETH_MESSAGE_CONTRACT_ADDRESS = "0x1a9695e9dbdb443f4b20e3e4ce87c8d963fda34f" const AVAX_MESSAGE_TRANSMITTER_CONTRACT_ADDRESS = '0xa9fb1b3009dcb79e2fe346c16a604b8fa8ae0a79'; From 7d98c73519261f2da724e107c245c07cd5434329 Mon Sep 17 00:00:00 2001 From: kevin-pv01 <134313281+kevin-pv01@users.noreply.github.com> Date: Mon, 5 Feb 2024 11:39:24 +0000 Subject: [PATCH 2/3] Update index.js fix contract addresses --- docs/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/index.js b/docs/index.js index d5fdab6..18be0fd 100644 --- a/docs/index.js +++ b/docs/index.js @@ -27,10 +27,10 @@ const main = async() => { web3.eth.accounts.wallet.add(avaxSigner); // Testnet Contract Addresses - const ETH_TOKEN_MESSENGER_CONTRACT_ADDRESS = "0xd0c3da58f55358142b8d3e06c1c30c5c6114efe8"; - const USDC_ETH_CONTRACT_ADDRESS = "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238"; - const ETH_MESSAGE_CONTRACT_ADDRESS = "0x1a9695e9dbdb443f4b20e3e4ce87c8d963fda34f" - const AVAX_MESSAGE_TRANSMITTER_CONTRACT_ADDRESS = '0xa9fb1b3009dcb79e2fe346c16a604b8fa8ae0a79'; + const ETH_TOKEN_MESSENGER_CONTRACT_ADDRESS = '0x9f3B8679c73C2Fef8b59B4f3444d4e156fb70AA5'; // Circle Messenger contract + const USDC_ETH_CONTRACT_ADDRESS = '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238'; // Circle Sepolia USDC contract + const ETH_MESSAGE_CONTRACT_ADDRESS = '0x80537e4e8bab73d21096baa3a8c813b45ca0b7c9'; // Just a library to allow a call of addressToBytes32 + const AVAX_MESSAGE_TRANSMITTER_CONTRACT_ADDRESS = '0xa9fb1b3009dcb79e2fe346c16a604b8fa8ae0a79'; // Circle Messenger contract // initialize contracts using address and ABI const ethTokenMessengerContract = new web3.eth.Contract(tokenMessengerAbi, ETH_TOKEN_MESSENGER_CONTRACT_ADDRESS, {from: ethSigner.address}); From f82122c326039c6783bf8337c28f04b6fca6eabb Mon Sep 17 00:00:00 2001 From: Walker Mayerchak Date: Fri, 9 Feb 2024 12:28:59 -0500 Subject: [PATCH 3/3] cleanup --- docs/README.md | 4 ++-- docs/index.js | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/README.md b/docs/README.md index 7a1e4a9..ec34233 100644 --- a/docs/README.md +++ b/docs/README.md @@ -28,7 +28,7 @@ The script has 5 steps: const approveTx = await usdcEthContract.methods.approve(ETH_TOKEN_MESSENGER_CONTRACT_ADDRESS, amount).send({gas: approveTxGas}) ``` -2. Second step executes `depositForBurn` function on `TokenMessengerContract` deployed in [Goerli testnet](https://goerli.etherscan.io/address/0xd0c3da58f55358142b8d3e06c1c30c5c6114efe8) +2. Second step executes `depositForBurn` function on `TokenMessengerContract` deployed in [Sepolia testnet](https://sepolia.etherscan.io/address/0x9f3B8679c73C2Fef8b59B4f3444d4e156fb70AA5) ```js const burnTx = await ethTokenMessengerContract.methods.depositForBurn(amount, AVAX_DESTINATION_DOMAIN, destinationAddressInBytes32, USDC_ETH_CONTRACT_ADDRESS).send(); ``` @@ -52,7 +52,7 @@ The script has 5 steps: } ``` -5. Last step calls `receiveMessage` function on `TokenMessengerContract` deployed in [Avalanche Fuji Network](https://testnet.snowtrace.io/address/0xa9fb1b3009dcb79e2fe346c16a604b8fa8ae0a79) to receive USDC at AVAX address. +5. Last step calls `receiveMessage` function on `MessageTransmitterContract` deployed in [Avalanche Fuji Network](https://testnet.snowtrace.io/address/0xa9fb1b3009dcb79e2fe346c16a604b8fa8ae0a79) to receive USDC at AVAX address. *Note: The attestation service is rate-limited, please limit your requests to less than 1 per second.* ```js diff --git a/docs/index.js b/docs/index.js index 18be0fd..229502d 100644 --- a/docs/index.js +++ b/docs/index.js @@ -27,10 +27,10 @@ const main = async() => { web3.eth.accounts.wallet.add(avaxSigner); // Testnet Contract Addresses - const ETH_TOKEN_MESSENGER_CONTRACT_ADDRESS = '0x9f3B8679c73C2Fef8b59B4f3444d4e156fb70AA5'; // Circle Messenger contract - const USDC_ETH_CONTRACT_ADDRESS = '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238'; // Circle Sepolia USDC contract - const ETH_MESSAGE_CONTRACT_ADDRESS = '0x80537e4e8bab73d21096baa3a8c813b45ca0b7c9'; // Just a library to allow a call of addressToBytes32 - const AVAX_MESSAGE_TRANSMITTER_CONTRACT_ADDRESS = '0xa9fb1b3009dcb79e2fe346c16a604b8fa8ae0a79'; // Circle Messenger contract + const ETH_TOKEN_MESSENGER_CONTRACT_ADDRESS = '0x9f3B8679c73C2Fef8b59B4f3444d4e156fb70AA5'; + const USDC_ETH_CONTRACT_ADDRESS = '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238'; + const ETH_MESSAGE_CONTRACT_ADDRESS = '0x80537e4e8bab73d21096baa3a8c813b45ca0b7c9'; + const AVAX_MESSAGE_TRANSMITTER_CONTRACT_ADDRESS = '0xa9fb1b3009dcb79e2fe346c16a604b8fa8ae0a79'; // initialize contracts using address and ABI const ethTokenMessengerContract = new web3.eth.Contract(tokenMessengerAbi, ETH_TOKEN_MESSENGER_CONTRACT_ADDRESS, {from: ethSigner.address});