======================================
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
CrossChainPriceNFTcontract via Remix, using the specified constructor arguments.
- Navigate to OpenSea testnets.
- Search for your
CrossChainPriceNFTcontract address to view your collection.
- Back in Remix, under the
CrossChainPriceNFTcontract, use themintfunction with your wallet address.
- Create a new file named
CrossDestinationMinter.solin Remix. - Copy the respective Solidity code into this file and deploy on the Sepolia network.
- Run the
testMintandtestMessagefunctions from your deployedCrossDestinationMintercontract.
- In MetaMask, switch to the Avalanche FUJI network.
- Verify the network change in Remix to Custom (43113).
- Create and deploy the
CrossSourceMinter.solcontract on FUJI, inputting theCrossDestinationMinteraddress as a parameter.
- Add LINK tokens to MetaMask for the FUJI network using the provided address.
- Transfer 5 LINK to your
CrossSourceMinteraddress.
- Use the
mintOnSepoliafunction 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.solin Remix and paste the provided code. - Deploy, setting the
CrossDestinationMinteraddress (from Sepolia) as a parameter.
- Transfer 5 LINK to your
CrossSourceMinterMumbaiaddress on MetaMask.
- Verify LINK balance in Remix and use the
mintOnSepoliafunction 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.