7. Chainlink CCIP & Cross-Chain NFT dApps

In this exercise we will be using CCIP to mint NFTs across multiple blockchains

CrossChainPriceNFT is an NFT Smart contract. It uses the BTC/USD Data Feed to get the Bitcoin Price

Chainlink CCIP in Cross-Chain dApps

CrossChainPriceNFT.sol

CrossChainPriceNFT.sol an NFT Smart contract, it uses the BTC/USD Data Feed to get the Bitcoin Price

  • The Images are emojis which depend on the price of Bitcoin when it was minted. If the Price is higher, then the Emoji is happy, if it is lower, the Emoji is sad, or if it didnt change, the Emoji remains neutral.

  • The Background Color depends on which blockchain the mint command came from.

  • The image is an SVG Generated on Chain, inside the smart contract

  • The MetaData is generated on chain, using Base64

CrossChainPriceNFT.sol source code

CrossDestinationMinter.sol

  • is prepared to receive a CCIP Message and mint an NFT

CrossDestinationMinter.sol Source Code

CrossSourceMinter.Sol

This smart contract creates a CCIP Message and sends it to the destination Chain using Chainlink CCIP. This sending-side Smart contract will be deployed on Avalanche Fuji.

CrossSourceMinter.sol Source Code

CrossSourceMinterMumbai.sol

This smart contract is the same as the CrossSourceMinter, but it is deployed on Polygon Mumbai. [IMPORTANT NOTE - MUMBAI is currently Deprecated] I will provide a workaround in this workshop but I wanted to include all the source material from the recorded bootcamp content so you, the learner can backtrack and see how it was originally shared.

CrossSourceMinterMumbai.sol Source Code

Last updated