First of all, I would like to say thank you to Solange Gueiros fellow Chainlink Developer Expert for a wonderful session (which I've used as a guide to wrote this article hehe)
Outline
- Basic CCIP
- Smart Contracts structure
- Pre-requisite
- Hands-on
- Summary
Basic CCIP
Smart Contracts structure
We will create 3 smart contracts on 2 chains in this session and it would look somewhat similar to this.
Mumbai
1. ChainlinkNFT.sol
2. DestinationMinter.sol
Avalanche Fuji
1. SourceMinter.sol
Prerequisite
- Get MATIC on Mumbai -> https://mumbaifaucet.com/
- Get LINK on Mumbai -> https://faucets.chain.link/mumbai
- Get AVAX/LINK on Fuji -> https://faucets.chain.link/fuji
Hands-On
Refer to all the code from this gist 👇
Sepolia
- ChainlinkNFT
We're using https://wizard.openzeppelin.com/#erc721
Try visit testnet.opensea.com after deployed - DestinationMinter.sol
Avalanche Fuji
3. SourceMinter.sol
Summary
- We deployed ChainlinkNFT on Mumbai
- Then we deployed DestinationMinter on Mumbai
- Change the chain to Avalanche Fuji, Then deploy SourceMinter
- Supply LINK to SourceMinter contract
- We can call mintOnMumbai() on SourceMinter to mint a new NFT on Mumbai!