Generate assets to empower your in-game items
1. Set up developer tools you'll need
2. Set up Metamask as your developer wallet: Metamask
3. Fork and modify the GGG contract
Solidity repository provides a standard set of libraries. This is your starting point for deploying our recommended ERC721 preset contracts.
At the end of this process you should have a copy of the repository installed locally on your machine with the path ../{YOUR_GITHUB_USERNAME}/GGG-boilerplate
Once downloaded, run the following command from the root directory:
Configure Hardhat
Update your project's hardhat.config.js/ts
file with the following code. This file is located in your smart contract repository.
4. Add metadata to your contract
Create metadata
There are 2 types of metadata to keep in mind:
For your collection: Contract metadata contains collection
description
andname
. A collection can have many NFTs.For each NFT: NFT metadata contains characteristics and properties of each specific NFT.
Create folders and files by running these commands in your terminal:
💡METADATA URLSAll NFT metadata filenames should be in the format of [int]
. The collection metadata file can contain any values as long as it is in JSON format.
In the folder
nft-metadata
populate the1
file with the metadata for the corresponding NFT, using the following example. Make sure to replace eachimage
with the URLs that you created earlier to host your NFT images.
Copy the contents of the
1
file into the42
and987654321098765432109876543210987654321
files, changing the values of"id"
to match.In the folder
contract-metadata
populate thecontract.json
file with the metadata for the collection, using the following example. Replaceimage
with the URL for the specific NFT image you uploaded when you created your collection metadata.
Ensure files are saved before uploading both folders into IPFS. Double check this by closing the file and re opening - make sure that the values have been saved.
5. Set up your wallet for minting
Obtain test $GGG tokens to pay for gas fees
Locate your wallet's private key
Configure the private key
6. Contract deployment
Deploy the contract
Fill in the values in scripts/deploy.ts
as appropriate, and then run the following command from your project's root directory:
🎉CONGRATULATIONS You've now deployed your first contract on Genesis Devnet!
Make sure you copy the CONTRACT_ADDRESS
which is returned after the successful deployment:
Verify the contract has been deployed
Last updated