Skip to content

Book library project built with Solidity contracts & NextJS frontend. Covered with tests. Setup for testnet networks and deploy script.

Notifications You must be signed in to change notification settings

petya0111/BookLibrary-hardhat

Repository files navigation

Book library Hardhat Project

This project demonstrates a Book Library contracts.

NOTE: Contract is already deployed in Goerli testnet - bookLibrary Contract address: 0xe17Ff3FDAd1404e96082eC15F54793E0eE580b69

Execute tasks for local setup

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

About

Book library project built with Solidity contracts & NextJS frontend. Covered with tests. Setup for testnet networks and deploy script.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published