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
What we are doing is adding the RPC and the network to the config file. Now we need to
885
-
connect our wallet to the testnet and add some testnet tokens, so we can actually pay for the deployment of the contract.
887
+
Do you remember in *Build a Basic NFT* we looked at Ethereum RPC (remote procedure call) node providers? What we are doing is adding the RPC and network configuration to the config file. This will let you, as the deployer, connect **your** wallet to the testnet. Now we need to add some testnet tokens, so we can actually **pay** for the deployment of the contract!
886
888
887
889
### Adding the testnet network
888
890
889
-
To add the Polygon Mumbai network head over to the
891
+
This time we're using Polygon Mumbai test network. Head over to the
890
892
[Chainlist](https://chainlist.org/) page and connect your wallet. Make sure you toggle
891
893
the testnet button, otherwise no testnets will show up, and search for Mumbai. You will see the testnet network
892
-
with chainID 80001. Add it to your wallet.
893
-
Note: **Always make sure to use a separate browser profile, with a separate wallet, holding only testnet tokens, for any tutorials. See our section on Wallets for background on your security, your private keys and your recovery seed phrases!**
894
-
894
+
with chainID 80001. Add it to your wallet.
895
+
<br/>
896
+
Note: **Always make sure to use a separate browser profile, with a separate wallet, holding only testnet tokens, for any tutorials. See our Fundamental on *Introduction to web3 Wallets* for background on your security, your private keys and your recovery seed phrases!**
897
+
<br/>
895
898

896
899
897
900
### Getting Some Testnet Funds
@@ -900,7 +903,7 @@ A testnet is a sandbox environment where developers
900
903
can test, create and modify functionalities, monitor and simulate a mainnet blockchain's network
901
904
performance, fix bugs and other network failures without having to worry about breaking a main chain, and paying in real crypto coins to do so! Mainnets cost - testnets generally don't.
902
905
903
-
We get testnet tokens from faucets. A faucet is a website, which on request, will *drip* a small amount of testnet tokens onto your address, and sometimes require completion of small tasks before doing so.
906
+
We get testnet tokens from faucets. A faucet is a website, which on request, will **drip** a small amount of testnet tokens onto your address, and sometimes require completion of small tasks before doing so.
904
907
some testnet on the wallets.
905
908
Note: Testnet and mainnet are separate networks. You can't for example send tokens from a testnet to a mainnet. Let's head over and get some on this
906
909
[website](https://faucet.paradigm.xyz/).
@@ -910,17 +913,17 @@ Note: Testnet and mainnet are separate networks. You can't for example send toke
910
913
If you complete the required tasks, you can get tokens for multiple testnets.
911
914
912
915
913
-
Before we deploy, we need to add a `.env` file to our root folder to make sure we are **not pushing our private keys into public repositories**.
916
+
Before we deploy, we need to add a `.env` file to our root folder to make sure we are **not pushing and therefore exposing our private keys in public repositories**.
914
917
915
-
For your wallet's private key, the most sensitive data of the project, you need to open Metamask, click on the three dots next to your Account Name, and then on Account Details, then click on Export Private Key. It will ask for your Metamask password, the one you use to open it, NOT your seed phrase. It also shows you a
916
-
notice so you know that you are entering the danger zone. Confirm and you'll be able to copy your private key. Add your private key into the `.env` file like so:
918
+
For your wallet's private key, the most sensitive data of the project, you need to open Metamask. Click on the three dots next to your Account Name, and then on Account Details, click on Export Private Key. It will ask for your Metamask password, the one you use to log in to your wallet each session, not your seed phrase. It also shows you a
919
+
notice so you know that you are entering the *danger zone*. Confirm and you'll be able to copy your private key. Add your private key into the `.env` file like so:
917
920
918
921
```bash
919
922
PRIVATE_KEY=f8abc629b....
920
923
```
921
924
922
925
<Calloutemoji='💡'size='md'variant='info'>
923
-
Also, make sure you have a line that says `.env` in the `.gitignore` file in our
926
+
Also, make sure you have a line that says `.env` in the `.gitignore` file in your
924
927
root folder. If this file doesn't exist, create it and add that line! This makes
925
928
sure we don't accidentally upload our `.env` file to our public repositories by
926
929
mistake.
@@ -946,8 +949,7 @@ We will deploy our smart contract by using this command:
946
949
npx hardhat run scripts/deploy.js --network mumbai
947
950
```
948
951
949
-
We specify where we want the contract to be deployed in the `—-network` part
950
-
of the command.
952
+
We specify the network where we want the contract to be deployed using the --network option.
951
953
952
954

953
955
@@ -959,7 +961,7 @@ Without a new script we won’t be able to mint any of our NFTs.
959
961
960
962
The mint function will run three times to mint each different Tier.
961
963
962
-
The code for what we want is below, but we need a home for it. So let's go back to the `/scripts` directory and create a `mint.js` file and paste in the code below. When we're done, we can grab our shiny new contract address from the command line and paste it after `const CONTRACT_ADDRESS =` in the file:
964
+
The code for what we want is below, but we need a home for it. So let's go back to the `/scripts` directory and create a `mint.js` file. Copy in the following code. When we're done, we can grab our shiny new contract address from the command line, and paste it in after `const CONTRACT_ADDRESS =`.
963
965
964
966
```jsx
965
967
consthre=require('hardhat')
@@ -1032,18 +1034,38 @@ If we look at our terminal we will see something like this.
1032
1034
1033
1035

1034
1036
1035
-
We have just minted 3 NFTs with different Tiers!
1037
+
You have just minted 3 NFTs - with different Tiers!
1036
1038
1037
1039
Let’s go ahead and view them on the Opensea marketplace. This could take a few
1038
-
minutes to appear, don't panic. You can search your newly created collection
1039
-
with your contract address or with the name that you chose in
0 commit comments