Skip to content

Commit

Permalink
Use the hardhat.config.js to extend the HRE
Browse files Browse the repository at this point in the history
  • Loading branch information
BananaNeil authored Oct 25, 2021
1 parent d18e2ce commit 512d723
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/advanced/hardhat-runtime-environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Hardhat lets you hook into the HRE construction, and extend it with new function

You can do this by adding an HRE extender into a queue. This extender is just a synchronous function that receives the HRE and adds fields to it with your new functionality. These new fields will also get [injected into the global scope during runtime](#exporting-globally).

For example, adding an instance of [Web3.js](https://web3js.readthedocs.io/en/latest/) to the HRE can be done in this way:
For example, adding an instance of [Web3.js](https://web3js.readthedocs.io/en/latest/) to the HRE can be done by installing the `web3` package and adding the following to your `hardhat.config.js`:

```js
extendEnvironment((hre) => {
Expand Down

0 comments on commit 512d723

Please sign in to comment.