Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

Latest commit

 

History

History
42 lines (26 loc) · 942 Bytes

hardhat.md

File metadata and controls

42 lines (26 loc) · 942 Bytes

HardHat

We use the Hardhat development environment, to compile, test and deploy our contracts.

Direct running

If you want to avoid using the convenience targets in the package.json, then you can execute against Hardhat directly.

All tests

Target to run all the mocha tests found in the /test directory, transpiled as necessary.

npx hardhat test

Single test

Run a single test (or a regex of tests), then pass in as an argument.

 npx hardhat test .\test\sample.test.ts

Scripts

The TypeScript transpiler will automatically as needed, execute through HardHat for the instantiated environment

npx hardhat run .\scripts\sample-script.ts

Logging

Logging is performed with Bunyan

Bunyan CLI

To have the JSON logging output into a more human-readable form, pipe the stdout to the Bunyan CLI tool.

npx hardhat accounts | npx bunyan