Skip to content

Commit 6979ee6

Browse files
committed
Merge branch 'master' into add-typescript-peer-deps
2 parents 49db609 + 18f11e4 commit 6979ee6

File tree

5 files changed

+42
-32
lines changed

5 files changed

+42
-32
lines changed

.changeset/afraid-eyes-hug.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"hardhat": patch
3+
---
4+
5+
Fix incorrect peerDependency

.github/workflows/comment-on-linter-error.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
ref: "refs/pull/${{ github.event.number }}/merge"
2323
- uses: actions/setup-node@v2
2424
with:
25-
node-version: 12
25+
node-version: 14
2626
cache: yarn
2727
- name: Install
2828
run: yarn --frozen-lockfile

.github/workflows/pre-release.yml

+11
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Pre-release tests
33
on:
44
push:
55
branches: [pre-release-testing-branch]
6+
workflow_dispatch:
67

78
env:
89
RUN_ETHERSCAN_TESTS: yes
@@ -30,7 +31,17 @@ jobs:
3031
run: yarn build
3132
- name: lint
3233
run: yarn lint
34+
- name: Cache artifacts
35+
uses: actions/cache@v2
36+
with:
37+
path: |
38+
packages/hardhat-core/test/internal/hardhat-network/stack-traces/test-files/**/artifacts
39+
key: hardhat-network-stack-traces-tests-${{ hashFiles('yarn.lock') }}-${{ hashFiles('packages/hardhat-core/test/internal/hardhat-network/stack-traces/test-files/**/*.sol') }}-${{ hashFiles('packages/hardhat-core/test/internal/hardhat-network/stack-traces/test-files/**/test.json') }}-${{ hashFiles('packages/hardhat-core/test/internal/hardhat-network/stack-traces/**/*.ts') }}
3340
- name: test
41+
env:
42+
DO_NOT_SET_THIS_ENV_VAR____IS_HARDHAT_CI: true
43+
FORCE_COLOR: 3
44+
NODE_OPTIONS: "--max-old-space-size=4096"
3445
run: yarn test
3546
- name: Check dependency versions
3647
run: node scripts/check-dependencies.js

docs/src/content/tutorial/deploying-to-a-live-network.md

+13-18
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Once you're ready to share your dApp with other people what you may want to do is deploy to a live network. This way others can access an instance that's not running locally on your system.
44

5-
There's the Ethereum network that deals with real money which is called "mainnet", and then there are other live networks that don't deal with real money but do mimic the real world scenario well, and can be used by others as a shared staging environment. These are called "testnets" and Ethereum has multiple ones: _Ropsten_, _Kovan_, _Rinkeby_ and _Goerli_. We recommend you deploy your contracts to the _Ropsten_ testnet.
5+
There's the Ethereum network that deals with real money which is called "mainnet", and then there are other live networks that don't deal with real money but do mimic the real world scenario well, and can be used as a shared staging environment. These are called "testnets" and [Ethereum has several](https://ethereum.org/en/developers/docs/networks/#ethereum-testnets), like _Goerli_ and _Sepolia_. We recommend you deploy your contracts to the _Goerli_ testnet.
66

77
At the software level, deploying to a testnet is the same as deploying to mainnet. The only difference is which network you connect to. Let's look into what the code to deploy your contracts using ethers.js would look like.
88

@@ -49,7 +49,7 @@ Token address: 0x5FbDB2315678afecb367f032d93F642f64180aa3
4949

5050
## Deploying to remote networks
5151

52-
To deploy to a remote network such as mainnet or any testnet, you need to add a `network` entry to your `hardhat.config.js` file. We’ll use Ropsten for this example, but you can add any network similarly:
52+
To deploy to a remote network such as mainnet or any testnet, you need to add a `network` entry to your `hardhat.config.js` file. We’ll use Goerli for this example, but you can add any network similarly:
5353

5454
```js{5,11,15-20}
5555
require("@nomiclabs/hardhat-waffle");
@@ -58,47 +58,42 @@ require("@nomiclabs/hardhat-waffle");
5858
// a new App in its dashboard, and replace "KEY" with its key
5959
const ALCHEMY_API_KEY = "KEY";
6060
61-
// Replace this private key with your Ropsten account private key
61+
// Replace this private key with your Goerli account private key
6262
// To export your private key from Metamask, open Metamask and
6363
// go to Account Details > Export Private Key
6464
// Be aware of NEVER putting real Ether into testing accounts
65-
const ROPSTEN_PRIVATE_KEY = "YOUR ROPSTEN PRIVATE KEY";
65+
const GOERLI_PRIVATE_KEY = "YOUR GOERLI PRIVATE KEY";
6666
6767
module.exports = {
6868
solidity: "0.7.3",
6969
networks: {
70-
ropsten: {
71-
url: `https://eth-ropsten.alchemyapi.io/v2/${ALCHEMY_API_KEY}`,
72-
accounts: [`${ROPSTEN_PRIVATE_KEY}`]
70+
goerli: {
71+
url: `https://eth-goerli.alchemyapi.io/v2/${ALCHEMY_API_KEY}`,
72+
accounts: [`${GOERLI_PRIVATE_KEY}`]
7373
}
7474
}
7575
};
7676
```
7777

7878
We're using [Alchemy](https://www.alchemyapi.io), but pointing `url` to any Ethereum node or gateway would work. Go grab your `ALCHEMY_API_KEY` and come back.
7979

80-
To deploy on Ropsten you need to send ropsten-ETH into the address that's going to be making the deployment. You can get some ETH for testnets from a faucet, a service that distributes testing-ETH for free. Here's some for Ropsten:
80+
To deploy on Goerli you need to send goerli-ETH into the address that's going to be making the deployment. You can get some ETH for testnets from a faucet, a service that distributes testing-ETH for free. Here are some for Goerli:
8181

82-
- [Portland State Ropsten Ethereum (rETH) faucet](https://ropsten.oregonctf.org/eth)
83-
- [Ropsten testnet faucet](https://faucet.egorfine.com/)
84-
- [MetaMask Ether Faucet](https://faucet.metamask.io/)
82+
- [Chainlink faucet](https://faucets.chain.link/)
83+
- [Alchemy Goerli Faucet](https://goerlifaucet.com/)
8584

86-
You'll have to change Metamask's network to Ropsten before transacting.
85+
You'll have to change Metamask's network to Goerli before transacting.
8786

8887
:::tip
8988

90-
You can get some ETH for other testnets following these links:
91-
92-
- [Kovan faucet](https://faucet.kovan.network/)
93-
- [Rinkeby faucet](https://faucet.rinkeby.io/)
94-
- [Goerli faucet](https://goerli-faucet.slock.it/)
89+
You can learn more about other testnets and find links to their faucets on the [ethereum.org site](https://ethereum.org/en/developers/docs/networks/#ethereum-testnets).
9590

9691
:::
9792

9893
Finally, run:
9994

10095
```
101-
npx hardhat run scripts/deploy.js --network ropsten
96+
npx hardhat run scripts/deploy.js --network goerli
10297
```
10398

10499
If everything went well, you should see the deployed contract address.

packages/hardhat-core/package.json

+12-13
Original file line numberDiff line numberDiff line change
@@ -93,19 +93,6 @@
9393
"ts-node": "^8.1.0",
9494
"typescript": "~4.5.2"
9595
},
96-
"peerDependencies": {
97-
"chai": "^4.2.0",
98-
"ts-node": "*",
99-
"typescript": "*"
100-
},
101-
"peerDependenciesMeta": {
102-
"ts-node": {
103-
"optional": true
104-
},
105-
"typescript": {
106-
"optional": true
107-
}
108-
},
10996
"dependencies": {
11097
"@ethereumjs/block": "^3.6.2",
11198
"@ethereumjs/blockchain": "^5.5.2",
@@ -156,6 +143,18 @@
156143
"uuid": "^8.3.2",
157144
"ws": "^7.4.6"
158145
},
146+
"peerDependencies": {
147+
"ts-node": "*",
148+
"typescript": "*"
149+
},
150+
"peerDependenciesMeta": {
151+
"ts-node": {
152+
"optional": true
153+
},
154+
"typescript": {
155+
"optional": true
156+
}
157+
},
159158
"nyc": {
160159
"extension": [
161160
".ts"

0 commit comments

Comments
 (0)