Git Product home page Git Product logo

ccip-crosschainnfts's Introduction

CrossChainPriceNFT Comprehensive Guide

======================================

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.

Step 1: Initial Setup and Contract Deployment


MetaMask & Network

  • Ensure MetaMask is set to the Sepolia network.

Remix IDE

  • Open Remix IDE.
  • Navigate to "DEPLOY & RUN TRANSACTIONS" and select "Injected provider - MetaMask" as the environment.
  • Confirm you're on the Sepolia (11155111) network.

Contract Preparation

  • In "FILE EXPLORER", create a new file named CrossChainPriceNFT.sol.
  • Copy the provided Solidity contract code into this file.

Deployment

  • Deploy the CrossChainPriceNFT contract via Remix, using the specified constructor arguments.

Step 2: Minting and Viewing Your NFT


Collection on OpenSea

  • Navigate to OpenSea testnets.
  • Search for your CrossChainPriceNFT contract address to view your collection.

Minting NFTs

  • Back in Remix, under the CrossChainPriceNFT contract, use the mint function with your wallet address.

CrossDestinationMinter Contract

  • Create a new file named CrossDestinationMinter.sol in Remix.
  • Copy the respective Solidity code into this file and deploy on the Sepolia network.

Step 3: Testing Cross-Chain Functionality


Tests

  • Run the testMint and testMessage functions from your deployed CrossDestinationMinter contract.

Switch Networks

  • In MetaMask, switch to the Avalanche FUJI network.
  • Verify the network change in Remix to Custom (43113).

CrossSourceMinter Contract

  • Create and deploy the CrossSourceMinter.sol contract on FUJI, inputting the CrossDestinationMinter address as a parameter.

Step 4: Cross-Chain Minting and Link Token Transfer


Send LINK Tokens

  • Add LINK tokens to MetaMask for the FUJI network using the provided address.
  • Transfer 5 LINK to your CrossSourceMinter address.

Minting Across Chains

  • Use the mintOnSepolia function to mint an NFT from the FUJI network to Sepolia.
  • Confirm the transaction ID via the CCIP Explorer.

Step 5: Mint from Polygon Mumbai


Setup Mumbai on MetaMask

  • Add Mumbai Network following instructions on Chainlist or manually with the specified details.

Add LINK Token on Mumbai

Get LINK from Faucet

Deploy CrossSourceMinterMumbai Contract

  • Create a new file CrossSourceMinterMumbai.sol in Remix and paste the provided code.
  • Deploy, setting the CrossDestinationMinter address (from Sepolia) as a parameter.

Step 6: Minting and Funding


Send LINK to CrossSourceMinterMumbai

  • Transfer 5 LINK to your CrossSourceMinterMumbai address on MetaMask.

Check Balance and Mint

  • Verify LINK balance in Remix and use the mintOnSepolia function to mint an NFT from Mumbai to Sepolia.

Step 7: Review and Verification


Review on CCIP Explorer

View Your NFT on OpenSea

Watch the Tutorial

For a detailed walkthrough of this project, watch our YouTube tutorial.

Resources

ccip-crosschainnfts's People

Contributors

juanc004 avatar

Stargazers

Agustin Villagrán avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.