Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 28 additions & 16 deletions step01_hardhat_typescript_helloworld/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ Note: You can use this prebuilt [template project](https://github.com/paulrberg/

Copy the files from step00_hardhat_helloworld

```
npm install --save-dev ts-node typescript

```
```
npm install --save-dev chai @types/node @types/mocha @types/chai

```
rename your config file to hardhat.config.ts

We need to apply three changes to your config for it to work with TypeScript:
Expand All @@ -21,17 +23,19 @@ We need to apply three changes to your config for it to work with TypeScript:
For updating test and scripts [follow this](https://hardhat.org/guides/typescript.html#writing-tests-and-scripts-in-typescript)

For Type-safe smart contract interactions:

```
npm install --save-dev typechain @typechain/hardhat @typechain/ethers-v5

```
Update tsconfig.json

```
tsc

```
```
npx hardhat compile

```
```
npx hardhat test

```



Expand All @@ -51,22 +55,30 @@ npx hardhat help
--------------------------------------
For Fresh project follow these steps:
--------------------------------------

```
npm init

```
```
npm install --save-dev hardhat

```
```
npx hardaht
```

Select an Advance sample project ....

```
npm install --save-dev "hardhat@^2.8.2" "@nomiclabs/hardhat-waffle@^2.0.0" "ethereum-waffle@^3.0.0" "chai@^4.2.0" "ethers@^5.0.0" "solhint@^3.3.6" "solidity-
coverage@^0.7.16" "@typechain/ethers-v5@^7.0.1" "@typechain/hardhat@^2.3.0" "@typescript-eslint/eslint-plugin@^4.29.1" "@typescript-eslint/parser@^4

```
```
npm install dotenv

```
```
npm install --save-dev ts-node

```
```
npm install @nomiclabs/hardhat-etherscan

```
```
npm install hardhat-gas-reporter
```