Skip to content

Commit 71faf2d

Browse files
elPiablo7i7o
authored andcommitted
Uncover some missing code re: API key
1 parent cec1cc0 commit 71faf2d

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

lessons/projects/3.mdx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ contract TierNFT is ERC721 {
202202
203203
### Adding Tiers and Using Them in the Mint Function
204204
205-
Now it’s time for us to add our tiers. Just as we explained before each tier
205+
Now it’s time for us to add our tiers. Just as we explained before, each tier
206206
will have a value that represents the service description. Now let’s go ahead and
207207
add the tiers and assign their values.
208208
@@ -399,8 +399,7 @@ This is the JSON format of our metadata:
399399
'"}'
400400
```
401401

402-
The part `data:image/svg+xml;base64` tells the browser that follows
403-
the comma is a string of text written in Base64, so the browser
402+
The part `data:image/svg+xml;base64` tells the browser that the code after the comma is a string of text written in Base64, so the browser
404403
can decode it back into our SVG file format. Just as an example, if our
405404
collection `TierNFT`, and the TokenID were `3`, our JSON would end up look
406405
something like this:
@@ -488,7 +487,7 @@ uint256) public tokenTier;
488487
489488
### Complete TokenURI function with our SVG
490489
491-
We did a bunch of things with our contract and now we're going to tell you what and SVG is.
490+
We did a bunch of things with our contract and now we're going to tell you what an SVG is!
492491
493492
Add these lines right next to the other constants defined for the tiers:
494493
@@ -864,6 +863,11 @@ module.exports = {
864863
}
865864
```
866865

866+
**const POLYGON_URL = process.env.POLYGON_URL;
867+
const PRIVATE_KEY = process.env.PRIVATE_KEY;
868+
url: POLYGON_URL,
869+
accounts: [PRIVATE_KEY]** ***We need an API key in .env file, and is reflected in config under URL***
870+
867871
We are adding the RPC and the network to our config file. We will need to
868872
connect our wallet to the testnet and add some testnet funds to deploy the
869873
contract.

0 commit comments

Comments
 (0)