... | @@ -88,9 +88,14 @@ Then run the command: |
... | @@ -88,9 +88,14 @@ Then run the command: |
|
npx hardhat
|
|
npx hardhat
|
|
```
|
|
```
|
|
|
|
|
|
and choose the option to create an empty **hardhat.config.js** file to configure your Hardhat development environment. Here you can define various settings such as the version of the solidity compiler that Hardhat uses to compile your smart contracts and put in the test networks that are going to be used for contract deployment.
|
|
and choose the option to create an empty hardhat.config.js file to configure your Hardhat development environment. In this file, you can define various settings, such as the version of the Solidity compiler that Hardhat uses to compile your smart contracts, and specify the test networks that will be used for contract deployment. To interact with the blockchain in the Hardhat environment, you need to install and add the ethers.js library plugin to the hardhat.config.js file. This library will allow you to deploy the written smart contract and perform other interactions with the blockchain.
|
|
|
|
To install the plugin, run the following command and add the import to your hardhat.config.js file:
|
|
|
|
|
|
(insert picture of hardhat.config.js here)
|
|
```sh
|
|
|
|
npm install --save-dev @nomiclabs/hardhat-ethers
|
|
|
|
```
|
|
|
|
|
|
|
|

|
|
|
|
|
|
After that, you can create the folders **contract/** to store the source files for your smart contracts and **scripts/** where you can store the script for the contract deployment. Now, your directory should look like this:
|
|
After that, you can create the folders **contract/** to store the source files for your smart contracts and **scripts/** where you can store the script for the contract deployment. Now, your directory should look like this:
|
|
|
|
|
... | | ... | |