You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/content/tutorial/deploying-to-a-live-network.md
+13-18
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
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.
4
4
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.
6
6
7
7
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.
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:
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.
79
79
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:
81
81
82
-
-[Portland State Ropsten Ethereum (rETH) faucet](https://ropsten.oregonctf.org/eth)
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.
87
86
88
87
:::tip
89
88
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).
95
90
96
91
:::
97
92
98
93
Finally, run:
99
94
100
95
```
101
-
npx hardhat run scripts/deploy.js --network ropsten
96
+
npx hardhat run scripts/deploy.js --network goerli
102
97
```
103
98
104
99
If everything went well, you should see the deployed contract address.
0 commit comments