Smart contracts used by the Nation3 Citizen Directory and Nation3 Basic Income (N3BI).
npm install
npx hardhat clean
npx hardhat compile
Run unit tests:
export REPORT_GAS=true
npx hardhat test
Run code coverage:
npx hardhat coverage
Check if coverage threshold has been met:
npx istanbul check-coverage --lines 80
Run ESLint:
npx eslint '**/*.{js,ts}' --fix
Run Solhint:
npx solhint 'contracts/*.sol' --fix
Run Prettier:
npx prettier '**/*.{json,sol,md}' --check
npx prettier '**/*.{json,sol,md}' --write
Start a local Ethereum network node:
npx hardhat node
This will start Hardhat Network, and expose it as a JSON-RPC and Websocket server at http://127.0.0.1:8545/.
npx hardhat run scripts/deploy-<contract>.ts
Add an .env
file, and set the variables:
cp .env.example .env
npx hardhat run scripts/deploy-<contract>.ts --network goerli
npx hardhat verify --network goerli <address>
Set the MAINNET_URL
in .env
.
npx hardhat run scripts/deploy-<contract>.ts --network mainnet
npx hardhat verify --network mainnet <address>
- GitHub.sol:
0x7a0e37e6e64d4fc59207c163e0176e22a4072503
- Discord.sol:
0x4BD52941D5C14035F49C93ab6EB3878DDa063119
- GitHub.sol:
0xB989C0C17a3Bce679D7586d9e55B6Eab11c18687
- Discord.sol:
0x3415f4ffb9f89fba0ab446da4a78223e4cd73bad