Skip to content

Commit 587d2c4

Browse files
committed
initialize repository with hardhat, waffle, ethers, and chai
0 parents  commit 587d2c4

File tree

9 files changed

+7249
-0
lines changed

9 files changed

+7249
-0
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules/
2+
3+
artifacts/
4+
cache/

README.md

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# TODO
2+
3+
This repository was generated from a template or is the template itself. For more information, see [docs/TEMPLATE.md](./docs/TEMPLATE.md).
4+
5+
## Development
6+
7+
Install dependencies via Yarn:
8+
9+
```bash
10+
yarn install
11+
```
12+
13+
Compile contracts via Hardhat:
14+
15+
```bash
16+
yarn run hardhat compile
17+
```
18+
19+
### Networks
20+
21+
By default, Hardhat uses the Hardhat Network in-process.
22+
23+
To use an external network via URL, set the `URL` environment variable and append commands with `--network generic`:
24+
25+
```bash
26+
URL="https://mainnet.infura.io/v3/[INFURA_KEY]" yarn run hardhat test --network generic
27+
```
28+
29+
### Testing
30+
31+
Test contracts via Hardhat:
32+
33+
```bash
34+
yarn run hardhat test
35+
```

contracts/.keep

Whitespace-only changes.

docs/TEMPLATE.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Hardhat Waffle Template
2+
3+
Template for new Solidity projects built with Hardhat and tested with Waffle.
4+
5+
## Setup
6+
7+
Find all occurrences of "TODO" and replace with relevant text.

hardhat.config.js

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
require('@nomiclabs/hardhat-waffle');
2+
3+
module.exports = {
4+
solidity: {
5+
version: '0.7.4',
6+
settings: {
7+
optimizer: {
8+
enabled: true,
9+
runs: 200,
10+
},
11+
}
12+
},
13+
14+
networks: {
15+
generic: {
16+
// set URL for external network, such as Infura
17+
url: `${ process.env.URL }`,
18+
accounts: {
19+
mnemonic: `${ process.env.MNEMONIC }`,
20+
},
21+
},
22+
},
23+
};

package.json

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"name": "hardhat-waffle-template",
3+
"version": "0.0.0",
4+
"description": "TODO",
5+
"author": "TODO",
6+
"license": "TODO",
7+
"private": true,
8+
"repository": {
9+
"type": "git",
10+
"url": "TODO"
11+
},
12+
"devDependencies": {
13+
"@nomiclabs/hardhat-ethers": "^2.0.0",
14+
"@nomiclabs/hardhat-waffle": "^2.0.0",
15+
"chai": "^4.2.0",
16+
"ethereum-waffle": "^3.1.1",
17+
"ethers": "^5.0.18",
18+
"hardhat": "^2.0.0"
19+
}
20+
}

scripts/.keep

Whitespace-only changes.

test/.keep

Whitespace-only changes.

0 commit comments

Comments
 (0)