Skip to content

Commit

Permalink
Merge remote-tracking branch 'documentation/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
khadni committed Dec 16, 2024
2 parents fb45ff1 + a76c17c commit a8922f2
Show file tree
Hide file tree
Showing 6 changed files with 103 additions and 43 deletions.
12 changes: 12 additions & 0 deletions public/changelog.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
[
{
"category": "integration",
"changes": [],
"date": "2024-12-16",
"description": "Chainlink Data Feeds is available on Hedera mainnet. View the available price feed information on the [Price Feed Addresses](https://docs.chain.link/data-feeds/price-feeds/addresses?network=hedera&page=1) page.",
"relatedNetworks": ["hedera"],
"relatedTokens": [],
"title": "Data Feeds on Hedera",
"topic": "data",
"subTopic": "data-feeds",
"urls": []
},
{
"category": "integration",
"changes": [],
Expand Down
6 changes: 3 additions & 3 deletions src/config/data/chains.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
},
"FANTOM_TESTNET": {
"chainId": 4002,
"title": "Fantom testnet",
"title": "Fantom Testnet",
"explorer": "https://testnet.ftmscan.com",
"nativeCurrency": {
"name": "Fantom",
Expand Down Expand Up @@ -585,13 +585,13 @@
"chains": {
"ZIRCUIT_MAINNET": {
"chainId": 48900,
"title": "Zircuit mainnet",
"title": "Zircuit",
"explorer": "https://explorer.zircuit.com",
"nativeCurrency": { "name": "ETH", "symbol": "ETH", "decimals": 18 }
},
"ZIRCUIT_TESTNET": {
"chainId": 48899,
"title": "Zircuit testnet",
"title": "Zircuit Testnet",
"explorer": "https://explorer.testnet.zircuit.com",
"nativeCurrency": { "name": "ETH", "symbol": "ETH", "decimals": 18 }
}
Expand Down
2 changes: 1 addition & 1 deletion src/config/sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,7 @@ export const SIDEBAR: Partial<Record<Sections, SectionEntry[]>> = {
url: "ccip/tutorials/cross-chain-tokens",
children: [
{
title: "Deploy and RegisterUsing Remix IDE",
title: "Deploy and Register Using Remix IDE",
url: "ccip/tutorials/cross-chain-tokens/register-from-eoa-remix",
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,10 @@ contract CCIPv1_5BurnMintPoolFork is Test {
CCIPLocalSimulatorFork public ccipLocalSimulatorFork;
MockERC20BurnAndMintToken public mockERC20TokenEthSepolia;
MockERC20BurnAndMintToken public mockERC20TokenBaseSepolia;
BurnMintTokenPool public burnMintTokenPoolEthSepolia;
BurnMintTokenPool public burnMintTokenPoolBaseSepolia;
Register.NetworkDetails ethSepoliaNetworkDetails;
Register.NetworkDetails baseSepoliaNetworkDetails;
uint256 ethSepoliaFork;
Expand Down Expand Up @@ -230,12 +233,14 @@ contract CCIPv1_5BurnMintPoolFork is Test {
function test_forkSupportNewCCIPToken() public {
// Step 3) Deploy BurnMintTokenPool on Ethereum Sepolia
vm.selectFork(ethSepoliaFork);
Register.NetworkDetails memory ethSepoliaNetworkDetails = ccipLocalSimulatorFork.getNetworkDetails(block.chainid);
ethSepoliaNetworkDetails = ccipLocalSimulatorFork.getNetworkDetails(block.chainid);
address[] memory allowlist = new address[](0);
uint8 localTokenDecimals = 18;
vm.startPrank(alice);
BurnMintTokenPool burnMintTokenPoolEthSepolia = new BurnMintTokenPool(
burnMintTokenPoolEthSepolia = new BurnMintTokenPool(
IBurnMintERC20(address(mockERC20TokenEthSepolia)),
localTokenDecimals,
allowlist,
ethSepoliaNetworkDetails.rmnProxyAddress,
ethSepoliaNetworkDetails.routerAddress
Expand All @@ -257,8 +262,9 @@ contract CCIPv1_5BurnMintPoolFork is Test {
baseSepoliaNetworkDetails = ccipLocalSimulatorFork.getNetworkDetails(block.chainid);
vm.startPrank(alice);
BurnMintTokenPool burnMintTokenPoolBaseSepolia = new BurnMintTokenPool(
burnMintTokenPoolBaseSepolia = new BurnMintTokenPool(
IBurnMintERC20(address(mockERC20TokenBaseSepolia)),
localTokenDecimals,
allowlist,
baseSepoliaNetworkDetails.rmnProxyAddress,
baseSepoliaNetworkDetails.routerAddress
Expand Down Expand Up @@ -434,15 +440,17 @@ contract CCIPv1_5BurnMintPoolFork is Test {
vm.startPrank(alice);
TokenPool.ChainUpdate[] memory chains = new TokenPool.ChainUpdate[](1);
bytes[] memory remotePoolAddressesEthSepolia = new bytes[](1);
remotePoolAddressesEthSepolia[0] = abi.encode(address(burnMintTokenPoolEthSepolia));
chains[0] = TokenPool.ChainUpdate({
remoteChainSelector: baseSepoliaNetworkDetails.chainSelector,
allowed: true,
remotePoolAddress: abi.encode(address(burnMintTokenPoolBaseSepolia)),
remotePoolAddresses: remotePoolAddressesEthSepolia,
remoteTokenAddress: abi.encode(address(mockERC20TokenBaseSepolia)),
outboundRateLimiterConfig: RateLimiter.Config({ isEnabled: true, capacity: 100_000, rate: 167 }),
inboundRateLimiterConfig: RateLimiter.Config({ isEnabled: true, capacity: 100_000, rate: 167 })
});
burnMintTokenPoolEthSepolia.applyChainUpdates(chains);
uint64[] memory remoteChainSelectorsToRemove = new uint64[](0);
burnMintTokenPoolEthSepolia.applyChainUpdates(remoteChainSelectorsToRemove, chains);
vm.stopPrank();
}
}
Expand All @@ -460,15 +468,16 @@ contract CCIPv1_5BurnMintPoolFork is Test {
vm.startPrank(alice);
chains = new TokenPool.ChainUpdate[](1);
bytes[] memory remotePoolAddressesBaseSepolia = new bytes[](1);
remotePoolAddressesBaseSepolia[0] = abi.encode(address(burnMintTokenPoolEthSepolia));
chains[0] = TokenPool.ChainUpdate({
remoteChainSelector: ethSepoliaNetworkDetails.chainSelector,
allowed: true,
remotePoolAddress: abi.encode(address(burnMintTokenPoolEthSepolia)),
remotePoolAddresses: remotePoolAddressesBaseSepolia,
remoteTokenAddress: abi.encode(address(mockERC20TokenEthSepolia)),
outboundRateLimiterConfig: RateLimiter.Config({ isEnabled: true, capacity: 100_000, rate: 167 }),
inboundRateLimiterConfig: RateLimiter.Config({ isEnabled: true, capacity: 100_000, rate: 167 })
});
burnMintTokenPoolBaseSepolia.applyChainUpdates(chains);
burnMintTokenPoolBaseSepolia.applyChainUpdates(remoteChainSelectorsToRemove, chains);
vm.stopPrank();
}
}
Expand Down Expand Up @@ -590,7 +599,10 @@ contract CCIPv1_5BurnMintPoolFork is Test {
CCIPLocalSimulatorFork public ccipLocalSimulatorFork;
MockERC20BurnAndMintToken public mockERC20TokenEthSepolia;
MockERC20BurnAndMintToken public mockERC20TokenBaseSepolia;
BurnMintTokenPool public burnMintTokenPoolEthSepolia;
BurnMintTokenPool public burnMintTokenPoolBaseSepolia;
Register.NetworkDetails ethSepoliaNetworkDetails;
Register.NetworkDetails baseSepoliaNetworkDetails;
uint256 ethSepoliaFork;
Expand Down Expand Up @@ -625,12 +637,14 @@ contract CCIPv1_5BurnMintPoolFork is Test {
function test_forkSupportNewCCIPToken() public {
// Step 3) Deploy BurnMintTokenPool on Ethereum Sepolia
vm.selectFork(ethSepoliaFork);
Register.NetworkDetails memory ethSepoliaNetworkDetails = ccipLocalSimulatorFork.getNetworkDetails(block.chainid);
ethSepoliaNetworkDetails = ccipLocalSimulatorFork.getNetworkDetails(block.chainid);
address[] memory allowlist = new address[](0);
uint8 localTokenDecimals = 18;
vm.startPrank(alice);
BurnMintTokenPool burnMintTokenPoolEthSepolia = new BurnMintTokenPool(
burnMintTokenPoolEthSepolia = new BurnMintTokenPool(
IBurnMintERC20(address(mockERC20TokenEthSepolia)),
localTokenDecimals,
allowlist,
ethSepoliaNetworkDetails.rmnProxyAddress,
ethSepoliaNetworkDetails.routerAddress
Expand All @@ -642,8 +656,9 @@ contract CCIPv1_5BurnMintPoolFork is Test {
baseSepoliaNetworkDetails = ccipLocalSimulatorFork.getNetworkDetails(block.chainid);
vm.startPrank(alice);
BurnMintTokenPool burnMintTokenPoolBaseSepolia = new BurnMintTokenPool(
burnMintTokenPoolBaseSepolia = new BurnMintTokenPool(
IBurnMintERC20(address(mockERC20TokenBaseSepolia)),
localTokenDecimals,
allowlist,
baseSepoliaNetworkDetails.rmnProxyAddress,
baseSepoliaNetworkDetails.routerAddress
Expand Down Expand Up @@ -729,31 +744,34 @@ contract CCIPv1_5BurnMintPoolFork is Test {
vm.startPrank(alice);
TokenPool.ChainUpdate[] memory chains = new TokenPool.ChainUpdate[](1);
bytes[] memory remotePoolAddressesEthSepolia = new bytes[](1);
remotePoolAddressesEthSepolia[0] = abi.encode(address(burnMintTokenPoolEthSepolia));
chains[0] = TokenPool.ChainUpdate({
remoteChainSelector: baseSepoliaNetworkDetails.chainSelector,
allowed: true,
remotePoolAddress: abi.encode(address(burnMintTokenPoolBaseSepolia)),
remotePoolAddresses: remotePoolAddressesEthSepolia,
remoteTokenAddress: abi.encode(address(mockERC20TokenBaseSepolia)),
outboundRateLimiterConfig: RateLimiter.Config({ isEnabled: true, capacity: 100_000, rate: 167 }),
inboundRateLimiterConfig: RateLimiter.Config({ isEnabled: true, capacity: 100_000, rate: 167 })
});
burnMintTokenPoolEthSepolia.applyChainUpdates(chains);
uint64[] memory remoteChainSelectorsToRemove = new uint64[](0);
burnMintTokenPoolEthSepolia.applyChainUpdates(remoteChainSelectorsToRemove, chains);
vm.stopPrank();
// Step 14) Configure Token Pool on Base Sepolia
vm.selectFork(baseSepoliaFork);
vm.startPrank(alice);
chains = new TokenPool.ChainUpdate[](1);
bytes[] memory remotePoolAddressesBaseSepolia = new bytes[](1);
remotePoolAddressesBaseSepolia[0] = abi.encode(address(burnMintTokenPoolEthSepolia));
chains[0] = TokenPool.ChainUpdate({
remoteChainSelector: ethSepoliaNetworkDetails.chainSelector,
allowed: true,
remotePoolAddress: abi.encode(address(burnMintTokenPoolEthSepolia)),
remotePoolAddresses: remotePoolAddressesBaseSepolia,
remoteTokenAddress: abi.encode(address(mockERC20TokenEthSepolia)),
outboundRateLimiterConfig: RateLimiter.Config({ isEnabled: true, capacity: 100_000, rate: 167 }),
inboundRateLimiterConfig: RateLimiter.Config({ isEnabled: true, capacity: 100_000, rate: 167 })
});
burnMintTokenPoolBaseSepolia.applyChainUpdates(chains);
burnMintTokenPoolBaseSepolia.applyChainUpdates(remoteChainSelectorsToRemove, chains);
vm.stopPrank();
// Step 15) Mint tokens on Ethereum Sepolia and transfer them to Base Sepolia
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ contract CCIPv1_5LockReleasePoolFork is Test {
CCIPLocalSimulatorFork public ccipLocalSimulatorFork;
MockERC20TokenOwner public mockERC20TokenEthSepolia;
MockERC20TokenOwner public mockERC20TokenBaseSepolia;
LockReleaseTokenPool public lockReleaseTokenPoolEthSepolia;
LockReleaseTokenPool public lockReleaseTokenPoolBaseSepolia;
Register.NetworkDetails ethSepoliaNetworkDetails;
Register.NetworkDetails baseSepoliaNetworkDetails;
uint256 ethSepoliaFork;
uint256 baseSepoliaFork;
Expand Down Expand Up @@ -195,12 +200,14 @@ contract CCIPv1_5LockReleasePoolFork is Test {
function test_forkSupportNewCCIPToken() public {
// Step 3) Deploy LockReleaseTokenPool on Ethereum Sepolia
vm.selectFork(ethSepoliaFork);
Register.NetworkDetails memory ethSepoliaNetworkDetails = ccipLocalSimulatorFork.getNetworkDetails(block.chainid);
ethSepoliaNetworkDetails = ccipLocalSimulatorFork.getNetworkDetails(block.chainid);
address[] memory allowlist = new address[](0);
uint8 localTokenDecimals = 18;
vm.startPrank(alice);
LockReleaseTokenPool lockReleaseTokenPoolEthSepolia = new LockReleaseTokenPool(
lockReleaseTokenPoolEthSepolia = new LockReleaseTokenPool(
IERC20(address(mockERC20TokenEthSepolia)),
localTokenDecimals,
allowlist,
ethSepoliaNetworkDetails.rmnProxyAddress,
true, // acceptLiquidity
Expand All @@ -220,11 +227,12 @@ contract CCIPv1_5LockReleasePoolFork is Test {
// Step 4) Deploy LockReleaseTokenPool on Base Sepolia
vm.selectFork(baseSepoliaFork);
Register.NetworkDetails memory baseSepoliaNetworkDetails = ccipLocalSimulatorFork.getNetworkDetails(block.chainid);
baseSepoliaNetworkDetails = ccipLocalSimulatorFork.getNetworkDetails(block.chainid);
vm.startPrank(alice);
LockReleaseTokenPool lockReleaseTokenPoolBaseSepolia = new LockReleaseTokenPool(
lockReleaseTokenPoolBaseSepolia = new LockReleaseTokenPool(
IERC20(address(mockERC20TokenBaseSepolia)),
localTokenDecimals,
allowlist,
baseSepoliaNetworkDetails.rmnProxyAddress,
true, // acceptLiquidity
Expand Down Expand Up @@ -407,15 +415,17 @@ contract CCIPv1_5LockReleasePoolFork is Test {
vm.startPrank(alice);
TokenPool.ChainUpdate[] memory chains = new TokenPool.ChainUpdate[](1);
bytes[] memory remotePoolAddressesEthSepolia = new bytes[](1);
remotePoolAddressesEthSepolia[0] = abi.encode(address(lockReleaseTokenPoolBaseSepolia));
chains[0] = TokenPool.ChainUpdate({
remoteChainSelector: baseSepoliaNetworkDetails.chainSelector,
allowed: true,
remotePoolAddress: abi.encode(address(lockReleaseTokenPoolBaseSepolia)),
remotePoolAddresses: remotePoolAddressesEthSepolia,
remoteTokenAddress: abi.encode(address(mockERC20TokenBaseSepolia)),
outboundRateLimiterConfig: RateLimiter.Config({ isEnabled: true, capacity: liquidityAmount, rate: 167 }),
inboundRateLimiterConfig: RateLimiter.Config({ isEnabled: true, capacity: liquidityAmount, rate: 167 })
});
lockReleaseTokenPoolEthSepolia.applyChainUpdates(chains);
uint64[] memory remoteChainSelectorsToRemove = new uint64[](0);
lockReleaseTokenPoolEthSepolia.applyChainUpdates(remoteChainSelectorsToRemove, chains);
vm.stopPrank();
}
}
Expand All @@ -433,15 +443,16 @@ contract CCIPv1_5LockReleasePoolFork is Test {
vm.startPrank(alice);
chains = new TokenPool.ChainUpdate[](1);
bytes[] memory remotePoolAddressesBaseSepolia = new bytes[](1);
remotePoolAddressesBaseSepolia[0] = abi.encode(address(lockReleaseTokenPoolEthSepolia));
chains[0] = TokenPool.ChainUpdate({
remoteChainSelector: ethSepoliaNetworkDetails.chainSelector,
allowed: true,
remotePoolAddress: abi.encode(address(lockReleaseTokenPoolEthSepolia)),
remotePoolAddresses: remotePoolAddressesBaseSepolia,
remoteTokenAddress: abi.encode(address(mockERC20TokenEthSepolia)),
outboundRateLimiterConfig: RateLimiter.Config({ isEnabled: true, capacity: liquidityAmount, rate: 167 }),
inboundRateLimiterConfig: RateLimiter.Config({ isEnabled: true, capacity: liquidityAmount, rate: 167 })
});
lockReleaseTokenPoolBaseSepolia.applyChainUpdates(chains);
lockReleaseTokenPoolBaseSepolia.applyChainUpdates(remoteChainSelectorsToRemove, chains);
vm.stopPrank();
}
}
Expand Down Expand Up @@ -534,6 +545,11 @@ contract CCIPv1_5LockReleasePoolFork is Test {
CCIPLocalSimulatorFork public ccipLocalSimulatorFork;
MockERC20TokenOwner public mockERC20TokenEthSepolia;
MockERC20TokenOwner public mockERC20TokenBaseSepolia;
LockReleaseTokenPool public lockReleaseTokenPoolEthSepolia;
LockReleaseTokenPool public lockReleaseTokenPoolBaseSepolia;
Register.NetworkDetails ethSepoliaNetworkDetails;
Register.NetworkDetails baseSepoliaNetworkDetails;
uint256 ethSepoliaFork;
uint256 baseSepoliaFork;
Expand Down Expand Up @@ -567,12 +583,14 @@ contract CCIPv1_5LockReleasePoolFork is Test {
function test_forkSupportNewCCIPToken() public {
// Step 3) Deploy LockReleaseTokenPool on Ethereum Sepolia
vm.selectFork(ethSepoliaFork);
Register.NetworkDetails memory ethSepoliaNetworkDetails = ccipLocalSimulatorFork.getNetworkDetails(block.chainid);
ethSepoliaNetworkDetails = ccipLocalSimulatorFork.getNetworkDetails(block.chainid);
address[] memory allowlist = new address[](0);
uint8 localTokenDecimals = 18;
vm.startPrank(alice);
LockReleaseTokenPool lockReleaseTokenPoolEthSepolia = new LockReleaseTokenPool(
lockReleaseTokenPoolEthSepolia = new LockReleaseTokenPool(
IERC20(address(mockERC20TokenEthSepolia)),
localTokenDecimals,
allowlist,
ethSepoliaNetworkDetails.rmnProxyAddress,
true, // acceptLiquidity
Expand All @@ -582,11 +600,12 @@ contract CCIPv1_5LockReleasePoolFork is Test {
// Step 4) Deploy LockReleaseTokenPool on Base Sepolia
vm.selectFork(baseSepoliaFork);
Register.NetworkDetails memory baseSepoliaNetworkDetails = ccipLocalSimulatorFork.getNetworkDetails(block.chainid);
baseSepoliaNetworkDetails = ccipLocalSimulatorFork.getNetworkDetails(block.chainid);
vm.startPrank(alice);
LockReleaseTokenPool lockReleaseTokenPoolBaseSepolia = new LockReleaseTokenPool(
lockReleaseTokenPoolBaseSepolia = new LockReleaseTokenPool(
IERC20(address(mockERC20TokenBaseSepolia)),
localTokenDecimals,
allowlist,
baseSepoliaNetworkDetails.rmnProxyAddress,
true, // acceptLiquidity
Expand Down Expand Up @@ -679,31 +698,34 @@ contract CCIPv1_5LockReleasePoolFork is Test {
vm.startPrank(alice);
TokenPool.ChainUpdate[] memory chains = new TokenPool.ChainUpdate[](1);
bytes[] memory remotePoolAddressesEthSepolia = new bytes[](1);
remotePoolAddressesEthSepolia[0] = abi.encode(address(lockReleaseTokenPoolBaseSepolia));
chains[0] = TokenPool.ChainUpdate({
remoteChainSelector: baseSepoliaNetworkDetails.chainSelector,
allowed: true,
remotePoolAddress: abi.encode(address(lockReleaseTokenPoolBaseSepolia)),
remotePoolAddresses: remotePoolAddressesEthSepolia,
remoteTokenAddress: abi.encode(address(mockERC20TokenBaseSepolia)),
outboundRateLimiterConfig: RateLimiter.Config({ isEnabled: true, capacity: liquidityAmount, rate: 167 }),
inboundRateLimiterConfig: RateLimiter.Config({ isEnabled: true, capacity: liquidityAmount, rate: 167 })
});
lockReleaseTokenPoolEthSepolia.applyChainUpdates(chains);
uint64[] memory remoteChainSelectorsToRemove = new uint64[](0);
lockReleaseTokenPoolEthSepolia.applyChainUpdates(remoteChainSelectorsToRemove, chains);
vm.stopPrank();
// Step 14) Configure Token Pool on Base Sepolia
vm.selectFork(baseSepoliaFork);
vm.startPrank(alice);
chains = new TokenPool.ChainUpdate[](1);
bytes[] memory remotePoolAddressesBaseSepolia = new bytes[](1);
remotePoolAddressesBaseSepolia[0] = abi.encode(address(lockReleaseTokenPoolEthSepolia));
chains[0] = TokenPool.ChainUpdate({
remoteChainSelector: ethSepoliaNetworkDetails.chainSelector,
allowed: true,
remotePoolAddress: abi.encode(address(lockReleaseTokenPoolEthSepolia)),
remotePoolAddresses: remotePoolAddressesBaseSepolia,
remoteTokenAddress: abi.encode(address(mockERC20TokenEthSepolia)),
outboundRateLimiterConfig: RateLimiter.Config({ isEnabled: true, capacity: liquidityAmount, rate: 167 }),
inboundRateLimiterConfig: RateLimiter.Config({ isEnabled: true, capacity: liquidityAmount, rate: 167 })
});
lockReleaseTokenPoolBaseSepolia.applyChainUpdates(chains);
lockReleaseTokenPoolBaseSepolia.applyChainUpdates(remoteChainSelectorsToRemove, chains);
vm.stopPrank();
// Step 15) Transfer tokens from Ethereum Sepolia to Base Sepolia
Expand Down
Loading

0 comments on commit a8922f2

Please sign in to comment.