Skip to content

Commit a09a9be

Browse files
committed
Start 2nd edition
Improve structures, wordings, correct typos, and etc. based on the later published blog posts elsewhere.
1 parent c70b3a2 commit a09a9be

File tree

4 files changed

+337
-3
lines changed

4 files changed

+337
-3
lines changed

docs/.vuepress/config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ module.exports = {
8585
'/tutorial/first-steps',
8686
'/tutorial/minting-service',
8787
'/tutorial/lazy-minting',
88+
'/tutorial/mint-nftstorage-polygon',
8889
'/tutorial/gallery-app',
8990
'/tutorial/using-nfts-in-games',
9091
'/tutorial/flow-nft-marketplace'

docs/tutorial/first-steps.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ On [the getting started page for Ethers](https://docs.ethers.io/v5/getting-start
7373

7474
### Gather the needed details
7575

76-
For this tutorial, we're going to connect to a smart contract called `Greeter` that's included with a new [Hardhat](https://hardhat.io) project. It's been deployed to the Ropsten testnet at the address `0xE0282e76237B8eB19A5D08e1741b8b3e2691Dadd`, and you can find details about it on the [EtherScan Ropsten block explorer](https://ropsten.etherscan.io) by searching for that address, which should take you to [the address detail view](https://ropsten.etherscan.io/address/0xE0282e76237B8eB19A5D08e1741b8b3e2691Dadd).
76+
For this tutorial, we're going to connect to a smart contract called `Greeter` that's included with a new [Hardhat](https://hardhat.org/) project. It's been deployed to the Ropsten testnet at the address `0xE0282e76237B8eB19A5D08e1741b8b3e2691Dadd`, and you can find details about it on the [EtherScan Ropsten block explorer](https://ropsten.etherscan.io) by searching for that address, which should take you to [the address detail view](https://ropsten.etherscan.io/address/0xE0282e76237B8eB19A5D08e1741b8b3e2691Dadd).
7777

7878
Ethers has a [Contract API](https://docs.ethers.io/v5/api/contract/contract/) that abstracts over the details of the blockchain and lets us interact with smart contracts as if they were regular JavaScript objects named `Contract`.
7979

@@ -95,6 +95,9 @@ In the `hello-eth` folder, next to `ethers-5.1.esm.min.js`, create a file called
9595
<script type="module">
9696
import { ethers } from "./ethers-5.1.esm.min.js";
9797
//const ethers = require('ethers')
98+
99+
//Create a constant to maniputale the DOM:
100+
const contractReturn = document.querySelector('.output');
98101
99102
const GREETER_ADDRESS = '0xE0282e76237B8eB19A5D08e1741b8b3e2691Dadd'
100103
const GREETER_ABI = `[{"inputs":[{"internalType":"string","name":"_greeting","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"greet","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_greeting","type":"string"}],"name":"setGreeting","outputs":[],"stateMutability":"nonpayable","type":"function"}]`
@@ -110,13 +113,14 @@ In the `hello-eth` folder, next to `ethers-5.1.esm.min.js`, create a file called
110113
const greeting = await greeterContract.greet();
111114
112115
// Write the greeting result to the DOM.
113-
document.getElementById('output').innerHTML = greeting;
116+
contractReturn.textContent = greeting;
114117
}
115118
getGreeting();
116119
</script>
117120
</head>
118121
<body>
119-
<div id="output" />
122+
<div class="output">
123+
</div>
120124
</body>
121125
</html>
122126
```

docs/tutorial/flow-nft-marketplace.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -948,7 +948,13 @@ Very often, especially for [decentralized applications][dapps] whose back-ends r
948948
949949
In this section, we will be working on the UI for the pet store app in React.js. While you're expected to have some familiarity with the library, I will do my best to use common features instead of trotting into advanced ones.
950950
951+
<<<<<<< HEAD
951952
After we are done, we will end up with a simple marketplace app that users can mint and query their NFTs.
953+
=======
954+
After we are done, we will end up with a simple marketplace app that users can mint and query their NFTs. It will be similar to this:
955+
956+
![finished-marketplace](./images/flow-nft-marketplace/flow-nft-marketplace-finish.png)
957+
>>>>>>> main
952958
953959
### Setting up
954960

0 commit comments

Comments
 (0)