ERC1155, ERC721, and marketplace V1 contracts for isMedia Ethereum NFTs
Hardhat is used for contract development and deploy.
Install packages
npm install
Compile contracts (see Environment)
npm run compile
Run tests
npm run test
# With coverage
npm run test:coverage
Lint
# Tests and config files (JS/TS)
npm run lint
# Contracts
npm run lint:solidity
Hardhat local blockchain node
npm run dev
Deploy
# To local node
npm run deploy:dev
# To Ropsten testnet (needs "ROPSTEN_X" env vars)
npm run deploy:test
The repo comes with and example config in .env.dist
. These represent the defaults; to modify them copy the file to .env
and edit.
Name | Default | Description |
---|---|---|
HARDHAT_LOGGING | 1 | Logger switch |
WALLET_MNEMONIC | - | Custom wallet mnemonic for local dev (for Metamask testing convenience) |
ETHERSCAN_API_KEY | - | API key for etherscan. Used for deployed contract verification. |
ROPSTEN_RPC_URL | - | RPC URL for ropsten testnet deploy |
ROPSTEN_MNEMONIC | - | Wallet mnemonic for ropsten deploy |
TEST_REPORT_GAS | 1 | Report gas usage after test |
OpenZeppelin contracts copied 2021-06-28