- The smart contract allows presale
- The smart contract allows postsale
- The baseURI function returns the json metadata for the Nft
- The contract allows only the owner or deployer of the contract to withdraw from the contract
{
name:"Nft name",
description:"Nft description",
image:"Nft ipfsHash or base64Hash"
attributes:[
{value:"can be any value",
trait__types:"coolness"
}
]
}
this is what the Nft data on opensea
or rarible
look like.
- On-Chain
- Off-chain
having your Nft metadata on-chain allows multiple possibilties some of the possibilites are which are the pros:
- on-chain game devlopment
- on-chain interaction
cons :
- Gas expensive
having your Nft metadata on-chain allows multiple possibilties some of the possibilites are which are the pros:
- Gas used is cheaper
- Easy to write
cons :
- no on-chain interaction with your Nft
- To Compile the Contract
yarn hardhat compile
- To Clear the Compile Contract
yarn hardhat clean
- To Deploy the Contract on hardhat
yarn hardhat run scripts/<scripts file name>
- To Deploy the contract to a testnet
yarn hardhat run scripts/<scripts file name> --network <network name>
- To Run Test on hardhat
yarn hardhat test
- To Run Test on a particular network
yarn hardhat test --network <network name>
- To Run a paricular Test
yarn hardhat test --grep <name of the test in quote>
- To Run a Specific Test on a Particular Network
yarn hardhat test --grep <name of the test in quote> --network <network name>
The preffered networks can be found in the hardhat config file
- Phone number - +2348134570701
- Twitter - ken_okha
- BlockChain developer