NFT

Deploy your first NFT

Deploy your First NFT on OpenSea

Ref:

Build your first Tradable NFT from Scratch

We will accomplish the following here under:

  • Structuring your ERC721 contract

  • Structuring you off-chain metadata

  • View your items on OpenSea

  • testing out the auction flow for your items.

Step 1: ERC721 Contract preparation

ERC721arrow-up-right is the latest standard in non-fungible tokens. ERC-721 defines a minimum interface a smart contract must implement to allow unique tokens to be managed, owned, and traded.

// ! you need to have a special version of node.js to make their script work: See here to change to v12.18.4 of node.js supported: https://app.gitbook.com/@marcantoine-lemaire/s/programming-languages/javascript-programmingarrow-up-right

Project Git: https://github.com/ProjectOpenSea/opensea-creaturesarrow-up-right (as illustration on OpenSea NFT platform integration)

To see NFT on OpenSea testnet: https://testnets.opensea.io/assetsarrow-up-right

Next, we'll want to mint new assets to our newly-deployed ERC721 contracts! We'll mint these assets into an account that we control so that we can test the OpenSea auction flow for our items.

Then Visit a Market place to add you NFT Inside of it: https://testnets.opensea.io/get-listed/step-twoarrow-up-right

Enter there the Address ot your NFT-Contract

You can now see your NFT objects:

Then put in sales the NFT with the owner address

Buy it with another address

Look at the transaction: https://rinkeby.etherscan.io/tx/0xf526b6d9f22cc4a4723c4cea9d5ca534bc4700f325862cd5da0d82e6b42fadf1arrow-up-right

Creature attribute are defined in https://opensea-creatures-api.herokuapp.com/api/creature/1arrow-up-right

That URL is defined on the Creature.sol: https://github.com/ProjectOpenSea/opensea-creatures/blob/a0db5ede13ffb2d43b3ebfc2c50f99968f0d1bbb/contracts/Creature.sol#L14arrow-up-right

At this point, we've deployed our first smart contract on the Rinkeby network and minted some new OpenSea creatures on our contract. You should be able to visit rinkeby.opensea.io and view your new creatures as NFTs inside your wallet!

Step2: Adding MetaData to the NFT Token

The default metadata for the creatures is provided by https://opensea-creatures-api.herokuapp.com/api/creature/{token_id}, which is set herearrow-up-right. Next, you'll need create your custom metadata API.

This is where off-chain metadata comes in to play! Each token identifier in your ERC721 contract will have corresponding metadata URI that returns additional important information about the item, such as the item's name, image, description, etc

So to change your MetaData of your NFT, change the creature.sol and use another URL corresponding to your API

Step3: Embed on your Web Site a NFT

https://opensea.io/blog/announcements/announcing-embeddable-nfts/arrow-up-right

NTF with Polkadot

Pallet named Unique that Gavin is developping: https://github.com/paritytech/substrate/tree/master/frame/uniquesarrow-up-right

Last updated