Skip to content

Commit

Permalink
chore: update README
Browse files Browse the repository at this point in the history
Signed-off-by: Jawad Tariq <[email protected]>
  • Loading branch information
JDawg287 committed Mar 1, 2024
1 parent 88ad0d4 commit 11d4010
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,38 @@ To build:
$ npm run build
```

## Build contracts with different Typechain target

To build different Typechain target:

```
npx hardhat typechain --typechain-target target
```

Where `target` can be `ethers-v6`, `web3-v1`etc.

*Note: you need to install the appropriate package for the target you want to build for. For example, to build for `web3-v1`, you need to install `@typechain/web3-v1` package.*

Default target is `ethers-v6` and it is output to `typechain-types/ethers-v6` directory.

You can specify the target in several ways:
- By setting the `TYPECHAIN_TARGET` environment variable
```bash
export TYPECHAIN_TARGET=web3-v1
```
- By setting the `--typechain-target` command line option
```bash
npx hardhat typechain --typechain-target web3-v1
```
- By setting the `typechain` field in `hardhat.config.ts`
```typescript
module.exports = {
typechain: {
target: 'web3-v1'
}
}
```

## Tests

To run the tests:
Expand Down

0 comments on commit 11d4010

Please sign in to comment.