======================================
This guide provides a step-by-step walkthrough for deploying and interacting with the CrossChainPriceNFT smart contract, enabling the creation and management of dynamic NFTs across different blockchain networks. Utilizing Chainlink's Cross-Chain Interoperability Protocol (CCIP), this guide also includes a challenge for deploying on Polygon Mumbai.
- Ensure MetaMask is set to the Sepolia network.
- Open Remix IDE.
- Navigate to "DEPLOY & RUN TRANSACTIONS" and select "Injected provider - MetaMask" as the environment.
- Confirm you're on the Sepolia (11155111) network.
- In "FILE EXPLORER", create a new file named
CrossChainPriceNFT.sol
. - Copy the provided Solidity contract code into this file.
- Deploy the
CrossChainPriceNFT
contract via Remix, using the specified constructor arguments.
- Navigate to OpenSea testnets.
- Search for your
CrossChainPriceNFT
contract address to view your collection.
- Back in Remix, under the
CrossChainPriceNFT
contract, use themint
function with your wallet address.
- Create a new file named
CrossDestinationMinter.sol
in Remix. - Copy the respective Solidity code into this file and deploy on the Sepolia network.
- Run the
testMint
andtestMessage
functions from your deployedCrossDestinationMinter
contract.
- In MetaMask, switch to the Avalanche FUJI network.
- Verify the network change in Remix to Custom (43113).
- Create and deploy the
CrossSourceMinter.sol
contract on FUJI, inputting theCrossDestinationMinter
address as a parameter.
- Add LINK tokens to MetaMask for the FUJI network using the provided address.
- Transfer 5 LINK to your
CrossSourceMinter
address.
- Use the
mintOnSepolia
function to mint an NFT from the FUJI network to Sepolia. - Confirm the transaction ID via the CCIP Explorer.
- Add Mumbai Network following instructions on Chainlist or manually with the specified details.
- Add LINK token to your wallet using the LINK token contract for Mumbai.
- Obtain LINK tokens from the Mumbai faucet.
- Create a new file
CrossSourceMinterMumbai.sol
in Remix and paste the provided code. - Deploy, setting the
CrossDestinationMinter
address (from Sepolia) as a parameter.
- Transfer 5 LINK to your
CrossSourceMinterMumbai
address on MetaMask.
- Verify LINK balance in Remix and use the
mintOnSepolia
function to mint an NFT from Mumbai to Sepolia.
- Verify the cross-chain minting operation on CCIP Explorer.
- Your new NFT should be visible on OpenSea Testnets upon successful minting.
For a detailed walkthrough of this project, watch our YouTube tutorial.