- the storytelling card is a generative ERC721 collection loosely based on the loot project, celebrating the sunset of FilmmakerDAO
- the cards are SVGs (pseudo-)randomly generated on the ethereum blockchain
- resources:
- set an account and project on infura or alchemy
- set a test account in metamask and copy your private key (i used rinkeby for dev and you can get some funds in this faucet)
- set up an account at etherscan and grab the API key
cp env_example .env
vim .env
- install the dependencies:
npm install
- set the default network "rinkeby" at
hardhat.config.js
- compile the contract:
npx hardhat compile
- deploy the contract:
npx hardhat run scripts/deploy.js
- you should be able to see it at rinkeby etherscan
npx hardhat console --network rinkeby
- ad-hoc minting:
> const Film = await ethers.getContractFactory('FilmmakerDAO');
> const film = await Film.attach('<contract>')
> await film.mint(<tokenID>)
- you should be able to see the NFT on the opensea (testnet)
- install hardhat etherscan plugin (compatible with etherscan and polygonscan)
npm install --save-dev @nomiclabs/hardhat-etherscan
- verify the smart contract with the contract address
npx hardhat verify --network rinkeby YOUR_CONTRACT_ADDRESS
- test a smart contract:
npx hardhat test
- clean artifacts:
npx hardhat clean
- same steps, simply set the default network to "mainnet" and make sure the private key in
.env
is from the desired account