LinuxCommandLibrary

hardhat

A development environment for Ethereum software.

TLDR

List available subcommands (or create a new project if no configuration exists)

$ hardhat
copy


Compile the current project and build all artifacts
$ hardhat compile
copy


Run a user-defined script after compiling the project
$ hardhat run [path/to/script.js]
copy


Run Mocha tests
$ hardhat test
copy


Run all given test files
$ hardhat test [path/to/file1.js] [path/to/file2.js]
copy


Start a local Ethereum JSON-RPC node for development
$ hardhat node
copy


Start a local Ethereum JSON-RPC node with a specific hostname and port
$ hardhat node --hostname [hostname] --port [port]
copy


Clean the cache and all artifacts
$ hardhat clean
copy

Copied to clipboard