Git Product home page Git Product logo

nft-builder's Introduction

NFT Minting

This application is a simple example to understand the process of creating an NFT.

MumbaiTestNet Metamask Network Parameters:

API Endpoints

This endpoint posts image to IPFS by using nft.storage API

Method: POST
Payload: None

Response:

{
    "metadata": {
        "name": "TOGGNFTTest2",
        "description": "TOGG NFT Test2",
        "image": "ipfs://bafybeiatlrvoolbn5m5bxeua5hramuuuemc44w26cjevktd7yc6hy5qxiq/TOGGNFTTest.png"
    },
    "ipnft": "bafyreifddym57uuvki275ndmcx4dzjc6yrp5askoeyjd2lzzpn2ibixkhm",
    "url": "ipfs://bafyreifddym57uuvki275ndmcx4dzjc6yrp5askoeyjd2lzzpn2ibixkhm/metadata.json"
}

This endpoint mints the image and returns the tx id

Method: POST

Payload:

{
  "metadata": "ipfs://bafyreifddym57uuvki275ndmcx4dzjc6yrp5askoeyjd2lzzpn2ibixkhm/metadata.json"
}

Response:

{
  "txHash": "0x8f7defd844434f954d1d15b94b9e654ac2944883f1d48c0bb8ca880b110d6986"
}

Hardhat CLI

https://hardhat.org/hardhat-runner/docs/getting-started#overview

Deploy contract

npx hardhat run scripts/deploy-contract.mjs --network PolygonMumbai

Output:

nft-builder-backend % npx hardhat run scripts/deploy-contract.mjs --network PolygonMumbai
ContractAddress:  0x245Ad6929537c872ff6Aa6124f3557Ea2782d9f3

Mint NFT

You can also use this cli to mint your NFT

npx hardhat run scripts/mint-nft.mjs --network PolygonMumbai

Output:

NFT minted to:  0x8B8590761d9a27f9abffCa684610Cd02a61a4B5B

Verify Your NFT

For this example you can see the result: https://testnets.opensea.io/0x8B8590761d9a27f9abffCa684610Cd02a61a4B5B

Minting Transaction Example

https://mumbai.polygonscan.com/tx/0x8f7defd844434f954d1d15b94b9e654ac2944883f1d48c0bb8ca880b110d6986

References

nft-builder's People

Contributors

alcnsahin 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.