Skip to content

Commit

Permalink
ethers-v6
Browse files Browse the repository at this point in the history
  • Loading branch information
Arvolear committed Oct 4, 2023
1 parent 25285eb commit 8a11a69
Show file tree
Hide file tree
Showing 9 changed files with 10,358 additions and 6,610 deletions.
4 changes: 2 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ POLYGONSCAN_KEY=POLYGONSCAN API KEY
AVALANCHE_KEY=AVALANCHE API KEY
COINMARKETCAP_KEY=COINMARKETCAP API KEY

# Available targets: 'ethers-v5', 'truffle-v5' and 'web3-v1'
# By default 'ethers-v5'
# Available targets: 'ethers-v6', 'truffle-v5' and 'web3-v1'
# By default 'ethers-v6'
TYPECHAIN_TARGET=TYPECHAIN TARGET

# Set 'false' to not automatically generate types
Expand Down
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ Template hardhat repository for ad-hoc smart contracts development.

The template works out of the box. To clean up the repo, you may need to delete the mock contracts, tests and migration files.

#### Compilation

To compile the contracts, use the next script:

```bash
npm run compile
```

#### Test

To run the tests, execute the following command:
Expand All @@ -26,7 +34,7 @@ To deploy the contracts locally, run the following commands (in the different te

```bash
npm run private-network
npm run deploy-local
npm run deploy-localhost
```

#### Bindings
Expand All @@ -41,9 +49,9 @@ npm run generate-types
### Integrated plugins

- Hardhat official `ethers` + `ethers-v5`
- Hardhat official `ethers` + `ethers-v6`
- [`Typechain`](https://www.npmjs.com/package/@typechain/hardhat)
- [`hardhat-migrate`](https://www.npmjs.com/package/@solarity/hardhat-migrate), [`hardhat-gobind`](https://www.npmjs.com/package/@solarity/hardhat-gobind)
- [`hardhat-migrate`](https://www.npmjs.com/package/@solarity/hardhat-migrate), [`hardhat-markup`](https://www.npmjs.com/package/@solarity/hardhat-markup), [`hardhat-gobind`](https://www.npmjs.com/package/@solarity/hardhat-gobind)
- [`hardhat-contract-sizer`](https://www.npmjs.com/package/hardhat-contract-sizer)
- [`hardhat-gas-reporter`](https://www.npmjs.com/package/hardhat-gas-reporter)
- [`solidity-coverage`](https://www.npmjs.com/package/solidity-coverage)
Expand Down
8 changes: 4 additions & 4 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import "@nomiclabs/hardhat-web3";
import "@nomiclabs/hardhat-truffle5";
import "@nomiclabs/hardhat-ethers";
import "@nomicfoundation/hardhat-ethers";
import "@nomicfoundation/hardhat-chai-matchers";
import "@solarity/hardhat-migrate";
import "@solarity/hardhat-gobind";
Expand All @@ -23,11 +23,11 @@ function privateKey() {
function typechainTarget() {
const target = process.env.TYPECHAIN_TARGET;

return target === "" || target === undefined ? "ethers-v5" : target;
return target === "" || target === undefined ? "ethers-v6" : target;
}

function forceTypechain() {
return process.env.TYPECHAIN_FORCE !== "false";
return process.env.TYPECHAIN_FORCE === "false";
}

const config: HardhatUserConfig = {
Expand Down Expand Up @@ -134,7 +134,7 @@ const config: HardhatUserConfig = {
target: typechainTarget(),
alwaysGenerateOverloads: true,
discriminateTypes: true,
dontOverrideCompile: !forceTypechain(),
dontOverrideCompile: forceTypechain(),
},
};

Expand Down
Loading

0 comments on commit 8a11a69

Please sign in to comment.