A place for StakeborgDAO Community Badges smart contracts.
Development stack:
-
Create a mainnet archive Matic node on Alchemy
-
add POLYGON_API_KEY to .env containing your Alchemy API KEY
-
npm install
will install all dependencies
-
npx hardhat test
will run all tests
-
npx hardhat coverage
will run all tests with code coverage
-
npx hardhat node
will start a local fork of the network
-
npx hardhat run --network localhost scripts/deploy.js
will deploy the contract on local fork
POLYGON_API_KEY
Alchemy API key for Polygon network
MUMBAI_API_KEY
Alchemy API key for Mumbai network
DEPLOYER_PRIVATE_KEY
32 bytes hex private key for deployer account
POLYSCAN_API_KEY
Polyscan API key used for verification
npx hardhat run scripts/deploy.js --network network-name
Where network-name is
- polygon
- polygonMumbai
Deployment details:
- Smart contract deploys paused
SUPPLY_SETTER_ROLErole sets supply for all tokensURI_SETTER_ROLErole sets URI for all tokensPAUSER_ROLEcan pause or unpause smart contractUPGRADER_ROLEcan upgrade contractWHITELISTER_ROLEcan set merklerootsMINTER_ROLEis only used internally during minting.MINTER_ROLEshould not be set manually.
INFURA_PROJECT_ID
Infura project id (API KEY)
XYZ_API_USER
stakeborgdao.xyz username
XYZ_API_KEY
stakeborgdao.xyz API key
node scripts/xyzMerkleRoots.js will pull data from stakeborgdao.xyz API and generate or update whitelist files in /data