Skip to content

Aleks-NFT/erc721

 
 

Repository files navigation

Simple ERC712 token

Configuration

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 .env file with the private key

Do not forget to update your token name and symbol in the file ./contracts/Token.sol (line 16)

Setup

yarn
yarn compile

Testing

yarn test

Deployment

If 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 deploy

Contract verification

yarn hardhat --network optimism etherscan-verify

or

yarn hardhat --network optimism verify <CONTRACT_ADDRESS>

Tasks

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>

NOTES

Information about deployments will be saved in the ./deployments directory

About

Simple ERC721 token

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 75.7%
  • Solidity 24.3%