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
In a Hardhat project, some of the default folders are:
188
189
189
190
- `contracts/` where the source files for your contracts should be.
@@ -205,11 +206,11 @@ We now need to add our last dependency. The OpenZeppelin contracts:
205
206
npm install @openzeppelin/contracts
206
207
```
207
208
208
-
<Callout emoji="💡" size="md" variant="info">
209
-
Open Zeppelin developed a lot of standard contracts that are super powerful,
210
-
widely used and fully tested and audited.
211
-
</Callout>
212
-
<SideDrawer buttonText="More on Open Zeppelin">
209
+
OpenZeppelin is best known for implementing freely available contracts for
210
+
various standards. They are powerful and widely used building blocks for Solidity
211
+
developers, and come fully tested and audited.
212
+
213
+
<SideDrawer buttonText="More on OpenZeppelin">
213
214
<OpenZeppelin />
214
215
</SideDrawer>
215
216
@@ -243,8 +244,8 @@ contracts. We'll write our smart contract step by step in five stages:
243
244
244
245
### Adda Mint Function
245
246
246
-
Let’s get started by inheriting OpenZeppelin's ERC721.sol like we did last time.
247
-
We add a constructor to our contract, which will mirror the one from ERC721.sol.
247
+
Let’s get started by inheriting OpenZeppelin's `ERC721` contract like we did last time.
248
+
We add a constructor to our contract, which will mirror the one from `ERC721.sol`.
248
249
249
250
{/* @wolovim optional line?: Unlike in our *Basic NFT* lesson, where we added a third parameter to the constructor for storing the token's baseURI, we will have a different approach this time, which we will come to later. */}
250
251
@@ -440,7 +441,7 @@ contract TierNFT is ERC721 {
440
441
441
442
### Create tokenURI function
442
443
443
-
When we inherited Open Zeppelin's ERC721, it gave us a function for `tokenURI` where we can store an image, a video, or much more. With the help of this ERC721 contract we have the ability to define **a base path** for creating a
444
+
When we inherited OpenZeppelin's `ERC721`, it gave us a function for `tokenURI` where we can store an image, a video, or much more. With the help of this `ERC721` contract we have the ability to define **a base path** for creating a
444
445
unique URI which adds the token ID to the end of it.
445
446
446
447
```solidity
@@ -494,11 +495,11 @@ it into the contract! Nifty, eh?
494
495
495
496
Let’s stop to break it down and examine it a little.
496
497
497
-
- Within the `tokenURI` function, you'll notice `override`, an ERC721 function
498
+
- Within the `tokenURI` function, you'll notice `override`, an `ERC721` function
498
499
we'll use, since we are not creating a separate JSON file to store images or
499
500
other services, but creating it right here in the contract.
500
-
- We also added `require(_exists(tokenId). "Nonexistent token");`. According to
501
-
ERC721 specification, it is required to throw an error if the NFT doesn't
501
+
- We also added `require(_exists(tokenId). "Nonexistent token");`. According to
502
+
the ERC-721 specification, it is required to throw an error if the NFT doesn't
502
503
exist.
503
504
-`imageSVG` is a placeholder for our image, and we will deal with it a bit
504
505
later.
@@ -755,7 +756,7 @@ We need to find a way to actually withdraw any funds our contract generates, oth
0 commit comments