Skip to content

Commit

Permalink
Merge pull request #28 from smartcontractkit/zp-ccip-integrations
Browse files Browse the repository at this point in the history
New network CCIP integrations
  • Loading branch information
thodges-gh authored Jan 28, 2025
2 parents fd3b2c3 + 58c025d commit 791c942
Show file tree
Hide file tree
Showing 4 changed files with 228 additions and 320 deletions.
6 changes: 6 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,9 @@ SONEIUM_MINATO_SEPOLIA_RPC_URL=""
BSQUARED_TESTNET_RPC_URL=""
BOB_SEPOLIA_RPC_URL=""
WORLDCHAIN_SEPOLIA_RPC_URL=""
SHIBARIUM_TESTNET_RPC_URL=""
BITLAYER_TESTNET_RPC_URL=""
FANTOM_SONIC_TESTNET_RPC_URL=""
CORN_TESTNET_RPC_URL=""
HASHKEY_SEPOLIA_RPC_URL=""
INK_SEPOLIA_RPC_URL=""
21 changes: 16 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ SONEIUM_MINATO_SEPOLIA_RPC_URL=""
BSQUARED_TESTNET_RPC_URL=""
BOB_SEPOLIA_RPC_URL=""
WORLDCHAIN_SEPOLIA_RPC_URL=""
SHIBARIUM_TESTNET_RPC_URL=""
BITLAYER_TESTNET_RPC_URL=""
FANTOM_SONIC_TESTNET_RPC_URL=""
CORN_TESTNET_RPC_URL=""
HASHKEY_SEPOLIA_RPC_URL=""
INK_SEPOLIA_RPC_URL=""
```

Once that is done, to load the variables in the `.env` file, run the following command:
Expand Down Expand Up @@ -112,7 +118,13 @@ enum SupportedNetworks {
SONEIUM_MINATO_SEPOLIA, // 17
BSQUARED_TESTNET, // 18
BOB_SEPOLIA, // 19
WORLDCHAIN_SEPOLIA // 20
WORLDCHAIN_SEPOLIA, // 20
SHIBARIUM_TESTNET, // 21
BITLAYER_TESTNET, // 22
FANTOM_SONIC_TESTNET, // 23
CORN_TESTNET, // 24
HASHKEY_SEPOLIA, // 25
INK_SEPOLIA // 26
}
```

Expand Down Expand Up @@ -169,11 +181,10 @@ Or if you want to mint 10\*\*18 units of `CCIP-BnM` test token on Avalanche Fuji
forge script ./script/Faucet.s.sol -vvv --broadcast --rpc-url avalancheFuji --sig "run(uint8)" -- 1
```

### EVMExtraArgs
### Production Best Practice
Most of these examples are simplified for educational purposes. For production code, please adhere to the following best practices (Refer to the [Best Practices](https://docs.chain.link/ccip/best-practices) guide from the Official Chainlink Documentation for more information.):

Most of these examples are simplified for educational purposes. For production code, please adhere to the following best practices:

- **Do Not Hardcode `extraArgs`**: In these examples, `extraArgs` are hardcoded within contracts for simplicity. It is recommended to make `extraArgs` mutable. For instance, you can construct `extraArgs` off-chain and pass them into your function calls, or store them in a storage variable that can be updated as needed. This approach ensures that `extraArgs` remain backward compatible with future CCIP upgrades. Refer to the [Best Practices](https://docs.chain.link/ccip/best-practices) guide from the Official Chainlink Documentation for more information.
- **Do Not Hardcode `extraArgs`**: In these examples, `extraArgs` are hardcoded within contracts for simplicity. It is recommended to make `extraArgs` mutable. For instance, you can construct `extraArgs` off-chain and pass them into your function calls, or store them in a storage variable that can be updated as needed. This approach ensures that `extraArgs` remain backward compatible with future CCIP upgrades.
- **Validate the Destination Chain**: Always ensure that the destination chain is valid and supported before sending messages.
- **Understand `allowOutOfOrderExecution` Usage**: This parameter is available only on lanes where the **Out of Order Execution** property is set to **Optional** or **Required**. Refer to the [CCIP Directory](https://docs.chain.link/ccip/directory) to determine if your target lane supports this feature. For lanes where this parameter is absent, you must use `extraArgsV1` instead.

Expand Down
6 changes: 6 additions & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,11 @@ soneiumMinatoSepolia = "${SONEIUM_MINATO_SEPOLIA_RPC_URL}"
bsquaredTestnet = "${BSQUARED_TESTNET_RPC_URL}"
bobSepolia = "${BOB_SEPOLIA_RPC_URL}"
worldchainSepolia = "${WORLDCHAIN_SEPOLIA_RPC_URL}"
shibariumTestnet = "${SHIBARIUM_TESTNET_RPC_URL}"
bitlayerTestnet= "${BITLAYER_TESTNET_RPC_URL}"
fantomSonicTestnet = "${FANTOM_SONIC_TESTNET_RPC_URL}"
cornTestnet = "${CORN_TESTNET_RPC_URL}"
hashkeySepolia = "${HASHKEY_SEPOLIA_RPC_URL}"
inkSepolia = "${INK_SEPOLIA_RPC_URL}"

# See more config options https://github.com/foundry-rs/foundry/tree/master/config
Loading

0 comments on commit 791c942

Please sign in to comment.