This project demonstrates a Book Library contracts.
NOTE: Contract is already deployed in Goerli testnet - bookLibrary Contract address: 0xe17Ff3FDAd1404e96082eC15F54793E0eE580b69
Install the dependencies
npm install
Compile the contracts
npx hardhat compile
Run local network with test accounts
npx hardhat node
Run tests with high coverage. Unit tests are typically run on hardhat networks or ganache.
npm run test
Run tests coverage.
npm run coverage
Create .env file with keys from .env.example. By default network is goerli so put private key from goerli network.
Deploying on testnet networks
npx hardhat deploy-testnets --network goerli
Deploying on mainnet networks
npx hardhat deploy-mainnet --private-key 0x
Interaction with contract
npx hardhat run scripts/interact-local.js
npx hardhat run scripts/interact-goerli.js