Create in the repository root .env file with the following content:
RPC_URI=https://opt-mainnet.g.alchemy.com/v2/<api_key>
KEY=<your_private_key>
!!! do not commit or share your
.envfile with the private key
Do not forget to update your token
nameandsymbolin the file./contracts/Token.sol(line 16)
yarn
yarn compileyarn testIf you want to send bulk minting transaction during a deployment you have to edit ./deploy/0001.ts file.
Add addresses and unique URIs of tokens respectfully to arrays: addresses and uris.
To start deployment use command:
yarn hardhat --network optimism deployyarn hardhat --network optimism etherscan-verifyor
yarn hardhat --network optimism verify <CONTRACT_ADDRESS>There is available the following tasks:
mint: Single token minting
yarn hardhat --network optimism mint --contract <CONTRACT_ADDRESS> --to <TO_ADDRESS> --uri <URI>mintBulk: Multiple tokens minting
!!! Comma-separated addresses and URIs must be equal by elements length
yarn hardhat --network optimism mint --contract <CONTRACT_ADDRESS> --to <TO_ADDRESSES_COMMA_SEPARATED> --uri <URIS_COMMA_SEPARATED>Information about deployments will be saved in the ./deployments directory