Package Exports
- @nomicfoundation/hardhat-toolbox-viem
- @nomicfoundation/hardhat-toolbox-viem/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@nomicfoundation/hardhat-toolbox-viem) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Hardhat Toolbox (Viem based)
The @nomicfoundation/hardhat-toolbox-viem plugin bundles all the commonly used packages and Hardhat plugins we recommend to start developing with Hardhat.
When you use this plugin, you'll be able to:
- Interact with your contracts using Viem and the
hardhat-viemplugin. - Test your contracts with Mocha, Chai and Chai as Promised. Note: the plugin Hardhat Chai Matchers is currently not available for Viem.
- Deploy your contracts with Hardhat Ignition.
- Interact with Hardhat Network with our Hardhat Network Helpers.
- Verify the source code of your contracts with the hardhat-verify plugin.
- Get metrics on the gas used by your contracts with the hardhat-gas-reporter plugin.
- Measure your tests coverage with solidity-coverage.
Note: you might want to pin Viem-related dependencies because Viem does not strictly follow semantic versioning for type changes. You can read more here.
Usage
To create a new project that uses the Toolbox, check our Setting up a project guide but select the Create a TypeScript project (with Viem) option instead.
Network Helpers
When the Toolbox is installed using npm 7 or later, its peer dependencies are automatically installed. However, these dependencies won't be listed in the package.json. As a result, directly importing the Network Helpers can be problematic for certain tools or IDEs. To address this issue, the Toolbox re-exports the Hardhat Network Helpers. You can use them like this:
import helpers from "@nomicfoundation/hardhat-toolbox/network-helpers";