This is the official repository for Potters Smart Contracts using Truffle Framework.
Potters contract allow generate random Harry Potter NFTs using Chainlink VRF
To avoid fulfillRandomWords()
revert, Potters Contract only store the random number by calling reserveRandomNFT()
. Once the random number is generated mint()
function may be called.
To install the latest version of Node.js, click here and follow the steps.
To install truffle, run the following command:
npm i -g truffle
npm i
All the testing scripts are under the test
folder. To run the test run the following commands:
$ truffle test
I have already deployed a sample contract to Goerli testnet network. You can play with it. In this test version of the contract, anybody can reserve a randomNFT
and mint
it.
Contract | Token address |
---|---|
Potters.sol |
0x96AEc092d389bEe607f0dB778998cc77A5Ec27aC |
Also you can check minted NFTs on: https://goerli.pixxiti.com/nfts/0x96aec092d389bee607f0db778998cc77a5ec27ac/${nftId} where nftId
can be a value between 0 and 4.