Minecraft development work was done under the repository at: https://github.com/iamcryptoboi/NFTLands
This Repository handles the Web functionality for the NFT Lands EthGlobal BuildQuest project.
Keep in mind that a .env file is needed with API private keys, we use Alchemy here. API Keys for the Professional Pinata Plan which includes Submarine functionality is required to run the server.
Public facing website for demo in the 2022 EthGlobal BuildQuest: https://nft-lands-g5c8o.ondigitalocean.app/
NFT Lands Web Build/Test Instructions:
Initial contract, Verify UI and Piñata Submarine functionality based on this article: https://medium.com/pinata/how-to-manage-nft-visibility-18e9b7a76b8c
Using our project:
- git clone https://github.com/cryptoKevinL/NFTLands
- npm install
- npm install dotenv
- .env file must have:
- POLYGON_PRIVATE_KEY
- POLYGON_URL=https://polygon-mumbai.g.alchemy.com/v2/{your_api_key}
- PINATA_V2_API_KEY
- PINATA_JWT - for Piñata Submarine (Paid Subscription Only)
- POLYSCAN_API_KEY (optional - for code verify)
- npx hardhat run scripts/deploy.js --network mumbai
- npx hardhat run scripts/mint_mumbai.js --network mumbai
- Addresses in mint script should be your own, for use with Metamask
- Otherwise, these can be minted from game with /buyplot (Working?)
- Verify code if you like, so you can interact with the contract on etherscan/polyscan
- npx hardhat verify --network mumbai "https://<your_gateway>.mypinata.cloud/ipfs//"
- cd /client
- Make sure new contract address of deployed contract is in pages/api/verify.js
- .env file here needs PINATA_V2_API_KEY, ALCHEMY_API_KEY (polygon), SECRET_COOKIE_PASSWORD=<random 32 chars>(not sure what this is)
- npm run dev
- Browse to localhost:3000 if running locally
- Click the only button
- Verify with MetaMask (from an address that was used in Mint Script, or /buyplot)
- Currently 10 Treasure Maps are stored in Piñata Submarine, so for demo purposes unique data for the first 10 minters.