@typechain/hardhat
Advanced tools
Comparing version 2.0.1 to 2.0.2
# @typechain/hardhat | ||
## 2.0.2 | ||
### Patch Changes | ||
- e552df9: Add missing dependency on `fs-extra` | ||
## 2.0.1 | ||
@@ -4,0 +10,0 @@ |
@@ -14,3 +14,3 @@ { | ||
], | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"license": "MIT", | ||
@@ -24,4 +24,4 @@ "repository": "https://github.com/ethereum-ts/Typechain", | ||
"scripts": { | ||
"format": "prettier --config ../../.prettierrc --ignore-path ../../.prettierignore --check \"./**/*.ts\"", | ||
"format:fix": "prettier --config ../../.prettierrc --ignore-path ../../.prettierignore --write \"./**/*.ts\"", | ||
"format": "prettier --config ../../.prettierrc --ignore-path ../../.prettierignore --check \"./**/*.ts\" README.md", | ||
"format:fix": "prettier --config ../../.prettierrc --ignore-path ../../.prettierignore --write \"./**/*.ts\" README.md", | ||
"lint": "eslint --ext .ts src test", | ||
@@ -34,2 +34,5 @@ "lint:fix": "yarn lint --fix", | ||
}, | ||
"dependencies": { | ||
"fs-extra": "^9.1.0" | ||
}, | ||
"devDependencies": { | ||
@@ -41,3 +44,2 @@ "@nomiclabs/hardhat-ethers": "^2.0.2", | ||
"ethers": "^5.1.3", | ||
"fs-extra": "^9.1.0", | ||
"hardhat": "^2.0.10", | ||
@@ -49,5 +51,4 @@ "rimraf": "^3.0.2", | ||
"hardhat": "^2.0.10", | ||
"ts-generator": "^0.1.1", | ||
"typechain": "^5.0.0" | ||
} | ||
} |
@@ -32,14 +32,35 @@ <p align="center"> | ||
And add the following statement to your hardhat.config.js: | ||
And add the following statement to your `hardhat.config.js`: | ||
```javascript | ||
require('@typechain/hardhat') | ||
require('@nomiclabs/hardhat-ethers') | ||
require('@nomiclabs/hardhat-waffle') | ||
``` | ||
Or, if you are using TypeScript, add this to your hardhat.config.ts: | ||
Or, if you use TypeScript, add this to your `hardhat.config.ts`: | ||
```typescript | ||
import '@typechain/hardhat' | ||
import '@nomiclabs/hardhat-ethers' | ||
import '@nomiclabs/hardhat-waffle' | ||
``` | ||
Here's a sample `tsconfig.json`: | ||
```json | ||
{ | ||
"compilerOptions": { | ||
"target": "es2018", | ||
"module": "commonjs", | ||
"strict": true, | ||
"esModuleInterop": true, | ||
"outDir": "dist", | ||
"resolveJsonModule": true | ||
}, | ||
"include": ["./scripts", "./test"], | ||
"files": ["./hardhat.config.ts"] | ||
} | ||
``` | ||
## Features | ||
@@ -89,8 +110,7 @@ | ||
```ts | ||
import { ethers, waffle } from '@nomiclabs/hardhat' | ||
import { ethers, waffle } from 'hardhat' | ||
import chai from 'chai' | ||
import { Wallet } from 'ethers' | ||
import CounterArtifact from '../artifacts/Counter.json' | ||
import { Counter } from '../typechain/Counter' | ||
import CounterArtifact from '../artifacts/contracts/Counter.sol/Counter.json' | ||
import { Counter } from '../src/types/Counter' | ||
@@ -105,11 +125,10 @@ const { deployContract } = waffle | ||
// 1 | ||
const signers = await ethers.signers() | ||
const signers = await ethers.getSigners() | ||
// 2 | ||
counter = (await deployContract(<Wallet>signers[0], CounterArtifact)) as Counter | ||
const initialCount = await counter.getCount() | ||
counter = (await deployContract(signers[0], CounterArtifact)) as Counter | ||
// 3 | ||
const initialCount = await counter.getCount() | ||
expect(initialCount).to.eq(0) | ||
expect(counter.address).to.properAddress | ||
}) | ||
@@ -127,3 +146,3 @@ | ||
describe('count down', async () => { | ||
// 5 | ||
// 5 - this throw a error with solidity ^0.8.0 | ||
it('should fail', async () => { | ||
@@ -130,0 +149,0 @@ await counter.countDown() |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18258
8
166
+ Addedfs-extra@^9.1.0
+ Addedat-least-node@1.0.0(transitive)
+ Addedfs-extra@9.1.0(transitive)
+ Addedjsonfile@6.1.0(transitive)
+ Addeduniversalify@2.0.1(transitive)
- Removed@types/mkdirp@0.5.2(transitive)
- Removed@types/resolve@0.0.8(transitive)
- Removedminimist@1.2.8(transitive)
- Removedmkdirp@0.5.6(transitive)
- Removedts-essentials@1.0.4(transitive)
- Removedts-generator@0.1.1(transitive)