Skip to content

davidtperk/hardhat-examples

 
 

Repository files navigation

Hardhat examples

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.

Parallel tests

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.

Wait until the node is started

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.

Customize generated artifacts

This example shows how to customize the artifacts emitted by Hardhat.

Use a custom version of solc

If you want to use a custom solc version (for example, a modified solc or a nightly version), check this example.

Reading events

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.

Tasks hooks

This example shows how to run some code before and/or after a task is executed.

Read returned value from tx

This example shows how to get the return value from a mined transaction.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 79.3%
  • Solidity 20.7%