Skip to content

Flow 2nd edition #223

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 23 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
93697c7
Kickstart the Flow tutorial
jochasinga Oct 12, 2021
bf062b5
Add some intro sections
jochasinga Oct 19, 2021
49823f2
Apply suggestions from code review
jochasinga Oct 20, 2021
3c9ddef
Add first part of contract section
jochasinga Oct 20, 2021
62ed84e
Add NFTCollection type
jochasinga Oct 21, 2021
0a44d91
Finish the NFTCollection part
jochasinga Oct 21, 2021
69600fe
Wrap up contract section
jochasinga Oct 25, 2021
6bf787a
Conclude minting transaction
jochasinga Oct 27, 2021
2f69fb9
Wrap up TransferToken and refactor for clarity
jochasinga Oct 28, 2021
c8f20e3
Finish up Cadence script
jochasinga Oct 30, 2021
f4e4f73
Start the front-end section and add `GetTokenOwner` script
jochasinga Oct 31, 2021
008eae9
Front end tutorial up to minting
jochasinga Nov 3, 2021
85e7028
Wrap up mintToken javascript code
jochasinga Nov 8, 2021
5703bba
Wrap up final draft
jochasinga Nov 10, 2021
0a6bc41
Apply suggestions from @mishmosh
jochasinga Nov 17, 2021
59a2c96
Format based on guidelines and include the tutorial in config.js
jochasinga Nov 30, 2021
df84e3e
Minor edits from unresolved suggestions
jochasinga Nov 30, 2021
a7b7516
Apply suggestions from code review by @yusef
jochasinga Dec 7, 2021
7588d44
Fix broken links
jochasinga Dec 7, 2021
1e415f1
Remove irrelevant paragraph
jochasinga Dec 7, 2021
39e924d
Remove the breaking tip section
jochasinga Dec 8, 2021
c70b3a2
Start second edition to improve Flow tutorial
jochasinga Mar 18, 2022
47a8d74
Start 2nd edition to improve the Flow tutorial
jochasinga Mar 18, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,10 @@ module.exports = {
'/tutorial/first-steps',
'/tutorial/minting-service',
'/tutorial/lazy-minting',
'/tutorial/mint-nftstorage-polygon',
'/tutorial/gallery-app',
'/tutorial/using-nfts-in-games'
'/tutorial/using-nfts-in-games',
'/tutorial/flow-nft-marketplace'
]
},
{
Expand Down
10 changes: 7 additions & 3 deletions docs/tutorial/first-steps.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ On [the getting started page for Ethers](https://docs.ethers.io/v5/getting-start

### Gather the needed details

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).
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).

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`.

Expand All @@ -95,6 +95,9 @@ In the `hello-eth` folder, next to `ethers-5.1.esm.min.js`, create a file called
<script type="module">
import { ethers } from "./ethers-5.1.esm.min.js";
//const ethers = require('ethers')

//Create a constant to maniputale the DOM:
const contractReturn = document.querySelector('.output');

const GREETER_ADDRESS = '0xE0282e76237B8eB19A5D08e1741b8b3e2691Dadd'
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"}]`
Expand All @@ -110,13 +113,14 @@ In the `hello-eth` folder, next to `ethers-5.1.esm.min.js`, create a file called
const greeting = await greeterContract.greet();

// Write the greeting result to the DOM.
document.getElementById('output').innerHTML = greeting;
contractReturn.textContent = greeting;
}
getGreeting();
</script>
</head>
<body>
<div id="output" />
<div class="output">
</div>
</body>
</html>
```
Expand Down
1,656 changes: 1,656 additions & 0 deletions docs/tutorial/flow-nft-marketplace.md

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
323 changes: 323 additions & 0 deletions docs/tutorial/mint-nftstorage-polygon.md

Large diffs are not rendered by default.