This repository contains examples showing how to do certain things in Hardhat. If you want to see something else included, feel free to open an issue.
You can run your Hardhat tests in parallel. All you have to do is to install mocha
and change the
command you use to run them. Check the example to learn more.
When you run hh node
, a JSON-RPC server is started that you can use via http (and
using --network localhost
). Sometimes you want to wait until the node is ready to
do something. You can accomplish this with the TASK_NODE_SERVER_READY
subtask.
See the example to learn more.
This example shows how to customize the artifacts emitted by Hardhat.
If you want to use a custom solc version (for example, a modified solc or a nightly version), check this example.
This example shows how to use waffle to test the events emitted by a contract. It also includes a script for getting the emitted events from a transaction.
This example shows how to run some code before and/or after a task is executed.
This example shows how to get the return value from a mined transaction.