diff --git a/package-lock.json b/package-lock.json index 9afb64713ec..38dbbde9e45 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,7 @@ "@astrojs/sitemap": "^3.0.3", "@chainlink/components": "^0.4.5", "@chainlink/contracts": "^0.8.0", - "@chainlink/contracts-ccip": "^0.7.6", + "@chainlink/contracts-ccip": "^1.2.1", "@chainlink/design-system": "^0.1.50", "@chainlink/solana-sdk": "^0.2.2", "@metamask/detect-provider": "^2.0.0", @@ -1068,9 +1068,9 @@ } }, "node_modules/@chainlink/contracts-ccip": { - "version": "0.7.6", - "resolved": "https://registry.npmjs.org/@chainlink/contracts-ccip/-/contracts-ccip-0.7.6.tgz", - "integrity": "sha512-yNbCBFpLs3R+ALymto9dQYKz3vatnjqYGu1pnMD0i2fHEMthiXe0+otaNCGNht6n8k7ruNaA0DNpz3F+2jHQXw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@chainlink/contracts-ccip/-/contracts-ccip-1.2.1.tgz", + "integrity": "sha512-8lVod5Gclx25ZSLqX40zzhMwN7unnvj9AMKOE/LYIP5DjyiTDs/3BeXTw6GakeIkQF5v3FILnMIz8emF5FdSpQ==", "dependencies": { "@eth-optimism/contracts": "^0.5.21", "@openzeppelin/contracts": "~4.3.3", diff --git a/package.json b/package.json index 1cc82b4032a..52915c3f24f 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "@astrojs/sitemap": "^3.0.3", "@chainlink/components": "^0.4.5", "@chainlink/contracts": "^0.8.0", - "@chainlink/contracts-ccip": "^0.7.6", + "@chainlink/contracts-ccip": "^1.2.1", "@chainlink/design-system": "^0.1.50", "@chainlink/solana-sdk": "^0.2.2", "@metamask/detect-provider": "^2.0.0", diff --git a/public/images/ccip/tutorials/ccip-explorer-ccip-retry-failed-defensive.jpg b/public/images/ccip/tutorials/ccip-explorer-ccip-retry-failed-defensive.jpg index 8fce714b3d0..deba2ce64fb 100644 Binary files a/public/images/ccip/tutorials/ccip-explorer-ccip-retry-failed-defensive.jpg and b/public/images/ccip/tutorials/ccip-explorer-ccip-retry-failed-defensive.jpg differ diff --git a/public/images/ccip/tutorials/ccip-explorer-ccip-retry-failed-tokens-transferred-defensive.jpg b/public/images/ccip/tutorials/ccip-explorer-ccip-retry-failed-tokens-transferred-defensive.jpg index 7e118175c54..2b704c05d75 100644 Binary files a/public/images/ccip/tutorials/ccip-explorer-ccip-retry-failed-tokens-transferred-defensive.jpg and b/public/images/ccip/tutorials/ccip-explorer-ccip-retry-failed-tokens-transferred-defensive.jpg differ diff --git a/public/images/ccip/tutorials/ccip-explorer-offchain-send-tokens-paylink-tx-details.jpg b/public/images/ccip/tutorials/ccip-explorer-offchain-send-tokens-paylink-tx-details.jpg index 78709bb8627..7e95a26afbb 100644 Binary files a/public/images/ccip/tutorials/ccip-explorer-offchain-send-tokens-paylink-tx-details.jpg and b/public/images/ccip/tutorials/ccip-explorer-offchain-send-tokens-paylink-tx-details.jpg differ diff --git a/public/images/ccip/tutorials/ccip-explorer-offchain-send-tokens-paylink-waiting-tx-details.jpg b/public/images/ccip/tutorials/ccip-explorer-offchain-send-tokens-paylink-waiting-tx-details.jpg index 3ea8f444484..47a16e07555 100644 Binary files a/public/images/ccip/tutorials/ccip-explorer-offchain-send-tokens-paylink-waiting-tx-details.jpg and b/public/images/ccip/tutorials/ccip-explorer-offchain-send-tokens-paylink-waiting-tx-details.jpg differ diff --git a/public/images/ccip/tutorials/ccip-explorer-offchain-send-tokens-tx-details.jpg b/public/images/ccip/tutorials/ccip-explorer-offchain-send-tokens-tx-details.jpg index f6a8d6902ea..42e40b14e5c 100644 Binary files a/public/images/ccip/tutorials/ccip-explorer-offchain-send-tokens-tx-details.jpg and b/public/images/ccip/tutorials/ccip-explorer-offchain-send-tokens-tx-details.jpg differ diff --git a/public/images/ccip/tutorials/ccip-explorer-pay-link-tx-details.jpg b/public/images/ccip/tutorials/ccip-explorer-pay-link-tx-details.jpg index 2e0e018a4e3..9262324d4fe 100644 Binary files a/public/images/ccip/tutorials/ccip-explorer-pay-link-tx-details.jpg and b/public/images/ccip/tutorials/ccip-explorer-pay-link-tx-details.jpg differ diff --git a/public/images/ccip/tutorials/ccip-explorer-pay-link-tx-success.jpg b/public/images/ccip/tutorials/ccip-explorer-pay-link-tx-success.jpg index 8f2f7f3167d..e57288e6dad 100644 Binary files a/public/images/ccip/tutorials/ccip-explorer-pay-link-tx-success.jpg and b/public/images/ccip/tutorials/ccip-explorer-pay-link-tx-success.jpg differ diff --git a/public/images/ccip/tutorials/ccip-explorer-pay-native-tx-details.jpg b/public/images/ccip/tutorials/ccip-explorer-pay-native-tx-details.jpg index bd2b33ff323..3e5983ced4a 100644 Binary files a/public/images/ccip/tutorials/ccip-explorer-pay-native-tx-details.jpg and b/public/images/ccip/tutorials/ccip-explorer-pay-native-tx-details.jpg differ diff --git a/public/images/ccip/tutorials/ccip-explorer-pay-native-tx-success.jpg b/public/images/ccip/tutorials/ccip-explorer-pay-native-tx-success.jpg index 4b983b44090..7fb46ca4e5f 100644 Binary files a/public/images/ccip/tutorials/ccip-explorer-pay-native-tx-success.jpg and b/public/images/ccip/tutorials/ccip-explorer-pay-native-tx-success.jpg differ diff --git a/public/images/ccip/tutorials/ccip-explorer-send-tokens-lastfailedmessageids-defensive.jpg b/public/images/ccip/tutorials/ccip-explorer-send-tokens-lastfailedmessageids-defensive.jpg index a4d67575360..82d1eca75d0 100644 Binary files a/public/images/ccip/tutorials/ccip-explorer-send-tokens-lastfailedmessageids-defensive.jpg and b/public/images/ccip/tutorials/ccip-explorer-send-tokens-lastfailedmessageids-defensive.jpg differ diff --git a/public/images/ccip/tutorials/ccip-explorer-send-tokens-message-pay-link-tx-details-defensive.jpg b/public/images/ccip/tutorials/ccip-explorer-send-tokens-message-pay-link-tx-details-defensive.jpg index e975962f819..dbb70f990cb 100644 Binary files a/public/images/ccip/tutorials/ccip-explorer-send-tokens-message-pay-link-tx-details-defensive.jpg and b/public/images/ccip/tutorials/ccip-explorer-send-tokens-message-pay-link-tx-details-defensive.jpg differ diff --git a/public/images/ccip/tutorials/ccip-explorer-send-tokens-message-pay-link-tx-details-success-defensive.jpg b/public/images/ccip/tutorials/ccip-explorer-send-tokens-message-pay-link-tx-details-success-defensive.jpg index 720732a1bd0..e7467a8c9bf 100644 Binary files a/public/images/ccip/tutorials/ccip-explorer-send-tokens-message-pay-link-tx-details-success-defensive.jpg and b/public/images/ccip/tutorials/ccip-explorer-send-tokens-message-pay-link-tx-details-success-defensive.jpg differ diff --git a/public/images/ccip/tutorials/ccip-explorer-send-tokens-message-pay-link-tx-details-success.jpg b/public/images/ccip/tutorials/ccip-explorer-send-tokens-message-pay-link-tx-details-success.jpg index 8f931ddf29d..e80f6badf02 100644 Binary files a/public/images/ccip/tutorials/ccip-explorer-send-tokens-message-pay-link-tx-details-success.jpg and b/public/images/ccip/tutorials/ccip-explorer-send-tokens-message-pay-link-tx-details-success.jpg differ diff --git a/public/images/ccip/tutorials/ccip-explorer-send-tokens-message-pay-link-tx-details.jpg b/public/images/ccip/tutorials/ccip-explorer-send-tokens-message-pay-link-tx-details.jpg index a2ea89ddb68..614cf8536c0 100644 Binary files a/public/images/ccip/tutorials/ccip-explorer-send-tokens-message-pay-link-tx-details.jpg and b/public/images/ccip/tutorials/ccip-explorer-send-tokens-message-pay-link-tx-details.jpg differ diff --git a/public/images/ccip/tutorials/ccip-explorer-send-tokens-message-tx-details-success.jpg b/public/images/ccip/tutorials/ccip-explorer-send-tokens-message-tx-details-success.jpg index dd6ae69ea17..12689d3f5df 100644 Binary files a/public/images/ccip/tutorials/ccip-explorer-send-tokens-message-tx-details-success.jpg and b/public/images/ccip/tutorials/ccip-explorer-send-tokens-message-tx-details-success.jpg differ diff --git a/public/images/ccip/tutorials/ccip-explorer-send-tokens-message-tx-details.jpg b/public/images/ccip/tutorials/ccip-explorer-send-tokens-message-tx-details.jpg index ab6e753b18d..7f7fa5c7a5c 100644 Binary files a/public/images/ccip/tutorials/ccip-explorer-send-tokens-message-tx-details.jpg and b/public/images/ccip/tutorials/ccip-explorer-send-tokens-message-tx-details.jpg differ diff --git a/public/images/ccip/tutorials/ccip-explorer-send-tokens-pay-link-tx-details-success.jpg b/public/images/ccip/tutorials/ccip-explorer-send-tokens-pay-link-tx-details-success.jpg index cbde92faf74..ac394ca9ee9 100644 Binary files a/public/images/ccip/tutorials/ccip-explorer-send-tokens-pay-link-tx-details-success.jpg and b/public/images/ccip/tutorials/ccip-explorer-send-tokens-pay-link-tx-details-success.jpg differ diff --git a/public/images/ccip/tutorials/ccip-explorer-send-tokens-pay-link-tx-details.jpg b/public/images/ccip/tutorials/ccip-explorer-send-tokens-pay-link-tx-details.jpg index c05e3d1a77b..6e8bf7533d7 100644 Binary files a/public/images/ccip/tutorials/ccip-explorer-send-tokens-pay-link-tx-details.jpg and b/public/images/ccip/tutorials/ccip-explorer-send-tokens-pay-link-tx-details.jpg differ diff --git a/public/images/ccip/tutorials/ccip-explorer-send-tokens-tx-details-success.jpg b/public/images/ccip/tutorials/ccip-explorer-send-tokens-tx-details-success.jpg index 2b0d4beff4c..08d1d47f9a1 100644 Binary files a/public/images/ccip/tutorials/ccip-explorer-send-tokens-tx-details-success.jpg and b/public/images/ccip/tutorials/ccip-explorer-send-tokens-tx-details-success.jpg differ diff --git a/public/images/ccip/tutorials/ccip-explorer-send-tokens-tx-details.jpg b/public/images/ccip/tutorials/ccip-explorer-send-tokens-tx-details.jpg index d95225d240d..0826c2da8e4 100644 Binary files a/public/images/ccip/tutorials/ccip-explorer-send-tokens-tx-details.jpg and b/public/images/ccip/tutorials/ccip-explorer-send-tokens-tx-details.jpg differ diff --git a/public/images/ccip/tutorials/ccip-explorer-tx-details-success.jpg b/public/images/ccip/tutorials/ccip-explorer-tx-details-success.jpg index c5a89d52a8f..62796967043 100644 Binary files a/public/images/ccip/tutorials/ccip-explorer-tx-details-success.jpg and b/public/images/ccip/tutorials/ccip-explorer-tx-details-success.jpg differ diff --git a/public/images/ccip/tutorials/ccip-explorer-tx-details.jpg b/public/images/ccip/tutorials/ccip-explorer-tx-details.jpg index 78de4f09b13..50319fb91b2 100644 Binary files a/public/images/ccip/tutorials/ccip-explorer-tx-details.jpg and b/public/images/ccip/tutorials/ccip-explorer-tx-details.jpg differ diff --git a/public/images/ccip/tutorials/deploy-receiver-mumbai.jpg b/public/images/ccip/tutorials/deploy-receiver-mumbai.jpg index 3ecab03a731..c9bff538b33 100644 Binary files a/public/images/ccip/tutorials/deploy-receiver-mumbai.jpg and b/public/images/ccip/tutorials/deploy-receiver-mumbai.jpg differ diff --git a/public/images/ccip/tutorials/deploy-sender-sepolia.jpg b/public/images/ccip/tutorials/deploy-sender-sepolia.jpg index 2a9969b253c..7bf068668a6 100644 Binary files a/public/images/ccip/tutorials/deploy-sender-sepolia.jpg and b/public/images/ccip/tutorials/deploy-sender-sepolia.jpg differ diff --git a/public/images/ccip/tutorials/deployed-receiver-mumbai.jpg b/public/images/ccip/tutorials/deployed-receiver-mumbai.jpg index ea5f1fe7f81..c0b2c058308 100644 Binary files a/public/images/ccip/tutorials/deployed-receiver-mumbai.jpg and b/public/images/ccip/tutorials/deployed-receiver-mumbai.jpg differ diff --git a/public/images/ccip/tutorials/deployed-sender-sepolia.jpg b/public/images/ccip/tutorials/deployed-sender-sepolia.jpg index 55cacfb7384..9957cdb9e23 100644 Binary files a/public/images/ccip/tutorials/deployed-sender-sepolia.jpg and b/public/images/ccip/tutorials/deployed-sender-sepolia.jpg differ diff --git a/public/images/ccip/tutorials/fund-deployed-sender-sepolia.jpg b/public/images/ccip/tutorials/fund-deployed-sender-sepolia.jpg index 46c73c9bdbb..0474ae9d617 100644 Binary files a/public/images/ccip/tutorials/fund-deployed-sender-sepolia.jpg and b/public/images/ccip/tutorials/fund-deployed-sender-sepolia.jpg differ diff --git a/public/images/ccip/tutorials/mumbai-getmessagedetails-pay-link.jpg b/public/images/ccip/tutorials/mumbai-getmessagedetails-pay-link.jpg index c46a3d4c10e..d1cd1620244 100644 Binary files a/public/images/ccip/tutorials/mumbai-getmessagedetails-pay-link.jpg and b/public/images/ccip/tutorials/mumbai-getmessagedetails-pay-link.jpg differ diff --git a/public/images/ccip/tutorials/mumbai-getmessagedetails-pay-native.jpg b/public/images/ccip/tutorials/mumbai-getmessagedetails-pay-native.jpg index 654fe1e84aa..c801b10ffca 100644 Binary files a/public/images/ccip/tutorials/mumbai-getmessagedetails-pay-native.jpg and b/public/images/ccip/tutorials/mumbai-getmessagedetails-pay-native.jpg differ diff --git a/public/images/ccip/tutorials/mumbai-getmessagedetails.jpg b/public/images/ccip/tutorials/mumbai-getmessagedetails.jpg index af254078dd6..9d152d77cc1 100644 Binary files a/public/images/ccip/tutorials/mumbai-getmessagedetails.jpg and b/public/images/ccip/tutorials/mumbai-getmessagedetails.jpg differ diff --git a/public/images/ccip/tutorials/mumbai-token-messagedetails-pay-link.jpg b/public/images/ccip/tutorials/mumbai-token-messagedetails-pay-link.jpg index 377f58b48c5..3fddc2bcb5b 100644 Binary files a/public/images/ccip/tutorials/mumbai-token-messagedetails-pay-link.jpg and b/public/images/ccip/tutorials/mumbai-token-messagedetails-pay-link.jpg differ diff --git a/public/images/ccip/tutorials/mumbai-token-messagedetails.jpg b/public/images/ccip/tutorials/mumbai-token-messagedetails.jpg index bce2c47d444..99ff77c8cf5 100644 Binary files a/public/images/ccip/tutorials/mumbai-token-messagedetails.jpg and b/public/images/ccip/tutorials/mumbai-token-messagedetails.jpg differ diff --git a/public/images/ccip/tutorials/mumbai-tokensreceived.jpg b/public/images/ccip/tutorials/mumbai-tokensreceived.jpg index daf0027f88e..6fde1692fb3 100644 Binary files a/public/images/ccip/tutorials/mumbai-tokensreceived.jpg and b/public/images/ccip/tutorials/mumbai-tokensreceived.jpg differ diff --git a/public/images/ccip/tutorials/send-tokens-pay-link-mumbai-tokensreceived.jpg b/public/images/ccip/tutorials/send-tokens-pay-link-mumbai-tokensreceived.jpg index 19335e9a49c..e2ce5548ebb 100644 Binary files a/public/images/ccip/tutorials/send-tokens-pay-link-mumbai-tokensreceived.jpg and b/public/images/ccip/tutorials/send-tokens-pay-link-mumbai-tokensreceived.jpg differ diff --git a/public/images/ccip/tutorials/sepolia-sendmessage.jpg b/public/images/ccip/tutorials/sepolia-sendmessage.jpg index e07891508c5..0a5d239dd0c 100644 Binary files a/public/images/ccip/tutorials/sepolia-sendmessage.jpg and b/public/images/ccip/tutorials/sepolia-sendmessage.jpg differ diff --git a/public/samples/CCIP/Messenger.sol b/public/samples/CCIP/Messenger.sol index fce999697e4..dfda4bc5613 100644 --- a/public/samples/CCIP/Messenger.sol +++ b/public/samples/CCIP/Messenger.sol @@ -5,7 +5,7 @@ import {IRouterClient} from "@chainlink/contracts-ccip/src/v0.8/ccip/interfaces/ import {OwnerIsCreator} from "@chainlink/contracts-ccip/src/v0.8/shared/access/OwnerIsCreator.sol"; import {Client} from "@chainlink/contracts-ccip/src/v0.8/ccip/libraries/Client.sol"; import {CCIPReceiver} from "@chainlink/contracts-ccip/src/v0.8/ccip/applications/CCIPReceiver.sol"; -import {IERC20} from "@chainlink/contracts-ccip/src/v0.8/vendor/openzeppelin-solidity/v4.8.0/token/ERC20/IERC20.sol"; +import {IERC20} from "@chainlink/contracts-ccip/src/v0.8/vendor/openzeppelin-solidity/v4.8.0/contracts/token/ERC20/IERC20.sol"; /** * THIS IS AN EXAMPLE CONTRACT THAT USES HARDCODED VALUES FOR CLARITY. @@ -247,8 +247,8 @@ contract Messenger is CCIPReceiver, OwnerIsCreator { data: abi.encode(_text), // ABI-encoded string tokenAmounts: new Client.EVMTokenAmount[](0), // Empty array aas no tokens are transferred extraArgs: Client._argsToBytes( - // Additional arguments, setting gas limit and non-strict sequencing mode - Client.EVMExtraArgsV1({gasLimit: 200_000, strict: false}) + // Additional arguments, setting gas limit + Client.EVMExtraArgsV1({gasLimit: 200_000}) ), // Set the feeToken to a feeTokenAddress, indicating specific asset will be used for fees feeToken: _feeTokenAddress diff --git a/public/samples/CCIP/ProgrammableDefensiveTokenTransfers.sol b/public/samples/CCIP/ProgrammableDefensiveTokenTransfers.sol index 94c364012fc..d85800cd047 100644 --- a/public/samples/CCIP/ProgrammableDefensiveTokenTransfers.sol +++ b/public/samples/CCIP/ProgrammableDefensiveTokenTransfers.sol @@ -5,9 +5,9 @@ import {IRouterClient} from "@chainlink/contracts-ccip/src/v0.8/ccip/interfaces/ import {OwnerIsCreator} from "@chainlink/contracts-ccip/src/v0.8/shared/access/OwnerIsCreator.sol"; import {Client} from "@chainlink/contracts-ccip/src/v0.8/ccip/libraries/Client.sol"; import {CCIPReceiver} from "@chainlink/contracts-ccip/src/v0.8/ccip/applications/CCIPReceiver.sol"; -import {IERC20} from "@chainlink/contracts-ccip/src/v0.8/vendor/openzeppelin-solidity/v4.8.0/token/ERC20/IERC20.sol"; -import {SafeERC20} from "@chainlink/contracts-ccip/src/v0.8/vendor/openzeppelin-solidity/v4.8.0/token/ERC20/utils/SafeERC20.sol"; -import {EnumerableMap} from "@chainlink/contracts-ccip/src/v0.8/vendor/openzeppelin-solidity/v4.8.0/utils/structs/EnumerableMap.sol"; +import {IERC20} from "@chainlink/contracts-ccip/src/v0.8/vendor/openzeppelin-solidity/v4.8.0/contracts/token/ERC20/IERC20.sol"; +import {SafeERC20} from "@chainlink/contracts-ccip/src/v0.8/vendor/openzeppelin-solidity/v4.8.0/contracts/token/ERC20/utils/SafeERC20.sol"; +import {EnumerableMap} from "@chainlink/contracts-ccip/src/v0.8/vendor/openzeppelin-solidity/v4.8.0/contracts/utils/structs/EnumerableMap.sol"; /** * THIS IS AN EXAMPLE CONTRACT THAT USES HARDCODED VALUES FOR CLARITY. @@ -466,8 +466,8 @@ contract ProgrammableDefensiveTokenTransfers is CCIPReceiver, OwnerIsCreator { data: abi.encode(_text), // ABI-encoded string tokenAmounts: tokenAmounts, // The amount and type of token being transferred extraArgs: Client._argsToBytes( - // Additional arguments, setting gas limit and non-strict sequencing mode - Client.EVMExtraArgsV1({gasLimit: 2_000_000, strict: false}) + // Additional arguments, setting gas limit + Client.EVMExtraArgsV1({gasLimit: 2_000_000}) ), // Set the feeToken to a feeTokenAddress, indicating specific asset will be used for fees feeToken: _feeTokenAddress diff --git a/public/samples/CCIP/ProgrammableTokenTransfers.sol b/public/samples/CCIP/ProgrammableTokenTransfers.sol index 3a027af95ec..776f5e7f549 100644 --- a/public/samples/CCIP/ProgrammableTokenTransfers.sol +++ b/public/samples/CCIP/ProgrammableTokenTransfers.sol @@ -5,7 +5,7 @@ import {IRouterClient} from "@chainlink/contracts-ccip/src/v0.8/ccip/interfaces/ import {OwnerIsCreator} from "@chainlink/contracts-ccip/src/v0.8/shared/access/OwnerIsCreator.sol"; import {Client} from "@chainlink/contracts-ccip/src/v0.8/ccip/libraries/Client.sol"; import {CCIPReceiver} from "@chainlink/contracts-ccip/src/v0.8/ccip/applications/CCIPReceiver.sol"; -import {IERC20} from "@chainlink/contracts-ccip/src/v0.8/vendor/openzeppelin-solidity/v4.8.0/token/ERC20/IERC20.sol"; +import {IERC20} from "@chainlink/contracts-ccip/src/v0.8/vendor/openzeppelin-solidity/v4.8.0/contracts/token/ERC20/IERC20.sol"; /** * THIS IS AN EXAMPLE CONTRACT THAT USES HARDCODED VALUES FOR CLARITY. @@ -328,8 +328,8 @@ contract ProgrammableTokenTransfers is CCIPReceiver, OwnerIsCreator { data: abi.encode(_text), // ABI-encoded string tokenAmounts: tokenAmounts, // The amount and type of token being transferred extraArgs: Client._argsToBytes( - // Additional arguments, setting gas limit and non-strict sequencing mode - Client.EVMExtraArgsV1({gasLimit: 200_000, strict: false}) + // Additional arguments, setting gas limit + Client.EVMExtraArgsV1({gasLimit: 200_000}) ), // Set the feeToken to a feeTokenAddress, indicating specific asset will be used for fees feeToken: _feeTokenAddress diff --git a/public/samples/CCIP/Sender.sol b/public/samples/CCIP/Sender.sol index b6f8c2a3871..dda6a7ec53e 100644 --- a/public/samples/CCIP/Sender.sol +++ b/public/samples/CCIP/Sender.sol @@ -56,8 +56,8 @@ contract Sender is OwnerIsCreator { data: abi.encode(text), // ABI-encoded string tokenAmounts: new Client.EVMTokenAmount[](0), // Empty array indicating no tokens are being sent extraArgs: Client._argsToBytes( - // Additional arguments, setting gas limit and non-strict sequencing mode - Client.EVMExtraArgsV1({gasLimit: 200_000, strict: false}) + // Additional arguments, setting gas limit + Client.EVMExtraArgsV1({gasLimit: 200_000}) ), // Set the feeToken address, indicating LINK will be used for fees feeToken: address(s_linkToken) diff --git a/public/samples/CCIP/TokenTransferor.sol b/public/samples/CCIP/TokenTransferor.sol index e66dc5ddae5..885873304c2 100644 --- a/public/samples/CCIP/TokenTransferor.sol +++ b/public/samples/CCIP/TokenTransferor.sol @@ -4,7 +4,7 @@ pragma solidity 0.8.19; import {IRouterClient} from "@chainlink/contracts-ccip/src/v0.8/ccip/interfaces/IRouterClient.sol"; import {OwnerIsCreator} from "@chainlink/contracts-ccip/src/v0.8/shared/access/OwnerIsCreator.sol"; import {Client} from "@chainlink/contracts-ccip/src/v0.8/ccip/libraries/Client.sol"; -import {IERC20} from "@chainlink/contracts-ccip/src/v0.8/vendor/openzeppelin-solidity/v4.8.0/token/ERC20/IERC20.sol"; +import {IERC20} from "@chainlink/contracts-ccip/src/v0.8/vendor/openzeppelin-solidity/v4.8.0/contracts/token/ERC20/IERC20.sol"; /** * THIS IS AN EXAMPLE CONTRACT THAT USES HARDCODED VALUES FOR CLARITY. @@ -221,8 +221,8 @@ contract TokenTransferor is OwnerIsCreator { data: "", // No data tokenAmounts: tokenAmounts, // The amount and type of token being transferred extraArgs: Client._argsToBytes( - // Additional arguments, setting gas limit to 0 as we are not sending any data and non-strict sequencing mode - Client.EVMExtraArgsV1({gasLimit: 0, strict: false}) + // Additional arguments, setting gas limit to 0 as we are not sending any data + Client.EVMExtraArgsV1({gasLimit: 0}) ), // Set the feeToken to a feeTokenAddress, indicating specific asset will be used for fees feeToken: _feeTokenAddress diff --git a/src/config/data/ccip/data.ts b/src/config/data/ccip/data.ts index 5ffbcbc4368..f0b4ff5378c 100644 --- a/src/config/data/ccip/data.ts +++ b/src/config/data/ccip/data.ts @@ -1,83 +1,161 @@ -import { ChainsConfig, LanesConfig, TokensConfig, Environment } from "./types" +import { ChainsConfig, LanesConfig, TokensConfig, Environment, Version } from "./types" // For mainnet -import chainsMainnet from "@config/data/ccip/mainnet/chains.json" -import lanesMainnet from "@config/data/ccip/mainnet/lanes.json" -import tokensMainnet from "@config/data/ccip/mainnet//tokens.json" +import chainsMainnetv100 from "@config/data/ccip/v1_0_0/mainnet/chains.json" +import lanesMainnetv100 from "@config/data/ccip/v1_0_0/mainnet/lanes.json" +import tokensMainnetv100 from "@config/data/ccip/v1_0_0/mainnet/tokens.json" // For testnet -import chainsTestnet from "@config/data/ccip/testnet/chains.json" -import lanesTestnet from "@config/data/ccip/testnet/lanes.json" -import tokensTestnet from "@config/data/ccip/testnet/tokens.json" +import chainsTestnetv120 from "@config/data/ccip/v1_2_0/testnet/chains.json" +import lanesTestnetv120 from "@config/data/ccip/v1_2_0/testnet/lanes.json" +import tokensTestnetv120 from "@config/data/ccip/v1_2_0/testnet/tokens.json" + +import chainsTestnetv100 from "@config/data/ccip/v1_0_0/testnet/chains.json" +import lanesTestnetv100 from "@config/data/ccip/v1_0_0/testnet/lanes.json" +import tokensTestnetv100 from "@config/data/ccip/v1_0_0/testnet/tokens.json" import { SupportedChain } from "@config/types" import { supportedChainToChainInRdd } from "@features/utils" -export const loadReferenceData = (environment: Environment) => { - let chainsReferenceData: ChainsConfig, lanesReferenceData: LanesConfig, tokensReferenceData: TokensConfig - switch ( - environment // Make sure to use the parameter 'environment', not the type 'Environment' - ) { - case Environment.Mainnet: - chainsReferenceData = chainsMainnet as unknown as ChainsConfig - lanesReferenceData = lanesMainnet as unknown as LanesConfig - tokensReferenceData = tokensMainnet as unknown as TokensConfig +export const loadReferenceData = ({ environment, version }: { environment: Environment; version: Version }) => { + let chainsReferenceData: ChainsConfig + let lanesReferenceData: LanesConfig + let tokensReferenceData: TokensConfig + + if (environment === Environment.Mainnet && version === Version.V1_0_0) { + chainsReferenceData = chainsMainnetv100 as unknown as ChainsConfig + lanesReferenceData = lanesMainnetv100 as unknown as LanesConfig + tokensReferenceData = tokensMainnetv100 as unknown as TokensConfig + } else if (environment === Environment.Testnet && version === Version.V1_2_0) { + chainsReferenceData = chainsTestnetv120 as unknown as ChainsConfig + lanesReferenceData = lanesTestnetv120 as unknown as LanesConfig + tokensReferenceData = tokensTestnetv120 as unknown as TokensConfig + } else if (environment === Environment.Testnet && version === Version.V1_0_0) { + chainsReferenceData = chainsTestnetv100 as unknown as ChainsConfig + lanesReferenceData = lanesTestnetv100 as unknown as LanesConfig + tokensReferenceData = tokensTestnetv100 as unknown as TokensConfig + } else { + throw new Error(`Invalid environment/version combination: ${environment}/${version}`) + } + + return { chainsReferenceData, lanesReferenceData, tokensReferenceData } +} + +export const getAllChains = ({ + mainnetVersion, + testnetVersion, +}: { + mainnetVersion: Version + testnetVersion: Version +}) => { + let chainsMainnetKeys: string[] = [] + let chainsTestnetKeys: string[] = [] + + switch (mainnetVersion) { + case Version.V1_0_0: + chainsMainnetKeys = Object.keys(chainsMainnetv100) + break + default: + throw new Error(`Invalid mainnet version: ${mainnetVersion}`) + } + + switch (testnetVersion) { + case Version.V1_0_0: + chainsTestnetKeys = Object.keys(chainsTestnetv100) break - case Environment.Testnet: - chainsReferenceData = chainsTestnet as unknown as ChainsConfig - lanesReferenceData = lanesTestnet as unknown as LanesConfig - tokensReferenceData = tokensTestnet as unknown as TokensConfig + case Version.V1_2_0: + chainsTestnetKeys = Object.keys(chainsTestnetv120) break default: - throw Error(`Wrong environment ${environment}`) + throw new Error(`Invalid testnet version: ${testnetVersion}`) } - return { chainsReferenceData, lanesReferenceData, tokensReferenceData } + return [...chainsMainnetKeys, ...chainsTestnetKeys] } -export const allChains = [...Object.keys(chainsMainnet), ...Object.keys(chainsTestnet)] - const CCIPTokenImage = "https://images.prismic.io/data-chain-link/86d5bc29-7511-49f5-bbd8-18a8ebc008b0_ccip-icon-white.png?auto=compress,format" -export const isBnMRdd = (chainRdd: string) => { - return tokensTestnet["CCIP-BnM"][chainRdd] +const isBnMRdd = ({ chainRdd, version }: { chainRdd: string; version: Version }) => { + let tokensTestData + + switch (version) { + case Version.V1_0_0: + tokensTestData = tokensTestnetv100["CCIP-BnM"] + break + case Version.V1_2_0: + tokensTestData = tokensTestnetv120["CCIP-BnM"] + break + default: + throw new Error(`Invalid testnet version: ${version}`) + } + + return tokensTestData[chainRdd] } -export const isBnM = (chain: SupportedChain) => { +export const isBnM = ({ chain, version }: { chain: SupportedChain; version: Version }) => { const chainRdd = supportedChainToChainInRdd(chain) - return isBnMRdd(chainRdd) + return isBnMRdd({ chainRdd, version }) } -export const isLnMRdd = (chainRdd: string) => { +export const isLnMRdd = ({ chainRdd, version }: { chainRdd: string; version: Version }) => { + let tokensTestData const supportedChainForLock: SupportedChain = "ETHEREUM_SEPOLIA" + switch (version) { + case Version.V1_0_0: + tokensTestData = tokensTestnetv100["CCIP-LnM"] + break + case Version.V1_2_0: + tokensTestData = tokensTestnetv120["CCIP-LnM"] + break + default: + throw new Error(`Invalid testnet version: ${version}`) + } + return { - supported: tokensTestnet["CCIP-LnM"][chainRdd], + supported: tokensTestData[chainRdd], supportedChainForLock, - } // LnM only for Sepolia + } } -export const isLnM = (chain: SupportedChain) => { +export const isLnM = ({ chain, version }: { chain: SupportedChain; version: Version }) => { const chainRdd = supportedChainToChainInRdd(chain) - return isLnMRdd(chainRdd) + return isLnMRdd({ chainRdd, version }) } -export const isBnMOrLnMRdd = (chainRdd: string) => { - return isBnMRdd(chainRdd) || isLnMRdd(chainRdd).supported +export const isBnMOrLnMRdd = ({ chainRdd, version }: { chainRdd: string; version: Version }) => { + return isBnMRdd({ chainRdd, version }) || isLnMRdd({ chainRdd, version }).supported } -export const isBnMOrLnM = (chain: SupportedChain) => { - return isBnM(chain) || isLnM(chain) +export const isBnMOrLnM = ({ chain, version }: { chain: SupportedChain; version: Version }) => { + return isBnM({ chain, version }) || isLnM({ chain, version }) } -export const getBnMParams = (supportedChain: SupportedChain) => { +export const getBnMParams = ({ supportedChain, version }: { supportedChain: SupportedChain; version: Version }) => { const supportedChainRdd = supportedChainToChainInRdd(supportedChain) - if (!(supportedChainRdd in chainsTestnet)) return undefined // No BnM for mainnets - const token = tokensTestnet["CCIP-BnM"][supportedChainRdd] + + let chainsTestData + let tokensTestData + switch (version) { + case Version.V1_0_0: + chainsTestData = chainsTestnetv100 + tokensTestData = tokensTestnetv100["CCIP-BnM"] + break + case Version.V1_2_0: + chainsTestData = chainsTestnetv120 + tokensTestData = tokensTestnetv120["CCIP-BnM"] + break + default: + throw new Error(`Invalid testnet version: ${version}`) + } + + if (!(supportedChainRdd in chainsTestData)) return undefined // No BnM for mainnets + const token = tokensTestData[supportedChainRdd] if (!token || Object.keys(token).length === 0) { console.warn(`No BnM found for testnet ${supportedChain}`) return undefined } + const { tokenAddress: address, symbol, @@ -98,23 +176,40 @@ export const getBnMParams = (supportedChain: SupportedChain) => { } } -export const getLnMParams = (supportedChain: SupportedChain) => { +export const getLnMParams = ({ supportedChain, version }: { supportedChain: SupportedChain; version: Version }) => { const supportedChainRdd = supportedChainToChainInRdd(supportedChain) - if (!isLnMRdd(supportedChainRdd).supported) return undefined - const token = tokensTestnet["CCIP-LnM"][supportedChainRdd] + + if (!isLnMRdd({ chainRdd: supportedChainRdd, version }).supported) return undefined + + let tokensTestData + switch (version) { + case Version.V1_0_0: + tokensTestData = tokensTestnetv100["CCIP-LnM"] + break + case Version.V1_2_0: + tokensTestData = tokensTestnetv120["CCIP-LnM"] + break + default: + throw new Error(`Invalid testnet version: ${version}`) + } + + const token = tokensTestData[supportedChainRdd] if (!token || Object.keys(token).length === 0) { console.warn(`No LnM found for testnet ${supportedChain}`) return undefined } + const { tokenAddress: address, symbol, decimals, } = token as { tokenAddress: string; symbol: string; decimals: number } + if (!address || !symbol || !decimals) { console.error(`Token data not correct for LnM token on ${supportedChain}`) return undefined } + return { type: "ERC20", options: { diff --git a/src/config/data/ccip/types.ts b/src/config/data/ccip/types.ts index dac4fd4d36d..0d3af5036a4 100644 --- a/src/config/data/ccip/types.ts +++ b/src/config/data/ccip/types.ts @@ -56,3 +56,8 @@ export enum Environment { Mainnet = "mainnet", Testnet = "testnet", } + +export enum Version { + V1_0_0 = "1.0.0", + V1_2_0 = "1.2.0", +} diff --git a/src/config/data/ccip/mainnet/chains.json b/src/config/data/ccip/v1_0_0/mainnet/chains.json similarity index 100% rename from src/config/data/ccip/mainnet/chains.json rename to src/config/data/ccip/v1_0_0/mainnet/chains.json diff --git a/src/config/data/ccip/mainnet/lanes.json b/src/config/data/ccip/v1_0_0/mainnet/lanes.json similarity index 100% rename from src/config/data/ccip/mainnet/lanes.json rename to src/config/data/ccip/v1_0_0/mainnet/lanes.json diff --git a/src/config/data/ccip/mainnet/tokens.json b/src/config/data/ccip/v1_0_0/mainnet/tokens.json similarity index 100% rename from src/config/data/ccip/mainnet/tokens.json rename to src/config/data/ccip/v1_0_0/mainnet/tokens.json diff --git a/src/config/data/ccip/testnet/chains.json b/src/config/data/ccip/v1_0_0/testnet/chains.json similarity index 100% rename from src/config/data/ccip/testnet/chains.json rename to src/config/data/ccip/v1_0_0/testnet/chains.json diff --git a/src/config/data/ccip/testnet/lanes.json b/src/config/data/ccip/v1_0_0/testnet/lanes.json similarity index 100% rename from src/config/data/ccip/testnet/lanes.json rename to src/config/data/ccip/v1_0_0/testnet/lanes.json diff --git a/src/config/data/ccip/testnet/tokens.json b/src/config/data/ccip/v1_0_0/testnet/tokens.json similarity index 100% rename from src/config/data/ccip/testnet/tokens.json rename to src/config/data/ccip/v1_0_0/testnet/tokens.json diff --git a/src/config/data/ccip/v1_2_0/testnet/chains.json b/src/config/data/ccip/v1_2_0/testnet/chains.json new file mode 100644 index 00000000000..360c6bbd01f --- /dev/null +++ b/src/config/data/ccip/v1_2_0/testnet/chains.json @@ -0,0 +1,32 @@ +{ + "ethereum-testnet-sepolia": { + "chainSelector": "16015286601757825753", + "router": "0x0bf3de8c5d3e8a2b34d2beeb17abfcebaf363a59", + "feeTokens": ["LINK", "WETH"] + }, + "ethereum-testnet-goerli-optimism-1": { + "chainSelector": "2664363617261496610", + "router": "0xcc5a0b910d9e9504a7561934bed294c51285a78d", + "feeTokens": ["LINK", "WETH"] + }, + "matic-testnet": { + "chainSelector": "12532609583862916517", + "router": "0x1035cabc275068e0f4b745a29cedf38e13af41b1", + "feeTokens": ["LINK", "WMATIC"] + }, + "avalanche-fuji-testnet": { + "chainSelector": "14767482510784806043", + "router": "0xf694e193200268f9a4868e4aa017a0118c9a8177", + "feeTokens": ["LINK", "WAVAX"] + }, + "bsc-testnet": { + "chainSelector": "13264668187771770619", + "router": "0xe1053ae1857476f36a3c62580ff9b016e8ee8f6f", + "feeTokens": ["LINK", "WBNB"] + }, + "ethereum-testnet-goerli-base-1": { + "chainSelector": "5790810961207155433", + "router": "0x80af2f44ed0469018922c9f483dc5a909862fdc2", + "feeTokens": ["LINK", "WETH"] + } +} diff --git a/src/config/data/ccip/v1_2_0/testnet/lanes.json b/src/config/data/ccip/v1_2_0/testnet/lanes.json new file mode 100644 index 00000000000..1aa2b1ad50b --- /dev/null +++ b/src/config/data/ccip/v1_2_0/testnet/lanes.json @@ -0,0 +1,654 @@ +{ + "avalanche-fuji-testnet": { + "ethereum-testnet-sepolia": { + "supportedTokens": { + "CCIP-BnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "CCIP-LnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + } + }, + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "ethereum-testnet-goerli-optimism-1": { + "supportedTokens": { + "CCIP-BnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "CCIP-LnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "USDC": { + "rateLimiterConfig": { + "capacity": "100000000000", + "isEnabled": true, + "rate": "167000000" + } + } + }, + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "matic-testnet": { + "supportedTokens": { + "CCIP-BnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "CCIP-LnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + } + }, + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "bsc-testnet": { + "supportedTokens": { + "CCIP-BnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "CCIP-LnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + } + }, + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "ethereum-testnet-goerli-base-1": { + "supportedTokens": { + "CCIP-BnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "CCIP-LnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "USDC": { + "rateLimiterConfig": { + "capacity": "100000000000", + "isEnabled": true, + "rate": "167000000" + } + } + }, + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + } + }, + "bsc-testnet": { + "ethereum-testnet-sepolia": { + "supportedTokens": { + "CCIP-BnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "CCIP-LnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + } + }, + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "avalanche-fuji-testnet": { + "supportedTokens": { + "CCIP-BnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "CCIP-LnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + } + }, + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "matic-testnet": { + "supportedTokens": { + "CCIP-BnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "CCIP-LnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + } + }, + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "ethereum-testnet-goerli-base-1": { + "supportedTokens": { + "CCIP-BnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "CCIP-LnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + } + }, + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + } + }, + "ethereum-testnet-goerli-base-1": { + "ethereum-testnet-sepolia": { + "supportedTokens": { + "CCIP-BnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "CCIP-LnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + } + }, + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "ethereum-testnet-goerli-optimism-1": { + "supportedTokens": { + "CCIP-BnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "CCIP-LnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "USDC": { + "rateLimiterConfig": { + "capacity": "100000000000", + "isEnabled": true, + "rate": "167000000" + } + } + }, + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "bsc-testnet": { + "supportedTokens": { + "CCIP-BnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "CCIP-LnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + } + }, + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "avalanche-fuji-testnet": { + "supportedTokens": { + "CCIP-BnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "CCIP-LnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "USDC": { + "rateLimiterConfig": { + "capacity": "100000000000", + "isEnabled": true, + "rate": "167000000" + } + } + }, + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + } + }, + "ethereum-testnet-goerli-optimism-1": { + "ethereum-testnet-sepolia": { + "supportedTokens": { + "CCIP-BnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "CCIP-LnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + } + }, + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "avalanche-fuji-testnet": { + "supportedTokens": { + "CCIP-BnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "CCIP-LnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "USDC": { + "rateLimiterConfig": { + "capacity": "100000000000", + "isEnabled": true, + "rate": "167000000" + } + } + }, + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "matic-testnet": { + "supportedTokens": { + "CCIP-BnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "CCIP-LnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + } + }, + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "ethereum-testnet-goerli-base-1": { + "supportedTokens": { + "CCIP-BnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "CCIP-LnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "USDC": { + "rateLimiterConfig": { + "capacity": "100000000000", + "isEnabled": true, + "rate": "167000000" + } + } + }, + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + } + }, + "ethereum-testnet-sepolia": { + "avalanche-fuji-testnet": { + "supportedTokens": { + "CCIP-BnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "CCIP-LnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + } + }, + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "ethereum-testnet-goerli-optimism-1": { + "supportedTokens": { + "CCIP-BnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "CCIP-LnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + } + }, + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "matic-testnet": { + "supportedTokens": { + "CCIP-BnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "CCIP-LnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + } + }, + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "bsc-testnet": { + "supportedTokens": { + "CCIP-BnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "CCIP-LnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + } + }, + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "ethereum-testnet-goerli-base-1": { + "supportedTokens": { + "CCIP-BnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "CCIP-LnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + } + }, + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + } + }, + "matic-testnet": { + "ethereum-testnet-sepolia": { + "supportedTokens": { + "CCIP-BnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "CCIP-LnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + } + }, + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "avalanche-fuji-testnet": { + "supportedTokens": { + "CCIP-BnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "CCIP-LnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + } + }, + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "ethereum-testnet-goerli-optimism-1": { + "supportedTokens": { + "CCIP-BnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "CCIP-LnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + } + }, + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "bsc-testnet": { + "supportedTokens": { + "CCIP-BnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + }, + "CCIP-LnM": { + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + } + }, + "rateLimiterConfig": { + "capacity": "100000000000000000000000", + "isEnabled": true, + "rate": "167000000000000000000" + } + } + } +} diff --git a/src/config/data/ccip/v1_2_0/testnet/tokens.json b/src/config/data/ccip/v1_2_0/testnet/tokens.json new file mode 100644 index 00000000000..ec04d5e5e85 --- /dev/null +++ b/src/config/data/ccip/v1_2_0/testnet/tokens.json @@ -0,0 +1,245 @@ +{ + "LINK": { + "avalanche-fuji-testnet": { + "tokenAddress": "0x0b9d5D9136855f6FEc3c0993feE6E9CE8a297846", + "allowListEnabled": false, + "poolAddress": "0x658af0d8ecbb13c5fd5b545ac7316e50cc07cf6e", + "poolType": "lockRelease", + "name": "Chainlink Token", + "symbol": "LINK.e", + "decimals": 18 + }, + "bsc-testnet": { + "tokenAddress": "0x84b9B910527Ad5C03A9Ca831909E21e236EA7b06", + "allowListEnabled": false, + "poolAddress": "0x8a710bbd77661d168d5a6725bd2e514ba1bff59d", + "name": "ChainLink Token", + "symbol": "LINK", + "decimals": 18 + }, + "ethereum-testnet-goerli-base-1": { + "tokenAddress": "0xd886e2286fd1073df82462ea1822119600af80b6", + "allowListEnabled": false, + "name": "ChainLink Token", + "symbol": "LINK", + "decimals": 18 + }, + "ethereum-testnet-goerli-optimism-1": { + "tokenAddress": "0xdc2CC710e42857672E7907CF474a69B63B93089f", + "allowListEnabled": false, + "poolAddress": "0xdecfaf632175915bdf38c00d9d9746e8a90a56c4", + "poolType": "lockRelease", + "name": "ChainLink Token", + "symbol": "LINK", + "decimals": 18 + }, + "ethereum-testnet-sepolia": { + "tokenAddress": "0x779877A7B0D9E8603169DdbD7836e478b4624789", + "allowListEnabled": false, + "poolAddress": "0x5344b4bf5ae39038a591866d2853b2b1db622911", + "poolType": "lockRelease", + "name": "ChainLink Token", + "symbol": "LINK", + "decimals": 18 + }, + "matic-testnet": { + "tokenAddress": "0x326C977E6efc84E512bB9C30f76E30c160eD06FB", + "allowListEnabled": false, + "poolAddress": "0x6fce09b2e74f649a4494a1844219cb0d86cfe8b7", + "poolType": "lockRelease", + "name": "ChainLink Token", + "symbol": "LINK", + "decimals": 18 + } + }, + "WAVAX": { + "avalanche-fuji-testnet": { + "tokenAddress": "0xd00ae08403B9bbb9124bB305C09058E32C39A48c", + "allowListEnabled": false, + "poolType": "lockRelease", + "name": "Wrapped AVAX", + "symbol": "WAVAX", + "decimals": 18 + } + }, + "WBNB": { + "bsc-testnet": { + "tokenAddress": "0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd", + "allowListEnabled": false, + "name": "Wrapped BNB", + "symbol": "WBNB", + "decimals": 18 + } + }, + "WETH": { + "ethereum-testnet-goerli-base-1": { + "tokenAddress": "0x4200000000000000000000000000000000000006", + "allowListEnabled": false, + "name": "Wrapped Ether", + "symbol": "WETH", + "decimals": 18 + }, + "ethereum-testnet-goerli-optimism-1": { + "tokenAddress": "0x4200000000000000000000000000000000000006", + "allowListEnabled": false, + "name": "Wrapped Ether", + "symbol": "WETH", + "decimals": 18 + }, + "ethereum-testnet-sepolia": { + "tokenAddress": "0x097D90c9d3E0B50Ca60e1ae45F6A81010f9FB534", + "allowListEnabled": false, + "name": "Wrapped Ether", + "symbol": "WETH", + "decimals": 18 + } + }, + "WMATIC": { + "matic-testnet": { + "tokenAddress": "0x9c3C9283D3e44854697Cd22D3Faa240Cfb032889", + "allowListEnabled": false, + "poolType": "lockRelease", + "name": "Wrapped Matic", + "symbol": "WMATIC", + "decimals": 18 + } + }, + "USDC": { + "ethereum-testnet-goerli-optimism-1": { + "tokenAddress": "0xe05606174bac4A6364B31bd0eCA4bf4dD368f8C6", + "allowListEnabled": false, + "poolAddress": "0x4849a40e3e64c3315a8e1875525301b19fc5babd", + "name": "USD Coin", + "symbol": "USDC", + "decimals": 6 + }, + "avalanche-fuji-testnet": { + "tokenAddress": "0x5425890298aed601595a70AB815c96711a31Bc65", + "allowListEnabled": false, + "poolAddress": "0x7a4d8f8c18762d362e64b411d7490fba112811cd", + "name": "USD Coin", + "symbol": "USDC", + "decimals": 6 + }, + "ethereum-testnet-goerli-base-1": { + "tokenAddress": "0xf175520c52418dfe19c8098071a252da48cd1c19", + "allowListEnabled": false, + "poolAddress": "0x5c576130b38e914abe4f422074fd8f86d1aa829b", + "name": "USD Coin", + "symbol": "USDC", + "decimals": 6 + } + }, + "CCIP-BnM": { + "avalanche-fuji-testnet": { + "tokenAddress": "0xD21341536c5cF5EB1bcb58f6723cE26e8D8E90e4", + "allowListEnabled": false, + "poolAddress": "0xec1062cbdf4fbf31b3a6aac62b6f6f123bb70e12", + "poolType": "burnMint", + "name": "CCIP-BnM", + "symbol": "CCIP-BnM", + "decimals": 18 + }, + "bsc-testnet": { + "tokenAddress": "0xbfa2acd33ed6eec0ed3cc06bf1ac38d22b36b9e9", + "allowListEnabled": false, + "poolAddress": "0x31ede84776da37e2404ee88d71c234e92cb672e5", + "poolType": "burnMint", + "name": "CCIP-BnM", + "symbol": "CCIP-BnM", + "decimals": 18 + }, + "ethereum-testnet-goerli-base-1": { + "tokenAddress": "0xbf9036529123de264bfa0fc7362fe25b650d4b16", + "allowListEnabled": false, + "poolAddress": "0x7e4247af17f00e92d4c067170917716d987c38f4", + "poolType": "burnMint", + "name": "CCIP-BnM", + "symbol": "CCIP-BnM", + "decimals": 18 + }, + "ethereum-testnet-goerli-optimism-1": { + "tokenAddress": "0xaBfE9D11A2f1D61990D1d253EC98B5Da00304F16", + "allowListEnabled": false, + "poolAddress": "0x8668ab4eb1dffe11db7491ebce633b050bb29cda", + "poolType": "burnMint", + "name": "CCIP-BnM", + "symbol": "CCIP-BnM", + "decimals": 18 + }, + "ethereum-testnet-sepolia": { + "tokenAddress": "0xFd57b4ddBf88a4e07fF4e34C487b99af2Fe82a05", + "allowListEnabled": false, + "poolAddress": "0x38d1ef9619cd40cf5482c045660ae7c82ada062c", + "poolType": "burnMint", + "name": "CCIP-BnM", + "symbol": "CCIP-BnM", + "decimals": 18 + }, + "matic-testnet": { + "tokenAddress": "0xf1E3A5842EeEF51F2967b3F05D45DD4f4205FF40", + "allowListEnabled": false, + "poolAddress": "0xa6c88f12ae1aa9c333e86ccbdd2957cac2e5f58c", + "poolType": "burnMint", + "name": "CCIP-BnM", + "symbol": "CCIP-BnM", + "decimals": 18 + } + }, + "CCIP-LnM": { + "avalanche-fuji-testnet": { + "tokenAddress": "0x70f5c5c40b873ea597776da2c21929a8282a3b35", + "allowListEnabled": false, + "poolAddress": "0x583dbe5f15dea93f321826d856994e53e01cd498", + "poolType": "lockRelease", + "name": "CCIP_LnM", + "symbol": "CCIP_LnM", + "decimals": 18 + }, + "bsc-testnet": { + "tokenAddress": "0x79a4fc27f69323660f5bfc12dee21c3cc14f5901", + "allowListEnabled": false, + "poolAddress": "0x44a27e50bec104518823c928a5560d2c69281e61", + "poolType": "lockRelease", + "name": "CCIP_LnM", + "symbol": "CCIP_LnM", + "decimals": 18 + }, + "ethereum-testnet-goerli-base-1": { + "tokenAddress": "0x73ed16c1a61b098fd6924cce5cc6a9a30348d944", + "allowListEnabled": false, + "poolAddress": "0x6becd9eb4df6bf59152344fbcdc7919b9f38c6ef", + "poolType": "lockRelease", + "name": "CCIP_LnM", + "symbol": "CCIP_LnM", + "decimals": 18 + }, + "ethereum-testnet-goerli-optimism-1": { + "tokenAddress": "0x835833d556299cdec623e7980e7369145b037591", + "allowListEnabled": false, + "poolAddress": "0xf66d20ac7b981e249fce8fb8ddae3974f5559735", + "poolType": "lockRelease", + "name": "CCIP_LnM", + "symbol": "CCIP_LnM", + "decimals": 18 + }, + "ethereum-testnet-sepolia": { + "tokenAddress": "0x466D489b6d36E7E3b824ef491C225F5830E81cC1", + "allowListEnabled": false, + "poolAddress": "0x09EC713b931586eD6Aa5425eC4d9dA078a47B6b1", + "poolType": "lockRelease", + "name": "CCIP_LnM", + "symbol": "CCIP_LnM", + "decimals": 18 + }, + "matic-testnet": { + "tokenAddress": "0xc1c76a8c5bfde1be034bbcd930c668726e7c1987", + "allowListEnabled": false, + "poolAddress": "0x83369f8586ba000a87db278549b9a2370dc626b6", + "poolType": "lockRelease", + "name": "CCIP_LnM", + "symbol": "CCIP_LnM", + "decimals": 18 + } + } +} diff --git a/src/config/sidebar.ts b/src/config/sidebar.ts index 4cb578323be..4cc1810e3f9 100644 --- a/src/config/sidebar.ts +++ b/src/config/sidebar.ts @@ -823,12 +823,16 @@ export const SIDEBAR: Partial> = { url: "ccip/supported-networks", children: [ { - title: "Mainnet", - url: "ccip/supported-networks/mainnet", + title: "Mainnet v1.0.0", + url: "ccip/supported-networks/v1_0_0/mainnet", }, { - title: "Testnet", - url: "ccip/supported-networks/testnet", + title: "Testnet v1.2.0", + url: "ccip/supported-networks/v1_2_0/testnet", + }, + { + title: "Testnet v1.0.0 (Deprecated)", + url: "ccip/supported-networks/v1_0_0/testnet", }, ], }, diff --git a/src/content/ccip/api-reference/ccip-receiver.mdx b/src/content/ccip/api-reference/ccip-receiver.mdx index 599d8862e2e..e900078dd4f 100644 --- a/src/content/ccip/api-reference/ccip-receiver.mdx +++ b/src/content/ccip/api-reference/ccip-receiver.mdx @@ -10,7 +10,7 @@ import { Tabs } from "@components/Tabs" + + Blockchain interoperability protocols are important for the Web3 ecosystem and traditional systems that need to interact with different blockchains. These protocols are the foundation for building blockchain abstraction layers, allowing traditional backends and dApps to interact with any blockchain network through a single middleware solution. Without a blockchain interoperability protocol, Web2 systems and dApps would need to build separate in-house implementations for each cross-chain interaction that they want to use, which is a time-consuming, resource-intensive, and complex process. Blockchain interoperability protocols provide the following capabilities: diff --git a/src/content/ccip/release-notes.mdx b/src/content/ccip/release-notes.mdx index 37c7e39af29..b93858f946a 100644 --- a/src/content/ccip/release-notes.mdx +++ b/src/content/ccip/release-notes.mdx @@ -6,6 +6,37 @@ title: "Chainlink CCIP Release Notes" import { Aside } from "@components" +## v1.2.0 release on testnet - 2023-12-08 + + + +- There is no change to the router interface, but you must use the new router addresses mentioned in the [CCIP v1.2.0 + configuration page](/ccip/supported-networks/v1_2_0/testnet). +- Added support for USDC transfers. USDC transfers are currently supported on the following lanes: + + - From Optimism Goerli to Avalanche Fuji. + - From Optimism Goerli to Base Goerli. + - From Avalanche Fuji to Optimism Goerli. + - From Avalanche Fuji to Base Goerli. + - From Base Goerli to Optimism Goerli. + - From Base Goerli to Avalanche Fuji. + + Refer to the [Supported Networks](/ccip/supported-networks/v1_2_0/testnet) to get a specific lane's token addresses and rate limits. + +- We've simplified the message sequencing process in our CCIP message handling by removing the `strict` sequencing flag from the [extraArgs](/ccip/api-reference/client#evmextraargsv1) field in [CCIP messages](/ccip/api-reference/client#evm2anymessage). + +- The gas limit and maximum message data length for CCIP messages have been adjusted on testnets. These changes are detailed in the [Service Limits](/ccip/service-limits) documentation. + +- To interact with CCIP v1.2.0 , use the [@chainlnk/contract-ccip](https://www.npmjs.com/package/@chainlink/contracts-ccip) npm package. + ## Arbitrum Goerli - 2023-11-17 Arbitrum Goerli is no longer supported. @@ -16,33 +47,39 @@ Arbitrum Sepolia support will be added at a later date. Added BNB and Base mainnets: -- [BNB mainnet](/ccip/supported-networks/mainnet#bnb-mainnet) -- [Base mainnet](/ccip/supported-networks/mainnet#base-mainnet) +- BNB mainnet. +- Base mainnet. + +See the [supported networks](/ccip/supported-networks) page for more information. ## New mainnet - 2023-09-21 Added Arbitrum mainnet: -- [Arbitrum mainnet](/ccip/supported-networks/mainnet#arbitrum-mainnet) +- Arbitrum mainnet. + +See the [supported networks](/ccip/supported-networks) page for more information. ## New testnets - 2023-08-25 Added BNB and Base testnets: -- [BNB testnet](/ccip/supported-networks/testnet#bnb-testnet) -- [Base Goerli](/ccip/supported-networks/testnet#base-goerli) +- BNB testnet. +- Base Goerli. + +See the [supported networks](/ccip/supported-networks) page for more information. ## Testnet GA release - 2023-07-20 Chainlink CCIP is publicly available on the following testnet chains: -- [Ethereum Sepolia](/ccip/supported-networks/testnet#ethereum-sepolia) -- [Optimism Goerli](/ccip/supported-networks/testnet#optimism-goerli) -- [Avalanche Fuji](/ccip/supported-networks/testnet#avalanche-fuji) -- [Arbitrum Goerli](/ccip/supported-networks/testnet) -- [Polygon Mumbai](/ccip/supported-networks/testnet#polygon-mumbai) +- Ethereum Sepolia. +- Optimism Goerli. +- Avalanche Fuji. +- Arbitrum Goerli. +- Polygon Mumbai. -See to the [supported networks](/ccip/supported-networks) page for more information. +See the [supported networks](/ccip/supported-networks) page for more information. ## Mainnet Early Access - 2023-07-17 @@ -52,7 +89,9 @@ See to the [supported networks](/ccip/supported-networks) page for more informat Chainlink CCIP is available on the following networks: -- [Ethereum mainnet](/ccip/supported-networks/mainnet#ethereum-mainnet) -- [Optimism mainnet](/ccip/supported-networks/mainnet#optimism-mainnet) -- [Avalanche mainnet](/ccip/supported-networks/mainnet#avalanche-mainnet) -- [Polygon mainnet](/ccip/supported-networks/mainnet#polygon-mainnet) +- Ethereum mainnet. +- Optimism mainnet. +- Avalanche mainnet. +- Polygon mainnet. + +See the [supported networks](/ccip/supported-networks) page for more information. diff --git a/src/content/ccip/service-limits.mdx b/src/content/ccip/service-limits.mdx index 7d0153005ee..1ba921edd17 100644 --- a/src/content/ccip/service-limits.mdx +++ b/src/content/ccip/service-limits.mdx @@ -15,7 +15,38 @@ import { Aside } from "@components" expressly acknowledge and agree to accept these terms. -Across all networks, CCIP transactions are subject to the following service limits: +## Mainnet + +### Version 1.0.0 + +| Item | Description | Limit | +| -------------------------------------------- | ---------------------------------------------------------------------------------------- | ----------------- | +| Maximum message `data` length | `data` payload sent within the [CCIP message](/ccip/api-reference/client#evm2anymessage) | 30 kilobytes | +| Message Gas Limit | User specified [gas limit](/ccip/api-reference/client#evmextraargsv1) | 2,000,000 | +| Maximum number of tokens | Maximum number of distinct tokens a user can transfer in a single transaction | 1 | + +## Testnet + +### Version 1.2.0 + +| Item | Description | Limit | +| -------------------------------------------- | ---------------------------------------------------------------------------------------- | ----------------- | +| Maximum message `data` length | `data` payload sent within the [CCIP message](/ccip/api-reference/client#evm2anymessage) | 30 kilobytes | +| Message Gas Limit | User specified [gas limit](/ccip/api-reference/client#evmextraargsv1) | 3,000,000 | +| Maximum number of tokens | Maximum number of distinct tokens a user can transfer in a single transaction | 1 | + +### Version 1.0.0 + + | Item | Description | Limit | | -------------------------------------------- | ---------------------------------------------------------------------------------------- | ----------------- | diff --git a/src/content/ccip/supported-networks/index.mdx b/src/content/ccip/supported-networks/index.mdx index e494cebbb29..c9467a33902 100644 --- a/src/content/ccip/supported-networks/index.mdx +++ b/src/content/ccip/supported-networks/index.mdx @@ -6,5 +6,8 @@ title: "CCIP Supported Networks" Click on the following links to find the latest configuration for Chainlink CCIP: -- [Mainnets](/ccip/supported-networks/mainnet) -- [Testnets](/ccip/supported-networks/testnet) +- Mainnets: + - [v1.0.0](/ccip/supported-networks/v1_0_0/mainnet) +- Testnets: + - [v1.2.0](/ccip/supported-networks/v1_2_0/testnet) + - [v1.0.0 (Deprecated)](/ccip/supported-networks/v1_0_0/testnet) diff --git a/src/content/ccip/supported-networks/mainnet.mdx b/src/content/ccip/supported-networks/v1_0_0/mainnet.mdx similarity index 66% rename from src/content/ccip/supported-networks/mainnet.mdx rename to src/content/ccip/supported-networks/v1_0_0/mainnet.mdx index 2e1cc37447b..2691fcb6de7 100644 --- a/src/content/ccip/supported-networks/mainnet.mdx +++ b/src/content/ccip/supported-networks/v1_0_0/mainnet.mdx @@ -1,16 +1,16 @@ --- section: ccip date: Last Modified -title: "CCIP Supported Networks Mainnet" +title: "CCIP Supported Networks Mainnet - v1.0.0" --- import { Aside } from "@components" import Main from "@features/ccip/components/supported-networks/Main.astro" -import { Environment } from "@config/data/ccip" +import { Environment, Version } from "@config/data/ccip" -
+
diff --git a/src/content/ccip/supported-networks/v1_0_0/testnet.mdx b/src/content/ccip/supported-networks/v1_0_0/testnet.mdx new file mode 100644 index 00000000000..ec66e39b8ee --- /dev/null +++ b/src/content/ccip/supported-networks/v1_0_0/testnet.mdx @@ -0,0 +1,28 @@ +--- +section: ccip +date: Last Modified +title: "CCIP Supported Networks Testnet - v1.0.0 (Deprecated)" +--- + +import { Aside } from "@components" +import Main from "@features/ccip/components/supported-networks/Main.astro" +import { Environment, Version } from "@config/data/ccip" + + + + + +
diff --git a/src/content/ccip/supported-networks/testnet.mdx b/src/content/ccip/supported-networks/v1_2_0/testnet.mdx similarity index 72% rename from src/content/ccip/supported-networks/testnet.mdx rename to src/content/ccip/supported-networks/v1_2_0/testnet.mdx index f47a12fa26d..af741b259d9 100644 --- a/src/content/ccip/supported-networks/testnet.mdx +++ b/src/content/ccip/supported-networks/v1_2_0/testnet.mdx @@ -1,12 +1,12 @@ --- section: ccip date: Last Modified -title: "CCIP Supported Networks Testnet" +title: "CCIP Supported Networks Testnet - v1.2.0" --- import { Aside } from "@components" import Main from "@features/ccip/components/supported-networks/Main.astro" -import { Environment } from "@config/data/ccip" +import { Environment, Version } from "@config/data/ccip" -
+
diff --git a/src/content/ccip/test-tokens.mdx b/src/content/ccip/test-tokens.mdx index 06a43a921c4..0f4b3df749b 100644 --- a/src/content/ccip/test-tokens.mdx +++ b/src/content/ccip/test-tokens.mdx @@ -42,7 +42,7 @@ You can use this interface to connect your MetaMask wallet, select a testnet, an Follow these steps to learn how to mint these tokens. The steps explain how to mint _CCIP-BnM_ on _Ethereum Sepolia_: - Go to the [Supported Networks page](/ccip/supported-networks/testnet). -- Go to [Ethereum Sepolia section](/ccip/supported-networks/testnet#ethereum-sepolia). You will find a list of active lanes where the source chain is _Ethereum Sepolia_. You will find the list of supported tokens you can transfer for each lane. You should find _CCIP-BnM_ in the list for each testnet. +- Go to [Ethereum Sepolia section](/ccip/supported-networks/v1_2_0/testnet#ethereum-sepolia). You will find a list of active lanes where the source chain is _Ethereum Sepolia_. You will find the list of supported tokens you can transfer for each lane. You should find _CCIP-BnM_ in the list for each testnet. - Click on the token address to display it on the block explorer ([CCIP-BnM on Ethereum Sepolia Etherscan](https://sepolia.etherscan.io/address/0xFd57b4ddBf88a4e07fF4e34C487b99af2Fe82a05) in this case). diff --git a/src/content/ccip/tutorials/cross-chain-tokens-from-eoa.mdx b/src/content/ccip/tutorials/cross-chain-tokens-from-eoa.mdx index 9240b7c6269..fb20a80df02 100644 --- a/src/content/ccip/tutorials/cross-chain-tokens-from-eoa.mdx +++ b/src/content/ccip/tutorials/cross-chain-tokens-from-eoa.mdx @@ -44,7 +44,7 @@ In this tutorial, you will use Chainlink CCIP to transfer tokens directly from y - [Configure MetaMask to use LINK tokens](/resources/acquire-link#configure-metamask-to-use-link-tokens) - Acquire testnet ETH and LINK from [faucets.chain.link](https://faucets.chain.link/sepolia) -1. Check the [Supported Networks page](/ccip/supported-networks) to confirm that the tokens you will transfer are supported for your lane. In this example, you will transfer tokens from _Ethereum Sepolia_ to _Polygon Mumbai_ so check the list of supported tokens [here](/ccip/supported-networks/testnet#ethereum-sepolia-polygon-mumbai). +1. Check the [Supported Networks page](/ccip/supported-networks) to confirm that the tokens you will transfer are supported for your lane. In this example, you will transfer tokens from _Ethereum Sepolia_ to _Polygon Mumbai_ so check the list of supported tokens [here](/ccip/supported-networks/v1_2_0/testnet#ethereum-sepolia-polygon-mumbai). 1. Learn how to [acquire CCIP test tokens](/ccip/test-tokens#mint-test-tokens). After following this guide, your [EOA (Externally Owned Account)](https://ethereum.org/en/developers/docs/accounts/#types-of-account) should have CCIP-BnM tokens, and CCIP-BnM should appear in the list of your tokens in MetaMask. @@ -120,21 +120,21 @@ Complete the following steps in your terminal: 1. Once you execute the command, you should see the following logs: ``` - $ node src/transfer-tokens.js ethereumSepolia polygonMumbai 0x9d087fC03ae39b088326b67fA3C788236645b717 0xFd57b4ddBf88a4e07fF4e34C487b99af2Fe82a05 1000000000000000 0x779877A7B0D9E8603169DdbD7836e478b4624789 - Estimated fees (wei): 1545523076996923 - approved router 0xD0daae2231E9CB96b94C8512223533293C3693Bf to spend 1000000000000000 of token 0xFd57b4ddBf88a4e07fF4e34C487b99af2Fe82a05. Transaction: 0x1c62300452171a011c3dfa417324d9cd5b87ea167bc458e05a24518689ab06f3 - approved router 0xD0daae2231E9CB96b94C8512223533293C3693Bf to spend fees 1545523076996923 of token 0x779877A7B0D9E8603169DdbD7836e478b4624789. Transaction: 0x4f5e2d59eefe422c8bbce38a490bb0a405ebecbbff4ef7c12c8f05f0f89fa734 + $ node src/transfer-tokens.js ethereumSepolia polygonMumbai 0x83dC44a4C00DFf69d0A0c7c94B20b53a4933BE0A 0xFd57b4ddBf88a4e07fF4e34C487b99af2Fe82a05 1000000000000000 0x779877A7B0D9E8603169DdbD7836e478b4624789 + Estimated fees (wei): 45004872518799270 + approved router 0x0bf3de8c5d3e8a2b34d2beeb17abfcebaf363a59 to spend 1000000000000000 of token 0xFd57b4ddBf88a4e07fF4e34C487b99af2Fe82a05. Transaction: 0x5216b9c85d576a6d97c80edaadd890f2a7ae0132e54e7bda9a102374de3c3003 + approved router 0x0bf3de8c5d3e8a2b34d2beeb17abfcebaf363a59 to spend fees 45004872518799270 of token 0x779877A7B0D9E8603169DdbD7836e478b4624789. Transaction: 0x63ca647e8fd8af177eea85ea02f18e6ece00f7c0e7d7917b050221141cd47a72 - ✅ 1000000000000000 of Tokens(0xFd57b4ddBf88a4e07fF4e34C487b99af2Fe82a05) Sent to account 0x9d087fC03ae39b088326b67fA3C788236645b717 on destination chain polygonMumbai using CCIP. Transaction hash 0xfa3620aedb0a090593812fdd49cd697d38530ed4b91f89435195e1eefcf0dbd6 - Message id is 0xa54e44186143b05a257239679ba512a5fd1c020557ef39edc9c62ac628f8e86d + ✅ 1000000000000000 of Tokens(0xFd57b4ddBf88a4e07fF4e34C487b99af2Fe82a05) Sent to account 0x83dC44a4C00DFf69d0A0c7c94B20b53a4933BE0A on destination chain polygonMumbai using CCIP. Transaction hash 0x7dda59032f1f157a830755264907139602f3fee73666938e12d17c26923c9e07 - Message id is 0x4ea8080f2a51377247e93b5f45c00330b8c4fde3043e99847d0cab734f473df2 - Wait for message 0xa54e44186143b05a257239679ba512a5fd1c020557ef39edc9c62ac628f8e86d to be executed on the destination chain - Check the explorer https://ccip.chain.link/msg/0xa54e44186143b05a257239679ba512a5fd1c020557ef39edc9c62ac628f8e86d + Wait for message 0x4ea8080f2a51377247e93b5f45c00330b8c4fde3043e99847d0cab734f473df2 to be executed on the destination chain - Check the explorer https://ccip.chain.link/msg/0x4ea8080f2a51377247e93b5f45c00330b8c4fde3043e99847d0cab734f473df2 ... ``` 1. Analyze the logs: - - The script communicates with the router to calculate the transaction fees required to transfer tokens, which amounts to 1,545,523,076,996,923 Juels (equivalent to 0,0015 LINK). - - The script engages with the Link token contract, authorizing the router contract to spend 1,545,523,076,996,923 Juels for the fees and 1000000000000000 (0.001 CCIP-BnM) from your Externally Owned Account (EOA) balance. + - The script communicates with the router to calculate the transaction fees required to transfer tokens, which amounts to 45,004,872,518,799,270 Juels (equivalent to 0,045 LINK). + - The script engages with the Link token contract, authorizing the router contract to spend 45,004,872,518,799,270 Juels for the fees and 1000000000000000 (0.001 CCIP-BnM) from your Externally Owned Account (EOA) balance. - The script initiates a transaction through the router to transfer 1000000000000000 (0.001 CCIP-BnM) to your account on _Polygon Mumbai_. It also returns the CCIP message ID. - The script continuously monitors the destination blockchain (_Polygon Mumbai_) to track the progress and completion of the cross-chain transaction. @@ -149,11 +149,11 @@ Complete the following steps in your terminal: 1. After several minutes (the waiting time depends on the [finality of the source blockchain](/ccip/concepts#finality)), the script will complete the polling process, and the following logs will be displayed: - ``` - Message 0xa54e44186143b05a257239679ba512a5fd1c020557ef39edc9c62ac628f8e86d is not processed yet on destination chain.Try again in 60sec - Check the explorer https://ccip.chain.link/msg/0xa54e44186143b05a257239679ba512a5fd1c020557ef39edc9c62ac628f8e86d + ``` + Message 0x4ea8080f2a51377247e93b5f45c00330b8c4fde3043e99847d0cab734f473df2 has not been processed yet on the destination chain.Try again in 60sec - Check the explorer https://ccip.chain.link/msg/0x4ea8080f2a51377247e93b5f45c00330b8c4fde3043e99847d0cab734f473df2 - ✅Status of message 0xa54e44186143b05a257239679ba512a5fd1c020557ef39edc9c62ac628f8e86d is SUCCESS - Check the explorer https://ccip.chain.link/msg/0xa54e44186143b05a257239679ba512a5fd1c020557ef39edc9c62ac628f8e86d - ``` + ✅Status of message 0x4ea8080f2a51377247e93b5f45c00330b8c4fde3043e99847d0cab734f473df2 is SUCCESS - Check the explorer https://ccip.chain.link/msg/0x4ea8080f2a51377247e93b5f45c00330b8c4fde3043e99847d0cab734f473df2 + ``` 1. Open the [CCIP explorer](https://ccip.chain.link/) and use the message ID to find your cross-chain transaction. @@ -186,31 +186,31 @@ Complete the following steps in your terminal: Command arguments: - | Argument | Explanation | - | ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | - | | Node.js will execute the JavaScript code inside the `transfer-tokens.js` file. | - | | This specifies the source blockchain, in this case, _Ethereum Sepolia_. | - | | This specifies the destination blockchain, which is _Polygon Mumbai_ in this case. | - | `YOUR_ACCOUNT` | This is the account address on the destination blockchain. Replace this with your account address. | - | | This is the CCIP-BnM token contract address on _Ethereum Sepolia_. The contract addresses for each network can be found on the [Supported Networks page](/ccip/supported-networks/testnet#ethereum-sepolia). | - | | This is the amount of CCIP-BnM tokens to be transferred. In this example, 0.001 CCIP-BnM are transferred. | + | Argument | Explanation | + | ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | + | | Node.js will execute the JavaScript code inside the `transfer-tokens.js` file. | + | | This specifies the source blockchain, in this case, _Ethereum Sepolia_. | + | | This specifies the destination blockchain, which is _Polygon Mumbai_ in this case. | + | `YOUR_ACCOUNT` | This is the account address on the destination blockchain. Replace this with your account address. | + | | This is the CCIP-BnM token contract address on _Ethereum Sepolia_. The contract addresses for each network can be found on the [Supported Networks page](/ccip/supported-networks/v1_2_0/testnet#ethereum-sepolia). | + | | This is the amount of CCIP-BnM tokens to be transferred. In this example, 0.001 CCIP-BnM are transferred. | 1. After you execute the command, you should see the following logs: ``` - $ node src/transfer-tokens.js ethereumSepolia polygonMumbai 0x9d087fC03ae39b088326b67fA3C788236645b717 0xFd57b4ddBf88a4e07fF4e34C487b99af2Fe82a05 1000000000000000 - Estimated fees (wei): 5810555558222 - approved router 0xD0daae2231E9CB96b94C8512223533293C3693Bf to spend 1000000000000000 of token 0xFd57b4ddBf88a4e07fF4e34C487b99af2Fe82a05. Transaction: 0x8a115653cc2f12bc772f7ebe51f0fd26665d8efe920f8a4152a1403ad86240d8 + $ node src/transfer-tokens.js ethereumSepolia polygonMumbai 0x83dC44a4C00DFf69d0A0c7c94B20b53a4933BE0A 0xFd57b4ddBf88a4e07fF4e34C487b99af2Fe82a05 1000000000000000 + Estimated fees (wei): 278051815072596 + approved router 0x0bf3de8c5d3e8a2b34d2beeb17abfcebaf363a59 to spend 1000000000000000 of token 0xFd57b4ddBf88a4e07fF4e34C487b99af2Fe82a05. Transaction: 0x85d91b16c08546ad5e8e7791cfe4ebf59cc986f805244230872487fe8ad6862d - ✅ 1000000000000000 of Tokens(0xFd57b4ddBf88a4e07fF4e34C487b99af2Fe82a05) Sent to account 0x9d087fC03ae39b088326b67fA3C788236645b717 on destination chain polygonMumbai using CCIP. Transaction hash 0x6be6508cc29f8d8da3c334f7063cc1a8a40d1a2cc13698751edf28f6c816a1aa - Message id is 0xa57bd1a6a343b78e1b05a78b1725bfd43a418601ca3d2d24118c8a5f7a81e4ae + ✅ 1000000000000000 of Tokens(0xFd57b4ddBf88a4e07fF4e34C487b99af2Fe82a05) Sent to account 0x83dC44a4C00DFf69d0A0c7c94B20b53a4933BE0A on destination chain polygonMumbai using CCIP. Transaction hash 0x358c2abccd75c52aeabf5b330fda2b17a4c29bfc2612fc85a8619d22c3d1be00 - Message id is 0x1dc9f4d0e798802b19668a26b59681b97c02ad16bef3765eae6c5232f1d2e050 - Wait for message 0xa57bd1a6a343b78e1b05a78b1725bfd43a418601ca3d2d24118c8a5f7a81e4ae to be executed on the destination chain - Check the explorer https://ccip.chain.link/msg/0xa57bd1a6a343b78e1b05a78b1725bfd43a418601ca3d2d24118c8a5f7a81e4ae + Wait for message 0x1dc9f4d0e798802b19668a26b59681b97c02ad16bef3765eae6c5232f1d2e050 to be executed on the destination chain - Check the explorer https://ccip.chain.link/msg/0x1dc9f4d0e798802b19668a26b59681b97c02ad16bef3765eae6c5232f1d2e050 ... ``` 1. Analyze the logs: - - The script communicates with the router to calculate the transaction fees required to transfer tokens, which amounts to 5,810,555,558,222 wei (equivalent to 0.00058 ETH). + - The script communicates with the router to calculate the transaction fees required to transfer tokens, which amounts to 278,051,815,072,596 wei (equivalent to 0.000278 ETH). - The script engages with the CCIP-BnM token contract, authorizing the router contract to deduct 0.001 CCIP-BnM from your Externally Owned Account (EOA) balance. - The script initiates a transaction through the router to transfer 0.001 CCIP-BnM tokens to your destination account on _Polygon Mumbai_. It also returns the CCIP message ID. - The script continuously monitors the destination blockchain (_Polygon Mumbai_) to track the progress and completion of the cross-chain transaction. diff --git a/src/content/ccip/tutorials/cross-chain-tokens.mdx b/src/content/ccip/tutorials/cross-chain-tokens.mdx index f972caa5b1d..7f188214e1a 100644 --- a/src/content/ccip/tutorials/cross-chain-tokens.mdx +++ b/src/content/ccip/tutorials/cross-chain-tokens.mdx @@ -32,7 +32,7 @@ In this tutorial, you will use Chainlink CCIP to transfer tokens from a smart co 1. You should understand how to write, compile, deploy, and fund a smart contract. If you need to brush up on the basics, read this [tutorial](/quickstarts/deploy-your-first-contract), which will guide you through using the [Solidity programming language](https://soliditylang.org/), interacting with the [MetaMask wallet](https://metamask.io) and working within the [Remix Development Environment](https://remix.ethereum.org/). 1. Your account must have some ETH and LINK tokens on _Ethereum Sepolia_. Learn how to [Acquire testnet LINK](/resources/acquire-link). -1. Check the [Supported Networks page](/ccip/supported-networks) to confirm that the tokens you will transfer are supported for your lane. In this example, you will transfer tokens from _Ethereum Sepolia_ to _Polygon Mumbai_ so check the list of supported tokens [here](/ccip/supported-networks/testnet#ethereum-sepolia-polygon-mumbai). +1. Check the [Supported Networks page](/ccip/supported-networks) to confirm that the tokens you will transfer are supported for your lane. In this example, you will transfer tokens from _Ethereum Sepolia_ to _Polygon Mumbai_ so check the list of supported tokens [here](/ccip/supported-networks/v1_2_0/testnet#ethereum-sepolia-polygon-mumbai). 1. Learn how to [acquire CCIP test tokens](/ccip/test-tokens#mint-test-tokens). Following this guide, you should have CCIP-BnM tokens, and CCIP-BnM should appear in the list of your tokens in MetaMask. 1. Learn how to [fund your contract](/resources/fund-your-contract). This guide shows how to fund your contract in LINK, but you can use the same guide to fund your contract with any ERC20 tokens as long as they appear in the list of tokens in MetaMask. @@ -53,7 +53,7 @@ To use this contract: 1. Open MetaMask and select the network _Ethereum Sepolia_. 1. In Remix IDE, click _Deploy & Run Transactions_ and select _Injected Provider - MetaMask_ from the environment list. Remix will then interact with your MetaMask wallet to communicate with _Ethereum Sepolia_. - 1. Fill in your blockchain's router and LINK contract addresses. The router address can be found on the [supported networks page](/ccip/supported-networks) and the LINK contract address on the [LINK token contracts page](/resources/link-token-contracts). For _Ethereum Sepolia_, the router address is and the LINK contract address is . + 1. Fill in your blockchain's router and LINK contract addresses. The router address can be found on the [supported networks page](/ccip/supported-networks) and the LINK contract address on the [LINK token contracts page](/resources/link-token-contracts). For _Ethereum Sepolia_, the router address is and the LINK contract address is . 1. Click the **transact** button. After you confirm the transaction, the contract address appears on the _Deployed Contracts_ list. Note your contract address. 1. Open MetaMask and fund your contract with CCIP-BnM tokens. You can transfer _CCIP-BnM_ to your contract. @@ -66,7 +66,7 @@ To use this contract: You will transfer _0.001 CCIP-BnM_. The CCIP fees for using CCIP will be paid in LINK. Read this [explanation](#transferring-tokens-and-pay-in-link) for a detailed description of the code example. -1. Open MetaMask and connect to _Ethereum Sepolia_. Fund your contract with LINK tokens. You can transfer _LINK_ to your contract. **Note**: The LINK tokens are used to pay for CCIP fees. +1. Open MetaMask and connect to _Ethereum Sepolia_. Fund your contract with LINK tokens. You can transfer _LINK_ to your contract. **Note**: The LINK tokens are used to pay for CCIP fees. 1. Transfer CCIP-BnM from _Ethereum Sepolia_: @@ -85,9 +85,12 @@ You will transfer _0.001 CCIP-BnM_. The CCIP fees for using CCIP will be paid in | \_amount |
The token amount (_0.001 CCIP-BnM_). | 1. Click the **transact** button and confirm the transaction on MetaMask. - 1. Once the transaction is successful, note the transaction hash. Here is an [example](https://sepolia.etherscan.io/tx/0xb423ad5650648f2856f67f6d8a9c0aa809aa7a86ab4e27b34721497e3a1d647c) of a transaction on _Ethereum Sepolia_. + 1. Once the transaction is successful, note the transaction hash. Here is an [example](https://sepolia.etherscan.io/tx/0x07c1b1f2b7926a5633baae0fc14289dd12a9faab0a7ad4786e57d1a27b61fb91) of a transaction on _Ethereum Sepolia_. - **Note**: During gas price spikes, your transaction might fail, requiring more than _0.01 LINK_ to proceed. If your transaction fails, fund your contract with more _LINK_ tokens and try again. + 1. Open the [CCIP explorer](https://ccip.chain.link/) and search your cross-chain transaction using the transaction hash. @@ -109,9 +112,9 @@ You will transfer _0.001 CCIP-BnM_. The CCIP fees for using CCIP will be paid in 1. Check the receiver account on the destination chain: - 1. Note the destination transaction hash from the CCIP explorer. `0x7abd502d0cb62bf99f3075ef1f83237de2fd213d09a268eff021957ac1703312` in this example. + 1. Note the destination transaction hash from the CCIP explorer. `0x65349bfd4016a3e1feb1bd91a0043315bcc0c356f466fcd463b7db096d33932e` in this example. 1. Open the block explorer for your destination chain. For _Polygon Mumbai_, open [polygonscan](https://mumbai.polygonscan.com/). - 1. Search the [transaction hash](https://mumbai.polygonscan.com/tx/0x7abd502d0cb62bf99f3075ef1f83237de2fd213d09a268eff021957ac1703312). + 1. Search the [transaction hash](https://mumbai.polygonscan.com/tx/0x65349bfd4016a3e1feb1bd91a0043315bcc0c356f466fcd463b7db096d33932e).
@@ -145,9 +148,12 @@ You will transfer _0.001 CCIP-BnM_. The CCIP fees for using CCIP will be paid in | \_amount |
The token amount (_0.001 CCIP-BnM_). | 1. Click the **transact** button and confirm the transaction on MetaMask. - 1. Once the transaction is successful, note the transaction hash. Here is an [example](https://sepolia.etherscan.io/tx/0x1c02435cce19a9b59d43f1ccc91f120abeb93b3962f4dd08a8ac8974d7ce6c70) of a transaction on _Ethereum Sepolia_. + 1. Once the transaction is successful, note the transaction hash. Here is an [example](https://sepolia.etherscan.io/tx/0xd20b6670af4741f81ac0ef8734a077677da21235e418c59d2ece100ed420e2bd) of a transaction on _Ethereum Sepolia_. - **Note**: During gas price spikes, your transaction might fail, requiring more than _0.01 ETH_ to proceed. If your transaction fails, fund your contract with more _ETH_ and try again. + 1. Open the [CCIP explorer](https://ccip.chain.link/) and search your cross-chain transaction using the transaction hash. @@ -169,9 +175,9 @@ You will transfer _0.001 CCIP-BnM_. The CCIP fees for using CCIP will be paid in 1. Check the receiver account on the destination chain: - 1. Note the destination transaction hash from the CCIP explorer. `0xa963f06e370d3eec0d0914646b6d25b6e1f4b767b5a2f5cf66e33e56ae5c4fc2` in this example. + 1. Note the destination transaction hash from the CCIP explorer. `0xac12b6e611571a736678b8c69c84f5c6ed20a6b9529b772dc14000389ab0dd8c` in this example. 1. Open the block explorer for your destination chain. For _Polygon Mumbai_, open [polygonscan](https://mumbai.polygonscan.com/). - 1. Search the [transaction hash](https://mumbai.polygonscan.com/tx/0xc3d9b21155c5c593afe3a2525e758541037c7f2b0bc1c1d70d76748d46f78b1b). + 1. Search the [transaction hash](https://mumbai.polygonscan.com/tx/0xac12b6e611571a736678b8c69c84f5c6ed20a6b9529b772dc14000389ab0dd8c).
@@ -199,7 +205,7 @@ The `transferTokensPayLINK` function undertakes six primary operations: - The `_receiver` address is encoded in bytes to accommodate non-EVM destination blockchains with distinct address formats. The encoding is achieved through [abi.encode](https://docs.soliditylang.org/en/develop/abi-spec.html). - The `data` is empty because you only transfer tokens. - The `tokenAmounts` is an array, with each element comprising a [`EVMTokenAmount` struct](/ccip/api-reference/client#evmtokenamount) that contains the token address and amount. The array contains one element where the `_token` (token address) and `_amount` (token amount) are passed by the user when calling the `transferTokensPayNative` function. - - The `extraArgs` specifies the `gasLimit` for relaying the message to the recipient contract on the destination blockchain, along with a `strict` parameter. In this example, the `gasLimit` is set to `0` because the contract only transfers tokens and does not expect function calls on the destination blockchain. The `strict` parameter is set to `false`. **Note**: If `strict` is true and `ccipReceive` reverts on the destination blockchain, subsequent messages from the same sender will be blocked by CCIP until the reverted message can be executed. + - The `extraArgs` specifies the `gasLimit` for relaying the message to the recipient contract on the destination blockchain. In this example, the `gasLimit` is set to `0` because the contract only transfers tokens and does not expect function calls on the destination blockchain. - The `_feeTokenAddress` designates the token address used for CCIP fees. Here, `address(linkToken)` signifies payment in LINK. {" "} @@ -223,8 +229,7 @@ The `transferTokensPayNative` function undertakes five primary operations: - The `_receiver` address is encoded in bytes to accommodate non-EVM destination blockchains with distinct address formats. The encoding is achieved through [abi.encode](https://docs.soliditylang.org/en/develop/abi-spec.html). - The `data` is empty because you only transfer tokens. - The `tokenAmounts` is an array, with each element comprising an `EVMTokenAmount` [struct](/ccip/api-reference/client#evmtokenamount) containing the token address and amount. The array contains one element where the `_token` (token address) and `_amount` (token amount) are passed by the user when calling the `transferTokensPayNative` function. - - The `extraArgs` specifies the `gasLimit` for relaying the message to the recipient contract on the destination blockchain, along with a `strict` parameter. In this example, the `gasLimit` is set to `0` because the contract only transfers tokens and does not expect function calls on the destination blockchain. The `strict` parameter is set to `false`. - **Note**: If `strict` is true and `ccipReceive` reverts on the destination blockchain, subsequent messages from the same sender will be blocked by CCIP until the reverted message can be executed. + - The `extraArgs` specifies the `gasLimit` for relaying the message to the recipient contract on the destination blockchain. In this example, the `gasLimit` is set to `0` because the contract only transfers tokens and does not expect function calls on the destination blockchain. - The `_feeTokenAddress` designates the token address used for CCIP fees. Here, `address(0)` signifies payment in native gas tokens (ETH). {" "} diff --git a/src/content/ccip/tutorials/programmable-token-transfers-defensive.mdx b/src/content/ccip/tutorials/programmable-token-transfers-defensive.mdx index 65cc8eb7960..c305a7b5ed0 100644 --- a/src/content/ccip/tutorials/programmable-token-transfers-defensive.mdx +++ b/src/content/ccip/tutorials/programmable-token-transfers-defensive.mdx @@ -31,7 +31,7 @@ This tutorial extends the [programmable token transfers example](/ccip/tutorials 1. You should understand how to write, compile, deploy, and fund a smart contract. If you need to brush up on the basics, read this [tutorial](/quickstarts/deploy-your-first-contract), which will guide you through using the [Solidity programming language](https://soliditylang.org/), interacting with the [MetaMask wallet](https://metamask.io) and working within the [Remix Development Environment](https://remix.ethereum.org/). 1. Your account must have some ETH and LINK tokens on _Ethereum Sepolia_ and MATIC tokens on _Polygon Mumbai_. Learn how to [Acquire testnet LINK](/resources/acquire-link). -1. Check the [Supported Networks page](/ccip/supported-networks) to confirm that the tokens you will transfer are supported for your lane. In this example, you will transfer tokens from _Ethereum Sepolia_ to _Polygon Mumbai_ so check the list of supported tokens [here](/ccip/supported-networks/testnet#ethereum-sepolia-polygon-mumbai). +1. Check the [Supported Networks page](/ccip/supported-networks) to confirm that the tokens you will transfer are supported for your lane. In this example, you will transfer tokens from _Ethereum Sepolia_ to _Polygon Mumbai_ so check the list of supported tokens [here](/ccip/supported-networks/v1_2_0/testnet#ethereum-sepolia-polygon-mumbai). 1. Learn how to [acquire CCIP test tokens](/ccip/test-tokens#mint-test-tokens). Following this guide, you should have CCIP-BnM tokens, and CCIP-BnM should appear in the list of your tokens in MetaMask. 1. Learn how to [fund your contract](/resources/fund-your-contract). This guide shows how to fund your contract in LINK, but you can use the same guide for funding your contract with any ERC20 tokens as long as they appear in the list of tokens in MetaMask. 1. Follow the previous tutorial: [_Transfer Tokens and Data Across Chains_](/ccip/tutorials/programmable-token-transfers) to learn how to make programmable token transfers using CCIP. @@ -53,7 +53,7 @@ To use this contract: 1. Open MetaMask and select the network _Ethereum Sepolia_. 1. In Remix IDE, click on _Deploy & Run Transactions_ and select _Injected Provider - MetaMask_ from the environment list. Remix will then interact with your MetaMask wallet to communicate with _Ethereum Sepolia_. - 1. Fill in your blockchain's router and LINK contract addresses. The router address can be found on the [supported networks page](/ccip/supported-networks) and the LINK contract address on the [LINK token contracts page](/resources/link-token-contracts). For _Ethereum Sepolia_, the router address is and the LINK contract address is . + 1. Fill in your blockchain's router and LINK contract addresses. The router address can be found on the [supported networks page](/ccip/supported-networks) and the LINK contract address on the [LINK token contracts page](/resources/link-token-contracts). For _Ethereum Sepolia_, the router address is and the LINK contract address is . 1. Click the **transact** button. After you confirm the transaction, the contract address appears on the _Deployed Contracts_ list. Note your contract address. 1. Open MetaMask and fund your contract with CCIP-BnM tokens. You can transfer _CCIP-BnM_ to your contract. @@ -65,7 +65,7 @@ To use this contract: 1. Open MetaMask and select the network _Polygon Mumbai_. 1. In Remix IDE, under _Deploy & Run Transactions_, make sure the environment is still _Injected Provider - MetaMask_. - 1. Fill in your blockchain's router and LINK contract addresses. The router address can be found on the [supported networks page](/ccip/supported-networks) and the LINK contract address on the [LINK token contracts page](/resources/link-token-contracts). For _Polygon Mumbai_, the router address is and the LINK contract address is . + 1. Fill in your blockchain's router and LINK contract addresses. The router address can be found on the [supported networks page](/ccip/supported-networks) and the LINK contract address on the [LINK token contracts page](/resources/link-token-contracts). For _Polygon Mumbai_, the router address is and the LINK contract address is . 1. Click the **transact** button. After you confirm the transaction, the contract address appears on the _Deployed Contracts_ list. Note your contract address. 1. Enable your contract to receive CCIP messages from _Ethereum Sepolia_: @@ -103,9 +103,12 @@ You will transfer _0.001 CCIP-BnM_ and a text. The CCIP fees for using CCIP will | \_amount |
The token amount (_0.001 CCIP-BnM_). | 1. Click on `transact` and confirm the transaction on MetaMask. - 1. After the transaction is successful, record the transaction hash. Here is an [example](https://sepolia.etherscan.io/tx/0x93e6da2389ad91b2a96f9a8f022dd6ea7e07aef49f8194e42b95ffc70ffed03b) of a transaction on _Ethereum Sepolia_. + 1. After the transaction is successful, record the transaction hash. Here is an [example](https://sepolia.etherscan.io/tx/0x2cf22661edecb61978d213bd0d7ceb47bcad71cc76322c16a2158dfa42bca4a9) of a transaction on _Ethereum Sepolia_. - **Note**: During gas price spikes, your transaction might fail, requiring more than _0.5 LINK_ to proceed. If your transaction fails, fund your contract with more _LINK_ tokens and try again. + 1. Open the [CCIP explorer](https://ccip.chain.link/) and search your cross-chain transaction using the transaction hash. @@ -116,7 +119,7 @@ You will transfer _0.001 CCIP-BnM_ and a text. The CCIP fees for using CCIP will alt="Chainlink CCIP Explorer transaction details" /> -1. The CCIP transaction is completed once the status is marked as "Success". In this example, the CCIP message ID is _0x5602a60c9257d8130a23a39c0b18f2bc015bc1bbe5e8dbcc2063a4e8004f135e_. +1. The CCIP transaction is completed once the status is marked as "Success". In this example, the CCIP message ID is _0x63e095fef2161d8bd3267bc474233693e85029aad3b59c12eb5b9ffdd3832f5d_.
@@ -138,7 +141,7 @@ You will transfer _0.001 CCIP-BnM_ and a text. The CCIP fees for using CCIP will alt="Chainlink CCIP Mumbai last failed message ids" /> - 1. Notice the messageId _0x5602a60c9257d8130a23a39c0b18f2bc015bc1bbe5e8dbcc2063a4e8004f135e_ is in the list. + 1. Notice the messageId _0x63e095fef2161d8bd3267bc474233693e85029aad3b59c12eb5b9ffdd3832f5d_ is in the list. 1. To recover the locked tokens, call the `retryFailedMessage` function: diff --git a/src/content/ccip/tutorials/programmable-token-transfers.mdx b/src/content/ccip/tutorials/programmable-token-transfers.mdx index da8643dc150..30bcddbe8fb 100644 --- a/src/content/ccip/tutorials/programmable-token-transfers.mdx +++ b/src/content/ccip/tutorials/programmable-token-transfers.mdx @@ -32,7 +32,7 @@ In this tutorial, you will use Chainlink CCIP to transfer tokens and arbitrary d 1. You should understand how to write, compile, deploy, and fund a smart contract. If you need to brush up on the basics, read this [tutorial](/quickstarts/deploy-your-first-contract), which will guide you through using the [Solidity programming language](https://soliditylang.org/), interacting with the [MetaMask wallet](https://metamask.io) and working within the [Remix Development Environment](https://remix.ethereum.org/). 1. Your account must have some ETH and LINK tokens on _Ethereum Sepolia_ and MATIC tokens on _Polygon Mumbai_. Learn how to [Acquire testnet LINK](/resources/acquire-link). -1. Check the [Supported Networks page](/ccip/supported-networks) to confirm that the tokens you will transfer are supported for your lane. In this example, you will transfer tokens from _Ethereum Sepolia_ to _Polygon Mumbai_ so check the list of supported tokens [here](/ccip/supported-networks/testnet#ethereum-sepolia-polygon-mumbai). +1. Check the [Supported Networks page](/ccip/supported-networks) to confirm that the tokens you will transfer are supported for your lane. In this example, you will transfer tokens from _Ethereum Sepolia_ to _Polygon Mumbai_ so check the list of supported tokens [here](/ccip/supported-networks/v1_2_0/testnet#ethereum-sepolia-polygon-mumbai). 1. Learn how to [acquire CCIP test tokens](/ccip/test-tokens#mint-test-tokens). Following this guide, you should have CCIP-BnM tokens, and CCIP-BnM should appear in the list of your tokens in MetaMask. 1. Learn how to [fund your contract](/resources/fund-your-contract). This guide shows how to fund your contract in LINK, but you can use the same guide for funding your contract with any ERC20 tokens as long as they appear in the list of tokens in MetaMask. 1. Follow the previous tutorial: [_Transfer tokens between chains_](/ccip/tutorials/cross-chain-tokens). @@ -54,7 +54,7 @@ To use this contract: 1. Open MetaMask and select the network _Ethereum Sepolia_. 1. In Remix IDE, click on _Deploy & Run Transactions_ and select _Injected Provider - MetaMask_ from the environment list. Remix will then interact with your MetaMask wallet to communicate with _Ethereum Sepolia_. - 1. Fill in your blockchain's router and LINK contract addresses. The router address can be found on the [supported networks page](/ccip/supported-networks) and the LINK contract address on the [LINK token contracts page](/resources/link-token-contracts). For _Ethereum Sepolia_, the router address is and the LINK contract address is . + 1. Fill in your blockchain's router and LINK contract addresses. The router address can be found on the [supported networks page](/ccip/supported-networks) and the LINK contract address on the [LINK token contracts page](/resources/link-token-contracts). For _Ethereum Sepolia_, the router address is and the LINK contract address is . 1. Click the **transact** button. After you confirm the transaction, the contract address appears on the _Deployed Contracts_ list. Note your contract address. 1. Open MetaMask and fund your contract with CCIP-BnM tokens. You can transfer _CCIP-BnM_ to your contract. @@ -66,7 +66,7 @@ To use this contract: 1. Open MetaMask and select the network _Polygon Mumbai_. 1. In Remix IDE, under _Deploy & Run Transactions_, make sure the environment is still _Injected Provider - MetaMask_. - 1. Fill in your blockchain's router and LINK contract addresses. The router address can be found on the [supported networks page](/ccip/supported-networks) and the LINK contract address on the [LINK token contracts page](/resources/link-token-contracts). For _Polygon Mumbai_, the router address is and the LINK contract address is . + 1. Fill in your blockchain's router and LINK contract addresses. The router address can be found on the [supported networks page](/ccip/supported-networks) and the LINK contract address on the [LINK token contracts page](/resources/link-token-contracts). For _Polygon Mumbai_, the router address is and the LINK contract address is . 1. Click the **transact** button. After you confirm the transaction, the contract address appears on the _Deployed Contracts_ list. Note your contract address. 1. Enable your contract to receive CCIP messages from _Ethereum Sepolia_: @@ -84,7 +84,7 @@ To use this contract: You will transfer _0.001 CCIP-BnM_ and a text. The CCIP fees for using CCIP will be paid in LINK. Read this [explanation](#transferring-tokens-and-data-and-pay-in-link) for a detailed description of the code example. -1. Open MetaMask and connect to _Ethereum Sepolia_. Fund your contract with LINK tokens. You can transfer _LINK_ to your contract. In this example, LINK is used to pay the CCIP fees. +1. Open MetaMask and connect to _Ethereum Sepolia_. Fund your contract with LINK tokens. You can transfer _LINK_ to your contract. In this example, LINK is used to pay the CCIP fees. 1. Send a string data with tokens from _Ethereum Sepolia_: @@ -103,9 +103,12 @@ You will transfer _0.001 CCIP-BnM_ and a text. The CCIP fees for using CCIP will | \_amount |
The token amount (_0.001 CCIP-BnM_). | 1. Click on `transact` and confirm the transaction on MetaMask. - 1. After the transaction is successful, record the transaction hash. Here is an [example](https://sepolia.etherscan.io/tx/0x807ef3a86828f3e7e7bed6fa38f770c39a67704221ece124c55ca1ba8b771992) of a transaction on _Ethereum Sepolia_. + 1. After the transaction is successful, record the transaction hash. Here is an [example](https://sepolia.etherscan.io/tx/0xdea9becf500a1509b0d33b5b567474b290fdf1cdd4e39f8e8bac6d1296702ac6) of a transaction on _Ethereum Sepolia_. - **Note**: During gas price spikes, your transaction might fail, requiring more than _0.01 LINK_ to proceed. If your transaction fails, fund your contract with more _LINK_ tokens and try again. + 1. Open the [CCIP explorer](https://ccip.chain.link/) and search your cross-chain transaction using the transaction hash. @@ -116,7 +119,7 @@ You will transfer _0.001 CCIP-BnM_ and a text. The CCIP fees for using CCIP will alt="Chainlink CCIP Explorer transaction details" /> -1. The CCIP transaction is completed once the status is marked as "Success". In this example, the CCIP message ID is _0x0269fd4a8f21d298c6d73b14a5b1051e87178518bdd0f1fce36f9c6c658808b1_. +1. The CCIP transaction is completed once the status is marked as "Success". In this example, the CCIP message ID is _0x1d49f223a33de970e98d05124223860b4bb0ca23cd93971aa3697bd203eb37f3_.
@@ -138,7 +141,7 @@ You will transfer _0.001 CCIP-BnM_ and a text. The CCIP fees for using CCIP will alt="Chainlink CCIP Mumbai message details" /> - 1. Notice the received messageId is _0x0269fd4a8f21d298c6d73b14a5b1051e87178518bdd0f1fce36f9c6c658808b1_, the received text is _Hello World!_, the token address is _0xf1E3A5842EeEF51F2967b3F05D45DD4f4205FF40_ (CCIP-BnM token address on _Polygon Mumbai_) and the token amount is 1000000000000000 (0.001 CCIP-BnM). + 1. Notice the received messageId is _0x1d49f223a33de970e98d05124223860b4bb0ca23cd93971aa3697bd203eb37f3_, the received text is _Hello World!_, the token address is _0xf1E3A5842EeEF51F2967b3F05D45DD4f4205FF40_ (CCIP-BnM token address on _Polygon Mumbai_) and the token amount is 1000000000000000 (0.001 CCIP-BnM). **Note**: These example contracts are designed to work bi-directionally. As an exercise, you can use them to transfer tokens and data from _Ethereum Sepolia_ to _Polygon Mumbai_ and from _Polygon Mumbai_ back to _Ethereum Sepolia_. @@ -165,9 +168,12 @@ You will transfer _0.001 CCIP-BnM_ and a text. The CCIP fees for using CCIP will | \_amount |
The token amount (_0.001 CCIP-BnM_). | 1. Click on `transact` and confirm the transaction on MetaMask. - 1. Once the transaction is successful, note the transaction hash. Here is an [example](https://sepolia.etherscan.io/tx/0x1484af3c9d0fc1cb5b93d22117f29bf24b9ec3604dea25502f0a68370136a1be) of a transaction on _Ethereum Sepolia_. + 1. Once the transaction is successful, note the transaction hash. Here is an [example](https://sepolia.etherscan.io/tx/0x83e797162b4a9535518e2c3182a1f41ef171080b37223446e6fb4c3e13cd5c5c) of a transaction on _Ethereum Sepolia_. - **Note**: During gas price spikes, your transaction might fail, requiring more than _0.01 ETH_ to proceed. If your transaction fails, fund your contract with more _ETH_ and try again. + 1. Open the [CCIP explorer](https://ccip.chain.link/) and search your cross-chain transaction using the transaction hash. @@ -178,7 +184,7 @@ You will transfer _0.001 CCIP-BnM_ and a text. The CCIP fees for using CCIP will alt="Chainlink CCIP Explorer transaction details" /> -1. The CCIP transaction is completed once the status is marked as "Success". In this example, the CCIP message ID is _0x3a2cde0d0dd07f2b2e7841b550221101d57792eb581a75ed11419022f13fd865_. Note that CCIP fees are denominated in LINK. Even if CCIP fees are paid using native gas tokens, node operators will be paid in LINK. +1. The CCIP transaction is completed once the status is marked as "Success". In this example, the CCIP message ID is _0x83b396df0fd6fac599459bc68003c8721ee2c191f98ea8222cea19af62b9a3ef_. Note that CCIP fees are denominated in LINK. Even if CCIP fees are paid using native gas tokens, node operators will be paid in LINK.
@@ -200,7 +206,7 @@ You will transfer _0.001 CCIP-BnM_ and a text. The CCIP fees for using CCIP will alt="Chainlink CCIP Mumbai message details" /> - 1. Notice the received messageId is _0x3a2cde0d0dd07f2b2e7841b550221101d57792eb581a75ed11419022f13fd865_, the received text is _Hello World!_, the token address is _0xf1E3A5842EeEF51F2967b3F05D45DD4f4205FF40_ (CCIP-BnM token address on _Polygon Mumbai_) and the token amount is 1000000000000000 (0.001 CCIP-BnM). + 1. Notice the received messageId is _0x83b396df0fd6fac599459bc68003c8721ee2c191f98ea8222cea19af62b9a3ef_, the received text is _Hello World!_, the token address is _0xf1E3A5842EeEF51F2967b3F05D45DD4f4205FF40_ (CCIP-BnM token address on _Polygon Mumbai_) and the token amount is 1000000000000000 (0.001 CCIP-BnM). **Note**: These example contracts are designed to work bi-directionally. As an exercise, you can use them to transfer tokens and data from _Ethereum Sepolia_ to _Polygon Mumbai_ and from _Polygon Mumbai_ back to _Ethereum Sepolia_. @@ -230,7 +236,7 @@ The `sendMessagePayLINK` function undertakes six primary operations: - The `_receiver` address is encoded in bytes to accommodate non-EVM destination blockchains with distinct address formats. The encoding is achieved through [abi.encode](https://docs.soliditylang.org/en/develop/abi-spec.html). - The `data` is encoded from a `string` to `bytes` using [abi.encode](https://docs.soliditylang.org/en/develop/abi-spec.html). - The `tokenAmounts` is an array, with each element comprising an `EVMTokenAmount` [struct](/ccip/api-reference/client#evmtokenamount) containing the token address and amount. The array contains one element where the `_token` (token address) and `_amount` (token amount) are passed by the user when calling the `transferTokensPayNative` function. - - The `extraArgs` specifies the `gasLimit` for relaying the message to the recipient contract on the destination blockchain, along with a `strict` parameter. In this example, the `gasLimit` is set to `200000` and `strict` is set to `false`. **Note**: If `strict` is true and `ccipReceive` reverts on the destination blockchain, subsequent messages from the same sender will be blocked by the CCIP until the reverted message can be executed. + - The `extraArgs` specifies the `gasLimit` for relaying the message to the recipient contract on the destination blockchain. In this example, the `gasLimit` is set to `200000. - The `_feeTokenAddress` designates the token address used for CCIP fees. Here, `address(linkToken)` signifies payment in LINK. {" "} @@ -254,7 +260,7 @@ The `sendMessagePayNative` function undertakes five primary operations: - The `_receiver` address is encoded in bytes to accommodate non-EVM destination blockchains with distinct address formats. The encoding is achieved through [abi.encode](https://docs.soliditylang.org/en/develop/abi-spec.html). - The `data` is encoded from a `string` to `bytes` using [abi.encode](https://docs.soliditylang.org/en/develop/abi-spec.html). - The `tokenAmounts` is an array, with each element comprising an `EVMTokenAmount` [struct](/ccip/api-reference/client#evmtokenamount) containing the token address and amount. The array contains one element where the `_token` (token address) and `_amount` (token amount) are passed by the user when calling the `transferTokensPayNative` function. - - The `extraArgs` specifies the `gasLimit` for relaying the message to the recipient contract on the destination blockchain, along with a `strict` parameter. In this example, the `gasLimit` is set to `200000` and `strict` is set to `false`. **Note**: If `strict` is true and `ccipReceive` reverts on the destination blockchain, subsequent messages from the same sender will be blocked by CCIP until the reverted message can be executed. + - The `extraArgs` specifies the `gasLimit` for relaying the message to the recipient contract on the destination blockchain. In this example, the `gasLimit` is set to `200000. - The `_feeTokenAddress` designates the token address used for CCIP fees. Here, `address(0)` signifies payment in native gas tokens (ETH). {" "} diff --git a/src/content/ccip/tutorials/send-arbitrary-data.mdx b/src/content/ccip/tutorials/send-arbitrary-data.mdx index 15b6a8121af..61637fea189 100644 --- a/src/content/ccip/tutorials/send-arbitrary-data.mdx +++ b/src/content/ccip/tutorials/send-arbitrary-data.mdx @@ -43,7 +43,7 @@ To use this contract: 1. Open MetaMask and select the network _Ethereum Sepolia_. 1. In Remix IDE, click on _Deploy & Run Transactions_ and select _Injected Provider - MetaMask_ from the environment list. Remix will then interact with your MetaMask wallet to communicate with _Ethereum Sepolia_. - 1. Fill in the router address and the link address for your network. You can find the router address on the [supported networks page](/ccip/supported-networks) and the LINK token address on the [LINK Token contracts page](/resources/link-token-contracts?parent=ccip). For _Ethereum Sepolia_, the router address is and the LINK contract address is . + 1. Fill in the router address and the link address for your network. You can find the router address on the [supported networks page](/ccip/supported-networks) and the LINK token address on the [LINK Token contracts page](/resources/link-token-contracts?parent=ccip). For _Ethereum Sepolia_, the router address is and the LINK contract address is . 1. Click on _transact_. After you confirm the transaction, the contract address appears on the _Deployed Contracts_ list. Note your contract address. 1. Enable your contract to send CCIP messages to _Polygon Mumbai_: @@ -54,7 +54,7 @@ To use this contract: 1. Open MetaMask and select the network _Polygon Mumbai_. 1. In Remix IDE, under _Deploy & Run Transactions_, make sure the environment is still _Injected Provider - MetaMask_. - 1. Fill in the router address and the LINK address for your network. You can find the router address on the [supported networks page](/ccip/supported-networks) and the LINK contract address on the [LINK token contracts page](/resources/link-token-contracts). For _Polygon Mumbai_, the router address is and the LINK contract address is . + 1. Fill in the router address and the LINK address for your network. You can find the router address on the [supported networks page](/ccip/supported-networks) and the LINK contract address on the [LINK token contracts page](/resources/link-token-contracts). For _Polygon Mumbai_, the router address is and the LINK contract address is . 1. Click on _transact_. After you confirm the transaction, the contract address appears on the _Deployed Contracts_ list. Note your contract address. 1. Enable your contract to receive CCIP messages from _Ethereum Sepolia_: @@ -70,7 +70,7 @@ To use this contract: You will use CCIP to send a text. The CCIP fees for using CCIP will be paid in LINK. Read this [explanation](#sending-data-and-pay-in-link) for a detailed description of the code example. -1. Open MetaMask and connect to _Ethereum Sepolia_. Fund your contract with LINK tokens. You can transfer _LINK_ to your contract. In this example, LINK is used to pay the CCIP fees. +1. Open MetaMask and connect to _Ethereum Sepolia_. Fund your contract with LINK tokens. You can transfer _LINK_ to your contract. In this example, LINK is used to pay the CCIP fees. 1. Send "Hello World!" from _Ethereum Sepolia_: @@ -87,9 +87,12 @@ You will use CCIP to send a text. The CCIP fees for using CCIP will be paid in L | \_text | any `string` | | 1. Click on `transact` and confirm the transaction on MetaMask. - 1. Once the transaction is successful, note the transaction hash. Here is an [example](https://sepolia.etherscan.io/tx/0x6e0fde707448c02c363c74a4b37826d34fa31d82a66ee2fb90f4ac7f54d83f7e) of a transaction on _Ethereum Sepolia_. + 1. Once the transaction is successful, note the transaction hash. Here is an [example](https://sepolia.etherscan.io/tx/0xb7da6f6f8ed216b05c10668e8f0311e3f46e1a82ccd8e4e733881e168fcf00de) of a transaction on _Ethereum Sepolia_. - **Note**: During gas price spikes, your transaction might fail, requiring more than _0.01 LINK_ to proceed. If your transaction fails, fund your contract with more _LINK_ tokens and try again. + 1. Open the [CCIP explorer](https://ccip.chain.link/) and search your cross-chain transaction using the transaction hash. @@ -100,7 +103,7 @@ You will use CCIP to send a text. The CCIP fees for using CCIP will be paid in L alt="Chainlink CCIP Explorer transaction details" /> -1. The CCIP transaction is completed once the status is marked as "Success". **Note**: In this example, the CCIP message ID is _0x15083b2b8f716e7b16de956fd3cfbe440532ec2fdabe4a78b2305b71f6dbbecb_. +1. The CCIP transaction is completed once the status is marked as "Success". **Note**: In this example, the CCIP message ID is _0x223b73f2e7dfb65cf317661ed9c5ba6b9f0bd8d61170a95c801b707d3526070a_.
@@ -122,7 +125,7 @@ You will use CCIP to send a text. The CCIP fees for using CCIP will be paid in L alt="Chainlink CCIP Mumbai message details" /> - 1. Notice the received text is the one you sent, "Hello World!" and the message ID is the one you expect _0x15083b2b8f716e7b16de956fd3cfbe440532ec2fdabe4a78b2305b71f6dbbecb_. + 1. Notice the received text is the one you sent, "Hello World!" and the message ID is the one you expect _0x223b73f2e7dfb65cf317661ed9c5ba6b9f0bd8d61170a95c801b707d3526070a_. **Note**: These example contracts are designed to work bi-directionally. As an exercise, you can use them to send data from _Ethereum Sepolia_ to _Polygon Mumbai_ and from _Polygon Mumbai_ back to _Ethereum Sepolia_. @@ -147,9 +150,12 @@ You will use CCIP to send a text. The CCIP fees for using CCIP will be paid in n | \_text | any `string` | | 1. Click on `transact` and confirm the transaction on MetaMask. - 1. Once the transaction is successful, note the transaction hash. Here is an [example](https://sepolia.etherscan.io/tx/0xb777743b414fdb05041c2bf1fbe312ab55f2999687bf4601f75d363fc73ddc8a) of a transaction on _Ethereum Sepolia_. + 1. Once the transaction is successful, note the transaction hash. Here is an [example](https://sepolia.etherscan.io/tx/0xf32beea1640aef99870a1f3da9ab202c08c1634932e9321e9ef2320fe1564453) of a transaction on _Ethereum Sepolia_. - **Note**: During gas price spikes, your transaction might fail, requiring more than _0.01 ETH_ to proceed. If your transaction fails, fund your contract with more _ETH_ and try again. + 1. Open the [CCIP explorer](https://ccip.chain.link/) and search your cross-chain transaction using the transaction hash. @@ -160,7 +166,7 @@ You will use CCIP to send a text. The CCIP fees for using CCIP will be paid in n alt="Chainlink CCIP Explorer transaction details" /> -1. The CCIP transaction is completed once the status is marked as "Success". In this example, the CCIP message ID is _0x0190507591e4857764ede9e37748364a0ed98ec0b7a866eb4140de59f12dcbce_. Note that CCIP fees are denominated in LINK. Even if CCIP fees are paid using native gas tokens, node operators will be paid in LINK. +1. The CCIP transaction is completed once the status is marked as "Success". In this example, the CCIP message ID is _0x54862fd17ca9718b55e3e2d34c84f26ef1e71a20cc2398f76974e40aff378838_. Note that CCIP fees are denominated in LINK. Even if CCIP fees are paid using native gas tokens, node operators will be paid in LINK.
@@ -182,7 +188,7 @@ You will use CCIP to send a text. The CCIP fees for using CCIP will be paid in n alt="Chainlink CCIP Mumbai message details" /> - 1. Notice the received text is the one you sent, "Hello World!" and the message ID is the one you expect _0x0190507591e4857764ede9e37748364a0ed98ec0b7a866eb4140de59f12dcbce_. + 1. Notice the received text is the one you sent, "Hello World!" and the message ID is the one you expect _0x54862fd17ca9718b55e3e2d34c84f26ef1e71a20cc2398f76974e40aff378838_. **Note**: These example contracts are designed to work bi-directionally. As an exercise, you can use them to send data from _Ethereum Sepolia_ to _Polygon Mumbai_ and from _Polygon Mumbai_ back to _Ethereum Sepolia_. @@ -212,7 +218,7 @@ The `sendMessagePayLINK` function undertakes five primary operations: - The `_receiver` address is encoded in bytes to accommodate non-EVM destination blockchains with distinct address formats. The encoding is achieved through [abi.encode](https://docs.soliditylang.org/en/develop/abi-spec.html). - The `data` is encoded from a `string` to `bytes` using [abi.encode](https://docs.soliditylang.org/en/develop/abi-spec.html). - The `tokenAmounts` is an empty `EVMTokenAmount` [struct](/ccip/api-reference/client#evmtokenamount) array as no tokens are transferred. - - The `extraArgs` specifies the `gasLimit` for relaying the message to the recipient contract on the destination blockchain, along with a `strict` parameter. In this example, the `gasLimit` is set to `200000` and `strict` is set to `false`. **Note**: If `strict` is true and `ccipReceive` reverts on the destination blockchain, subsequent messages from the same sender will be blocked by the CCIP until the reverted message can be executed. + - The `extraArgs` specifies the `gasLimit` for relaying the message to the recipient contract on the destination blockchain. In this example, the `gasLimit` is set to `200000`. - The `_feeTokenAddress` designates the token address used for CCIP fees. Here, `address(linkToken)` signifies payment in LINK. {" "} @@ -235,7 +241,7 @@ The `sendMessagePayNative` function undertakes four primary operations: - The `_receiver` address is encoded in bytes to accommodate non-EVM destination blockchains with distinct address formats. The encoding is achieved through [abi.encode](https://docs.soliditylang.org/en/develop/abi-spec.html). - The `data` is encoded from a `string` to `bytes` using [abi.encode](https://docs.soliditylang.org/en/develop/abi-spec.html). - The `tokenAmounts` is an empty `EVMTokenAmount` [struct](/ccip/api-reference/client#evmtokenamount) array as no tokens are transferred. - - The `extraArgs` specifies the `gasLimit` for relaying the message to the recipient contract on the destination blockchain, along with a `strict` parameter. In this example, the `gasLimit` is set to `200000` and `strict` is set to `false`. **Note**: If `strict` is true and `ccipReceive` reverts on the destination blockchain, subsequent messages from the same sender will be blocked by CCIP until the reverted message can be executed. + - The `extraArgs` specifies the `gasLimit` for relaying the message to the recipient contract on the destination blockchain. In this example, the `gasLimit` is set to `200000`. - The `_feeTokenAddress` designates the token address used for CCIP fees. Here, `address(0)` signifies payment in native gas tokens (ETH). {" "} diff --git a/src/features/ccip/components/NetworkDropdown.tsx b/src/features/ccip/components/NetworkDropdown.tsx index 919dd8f5b3d..16ecefeb7bb 100644 --- a/src/features/ccip/components/NetworkDropdown.tsx +++ b/src/features/ccip/components/NetworkDropdown.tsx @@ -6,7 +6,16 @@ import { MetaMaskInpageProvider } from "@metamask/providers" import { ethers, Contract, utils } from "ethers" import { burnMintAbi } from "@features/abi" import { SupportedChain } from "@config" -import { allChains, getBnMParams, getLnMParams, isBnMOrLnMRdd, isLnM, isBnM, isBnMOrLnM } from "@config/data/ccip" +import { + getAllChains, + getBnMParams, + getLnMParams, + isBnMOrLnMRdd, + isLnM, + isBnM, + isBnMOrLnM, + Version, +} from "@config/data/ccip" import { Toast } from "./Toast" import { directoryToSupportedChain, @@ -48,7 +57,9 @@ export const NetworkDropdown = ({ userAddress }: Props) => { detailsElementRef.current.open = false }, [detailsElementRef]) - const supportedChains = allChains.map((element) => directoryToSupportedChain(element)) + const supportedChains = getAllChains({ mainnetVersion: Version.V1_0_0, testnetVersion: Version.V1_2_0 }).map( + (element) => directoryToSupportedChain(element) + ) const supportedChainFromHexChainId = (chainHexId: string) => { const supportedChain = supportedChains.find((supportedChain) => { @@ -148,7 +159,7 @@ export const NetworkDropdown = ({ userAddress }: Props) => { const addBnMAssetToWallet = async () => { if (!activeChain) return - const params = getBnMParams(activeChain) + const params = getBnMParams({ supportedChain: activeChain, version: Version.V1_2_0 }) if (!params) return validateEthereumApi(window.ethereum) const success = await window.ethereum.request({ @@ -167,7 +178,7 @@ export const NetworkDropdown = ({ userAddress }: Props) => { const addLnMAssetToWallet = async () => { if (!activeChain) return - const params = getLnMParams(activeChain) + const params = getLnMParams({ supportedChain: activeChain, version: Version.V1_2_0 }) if (!params) return validateEthereumApi(window.ethereum) const success = await window.ethereum.request({ @@ -189,7 +200,7 @@ export const NetworkDropdown = ({ userAddress }: Props) => { setMintBnMTokenButtonDisabled(true) if (!activeChain) return - const params = getBnMParams(activeChain) + const params = getBnMParams({ supportedChain: activeChain, version: Version.V1_2_0 }) if (!params) return const { address: ccipBNMContractAddress } = params.options const provider = new ethers.providers.Web3Provider(window.ethereum) @@ -229,7 +240,7 @@ export const NetworkDropdown = ({ userAddress }: Props) => { setMintLnMTokenButtonDisabled(true) if (!activeChain) return - const params = getLnMParams(activeChain) + const params = getLnMParams({ supportedChain: activeChain, version: Version.V1_2_0 }) if (!params) return const { address: ccipLNMContractAddress } = params.options const provider = new ethers.providers.Web3Provider(window.ethereum) @@ -321,8 +332,8 @@ export const NetworkDropdown = ({ userAddress }: Props) => {
{activeChain ? (
    - {allChains.map((chainRdd) => { - if (isBnMOrLnMRdd(chainRdd)) { + {getAllChains({ mainnetVersion: Version.V1_0_0, testnetVersion: Version.V1_2_0 }).map((chainRdd) => { + if (isBnMOrLnMRdd({ chainRdd, version: Version.V1_2_0 })) { const supportedChain = directoryToSupportedChain(chainRdd) const supportedChainTitle = getTitle(supportedChain) const activeChainTitle = getTitle(activeChain) @@ -380,10 +391,10 @@ export const NetworkDropdown = ({ userAddress }: Props) => {
{activeChain !== undefined ? ( - isBnMOrLnM(activeChain) ? ( + isBnMOrLnM({ chain: activeChain, version: Version.V1_2_0 }) ? ( <>
- {activeChain && isBnM(activeChain) && ( + {activeChain && isBnM({ chain: activeChain, version: Version.V1_2_0 }) && (
)} - {activeChain && isLnM(activeChain).supported && ( + {activeChain && isLnM({ chain: activeChain, version: Version.V1_2_0 }).supported && (

- {isLnM(activeChain).supportedChainForLock === activeChain ? ( + {isLnM({ chain: activeChain, version: Version.V1_2_0 }).supportedChainForLock === activeChain ? ( @@ -432,8 +443,8 @@ export const NetworkDropdown = ({ userAddress }: Props) => { <>

Chainlink CCIP does not support this network. Switch your wallet to a supported network.

    - {allChains.map((chainRdd) => { - if (isBnMOrLnMRdd(chainRdd)) { + {getAllChains({ mainnetVersion: Version.V1_0_0, testnetVersion: Version.V1_2_0 }).map((chainRdd) => { + if (isBnMOrLnMRdd({ chainRdd, version: Version.V1_2_0 })) { const supportedChain = directoryToSupportedChain(chainRdd) const supportedChainTitle = getTitle(supportedChain) const chainIcon = getChainIcon(supportedChain) diff --git a/src/features/ccip/components/supported-networks/ChainConfig.astro b/src/features/ccip/components/supported-networks/ChainConfig.astro index 15a08cb84f0..faeb2ee3149 100644 --- a/src/features/ccip/components/supported-networks/ChainConfig.astro +++ b/src/features/ccip/components/supported-networks/ChainConfig.astro @@ -1,6 +1,6 @@ --- import { ChainConfig } from "@config/data/ccip/types" -import { loadReferenceData, Environment } from "@config/data/ccip/" +import { loadReferenceData, Environment, Version } from "@config/data/ccip/" import { SupportedChain } from "@config" import { Address, CopyText, Accordion } from "@components" import { @@ -18,9 +18,10 @@ type ConfigProps = { sourceChain: SupportedChain // key in SupportedChain sourceChainRefId: string // id in reference directory environment: Environment + version: Version } -const { chainConfig, sourceChain, environment, sourceChainRefId } = Astro.props as ConfigProps +const { chainConfig, sourceChain, environment, sourceChainRefId, version } = Astro.props as ConfigProps const { router, chainSelector, feeTokens } = chainConfig const explorerUrl = getExplorer(sourceChain) if (!explorerUrl) throw Error(`Explorer url not found for ${sourceChain}`) @@ -40,7 +41,7 @@ feeTokens.sort((feeToken1, feeToken2) => { let tokensReferenceData try { - tokensReferenceData = loadReferenceData(environment).tokensReferenceData + tokensReferenceData = loadReferenceData({ environment, version }).tokensReferenceData } catch (error) { console.error(error) throw Error(`Error while loading CCIP reference data`) @@ -53,7 +54,7 @@ const feeTokensWithAddresses = feeTokens.map((feeToken) => { } }) -const laneReferenceData = loadReferenceData(environment).lanesReferenceData[sourceChainRefId] +const laneReferenceData = loadReferenceData({ environment, version }).lanesReferenceData[sourceChainRefId] --- @@ -126,6 +127,7 @@ const laneReferenceData = loadReferenceData(environment).lanesReferenceData[sour sourceChain={sourceChain} sourceChainRefId={sourceChainRefId} environment={environment} + version={version} /> diff --git a/src/features/ccip/components/supported-networks/LaneConfig.astro b/src/features/ccip/components/supported-networks/LaneConfig.astro index f5a25e923c6..e26dcea998d 100644 --- a/src/features/ccip/components/supported-networks/LaneConfig.astro +++ b/src/features/ccip/components/supported-networks/LaneConfig.astro @@ -1,6 +1,6 @@ --- import { LaneConfig } from "@config/data/ccip/types" -import { loadReferenceData, Environment } from "@config/data/ccip/" +import { loadReferenceData, Environment, Version } from "@config/data/ccip/" import { SupportedChain } from "@config" import { Address, Aside } from "@components" import BigNumber from "bignumber.js" @@ -13,10 +13,11 @@ type ConfigProps = { sourceChain: SupportedChain // key in SupportedChain sourceChainRefId: string // id in reference directory environment: Environment + version: Version } const contactUrl = "https://chainlinkcommunity.typeform.com/ccip-form?typeform-source=docs.chain.link#ref_id=ccip_docs" -const { laneConfig, sourceChain, environment, sourceChainRefId } = Astro.props as ConfigProps +const { laneConfig, sourceChain, environment, sourceChainRefId, version } = Astro.props as ConfigProps const { rateLimiterConfig, supportedTokens } = laneConfig const normalizeNumber = (bigNum: BigNumber, decimals: number = 18) => { @@ -87,7 +88,7 @@ let tokensWithExtraInfo: { decimals: number }[] = [] -const tokensReferenceData = loadReferenceData(environment).tokensReferenceData +const tokensReferenceData = loadReferenceData({ environment, version }).tokensReferenceData if (supportedTokens) { tokensWithExtraInfo = Object.keys(supportedTokens) .filter((supportedToken) => { diff --git a/src/features/ccip/components/supported-networks/Main.astro b/src/features/ccip/components/supported-networks/Main.astro index 4667f4ddf09..e8792e50ade 100644 --- a/src/features/ccip/components/supported-networks/Main.astro +++ b/src/features/ccip/components/supported-networks/Main.astro @@ -1,12 +1,17 @@ --- import { Accordion, Aside } from "@components" -import { loadReferenceData } from "@config/data/ccip/" +import { loadReferenceData, Version, Environment } from "@config/data/ccip/" import { directoryToSupportedChain, getTitle, getChainIcon } from "@features/utils" import ChainConfig from "./ChainConfig.astro" -const { environment } = Astro.props +type MainProps = { + environment: Environment + version: Version +} + +const { environment, version } = Astro.props as MainProps -const chainsReferenceData = loadReferenceData(environment).chainsReferenceData +const chainsReferenceData = loadReferenceData({ environment, version }).chainsReferenceData ---