├── .github
└── ISSUE_TEMPLATE
│ ├── code_mistake.yml
│ ├── config.yml
│ ├── repo_enhancement.yml
│ └── video_mistake.yml
├── .gitignore
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── README.md
├── chronological-updates.md
├── how-to-answer-a-question.md
├── how-to-ask-a-question.md
└── img
├── blockchain1.png
├── ganache-windows.png
└── hh-fcc-background.png
/.github/ISSUE_TEMPLATE/code_mistake.yml:
--------------------------------------------------------------------------------
1 | name: Code Mistake
2 | description: File an issue with one of the code repositories.
3 | labels: ["code-bug"]
4 | body:
5 | - type: markdown
6 | attributes:
7 | value: |
8 | Please ensure that the bug has not already been filed in the issue tracker.
9 |
10 | Thanks for taking the time to report this bug!
11 | - type: dropdown
12 | attributes:
13 | label: Lesson
14 | description: Which lesson is this an issue for?
15 | multiple: false
16 | options:
17 | - Lesson 1
18 | - Lesson 2
19 | - Lesson 3
20 | - Lesson 4
21 | - Lesson 5
22 | - Lesson 6
23 | - Lesson 7
24 | - Lesson 8
25 | - Lesson 9
26 | - Lesson 10
27 | - Lesson 11
28 | - Lesson 12
29 | - Lesson 13
30 | - Lesson 14
31 | - Lesson 15
32 | - Lesson 16
33 | - Lesson 17
34 | - Lesson 18
35 | - Other (please describe)
36 | validations:
37 | required: true
38 | - type: input
39 | attributes:
40 | label: Could you please leave a link to the timestamp in the video where this error occurs? (You can right click a video and "copy video URL at current time")
41 | placeholder: "https://www.youtube.com/watch?v=M576WGiDBdQ&t=21247s"
42 | - type: dropdown
43 | attributes:
44 | label: Operating System
45 | description: What operating system are you on?
46 | options:
47 | - Windows
48 | - macOS (Intel)
49 | - macOS (Apple Silicon)
50 | - Linux
51 | - type: textarea
52 | attributes:
53 | label: Describe the bug
54 | description: Please include relevant code snippets as well if relevant. Remember to format!
55 | validations:
56 | required: true
57 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | blank_issues_enabled: true
2 | contact_links:
3 | - name: Anything Else
4 | url: https://github.com/smartcontractkit/full-blockchain-solidity-course-js/discussions
5 | about: For anything else that is a question about the course, looking to show off something cool, connect with other developers, or looking for support, please head over to the discussions tab!
6 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/repo_enhancement.yml:
--------------------------------------------------------------------------------
1 | name: Repo Enhancement
2 | description: If you have a suggestion on how to make this repository better, please let us know!
3 | labels: ["enhancement"]
4 | body:
5 | - type: textarea
6 | attributes:
7 | label: Describe the enhancement
8 | description: The more information the better! Thanks for making this issue!
9 | validations:
10 | required: true
11 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/video_mistake.yml:
--------------------------------------------------------------------------------
1 | name: Video Mistake
2 | description: File an issue when Patrick made a mistake in the video.
3 | labels: ["video-bug"]
4 | body:
5 | - type: markdown
6 | attributes:
7 | value: |
8 | Please ensure that the bug has not already been filed in the issue tracker.
9 |
10 | Thanks for taking the time to report this bug!
11 | - type: dropdown
12 | attributes:
13 | label: Lesson
14 | description: Which lesson is this an issue for?
15 | multiple: false
16 | options:
17 | - Lesson 1
18 | - Lesson 2
19 | - Lesson 3
20 | - Lesson 4
21 | - Lesson 5
22 | - Lesson 6
23 | - Lesson 7
24 | - Lesson 8
25 | - Lesson 9
26 | - Lesson 10
27 | - Lesson 11
28 | - Lesson 12
29 | - Lesson 13
30 | - Lesson 14
31 | - Lesson 15
32 | - Lesson 16
33 | - Lesson 17
34 | - Lesson 18
35 | - Other (please describe)
36 | validations:
37 | required: true
38 | - type: input
39 | attributes:
40 | label: Could you please leave a link to the timestamp in the video where this error occurs? (You can right click a video and "copy video URL at current time")
41 | placeholder: "https://www.youtube.com/watch?v=M576WGiDBdQ&t=21247s"
42 | - type: textarea
43 | attributes:
44 | label: Describe the bug
45 | description: Please include relevant code snippets as well if relevant. Remember to format!
46 | validations:
47 | required: true
48 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | script.md
2 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | We as members, contributors, and leaders pledge to make participation in our
6 | community a harassment-free experience for everyone, regardless of age, body
7 | size, visible or invisible disability, ethnicity, sex characteristics, gender
8 | identity and expression, level of experience, education, socio-economic status,
9 | nationality, personal appearance, race, religion, or sexual identity
10 | and orientation.
11 |
12 | We pledge to act and interact in ways that contribute to an open, welcoming,
13 | diverse, inclusive, and healthy community.
14 |
15 | ## Our Standards
16 |
17 | Examples of behavior that contributes to a positive environment for our
18 | community include:
19 |
20 | * Demonstrating empathy and kindness toward other people
21 | * Being respectful of differing opinions, viewpoints, and experiences
22 | * Giving and gracefully accepting constructive feedback
23 | * Accepting responsibility and apologizing to those affected by our mistakes,
24 | and learning from the experience
25 | * Focusing on what is best not just for us as individuals, but for the
26 | overall community
27 |
28 | Examples of unacceptable behavior include:
29 |
30 | * The use of sexualized language or imagery, and sexual attention or
31 | advances of any kind
32 | * Trolling, insulting or derogatory comments, and personal or political attacks
33 | * Public or private harassment
34 | * Publishing others' private information, such as a physical or email
35 | address, without their explicit permission
36 | * Other conduct which could reasonably be considered inappropriate in a
37 | professional setting
38 |
39 | ## Enforcement Responsibilities
40 |
41 | Community leaders are responsible for clarifying and enforcing our standards of
42 | acceptable behavior and will take appropriate and fair corrective action in
43 | response to any behavior that they deem inappropriate, threatening, offensive,
44 | or harmful.
45 |
46 | Community leaders have the right and responsibility to remove, edit, or reject
47 | comments, commits, code, wiki edits, issues, and other contributions that are
48 | not aligned to this Code of Conduct, and will communicate reasons for moderation
49 | decisions when appropriate.
50 |
51 | ## Scope
52 |
53 | This Code of Conduct applies within all community spaces, and also applies when
54 | an individual is officially representing the community in public spaces.
55 | Examples of representing our community include using an official e-mail address,
56 | posting via an official social media account, or acting as an appointed
57 | representative at an online or offline event.
58 |
59 | ## Enforcement
60 |
61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be
62 | reported to the community leaders responsible for enforcement at
63 | .
64 | All complaints will be reviewed and investigated promptly and fairly.
65 |
66 | All community leaders are obligated to respect the privacy and security of the
67 | reporter of any incident.
68 |
69 | ## Enforcement Guidelines
70 |
71 | Community leaders will follow these Community Impact Guidelines in determining
72 | the consequences for any action they deem in violation of this Code of Conduct:
73 |
74 | ### 1. Correction
75 |
76 | **Community Impact**: Use of inappropriate language or other behavior deemed
77 | unprofessional or unwelcome in the community.
78 |
79 | **Consequence**: A private, written warning from community leaders, providing
80 | clarity around the nature of the violation and an explanation of why the
81 | behavior was inappropriate. A public apology may be requested.
82 |
83 | ### 2. Warning
84 |
85 | **Community Impact**: A violation through a single incident or series
86 | of actions.
87 |
88 | **Consequence**: A warning with consequences for continued behavior. No
89 | interaction with the people involved, including unsolicited interaction with
90 | those enforcing the Code of Conduct, for a specified period of time. This
91 | includes avoiding interactions in community spaces as well as external channels
92 | like social media. Violating these terms may lead to a temporary or
93 | permanent ban.
94 |
95 | ### 3. Temporary Ban
96 |
97 | **Community Impact**: A serious violation of community standards, including
98 | sustained inappropriate behavior.
99 |
100 | **Consequence**: A temporary ban from any sort of interaction or public
101 | communication with the community for a specified period of time. No public or
102 | private interaction with the people involved, including unsolicited interaction
103 | with those enforcing the Code of Conduct, is allowed during this period.
104 | Violating these terms may lead to a permanent ban.
105 |
106 | ### 4. Permanent Ban
107 |
108 | **Community Impact**: Demonstrating a pattern of violation of community
109 | standards, including sustained inappropriate behavior, harassment of an
110 | individual, or aggression toward or disparagement of classes of individuals.
111 |
112 | **Consequence**: A permanent ban from any sort of public interaction within
113 | the community.
114 |
115 | ## Attribution
116 |
117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118 | version 2.0, available at
119 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120 |
121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct
122 | enforcement ladder](https://github.com/mozilla/diversity).
123 |
124 | [homepage]: https://www.contributor-covenant.org
125 |
126 | For answers to common questions about this code of conduct, see the FAQ at
127 | https://www.contributor-covenant.org/faq. Translations are available at
128 | https://www.contributor-covenant.org/translations.
129 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # How do I make a contribution?
2 |
3 | Never made an open-source contribution before? Wondering how contributions work in this project? Here's a quick run-down!
4 |
5 | - Find an issue that you want to address or a feature that you want to add.
6 |
7 | - Fork the repository associated with the issue to your local GitHub organization. This means that you will have a copy of the repository under `your-GitHub-username/repository-name`.
8 |
9 | - Clone the forked repository to your local machine using `git clone https://github.com/github-username/repository-name.git`. E.g. for a repo named "xyzRepo", the user can run https://github.com/github-username/xyzRepo.git.
10 |
11 | - Create a new branch for your fix using `git checkout -b branch-name-here`. E.g `git checkout -b main`
12 |
13 | - Make the appropriate changes for the issue you are trying to address or the feature that you want to add.
14 |
15 | - Use `git add insert-paths-of-changed-files-here` to add the file contents of the changed files to the "snapshot" git uses to manage the state of the project, also known as the index.
16 |
17 | - Use `git commit -m "Insert a short message of the changes made here"` to store the contents of the index with a descriptive message.
18 |
19 | - Push the changes to the remote repository using `git push origin branch-name-here`.
20 |
21 | - Submit a pull request to the upstream repository.
22 |
23 | - Title the pull request with a short description of the changes made and the issue or bug number associated with your change. For example, you can title an issue like so **"Added more log outputting to resolve #4352"**.
24 |
25 | - In the description of the pull request, explain the changes that you made, any issues you think exist with the pull request you made, and any questions you have for the maintainer. It's OK if your pull request is not perfect (no pull request is), the reviewer will be able to help you fix any problems and improve it!
26 |
27 | - Wait for the pull request to be reviewed by a maintainer.
28 |
29 | - Make changes to the pull request if the reviewing maintainer recommends them.
30 |
31 | - Celebrate your success after your pull request is merged!
32 |
33 | # Where can I go for help?
34 |
35 | If you need help, you can ask questions on our **discussions** tab.
36 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | # Web3, Full Stack Solidity, Smart Contract & Blockchain - Beginner to Expert ULTIMATE Course | Javascript Edition
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | Welcome to the repository for the Ultimate Web3, Full Stack Solidity, and Smart Contract - Beginner to Expert Full Course | Javascript Edition FreeCodeCamp Course!
13 |
14 | # Link to video: https://www.youtube.com/watch?v=gyMwXuJrbJQ
15 |
16 | All code references have both a javascript and a typescript edition.
17 |
18 | Recommended Testnet: Sepolia
19 |
20 | *We have updated the repos to work with Sepolia due to Rinkeby and Kovan being sunset, and Goerli being a disaster. Let us know if any of the changes break stuff!*
21 |
22 | # [Testnet Faucets](https://faucets.chain.link)
23 | Main Faucet: https://faucets.chain.link
24 | Backup Faucet: https://sepoliafaucet.com/
25 |
26 | > ⚠️ All code associated with this course is for demo purposes only. They have not been audited and should not be considered production ready. Please use at your own risk.
27 |
28 | # Resources For This Course
29 |
30 | ### Questions
31 |
32 | - [Github Discussions](https://github.com/smartcontractkit/full-blockchain-solidity-course-js/discussions)
33 | - Ask questions and chat about the course here!
34 | - [Stack Exchange Ethereum](https://ethereum.stackexchange.com/)
35 | - Great place for asking technical questions about Ethereum
36 | - [StackOverflow](https://stackoverflow.com/)
37 | - Great place for asking technical questions overall
38 |
39 |
40 | # Table of Contents
41 |
42 |
43 | Resources
44 |
45 | - Testnet Faucets
46 | - Resources For This Course
49 |
50 | - Table of Contents
51 |
52 |
53 |
54 | Lesson 0: The Edge of the Rabbit Hole
55 |
56 | -
57 | Welcome to the course!
58 |
59 | -
60 | Best Practices
61 |
62 |
63 |
64 |
65 | Lesson 1: Blockchain Basics
66 |
67 | -
68 | What is a Blockchain? What does a blockchain do?
69 |
70 | - The Purpose Of Smart Contracts
71 | - Other Blockchain Benefits
72 | - What have Smart Contracts done so far?
73 | - Making Your First Transaction
74 | - Gas I: Introduction to Gas
75 | - How Do Blockchains Work?
76 | - Signing Transactions
77 | - Gas II
78 | - High-Level Blockchain Fundamentals
79 |
80 |
81 |
82 | Lesson 2: Welcome to Remix! Simple Storage
83 |
84 | - Introduction
85 | - Setting Up Your First Contract
86 | - Basic Solidity: Types
87 | - Basic Solidity: Functions
88 | - Basic Solidity: Arrays & Structs
89 | - Basic Solidity: Compiler Errors and Warnings
90 | - Memory, Storage, Calldata (Intro)
91 | - Mappings
92 | - Deploying your First Contract
93 | - The EVM & A Recap of Lesson 2
94 |
95 |
96 |
97 | Lesson 3: Remix Storage Factory
98 |
99 | - Introduction
100 | - Basic Solidity: Importing Contracts into other Contracts
101 | - Basic Solidity: Interacting with other Contracts
102 | - Basic Solidity: Inheritance & Overrides
103 | - Lesson 3 Recap
104 |
105 |
106 |
107 | Lesson 4: Remix Fund Me
108 |
109 | - Introduction
110 | - Sending ETH Through a Function & Reverts
111 | - Chainlink & Oracles
112 | - Review of Sending ETH and working with Chainlink
113 | - Interfaces & Price Feeds
114 | - Importing from GitHub & NPM
115 | - Floating Point Math in Solidity
116 | - Basic Solidity: Arrays & Structs II
117 | - Review of Interfacs, Importing from GitHub, & Math in Solidity
118 | - Libraries
119 | - SafeMath, Overflow Checking, and the "unchecked" keywork
120 | - Basic Solidity: For Loop
121 | - Basic Solidity: Resetting an Array
122 | - Sending ETH from a Contract
123 | - Basic Solidity: Constructor
124 | - Basic Solidity: Modifiers
125 | - Testnet Demo
126 | - Advanced Solidity
132 |
133 |
134 | Lesson 5: Ethers.js Simple Storage
135 |
136 | - Effective Debugging Strategies & Getting Help
139 |
140 | - Installation & Setup
145 |
146 | - Local Development Introduction
149 |
150 | - Tiny Javascript Refresher
151 | - Asynchronous Programming in Javascript
152 | - Compiling our Solidity
153 | - Ganache & Networks
154 | - Introduction to Ethers.js
157 |
158 | - Adding Transaction Overrides
159 | - Transaction Receipts
160 | - Sending a "raw" Transaction in Ethersjs
161 | - Interacting with Contracts in Ethersjs
162 | - Environment Variables
163 | - Better Private Key Management
164 | - Optional Prettier Formatting
165 | - Deploying to a Testnet or a Mainnet
166 | - Verifying on Block Explorers from the UI
167 | - Alchemy Dashboard & The Mempool
168 | - Lesson 5 Recap
171 |
172 |
173 |
174 |
175 | Lesson 6: Hardhat Simple Storage
176 |
177 | - Introduction
178 | - Hardhat Setup
181 |
182 | - Hardhat Setup Continued
183 | - Deploying SimpleStorage from Hardhat
184 | - Networks in Hardhat
185 | - Programatic Verification
186 | - Interacting with Contracts in Hardhat
187 | - Artifacts Troubleshooting
188 | - Custom Hardhat Tasks
189 | - Hardhat Localhost Node
190 | - The Hardhat Console
191 | - Hardhat Tests
192 | - Hardhat Gas Reporter
193 | - Solidity Coverage
194 | - Hardhat Waffle
195 | - Lesson 6 Recap
198 |
199 |
200 |
201 |
202 | Lesson 7: Hardhat Fund Me
203 |
204 | - Introduction
205 | - Hardhat Setup - Fund Me
206 | - Linting
207 | - Hardhat Setup - Fund Me - Continued
208 | - Importing from NPM
209 | - Hardhat Deploy
210 | - Mocking
211 | - Utils Folder
212 | - Testnet Demo - Hardhat Fund Me
213 | - Solidity Style Guide
214 | - Testing Fund Me
215 | - Breakpoints & Debugging
216 | - Gas III:
217 | - console.log & Debugging
218 | - Testing Fund Me II
219 | - Storage in Solidity
220 | - Gas Optimizations using Storage Knowledge
221 | - Solidity Chainlink Style Guide
222 | - Storage Review
223 | - Staging Tests
224 | - Running Scripts on a Local Node
225 | - Adding Scripts to your package.json
226 | - Pushing to GitHub
227 | - 🐸🐦 Tweet Me (add your repo in)!
228 |
229 |
230 |
231 | Lesson 8: HTML / Javascript Fund Me (Full Stack / Front End)
232 |
233 | - Introduction
234 | - How Websites work with Web3 Wallets
235 | - HTML Setup
236 | - Connecting HTML to Metamask
237 | - Javascript in it's own file
238 | - ES6 vs Nodejs
239 | - Sending a transaction from a Website
240 | - Resetting an Account in Metamask
241 | - Listening for Events and Completed Transactions
242 | - Input Forms
243 | - Reading from the Blockchain
244 | - Withdraw Function
245 | - Lesson 8 Recap
248 |
249 |
250 |
251 |
252 | Lesson 9: Hardhat Smart Contract Lottery
253 |
254 | - Introduction
255 | - Hardhat Setup - Smart Contract Lottery
256 | - Raffle.sol Setup
257 | - Introduction to Events
258 | - Events in Raffle.sol
259 | - Introduction to Chainlink VRF
262 |
263 | - Implementing Chainlink VRF - Introduction
266 |
267 | - Implementing Chainlink VRF - The Request
268 | - Implementing Chainlink VRF - The FulFill
271 |
272 | - Introduction to Chainlink Keepers
273 | - Implementing Chainlink Keepers - checkUpkeep
276 |
277 | - Implementing Chainlink Keepers - checkUpkeep continued
278 | - Implementing Chainlink Keepers - performUpkeep
279 | - Code Cleanup
280 | - Deploying Raffle.sol
284 |
285 | - Raffle.sol Unit Tests
289 |
290 | - Hardhat Methods & Time Travel
293 |
294 | - Callstatic
299 |
300 | - Raffle.sol Staging Tests
301 | - Testing on a Testnet
304 |
305 | - Conclusion
306 | - Typescript - Smart Contract Lottery
307 |
308 |
309 |
310 | Lesson 10: NextJS Smart Contract Lottery (Full Stack / Front End)
311 |
312 | - Introduction
315 |
316 | - NextJS Setup
317 | - Manual Header I
320 |
321 | - Manual Header II
322 | - useEffect Hook
323 | - Local Storage
324 | - isWeb3EnabledLoading
325 | - web3uikit
326 | - Introduction to Calling Functions in Nextjs
330 |
331 | - useState
332 | - Calling Functions in NextJS
333 | - useNotification
334 | - Reading & Displaying Contract Data
335 | - A Note about
onSuccess
336 | - A Challenge to You
337 | - Tailwind & Styling
338 | - Introduction to Hosting your Site
339 | - IPFS
340 | - Hosting on IPFS
341 | - Hosting on IPFS & Filecoin using Fleek
342 | - Filecoin Overview
343 | - Lesson 10 Recap
344 |
345 |
346 |
347 | Lesson 11: Hardhat Starter Kit
348 |
349 |
350 |
351 | Lesson 12: Hardhat ERC20s
352 |
353 | - What is an ERC? What is an EIP?
354 | - What is an ERC20?
355 | - Manually Creating an ERC20 Token
356 | - Creating an ERC20 Token with Openzeppelin
357 | - Lesson 12 Recap
358 |
359 |
360 |
361 |
362 | Lesson 13: Hardhat DeFi & Aave
363 |
364 | - What is DeFi?
365 | - What is Aave?
366 | - Programatic Borrowing & Lending
367 | - WETH - Wrapped ETH
368 | - Forking Mainnet
369 | - Depositing into Aave
370 | - Borrowing from Aave
371 | - Repaying with Aave
372 | - Visualizing the Transactions
373 | - Lesson 13 Recap
374 | - Happy Bow-Tie Friday with Austin Griffith
377 |
378 |
379 |
380 |
381 |
382 | Lesson 14: Hardhat NFTs (EVERYTHING you need to know about NFTs)
383 |
384 | - What is an NFT?
385 | - Code Overview
386 | - Hardhat Setup
387 | - Basic NFT
390 |
391 | - Random IPFS NFT
402 |
403 | - Dynamic SVG On-Chain NFT
408 |
409 | - Advanced: EVM Opcodes, Encoding, and Calling
418 |
419 | - Deploying the NFTs to a Testnet
420 | - Lesson 14 Recap
421 |
422 |
423 |
424 |
425 | Lesson 15: NextJS NFT Marketplace (If you finish this lesson, you are a full-stack MONSTER!)
426 |
427 | - Introduction
428 | - Part I: NFT Marketplace Contracts
432 |
433 | - Reentrancy
439 |
440 | - Part II: Moralis Front End
461 |
462 | - Part III: TheGraph Front End
470 |
471 |
472 |
473 |
474 |
475 | Lesson 16: Hardhat Upgrades
476 |
477 | - Upgradeable Smart Contracts Overview
478 | - Types of Upgrades
479 | - Delegatecall
480 | - Small Proxy Example
481 | - Transparent Upgradeable Smart Contract
482 |
483 |
484 |
485 |
486 | Lesson 17: Hardhat DAOs
487 |
488 | - Introduction
489 | - What is a DAO?
490 | - How to build a DAO
491 |
492 |
493 |
494 | Lesson 18: Security & Auditing
495 |
496 | - Introduction
497 | - Slither
498 | - Fuzzing and Eth Security Toolbox
499 | - Closing Thoughts
500 |
501 |
502 |
503 | More Resources
504 |
515 |
516 |
517 |
518 | # Lesson 0: The Edge of the Rabbit Hole
519 | ## Welcome to the course!
520 | *[⌨️ (00:00:00) Lesson 0: Welcome To Blockchain](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=0s)*
521 | ## Best Practices
522 | - **Follow the repository:** While going through the course be 100% certain to follow along with the github repository. If you run into in an issue check the chronological-updates in the repo.
523 | - **Be Active in the community:** Ask questions and engage with other developers going through the course in the discussions tab, be sure to go and say hello or gm! This space is different from the other industries, you don't have to be secretive; communicate, network and learn with others :)
524 | - **Learn at your own pace:** It doesn't matter if it takes you a day, a week, a month or even a year. Progress >>> Perfection
525 | - **Take Breaks:** You will exhaust your mind and recall less if you go all out and watch the entire course in one sitting.
526 | **Suggested Strategy** every 25 minutes take a 5 min break, and every 2 hours take a longer 30 min break
527 | - **Refer to Documentation:** Things are constantly being updated, so whenever Patrick opens up some documentation, open it your end and maybe even have the code sample next to you.
528 |
529 | # Lesson 1: Blockchain Basics
530 | *[⌨️ (00:09:05) Lesson 1: Blockchain Basics](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=545s)*
531 | ## What is a Blockchain? What does a blockchain do?
532 | - [Bitcoin Whitepaper](https://bitcoin.org/bitcoin.pdf)
533 | - [Satoshi Nakamoto](https://en.wikipedia.org/wiki/Satoshi_Nakamoto)
534 | - [Ethereum Whitepaper](https://ethereum.org/en/whitepaper/)
535 | - [Vitalik Buterin](https://en.wikipedia.org/wiki/Vitalik_Buterin)
536 | - [What is a Smart Contract?](https://chain.link/education/smart-contracts)
537 | - [Nick Szabo](https://en.wikipedia.org/wiki/Nick_Szabo)
538 | - [Hybrid Smart Contracts](https://blog.chain.link/hybrid-smart-contracts-explained/)
539 | - [Blockchain Oracles](https://betterprogramming.pub/what-is-a-blockchain-oracle-f5ccab8dbd72?source=friends_link&sk=d921a38466df8a9176ed8dd767d8c77d)
540 | - [Terminology](https://connect.comptia.org/content/articles/blockchain-terminology)
541 | - [Web3](https://en.wikipedia.org/wiki/Web3)
542 | - [What is a blockchain](https://www.investopedia.com/terms/b/blockchain.asp)
543 |
544 | ## The Purpose Of Smart Contracts
545 | *[⌨️ (00:18:27) The Purpose of Smart Contracts](https://youtu.be/gyMwXuJrbJQ?t=1107)*
546 | - 🎥 [Original Video](https://www.youtube.com/watch?v=_JeRq7Gwj5Y&feature=youtu.be)
547 | - 🦬 [My ETH Denver Talk](https://www.youtube.com/watch?v=06hXCX_jj2E)
548 | - 🍔 [McDonalds Scandal](https://www.chicagotribune.com/sns-mcdonalds-story.html)
549 | - ⛓ [More on the evolution of agreements](https://www.youtube.com/watch?v=ufVyX7JDCgg)
550 | - ✍️ [What is a Smart Contract?](https://www.youtube.com/watch?v=ZE2HxTmxfrI)
551 | - 🧱 [How does a blockchain work?](https://www.youtube.com/watch?v=SSo_EIwHSd4)
552 | - 🔮 [Chainlink & Oracles](https://www.youtube.com/watch?v=tIUHQ7sDoaU)
553 |
554 | ## Other Blockchain Benefits
555 | *[⌨️ (00:30:41) Other Blockchain Benefits](https://youtu.be/gyMwXuJrbJQ?t=1841)*
556 | - Decentralized
557 | - Transparency & Flexibility
558 | - Speed & Efficiency
559 | - Security & Immutability
560 | - Counterparty Risk Removal
561 | - Trust Minimized Agreements
562 |
563 | ## What have Smart Contracts done so far?
564 | *[⌨️ (00:36:36) What have Smart Contracts done so far?](https://youtu.be/gyMwXuJrbJQ?t=2196)*
565 | - [DeFi](https://chain.link/education/defi)
566 | - [Defi Llama](https://defillama.com/)
567 | - [Why DeFi is Important](https://medium.com/the-capital/why-defi-1519cc4d4bd3)
568 | - [DAOs](https://betterprogramming.pub/what-is-a-dao-what-is-the-architecture-of-a-dao-how-to-build-a-dao-high-level-d096a97162cc)
569 | - [NFTs](https://www.youtube.com/watch?v=9yuHz6g_P50)
570 |
571 | ## Making Your First Transaction
572 | *[⌨️ (00:39:17) Making Your First Transaction](https://youtu.be/gyMwXuJrbJQ?t=2357)*
573 | - [Metamask Download Link](https://metamask.io/)
574 | - [What is a Private Key?](https://www.coinbase.com/learn/crypto-basics/what-is-a-private-key)
575 | - [What is a Secret Phrase?](https://metamask.zendesk.com/hc/en-us/articles/360060826432-What-is-a-Secret-Recovery-Phrase-and-how-to-keep-your-crypto-wallet-secure)
576 | - [Etherscan](https://etherscan.io/)
577 | - [Sepolia Etherscan](https://sepolia.etherscan.io/)
578 | - Sepolia Faucet (Check the [link token contracts page](https://docs.chain.link/docs/link-token-contracts/#sepolia))
579 | - NOTE: The Chainlink documentation always has the most up to date faucets on their [link token contracts page](https://docs.chain.link/docs/link-token-contracts/#sepolia). If the faucet above is broken, check the chainlink documentation for the most up to date faucet.
580 | - OR, use the [Sepolia ETH Faucet](https://faucets.chain.link/), just be sure to swap your metamask to Sepolia!
581 |
582 | ## Gas I: Introduction to Gas
583 | *[⌨️ (00:58:59) Gas I: Introduction to Gas](https://youtu.be/gyMwXuJrbJQ?t=3539)*
584 | - [Gas and Gas Fees](https://ethereum.org/en/developers/docs/gas/)
585 | - [Wei, Gwei, and Ether Converter](https://eth-converter.com/)
586 | - [ETH Gas Station](https://ethgasstation.info/)
587 |
588 | ## How Do Blockchains Work?
589 | *[⌨️ (01:05:32) How Do Blockchains Work](https://youtu.be/gyMwXuJrbJQ?t=3932)*
590 | - [What is a hash?](https://techjury.net/blog/what-is-cryptographic-hash/)
591 | - [Blockchain Demo](https://andersbrownworth.com/blockchain/)
592 | - [Summary](https://ethereum.org/en/developers/docs/intro-to-ethereum/)
593 |
594 | ## Signing Transactions
595 | *[⌨️ (01:22:55) Signing Transactions](https://youtu.be/gyMwXuJrbJQ?t=4975)*
596 | - [Public / Private Keys](https://andersbrownworth.com/blockchain/public-private-keys/keys)
597 | - [Layer 2 and Rollups](https://ethereum.org/en/developers/docs/scaling/layer-2-rollups/)
598 | - [Decentralized Blockchain Oracles](https://blog.chain.link/what-is-the-blockchain-oracle-problem/)
599 |
600 | ## Gas II
601 | *[⌨️ (01:30:22) Gas II: Block Rewards & EIP 1559](https://youtu.be/gyMwXuJrbJQ?t=5422)*
602 | - [Block Rewards](https://www.investopedia.com/terms/b/block-reward.asp)
603 | - Advanced Gas
604 | - [EIP 1559](https://www.youtube.com/watch?v=MGemhK9t44Q)
605 | - GWEI, WEI, and ETH
606 | - [ETH Converter](https://eth-converter.com/)
607 | ## Gas II Summary
608 | *[⌨️ (01:36:44) Gas II Summary](https://youtu.be/gyMwXuJrbJQ?t=5804)*
609 | - [Run Your Own Ethereum Node](https://geth.ethereum.org/docs/getting-started)
610 |
611 | ## High-Level Blockchain Fundamentals
612 | *[⌨️ (01:39:32) High-Level Blockchain Fundamentals]https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=5972s()*
613 | - [Consensus](https://wiki.polkadot.network/docs/learn-consensus)
614 | - [Proof of Stake](https://ethereum.org/en/developers/docs/consensus-mechanisms/pos/)
615 | - [Proof of Work](https://ethereum.org/en/developers/docs/consensus-mechanisms/pow/)
616 | - [Nakamoto Consensus](https://blockonomi.com/nakamoto-consensus/)
617 | - [Ethereum 2 (the merge)](https://ethereum.org/en/eth2/)
618 |
619 | 🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊 Completed Blockchain Basics! 🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊
620 |
621 | # Lesson 2: [Welcome to Remix! Simple Storage](https://github.com/PatrickAlphaC/simple-storage-fcc)
622 |
623 | *[⌨️ (02:01:16) Lesson 2: Welcome to Remix! Simple Storage](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=7276s)*
624 |
625 | 💻 Code: https://github.com/PatrickAlphaC/simple-storage-fcc
626 |
627 | ## Introduction
628 | *[⌨️ (02:03:05) Introduction](https://youtu.be/gyMwXuJrbJQ?t=7385)*
629 | - [Remix](https://remix.ethereum.org/)
630 | - [Solidity Documentation](https://docs.soliditylang.org/en/latest/index.html)
631 |
632 | ## Setting Up Your First Contract
633 | *[⌨️ (02:05:18) Setting Up Your First Contract](https://youtu.be/gyMwXuJrbJQ?t=7518)*
634 | - Versioning
635 | - Take notes in your code!
636 | - [What is a software license](https://snyk.io/learn/what-is-a-software-license/)
637 | - SPDX License
638 | - Compiling
639 | - Contract Declaration
640 |
641 | ## Basic Solidity: Types
642 | *[⌨️ (02:12:28) Basic Solidity Types](https://youtu.be/gyMwXuJrbJQ?t=7948)*
643 | - [Types & Declaring Variables](https://docs.soliditylang.org/en/v0.8.13/)
644 | - `uint256`, `int256`, `bool`, `string`, `address`, `bytes32`
645 | - [Solidity Types](https://docs.soliditylang.org/en/latest/types.html)
646 | - [Bits and Bytes](https://www.youtube.com/watch?v=Dnd28lQHquU)
647 | - Default Initializations
648 | - Comments
649 |
650 | ## Basic Solidity: Functions
651 | *[⌨️ (02:18:40) Basic Solidity Functions](https://youtu.be/gyMwXuJrbJQ?t=8320)*
652 | - Functions
653 | - Deploying a Contract
654 | - Smart Contracts have addresses just like our wallets
655 | - Calling a public state-changing Function
656 | - [Visibility](https://docs.soliditylang.org/en/latest/contracts.html#visibility-and-getters)
657 | - Gas III | An example
658 | - Scope
659 | - View & Pure Functions
660 |
661 | ## Basic Solidity: Arrays & Structs
662 | *[⌨️ (02:35:30) Basic Solidity Arrays & Structs](https://youtu.be/gyMwXuJrbJQ?t=9331)*
663 | - Structs
664 | - Intro to Storage
665 | - Arrays
666 | - Dynamic & Fixed Sized
667 | - `push` array function
668 |
669 |
670 | ## Basic Solidity: Compiler Errors and Warnings
671 | *[⌨️ (02:45:35) Basic Solidity Errors & Warnings](https://youtu.be/gyMwXuJrbJQ?t=9935)*
672 | - Yellow: Warnings are Ok
673 | - Red: Errors are not Ok
674 |
675 | ## Memory, Storage, Calldata (Intro)
676 | *[⌨️ (02:46:34) Basic Solidity Memory, Storage, & Calldata (Intro)](https://youtu.be/gyMwXuJrbJQ?t=9994)*
677 | - 6 Places you can store and access data
678 | - calldata
679 | - memory
680 | - storage
681 | - code
682 | - logs
683 | - stack
684 |
685 | ## Mappings
686 | *[⌨️ (02:50:17) Basic Solidity Mappings](https://youtu.be/gyMwXuJrbJQ?t=10217)*
687 | - [Mappings](https://solidity-by-example.org/mapping)
688 |
689 | ## Deploying your First Contract
690 | *[⌨️ (02:53:38) Deploying your First Contract](https://youtu.be/gyMwXuJrbJQ?t=10418)*
691 | - A testnet or mainnet
692 | - Connecting Metamask
693 | - [Find a faucet here](https://docs.chain.link/docs/link-token-contracts/#Sepolia)
694 | - See the faucets at the top of this readme!
695 | - Interacting with Deployed Contracts
696 |
697 | ## The EVM & A Recap of Lesson 2
698 | *[⌨️ (03:03:07) The EVM & A Recap of Lesson 2](https://youtu.be/gyMwXuJrbJQ?t=10987)*
699 | - The EVM
700 |
701 | # Lesson 3: Remix Storage Factory
702 |
703 | *[⌨️ (03:05:34) Lesson 3: Remix Storage Factory](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=11134s)*
704 |
705 | 💻 Code: https://github.com/PatrickAlphaC/storage-factory-fcc
706 |
707 | ## Introduction
708 | *[⌨️ (03:06:06) Introduction](https://youtu.be/gyMwXuJrbJQ?t=11166)*
709 | - [Factory Pattern](https://betterprogramming.pub/learn-solidity-the-factory-pattern-75d11c3e7d29)
710 |
711 | ## Basic Solidity: Importing Contracts into other Contracts
712 | *[⌨️ (03:07:29) Importing Contracts into other Contracts](https://youtu.be/gyMwXuJrbJQ?t=11249)*
713 | - [Composibility](https://chain.link/techtalks/defi-composability)
714 | - [Solidity new keyword](https://docs.soliditylang.org/en/latest/control-structures.html?highlight=new#creating-contracts-via-new)
715 | - [Importing Code in solidity](https://solidity-by-example.org/import)
716 |
717 | ## Basic Solidity: Interacting with other Contracts
718 | *[⌨️ (03:16:36) Interacting with other contracts](https://youtu.be/gyMwXuJrbJQ?t=11796)*
719 | - To interact, you always need: ABI + Address
720 | - [ABI](https://docs.soliditylang.org/en/latest/abi-spec.html?highlight=abi)
721 |
722 | ## Basic Solidity: Inheritance & Overrides
723 | *[⌨️ (03:25:23) Inheritance & Overrides](https://youtu.be/gyMwXuJrbJQ?t=12323)*
724 | - [Inheritance](https://solidity-by-example.org/inheritance)
725 | - [Override & Virtual Keyword](https://docs.soliditylang.org/en/latest/contracts.html?highlight=override#function-overriding)
726 |
727 | ## Lesson 3 Recap
728 | *[⌨️ (03:30:29) Lesson 3 Recap](https://youtu.be/gyMwXuJrbJQ?t=12629)*
729 |
730 | # Lesson 4: Remix Fund Me
731 |
732 | *[⌨️ (03:31:55) Lesson 4: Remix Fund Me](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=12715s)*
733 |
734 | 💻 Code: https://github.com/PatrickAlphaC/fund-me-fcc
735 |
736 | ## Introduction
737 |
738 | ## Sending ETH Through a Function & Reverts
739 | - [Fields in a Transaction](https://ethereum.org/en/developers/docs/transactions/)
740 | - [More on v,r,s](https://ethereum.stackexchange.com/questions/15766/what-does-v-r-s-in-eth-gettransactionbyhash-mean)
741 | - [payable](https://solidity-by-example.org/payable)
742 | - [msg.value & Other global keywords](https://docs.soliditylang.org/en/latest/cheatsheet.html?highlight=cheatsheet#global-variables)
743 | - [require](https://codedamn.com/news/solidity/what-is-require-in-solidity)
744 | - [revert](https://medium.com/blockchannel/the-use-of-revert-assert-and-require-in-solidity-and-the-new-revert-opcode-in-the-evm-1a3a7990e06e)
745 |
746 | ## Chainlink & Oracles
747 | - [What is a blockchain oracle?](https://chain.link/education/blockchain-oracles)
748 | - [What is the oracle problem?](https://blog.chain.link/what-is-the-blockchain-oracle-problem/)
749 | - [Chainlink](https://chain.link/)
750 | - [Chainlink Price Feeds (Data Feeds)](https://docs.chain.link/docs/get-the-latest-price/)
751 | - [data.chain.link](https://data.chain.link/)
752 | - [Chainlink VRF](https://docs.chain.link/docs/chainlink-vrf/)
753 | - [Chainlink Keepers](https://docs.chain.link/docs/chainlink-keepers/introduction/)
754 | - [Chainlink API Calls](https://docs.chain.link/docs/request-and-receive-data/)
755 | - [Importing Tokens into your Metamask](https://consensys.net/blog/metamask/how-to-add-your-custom-tokens-in-metamask/)
756 | - [Request and Receive Chainlink Model](https://docs.chain.link/docs/architecture-request-model/)
757 |
758 | ## Review of Sending ETH and working with Chainlink
759 |
760 | ## Interfaces & Price Feeds
761 | - [Chainlink Price Feeds (Data Feeds)](https://docs.chain.link/docs/get-the-latest-price/)
762 | - [Chainlink GitHub](https://github.com/smartcontractkit/chainlink)
763 | - [Interface](https://solidity-by-example.org/interface)
764 |
765 | ## Importing from GitHub & NPM
766 | - [Chainlink NPM Package](https://www.npmjs.com/package/@chainlink/contracts)
767 |
768 | ## Floating Point Math in Solidity
769 | - [tuple](https://docs.soliditylang.org/en/latest/abi-spec.html?highlight=tuple#handling-tuple-types)
770 | - [Floating Point Numbers in Solidity](https://stackoverflow.com/questions/58277234/does-solidity-supports-floating-point-number)
771 | - [Type Casting](https://ethereum.stackexchange.com/questions/6891/type-casting-in-solidity)
772 | - Gas Estimation Failed
773 | - Someone should make an article explaining this error
774 |
775 | ## Basic Solidity: Arrays & Structs II
776 | - [msg.sender](https://docs.soliditylang.org/en/latest/cheatsheet.html?highlight=msg.sender)
777 |
778 | ## Review of Interfaces, Importing from GitHub, & Math in Solidity
779 |
780 | ## Libraries
781 | - [Library](https://docs.soliditylang.org/en/v0.8.14/contracts.html?highlight=library#libraries)
782 | - [Solidity-by-example Library](https://solidity-by-example.org/library)
783 |
784 | ## SafeMath, Overflow Checking, and the "unchecked" keyword
785 | - [Openzeppelin Safemath](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/math/SafeMath.sol)
786 | - [unchecked vs. checked](https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic)
787 |
788 | ## Basic Solidity: For Loop
789 | - [For Loop](https://solidity-by-example.org/loop)
790 | - `/* */` is another way to make comments
791 |
792 | ## Basic Solidity: Resetting an Array
793 |
794 | ## Sending ETH from a Contract
795 | - [Transfer, Send, Call](https://solidity-by-example.org/sending-ether/)
796 | - [this keyword](https://ethereum.stackexchange.com/questions/1781/what-is-the-this-keyword-in-solidity)
797 |
798 | ## Basic Solidity: Constructor
799 | - [Constructor](https://solidity-by-example.org/constructor)
800 |
801 | ## Basic Solidity: Modifiers
802 | - [Double equals](https://www.geeksforgeeks.org/solidity-operators/)
803 | - [Modifier](https://solidity-by-example.org/function-modifier)
804 |
805 | ## Testnet Demo
806 | - [Disconnecting Metamask](https://help.1inch.io/en/articles/4666771-metamask-how-to-connect-disconnect-and-switch-accounts-with-metamask-on-1inch-network)
807 |
808 | ## Advanced Solidity
809 | ### Immutable & Constant
810 | - [Immutable](https://solidity-by-example.org/immutable)
811 | - [Constant](https://solidity-by-example.org/constants)
812 | - [Current ETH Gas Prices](https://etherscan.io/gastracker)
813 | - Don't stress about gas optimizations! (yet)
814 | - Naming Conventions
815 | - [Someone make this!](https://github.com/smartcontractkit/full-blockchain-solidity-course-js/issues/13)
816 |
817 | ### Custom Errors
818 | - [Custom Errors Introduction](https://blog.soliditylang.org/2021/04/21/custom-errors/)
819 |
820 | ### Receive & Fallback Functions
821 | - [Solidity Docs Special Functions](https://docs.soliditylang.org/en/latest/contracts.html?highlight=fallback#special-functions)
822 | - [Fallback](https://solidity-by-example.org/fallback)
823 | - [Receive](https://docs.soliditylang.org/en/latest/contracts.html?highlight=fallback#receive-ether-function)
824 |
825 | ## Lesson 4 Recap
826 |
827 | 🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊 Completed Solidity Basics! 🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊
828 |
829 | # Lesson 5: Ethers.js Simple Storage
830 |
831 | *[⌨️ (05:30:42) Lesson 5: Ethers.js Simple Storage](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=19842s)*
832 |
833 | 💻 Code: https://github.com/PatrickAlphaC/ethers-simple-storage-fcc
834 |
835 | 🧪 [Alchemy: https://alchemy.com/?a=673c802981](https://alchemy.com/?a=673c802981)
836 |
837 | ## Effective Debugging Strategies & Getting Help
838 | *[⌨️ (5:30:46) Effective Debugging Stategies & Getting Help](https://youtu.be/gyMwXuJrbJQ?t=19846)*
839 | 1. Tinker and isolate problem
840 | 1. For this course, take at LEAST 15 minutes to figure out a bug.
841 | 2. Google / Web Search the Exact problem
842 | 1. Go to this GitHub Repo / Discussions
843 | 3. Ask a question on a Forum like Stack Exchange Ethereum or Stack Overflow
844 | 1. Format your questions!!
845 | 2. Use [Markdown](https://www.markdowntutorial.com/)
846 |
847 | ### How to Debug Anything Video
848 | - [Patrick's Original Video](https://www.youtube.com/watch?v=XT8STflvwNo)
849 |
850 | ## Installation & Setup
851 | - [Visual Studio Code](https://code.visualstudio.com/)
852 | - [Crash Course](https://www.youtube.com/watch?v=WPqXP_kLzpo)
853 | - [NodeJS](https://nodejs.org/en/)
854 | - [VSCode Keybindings](https://code.visualstudio.com/docs/getstarted/keybindings)
855 | - [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
856 | - [What is a terminal?](https://code.visualstudio.com/docs/editor/integrated-terminal)
857 |
858 | ### Mac & Linux Setup
859 |
860 | ### Windows Setup
861 | - [WSL](https://docs.microsoft.com/en-us/windows/wsl/install)
862 | - When working in WSL, use Linux commands instead of Windows commands
863 | - [TroubleShooting](https://docs.microsoft.com/en-us/windows/wsl/troubleshooting)
864 | - `curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash`
865 |
866 | > ⚠️ Please use Gitpod as an absolute last resort
867 | ### Gitpod
868 | - [Gitpod](https://www.gitpod.io/)
869 | - **If using this, NEVER share a private key with real money on Gitpod**
870 | - Ideally you figure out the MacOS, Linux, or Windows install though
871 |
872 | ## Local Development Introduction
873 | - `CMD + K` or `CTRL + K` clears the terminal
874 | - `mkdir ethers-simple-storage-fcc`
875 | - `code .` to open VSCode in a new VSCode window
876 | ### Optional Javascript Crash Courses
877 | - [NodeJS Course](https://www.youtube.com/watch?v=RLtyhwFtXQA)
878 | - [Javascript Course](https://www.youtube.com/watch?v=jS4aFq5-91M)
879 | - Import your `SimpleStorage.sol`
880 | - [Solidity + Hardhat VSCode Extension](https://marketplace.visualstudio.com/items?itemName=NomicFoundation.hardhat-solidity)
881 |
882 | - Format your solidity code with:
883 | ```
884 | "[solidity]": {
885 | "editor.defaultFormatter": "NomicFoundation.hardhat-solidity"
886 | },
887 | "[javascript]":{
888 | "editor.defaultFormatter": "esbenp.prettier-vscode"
889 | }
890 | ```
891 | In your `.vscode/settings.json` file.
892 | - [Prettier Extension](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)
893 | ## Tiny Javascript Refresher
894 | - [Javascript Tips](https://www.freecodecamp.org/news/learn-javascript-free-js-courses-for-beginners/)
895 | ## Asynchronous Programming in Javascript
896 | - [Asynchronous Programming](https://www.bmc.com/blogs/asynchronous-programming/)
897 | - [async keyword](https://www.w3schools.com/JS//js_async.asp)
898 | - [Promise in Javascript](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)
899 | - [await keyword](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await)
900 | ## Compiling our Solidity
901 | - [Yarn Install](https://yarnpkg.com/getting-started/install)
902 | - [solc-js](https://github.com/ethereum/solc-js)
903 | - `yarn add solc@0.8.7-fixed`
904 | - [yarn scripts](https://classic.yarnpkg.com/lang/en/docs/cli/run/)
905 | ## Ganache & Networks
906 | - [Ganache](https://trufflesuite.com/ganache/)
907 | - Networks in Metamask
908 | - RPC URL
909 | - [Geth](https://github.com/ethereum/go-ethereum)
910 | - [JSON RPC Spec Playground](https://playground.open-rpc.org/?schemaUrl=https://raw.githubusercontent.com/ethereum/execution-apis/assembled-spec/openrpc.json&uiSchema%5BappBar%5D%5Bui:splitView%5D=false&uiSchema%5BappBar%5D%5Bui:input%5D=false&uiSchema%5BappBar%5D%5Bui:examplesDropdown%5D=false)
911 | ## Introduction to Ethers.js
912 | - [Ethers.js](https://docs.ethers.io/v5/getting-started/)
913 | - [prettier-plugin-solidity](https://github.com/prettier-solidity/prettier-plugin-solidity)
914 | ### A Note on the await Keyword
915 | ## Adding Transaction Overrides
916 | ## Transaction Receipts
917 | ## Sending a "raw" Transaction in Ethers.js
918 | ## Interacting with Contracts in Ethers.js
919 | - [EVM Decompiler](https://ethervm.io/decompile)
920 | - [BigNumber](https://docs.ethers.io/v5/api/utils/bignumber/)
921 | ## Environment Variables
922 | - [dotenv](https://www.npmjs.com/package/dotenv)
923 | - [.gitignore](https://www.atlassian.com/git/tutorials/saving-changes/gitignore)
924 | ## Better Private Key Management
925 | - [wallet.encrypt](https://docs.ethers.io/v5/api/signer/#Wallet-encrypt)
926 | - [THE .ENV PLEDGE](https://github.com/smartcontractkit/full-blockchain-solidity-course-js/discussions/5)
927 | ## Optional Prettier Formatting
928 | - [Prettier](https://prettier.io/docs/en/index.html)
929 | - [Best README Template](https://github.com/othneildrew/Best-README-Template)
930 | ## Deploying to a Testnet or a Mainnet
931 | - [Alchemy](https://alchemy.com/?a=673c802981)
932 | - [Getting your private key from Metamask](https://metamask.zendesk.com/hc/en-us/articles/360015289632-How-to-Export-an-Account-Private-Key)
933 | - `CTRL + C` stops any terminal command
934 | ## Verifying on Block Explorers from the UI
935 | ## Alchemy Dashboard & The Mempool
936 | - [Special Guest Albert Hu](https://twitter.com/thatguyintech)
937 | - [Mempool](https://ethereum.org/en/developers/tutorials/sending-transactions-using-web3-and-alchemy/#see-your-transaction-in-the-mempool)
938 | ## Lesson 5 Recap
939 | ### Typescript Ethers Simple Storage
940 |
941 | # Lesson 6: Hardhat Simple Storage
942 |
943 | *[⌨️ (08:20:17) Lesson 6: Hardhat Simple Storage](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=30017s)*
944 |
945 | 💻 Code: https://github.com/PatrickAlphaC/hardhat-simple-storage-fcc
946 |
947 | ## Introduction
948 | *[⌨️ (08:20:19) Introduction](https://youtu.be/gyMwXuJrbJQ?t=30019)*
949 | ## Hardhat Setup
950 | *[⌨️ (08:22:47) Hardhat Setup](https://youtu.be/gyMwXuJrbJQ?t=30167)*
951 | - [Hardhat Documentation](https://hardhat.org/)
952 | - [DevDependencies vs Dependencies](https://stackoverflow.com/questions/18875674/whats-the-difference-between-dependencies-devdependencies-and-peerdependencies)
953 | - [@ Sign node modules](https://stackoverflow.com/questions/36667258/what-is-the-meaning-of-the-at-prefix-on-npm-packages)
954 |
955 | ### Troubleshooting Hardhat Setup
956 | *[⌨️ (08:29:43) Troubleshooting Hardhat Setup](https://youtu.be/gyMwXuJrbJQ?t=30583)*
957 | - [Special Guest Cami Ramos Garzon](https://twitter.com/camiinthisthang)
958 | ## Hardhat Setup Continued
959 | *[⌨️ (08:31:48) Hardhat Setup Continued](https://youtu.be/gyMwXuJrbJQ?t=30708)*
960 | ## Deploying SimpleStorage from Hardhat
961 | *[⌨️ (08:33:10) Deploying SimpleStorage from Hardhat](https://youtu.be/gyMwXuJrbJQ?t=30790)*
962 | ## Networks in Hardhat
963 | *[⌨️ (08:41:44) Networks in Hardhat](https://youtu.be/gyMwXuJrbJQ?t=31304)*
964 | - [The Hardhat Network](https://hardhat.org/hardhat-network/)
965 | - [Hardhat configuration](https://hardhat.org/config/#configuration)
966 | - [Chain ID List](https://chainlist.org/)
967 | ## Programmatic Verification
968 | *[⌨️ (08:51:16) Programmatic Verification](https://youtu.be/gyMwXuJrbJQ?t=31876)*
969 | - [Etherscan Verify Tutorial](https://docs.etherscan.io/tutorials/verifying-contracts-programmatically)
970 | - [Etherscan Docs](https://docs.etherscan.io/)
971 | - [Hardhat-Etherscan](https://hardhat.org/plugins/nomiclabs-hardhat-etherscan.html)
972 | - [Etherscan API Keys](https://info.etherscan.com/api-keys/)
973 | - [Javascript == vs ===](https://stackoverflow.com/questions/359494/which-equals-operator-vs-should-be-used-in-javascript-comparisons)
974 | ## Interacting with Contracts in Hardhat
975 | *[⌨️ (09:06:37) Interacting with Contracts in Hardhat](https://youtu.be/gyMwXuJrbJQ?t=32797)*
976 | ## Artifacts Troubleshooting
977 | *[⌨️ (09:09:42) Artifacts Troubleshooting](https://youtu.be/gyMwXuJrbJQ?t=32982)*
978 | ## Custom Hardhat Tasks
979 | *[⌨️ (09:10:52) Custom Hardhat Tasks](https://youtu.be/gyMwXuJrbJQ?t=33052)*
980 | - [Hardhat Tasks](https://hardhat.org/guides/create-task.html)
981 | - [Javascript Arrow Functions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions)
982 | ## Hardhat Localhost Node
983 | *[⌨️ (09:18:12) Hardhat Localhost Node](https://youtu.be/gyMwXuJrbJQ?t=33492)*
984 | ## The Hardhat Console
985 | *[⌨️ (09:23:11) The Hardhat Console](https://youtu.be/gyMwXuJrbJQ?t=33791)*
986 | - [Hardhat Console](https://hardhat.org/guides/hardhat-console.html)
987 | ## Hardhat Tests
988 | *[⌨️ (09:26:13) Hardhat Tests](https://youtu.be/gyMwXuJrbJQ?t=33973)*
989 | - [Hardhat Tests](https://hardhat.org/tutorial/testing-contracts.html#_5-testing-contracts)
990 | - [Mocha Style Tests](https://mochajs.org/)
991 | - [Chai](https://www.npmjs.com/package/chai)
992 | - [Waffle Tests](https://ethereum-waffle.readthedocs.io/en/latest/)
993 | ## Hardhat Gas Reporter
994 | *[⌨️ (09:38:10) Hardhat Gas Reporter](https://youtu.be/gyMwXuJrbJQ?t=34690)*
995 | - [Hardhat Gas Reporter](https://www.npmjs.com/package/hardhat-gas-reporter)
996 | - [Coinmarketcap API](https://coinmarketcap.com/api/)
997 | ## Solidity Coverage
998 | *[⌨️ (09:44:40) Solidity Coverage](https://youtu.be/gyMwXuJrbJQ?t=35080)*
999 | - [Solidity Coverage](https://github.com/sc-forks/solidity-coverage)
1000 | ## Hardhat Waffle
1001 | *[⌨️ (09:47:02) Hardhat Waffle](https://youtu.be/gyMwXuJrbJQ?t=35222)*
1002 | - [Hardhat-Waffle](https://npm.io/package/@nomiclabs/hardhat-waffle)
1003 | ## Lesson 6 Recap
1004 | *[⌨️ (09:47:37) Lesson 6 Recap](https://youtu.be/gyMwXuJrbJQ?t=35257)*
1005 | ### Typescript Hardhat Simple Storage
1006 | *[⌨️ (09:52:15) Typescript Hardhat Simple Storage](https://youtu.be/gyMwXuJrbJQ?t=35535)*
1007 | - [Typechain](https://github.com/dethcrypto/TypeChain)
1008 |
1009 | ```
1010 | yarn add --dev @typechain/ethers-v5 @typechain/hardhat @types/chai @types/node @types/mocha ts-node typechain typescript
1011 | ```
1012 |
1013 | # Lesson 7: Hardhat Fund Me
1014 |
1015 | *[⌨️ (10:00:48) Lesson 7: Hardhat Fund Me](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=36048s)*
1016 |
1017 | 💻 Code: https://github.com/PatrickAlphaC/hardhat-fund-me-fcc
1018 |
1019 | ## Introduction
1020 | *[⌨️ (10:00:50) Introduction](https://youtu.be/gyMwXuJrbJQ?t=36050)*
1021 | ## Hardhat Setup - Fund Me
1022 | *[⌨️ (10:03:41) Hardhat Setup - Fund Me](https://youtu.be/gyMwXuJrbJQ?t=36221)*
1023 | ## Linting
1024 | *[⌨️ (10:06:20) Linting](https://youtu.be/gyMwXuJrbJQ?t=36380)*
1025 | - [Eslint](https://eslint.org/)
1026 | - [Solhint](https://github.com/protofire/solhint)
1027 | - [Linting Code](https://www.perforce.com/blog/qac/what-lint-code-and-why-linting-important)
1028 | ## Hardhat Setup - Fund Me - Continued
1029 | *[⌨️ (10:07:47) Hardhat Setup - Fund Me - Continued](https://youtu.be/gyMwXuJrbJQ?t=36467)*
1030 | ## Importing from NPM
1031 | *[⌨️ (10:09:38) Importing from NPM](https://youtu.be/gyMwXuJrbJQ?t=36578)*
1032 | - [@chainlink/contracts](https://www.npmjs.com/package/@chainlink/contracts)
1033 | ## Hardhat Deploy
1034 | *[⌨️ (10:10:43) Hardhat Deploy](https://youtu.be/gyMwXuJrbJQ?t=36643)*
1035 | - [Hardhat Deploy](https://github.com/wighawag/hardhat-deploy)
1036 | ## Mocking
1037 | *[⌨️ (10:21:05) Mocking](https://youtu.be/gyMwXuJrbJQ?t=37265)*
1038 | - [Mocking](https://stackoverflow.com/questions/2665812/what-is-mocking)
1039 | - [Aave Github](https://github.com/aave/aave-v3-core)
1040 | - [Chainlink Github](https://github.com/smartcontractkit/chainlink)
1041 | - Multiple Versions of Solidity
1042 | - Tags in hardhat
1043 | ## Utils Folder
1044 | *[⌨️ (10:52:51) Utils Folder](https://youtu.be/gyMwXuJrbJQ?t=39171)*
1045 | ## Testnet Demo - Hardhat Fund Me
1046 | *[⌨️ (10:55:45) Testnet Demo - Hardhat Fund Me](https://youtu.be/gyMwXuJrbJQ?t=39345)*
1047 | - Hardhat Deploy Block Confirmations
1048 | ### TypeScript
1049 | - [Code file](https://github.com/PatrickAlphaC/hardhat-fund-me-fcc/blob/84271e7002e55d86c90b26466ff27bc067f25de0/deploy/01-deploy-fund-me.ts#L29) (TypeScript edition)
1050 | - Define blockConfirmations in the `helper-hardhat-config.ts` file instead of `hardhat-config.js`.
1051 | ## Solidity Style Guide
1052 | *[⌨️ (11:00:10) Solidity Style Guide](https://youtu.be/gyMwXuJrbJQ?t=39610)*
1053 | - [Style Guide](https://docs.soliditylang.org/en/latest/style-guide.html)
1054 | - [NatSpec](https://docs.soliditylang.org/en/latest/natspec-format.html)
1055 | ## Testing Fund Me
1056 | *[⌨️ (11:08:36) Testing Fund Me](https://youtu.be/gyMwXuJrbJQ?t=40116)*
1057 | - [Unit Testing](https://en.wikipedia.org/wiki/Unit_testing)
1058 | - [Hardhat Deploy Fixtures](https://github.com/wighawag/hardhat-deploy#creating-fixtures)
1059 | - [ethers.getContract](https://github.com/wighawag/hardhat-deploy-ethers)
1060 | - [expect](https://ethereum-waffle.readthedocs.io/en/latest/matchers.html)
1061 | - [ethers.utils.parseUnits](https://docs.ethers.io/v5/api/utils/display-logic/#utils-parseUnits)
1062 | - [Waffle Chai Matchers](https://ethereum-waffle.readthedocs.io/en/latest/matchers.html)
1063 | ## Breakpoints & Debugging
1064 | *[⌨️ (11:30:39) Breakpoints & Debugging](https://youtu.be/gyMwXuJrbJQ?t=41439)*
1065 | - [VSCode Breakpoints](https://code.visualstudio.com/Docs/editor/debugging)
1066 | ## Gas III
1067 | *[⌨️ (11:33:40) Gas III](https://youtu.be/gyMwXuJrbJQ?t=41620)*
1068 | - [Transaction Response](https://docs.ethers.io/v5/api/providers/types/#providers-TransactionResponse)
1069 | - [Transaction Receipt](https://docs.ethers.io/v5/api/providers/types/#providers-TransactionReceipt)
1070 | ## console.log & Debugging
1071 | *[⌨️ (11:36:35) console.log & Debugging](https://youtu.be/gyMwXuJrbJQ?t=41795)*
1072 | - [Hardhat console.log](https://hardhat.org/hardhat-network/reference/#console-log)
1073 | ## Testing Fund Me II
1074 | *[⌨️ (11:37:31) Testing Fund Me II](https://youtu.be/gyMwXuJrbJQ?t=41851)*
1075 | ## Storage in Solidity
1076 | *[⌨️ (11:44:34) Storage in Solidity](https://youtu.be/gyMwXuJrbJQ?t=42274)*
1077 | - [Storage Layout](https://docs.soliditylang.org/en/latest/internals/layout_in_storage.html)
1078 | - [Purpose of the memory keyword](https://stackoverflow.com/questions/33839154/in-ethereum-solidity-what-is-the-purpose-of-the-memory-keyword)
1079 | - [getStorageAt](https://docs.ethers.io/v5/api/providers/provider/#Provider-getStorageAt)
1080 | ## Gas Optimizations using Storage Knowledge
1081 | *[⌨️ (11:52:38) Gas Optimizations using Storage Knowledge](https://youtu.be/gyMwXuJrbJQ?t=42758)*
1082 | - [Opcodes](https://ethereum.org/en/developers/docs/evm/opcodes/)
1083 | - [Opcodes by Gas](https://github.com/crytic/evm-opcodes)
1084 | - [Opcodes by Gas](https://evm.codes/)
1085 | - Append `s_` to storage variables
1086 | - Append `i_` to immutable variables
1087 | - Caps lock and underscore constant variables
1088 | ## Solidity Chainlink Style Guide
1089 | *[⌨️ (12:05:29) Solidity Chainlink Style Guide](https://youtu.be/gyMwXuJrbJQ?t=43529)*
1090 | - [Chainlink Solidity Style Guide](https://github.com/smartcontractkit/full-blockchain-solidity-course-js/issues/13)
1091 | ## Storage Review
1092 | *[⌨️ (12:09:59) Storage Review](https://youtu.be/gyMwXuJrbJQ?t=43799)*
1093 | ## Staging Tests
1094 | *[⌨️ (12:11:43) Staging Tests](https://youtu.be/gyMwXuJrbJQ?t=43903)*
1095 | - [Ternary](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_Operator)
1096 | ## Running Scripts on a Local Node
1097 | *[⌨️ (12:17:58) Running Scripts on a Local Node](https://youtu.be/gyMwXuJrbJQ?t=44278)*
1098 | ## Adding Scripts to your package.json
1099 | *[⌨️ (12:22:00) Adding Scripts to your package.json](https://youtu.be/gyMwXuJrbJQ?t=44520)*
1100 | ## Pushing to GitHub
1101 | *[⌨️ (12:25:17) Pushing to GitHub](https://youtu.be/gyMwXuJrbJQ?t=44717)*
1102 | - [Github Quickstart](https://docs.github.com/en/get-started/quickstart)
1103 | - [What is Git?](https://www.git-scm.com/book/en/v2/Getting-Started-What-is-Git%3F)
1104 | - [The quickstart that we follow in the video](https://docs.github.com/en/get-started/importing-your-projects-to-github/importing-source-code-to-github/adding-locally-hosted-code-to-github#adding-a-local-repository-to-github-using-git)
1105 | - [Learn about git and GitHub](https://www.youtube.com/watch?v=RGOj5yH7evk)
1106 | ## 🐸🐦 [Tweet Me (add your repo in)!](https://twitter.com/intent/tweet?text=I%20just%20made%20my%20first%20Smart%20Contract%20repo%20using%20@solidity_lang,%20@HardhatHQ,%20@chainlink,%20@AlchemyPlatform,%20and%20more!%0a%0aThanks%20@PatrickAlphaC!!)
1107 |
1108 | # Lesson 8: HTML / Javascript Fund Me (Full Stack / Front End)
1109 |
1110 | *[⌨️ (12:32:57) Lesson 8: HTML / Javascript Fund Me (Full Stack / Front End)](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=45177s)*
1111 |
1112 | 💻 Code: https://github.com/PatrickAlphaC/html-fund-me-fcc
1113 |
1114 | ## Introduction
1115 | ## How Websites work with Web3 Wallets
1116 | - [How to Connect your Smart Contracts to Metamask](https://www.youtube.com/watch?v=pdsYCkUWrgQ)
1117 | - 💻 Code from Video: https://github.com/PatrickAlphaC/full-stack-web3-metamask-connectors
1118 | - ✍️ Article from Video: https://betterprogramming.pub/everything-you-need-to-know-about-fullstack-web3-94c0f1b18019?sk=a2764bcbdae98bf05e1052931de77982
1119 | ## HTML Setup
1120 | - Live Server: ExtensionID: ritwickdey.LiveServer
1121 | ## Connecting HTML to Metamask
1122 | - [Metamask Docs](https://docs.metamask.io/guide/)
1123 | ## Javascript in it's own file
1124 | ## ES6 vs Nodejs
1125 | - [ES6 vs Nodesjs](https://stackoverflow.com/questions/31354559/using-node-js-require-vs-es6-import-export#31367852)
1126 | - [Ethers docs for web browser](https://docs.ethers.io/v5/getting-started/#getting-started--importing--web-browser)
1127 | - [module vs text/javascript](https://stackoverflow.com/questions/51418964/script-type-text-javascript-vs-script-type-module)
1128 | ## Sending a transaction from a Website
1129 | - [Web3Provider](https://docs.ethers.io/v5/api/providers/other/#Web3Provider)
1130 | - [Adding a network to metamask](https://metamask.zendesk.com/hc/en-us/articles/360043227612-How-to-add-a-custom-network-RPC)
1131 | ## Resetting an Account in Metamask
1132 | ```
1133 | MetaMask - RPC Error:
1134 | [ethjs-query] while formatting ouputs from RPC '{"value":{"code":-32603,"data":{"code":-32000,"message":"Nonce too high. Expected nonce to be 2 but got 4. Note that transactions can't be queued when automining."}}}'
1135 | ```
1136 | ## Listening for Events and Completed Transactions
1137 | - [provider.once](https://docs.ethers.io/v5/api/providers/provider/#Provider-once)
1138 | - [Anonymous function](https://www.geeksforgeeks.org/javascript-anonymous-functions/)
1139 | - [Javascript Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)
1140 | ## Input Forms
1141 | ## Reading from the Blockchain
1142 | ## Withdraw Function
1143 | ## Lesson 8 Recap
1144 | ### Optional Links:
1145 | - [Browserify](https://browserify.org/)
1146 | - [Watchify](https://www.npmjs.com/package/watchify)
1147 |
1148 | # Lesson 9: Hardhat Smart Contract Lottery
1149 |
1150 | *[⌨️ (13:41:02) Lesson 9: Hardhat Smart Contract Lottery](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=49262s)*
1151 |
1152 | 💻 Code: https://github.com/PatrickAlphaC/hardhat-smartcontract-lottery-fcc
1153 |
1154 | ## Introduction
1155 | ## Hardhat Setup - Smart Contract Lottery
1156 | *[⌨️ (13:43:43) Hardhat Setup](https://youtu.be/gyMwXuJrbJQ?t=49423)*
1157 | - Install dependencies:
1158 | ```bash
1159 | yarn add --dev @nomiclabs/hardhat-ethers@npm:hardhat-deploy-ethers ethers @nomiclabs/hardhat-etherscan @nomiclabs/hardhat-waffle chai ethereum-waffle hardhat hardhat-contract-sizer hardhat-deploy hardhat-gas-reporter prettier prettier-plugin-solidity solhint solidity-coverage dotenv
1160 | ```
1161 | - Install dependencies (Typescript version):
1162 | ```bash
1163 | yarn add --dev @nomiclabs/hardhat-ethers@npm:hardhat-deploy-ethers ethers @nomiclabs/hardhat-etherscan @nomiclabs/hardhat-waffle chai ethereum-waffle hardhat hardhat-contract-sizer hardhat-deploy hardhat-gas-reporter prettier prettier-plugin-solidity solhint solidity-coverage dotenv @typechain/ethers-v5 @typechain/hardhat @types/chai @types/node ts-node typechain typescript
1164 | ```
1165 | ## Raffle.sol Setup
1166 | *[⌨️ (13:46:55) Raffle.sol Setup](https://youtu.be/gyMwXuJrbJQ?t=49615)*
1167 | - [Custom Errors in Solidity](https://blog.soliditylang.org/2021/04/21/custom-errors/)
1168 | ## Introduction to Events
1169 | *[⌨️ (13:54:02) Introduction to Events](https://youtu.be/gyMwXuJrbJQ?t=50042)*
1170 | - [Events & Logging Video](https://www.youtube.com/watch?v=KDYJC85eS5M)
1171 | - [Events & Logging in Hardhat](https://github.com/PatrickAlphaC/hardhat-events-logs)
1172 | ## Events in Raffle.sol
1173 | *[⌨️ (14:00:47) Events in Raffle.sol](https://youtu.be/gyMwXuJrbJQ?t=50447)*
1174 | ## Introduction to Chainlink VRF
1175 | *[⌨️ (14:02:30) Introduction to Chainlink VRF](https://youtu.be/gyMwXuJrbJQ?t=50550)*
1176 | - [Special Guest Stephen Fluin](https://twitter.com/stephenfluin)
1177 | ### Sub-Lesson: Chainlink VRF
1178 | > - [Chainlink VRFv2 Docs](https://docs.chain.link/docs/get-a-random-number/)
1179 | > - [Chainlink VRFv2 Walkthrough](https://www.youtube.com/watch?v=rdJ5d8j1RCg)
1180 | > - [Chainlink Contracts](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/VRFConsumerBase.sol)
1181 | ## Implementing Chainlink VRF - Introduction
1182 | *[⌨️ (14:09:53) Implementing Chainlink VRF](https://youtu.be/gyMwXuJrbJQ?t=50993)*
1183 | ### Hardhat Shorthand
1184 | - [Hardhat Shorthand](https://hardhat.org/guides/shorthand.html)
1185 | ## Implementing Chainlink VRF - The Request
1186 | ## Implementing Chainlink VRF - The FulFill
1187 | ### Modulo
1188 | - [Modulo](https://docs.soliditylang.org/en/latest/types.html?highlight=modulo#modulo)
1189 | ## Introduction to Chainlink Keepers
1190 | - [Chainlink Keepers Docs](https://docs.chain.link/docs/chainlink-keepers/introduction/)
1191 | - [Chainlink Keepers Walkthrough](https://www.youtube.com/watch?v=-Wkw5JVQGUo)
1192 | ## Implementing Chainlink Keepers - checkUpkeep
1193 | ### Enums
1194 | - [Enum](https://docs.soliditylang.org/en/latest/structure-of-a-contract.html?highlight=enum#enum-types)
1195 | ## Implementing Chainlink Keepers - checkUpkeep continued
1196 | - block.timestamp
1197 | ## Implementing Chainlink Keepers - performUpkeep
1198 | ## Code Cleanup
1199 | ## Deploying Raffle.sol
1200 | ### Mock Chainlink VRF Coordinator
1201 | ### Continued
1202 | - [LINK Token](https://docs.chain.link/docs/link-token-contracts/)
1203 | ## Raffle.sol Unit Tests
1204 | - We use `async function` in the describe blocks at the start, but we correctly take them out later.
1205 | ### Testing Events & Chai Matchers
1206 | - [Emit Chai Matcher](https://ethereum-waffle.readthedocs.io/en/latest/matchers.html#emitting-events)
1207 | ### Continued I
1208 | ## Hardhat Methods & Time Travel
1209 | - [Make Hardhat do whatever you want it to](https://hardhat.org/hardhat-network/reference/)
1210 | - [Special debugging hardhat methods](https://hardhat.org/hardhat-network/reference/#special-testing-debugging-methods)
1211 | ### Continued II
1212 | ## Callstatic
1213 | - [Callstatic](https://docs.ethers.io/v5/api/contract/contract/#contract-callStatic)
1214 | ### Continued III
1215 | ### Massive Promise Test
1216 | ### Continued IV
1217 | ## Raffle.sol Staging Tests
1218 | ## Testing on a Testnet
1219 | ### Recommended LINK amounts for Sepolia Staging Test:
1220 | - Chainlink VRF: 2 LINK
1221 | - Chainlink Keepers: 8 LINK
1222 | ## Conclusion
1223 | ## Typescript - Smart Contract Lottery
1224 |
1225 | 🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊 Completed Hardhat Basics! 🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊
1226 |
1227 | # Lesson 10: NextJS Smart Contract Lottery (Full Stack / Front End)
1228 |
1229 | *[⌨️ (16:34:07) Lesson 10: NextJS Smart Contract Lottery (Full Stack / Front End)](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=59647s)*
1230 |
1231 | 💻 Code: https://github.com/PatrickAlphaC/nextjs-smartcontract-lottery-fcc
1232 |
1233 | ⚡️⚡️ Live Demo IPFS: ipfs://QmXwACyjcS8tL7UkYwimpqMqW9sKzSHUjE4uSZBSyQVuEH
1234 |
1235 | ⚡️⚡️ Live Demo Fleek: https://fancy-dream-3458.on.fleek.co/
1236 |
1237 | ## Introduction
1238 | We move into using [NextJS](https://nextjs.org/) for our front end. NextJS is a [React framework](https://reactjs.org/) for building websites.
1239 |
1240 | ### Optional Sub-Lesson: Full Stack Development & Other Libraries
1241 | - [6 Ways to connect your dapp to a wallet](https://www.youtube.com/watch?v=pdsYCkUWrgQ)
1242 | - [NextJS Crash Course](https://www.youtube.com/watch?v=mTz0GXj8NN0)
1243 | - Other React libraries:
1244 | - [Web3React](https://github.com/NoahZinsmeister/web3-react)
1245 | - [wagmi](https://github.com/tmm/wagmi)
1246 | - [react-moralis](https://www.npmjs.com/package/react-moralis)
1247 | - [useDapp](https://github.com/TrueFiEng/useDApp)
1248 | - [Web3Modal](https://github.com/Web3Modal/web3modal)
1249 | - [useMetamask](https://github.com/mdtanrikulu/use-metamask)
1250 | - Other Full Stack Web3 Templates
1251 | - [scaffold-eth](https://github.com/scaffold-eth/scaffold-eth)
1252 | - [ethereum-boilerplate](https://github.com/ethereum-boilerplate/ethereum-boilerplate)
1253 | - [create-eth-app](https://github.com/paulrberg/create-eth-app)
1254 | - [React being quite popular](https://insights.stackoverflow.com/survey/2021#section-most-popular-technologies-web-frameworks)
1255 | - [Why use react?](https://www.freecodecamp.org/news/why-use-react-for-web-development/)
1256 |
1257 | ## NextJS Setup
1258 | - [NextJS Documentation](https://nextjs.org/learn/basics/create-nextjs-app)
1259 | - [NextJS Minimal Ethers Example For Lottery](https://github.com/PatrickAlphaC/nextjs-ethers-introduction)
1260 |
1261 | ```
1262 | yarn create next-app .
1263 | ```
1264 | ## Manual Header I
1265 | - [What is a component?](https://www.w3schools.com/react/react_components.asp)
1266 | - [jsx](https://reactjs.org/docs/introducing-jsx.html)
1267 | - [Moralis](https://moralis.io/)
1268 | - [React Moralis](https://github.com/MoralisWeb3/react-moralis)
1269 | ### React Hooks
1270 | - [What is a react hook?](https://reactjs.org/docs/hooks-overview.html)
1271 | ## Manual Header II
1272 | ## useEffect Hook
1273 | - [useEffect Hook](https://reactjs.org/docs/hooks-effect.html)
1274 | - [More on useEffect](https://blog.logrocket.com/guide-to-react-useeffect-hook/)
1275 | - [React Context](https://www.freecodecamp.org/news/react-context-for-beginners/)
1276 | - [useEffect Firing Twice](https://stackoverflow.com/questions/60618844/react-hooks-useeffect-is-called-twice-even-if-an-empty-array-is-used-as-an-ar)
1277 | ## Local Storage
1278 | - [Local Storage](https://codinglead.co/javascript/what-is-localstorage)
1279 | ## isWeb3EnabledLoading
1280 | ## web3uikit
1281 | - [web3uikit](https://github.com/web3ui/web3uikit)
1282 | - [web3uikit interactive docs](https://web3ui.github.io/web3uikit/?path=/story/1-web3-blockie--custom-seed)
1283 | - [web3uikit connect button](https://web3ui.github.io/web3uikit/?path=/story/1-web3-connectbutton--default)
1284 | ## Introduction to Calling Functions in Nextjs
1285 | - [useWeb3Contract](https://github.com/MoralisWeb3/react-moralis#useweb3contract)
1286 | ### Automatic Constant Value UI Updater
1287 | - [ethers.utils.FormatTypes](https://docs.ethers.io/v5/api/utils/abi/fragments/#fragments--formats)
1288 | ### runContractFunction
1289 | - [Moralis Provider](https://github.com/MoralisWeb3/react-moralis#wrap-your-app-in-a-moralisprovider)
1290 | - [useMoralis](https://github.com/MoralisWeb3/react-moralis#usemoralis)
1291 | - [parseInt](https://www.w3schools.com/JSREF/jsref_parseint.asp)
1292 | ## useState
1293 | - [useState Hook](https://reactjs.org/docs/hooks-state.html)
1294 | ## Calling Functions in NextJS
1295 | ## useNotification
1296 | - Add `onError` to all your `runContractFunction` calls
1297 | ## Reading & Displaying Contract Data
1298 | ## A Note about `onSuccess`
1299 | - `onSuccess` just checks to see if MetaMask sends the transaction, not
1300 | ## A Challenge to You
1301 | ## Tailwind & Styling
1302 | - [Learn CSS](https://www.w3schools.com/css/)
1303 | - [Tailwindcss](https://tailwindcss.com/)
1304 | - [PostCSS Extension](https://marketplace.visualstudio.com/items?itemName=csstools.postcss)
1305 | - [Tailwind Extension](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss)
1306 | - [Install Tailwind into NextJS](https://tailwindcss.com/docs/guides/nextjs)
1307 | ## Introduction to Hosting your Site
1308 | *[⌨️ (18:12:50) Introdunction to Hosting your Site](https://youtu.be/gyMwXuJrbJQ?t=65570)*
1309 | - [Vercel](https://vercel.com/)
1310 | - [Moralis](https://moralis.io/)
1311 | - [Netilfy](https://www.netlify.com/)
1312 | - [IPFS](https://ipfs.io/)
1313 | ## IPFS
1314 | *[⌨️ (18:15:14) IPFS](https://youtu.be/gyMwXuJrbJQ?t=65714)*
1315 | - [What is IPFS](https://www.youtube.com/watch?v=5Uj6uR3fp-U)
1316 | - [IPFS](https://ipfs.io/)
1317 | ## Hosting on IPFS
1318 | *[⌨️ (18:18:51) Hosting on IPFS](https://youtu.be/gyMwXuJrbJQ?t=65931)*
1319 | - [IPFS Companion](https://chrome.google.com/webstore/detail/ipfs-companion/nibjojkomfdiaoajekhjakgkdhaomnch)
1320 | - [Brave Browser](https://brave.com/)
1321 | - `yarn build && yarn next export`
1322 | ## Hosting on IPFS & Filecoin using Fleek
1323 | *[⌨️ (18:25:45) Hosting on IPFS & Filecoin using Fleek](https://youtu.be/gyMwXuJrbJQ?t=66345)*
1324 | - [Fleek](https://fleek.co/)
1325 | ## Filecoin Overview
1326 | *[⌨️ (18:31:28) Filecoin Overview](https://youtu.be/gyMwXuJrbJQ?t=66688)*
1327 | - [Special Guest Ally Haire](https://twitter.com/DeveloperAlly)
1328 | - [IPFS URL of Ally's Video](ipfs://bafybeiasd6oxqiefoxgtskrokomexnb4zcq3fhwlcbyplx2paw65zmq2du)
1329 | ## Lesson 10 Recap
1330 |
1331 | # Lesson 11: Hardhat Starter Kit
1332 |
1333 | *[⌨️ (18:51:36) Lesson 11: Hardhat Starter Kit](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=67896s)*
1334 |
1335 | 💻 Code: https://github.com/smartcontractkit/hardhat-starter-kit
1336 |
1337 | # Lesson 12: Hardhat ERC20s
1338 |
1339 | *[⌨️ (18:59:24) Lesson 12: Hardhat ERC20s](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=68364s)*
1340 |
1341 | 💻 Code: https://github.com/PatrickAlphaC/hardhat-erc20-fcc
1342 |
1343 | ## What is an ERC? What is an EIP?
1344 | - [What is an EIP?](https://eips.ethereum.org/)
1345 | - [EIPs codebase](https://github.com/ethereum/EIPs)
1346 | ## What is an ERC20?
1347 | - [Video (using brownie/python)](https://youtu.be/8rpir_ZSK1g?t=39)
1348 | - [EIP-20](https://eips.ethereum.org/EIPS/eip-20)
1349 | - [ERC-677](https://github.com/ethereum/EIPs/issues/677)
1350 | - [EIP-777](https://eips.ethereum.org/EIPS/eip-777)
1351 | ## Manually Creating an ERC20 Token
1352 | ## Creating an ERC20 Token with Openzeppelin
1353 | - [Openzeppelin](https://openzeppelin.com/)
1354 | - [Openzeppelin Contracts](https://github.com/OpenZeppelin/openzeppelin-contracts)
1355 | - [Solmate (Openzeppelin alternative)](https://github.com/Rari-Capital/solmate)
1356 | ## Lesson 12 Recap
1357 |
1358 | # Lesson 13: Hardhat DeFi & Aave
1359 |
1360 | *[⌨️ (19:16:13) Lesson 13: Hardhat DeFi & Aave](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=69373s)*
1361 |
1362 | 💻 Code: https://github.com/PatrickAlphaC/hardhat-defi-fcc
1363 |
1364 | ## What is DeFi?
1365 | - [What is DeFi?](https://chain.link/education/defi)
1366 | - [DefiLlama](https://defillama.com/)
1367 | ## What is Aave?
1368 | - [Aave](https://aave.com/)
1369 | - [My Previous Aave Video on Shorting Assets](https://www.youtube.com/watch?v=TmNGAvI-RUA)
1370 | ## Programmatic Borrowing & Lending
1371 | - [DAI](https://makerdao.com/en/)
1372 | - [Uniswap](https://app.uniswap.org/)
1373 | ## WETH - Wrapped ETH
1374 | - [WETH Token Sepolia Etherscan](https://sepolia.etherscan.io/address/0xdd13E55209Fd76AfE204dBda4007C227904f0a81)
1375 | - [WETH Token Mainnet](https://etherscan.io/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2)
1376 | ## Forking Mainnet
1377 | - [Mainnet Forking](https://hardhat.org/hardhat-network/guides/mainnet-forking.html)
1378 | ## Depositing into Aave
1379 | - [Aave V2 Docs](https://docs.aave.com/developers/v/2.0/)
1380 | - [Aave NPM](https://www.npmjs.com/package/@aave/protocol-v2)
1381 | ## Borrowing from Aave
1382 | - [Aave Borrowing FAQs](https://docs.aave.com/faq/borrowing)
1383 | - [Health Factor](https://docs.aave.com/faq/borrowing#what-is-the-health-factor)
1384 | - [Aave Risk Parameters](https://docs.aave.com/risk/asset-risk/risk-parameters)
1385 | ## Repaying with Aave
1386 | ## Visualizing the Transactions
1387 | - [aTokens](https://docs.aave.com/developers/v/1.0/developing-on-aave/the-protocol/atokens)
1388 | ## Lesson 13 Recap
1389 | ## Happy Bow-Tie Friday with Austin Griffith
1390 | - [Special Guest Austin Griffith](https://twitter.com/austingriffith)!
1391 | - [Speed Run Ethereum](https://speedrunethereum.com/)
1392 | ### More DeFi Learnings:
1393 | - [Defi-Minimal](https://github.com/smartcontractkit/defi-minimal/tree/main/contracts)
1394 | - [Defi Dad](https://www.youtube.com/channel/UCatItl6C7wJp9txFMbXbSTg)
1395 |
1396 |
1397 | # Lesson 14: Hardhat NFTs (EVERYTHING you need to know about NFTs)
1398 |
1399 | *[⌨️ (20:28:51) Lesson 14: Hardhat NFTs ](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=73731s)*
1400 |
1401 | 💻 Code: https://github.com/PatrickAlphaC/hardhat-nft-fcc
1402 |
1403 | ## What is an NFT?
1404 | - [Video](https://www.youtube.com/watch?v=9yuHz6g_P50)
1405 | - [Optional: All on Chain SVG NFT](https://www.youtube.com/watch?v=9oERTH9Bkw0)
1406 | - [EIP-721](https://eips.ethereum.org/EIPS/eip-721)
1407 | ## Code Overview
1408 | - [Opensea Testnet](https://testnets.opensea.io/)
1409 | ## Hardhat Setup
1410 | ## Basic NFT
1411 | ### Write Tests
1412 | - [Openzeppelin NFT](https://docs.openzeppelin.com/contracts/4.x/)
1413 | ## Random IPFS NFT
1414 | ### Mapping Chainlink VRF Requests
1415 | ### Creating Rare NFTs
1416 | ### Setting the NFT Image
1417 | ### Setting an NFT Mint Price
1418 | ### Deploy Script
1419 | ### Uploading Token Images with Pinata
1420 | - [Pinata](https://pinata.cloud)
1421 | - [nft.storage](https://nft.storage)
1422 | - [Pinata NPM](https://www.npmjs.com/package/@pinata/sdk)
1423 | - [Pinata Docs](https://docs.pinata.cloud/)
1424 | ### Uploading Token URIs (metadata) with Pinata
1425 | ### Deploying
1426 | ### Tests
1427 | ## Dynamic SVG On-Chain NFT
1428 | - [Patrick's Original Video](https://www.youtube.com/watch?v=9oERTH9Bkw0)
1429 | ### What is an SVG?
1430 | - [SVG Tutorial](https://www.w3schools.com/graphics/svg_intro.asp)
1431 | - [On-Chain SVG Example](https://opensea.io/assets/matic/0x291ff90b9c410f56e047599bfee6b585c0c484d7/2)
1432 | ### Initial Code
1433 | ### Base64 Encoding
1434 | - [Base64 Encoding](https://en.wikipedia.org/wiki/Base64)
1435 | - [Example Encoder](https://base64.guru/converter/encode/image/svg)
1436 | - [base64-sol](https://www.npmjs.com/package/base64-sol/v/1.0.1)
1437 | ## Advanced: EVM Opcodes, Encoding, and Calling
1438 | ### abi.encode & abi.encodePacked
1439 | - [abi.encode](https://docs.soliditylang.org/en/latest/cheatsheet.html?highlight=cheatsheet#global-variables)
1440 | - [abi.encodePacked](https://docs.soliditylang.org/en/latest/cheatsheet.html?highlight=cheatsheet#global-variables)
1441 | Thanks to [Alex Roan](https://twitter.com/alexroan) for his help on this session!
1442 | - [Example Contract Creation Transaction](https://etherscan.io/tx/0x112133a0a74af775234c077c397c8b75850ceb61840b33b23ae06b753da40490)
1443 | What REALLY is the ABI?
1444 | - [EVM Opcodes](https://www.evm.codes/)
1445 | - [More EVM Opcodes](https://github.com/crytic/evm-opcodes)
1446 | - [Solidity Cheatsheet](https://docs.soliditylang.org/en/latest/cheatsheet.html?highlight=encodewithsignature)
1447 | - [abi.encode vs abi.encodePacked](https://ethereum.stackexchange.com/questions/91826/why-are-there-two-methods-encoding-arguments-abi-encode-and-abi-encodepacked)
1448 | ### Introduction to Encoding Function Calls Directly
1449 | ### Introduction to Encoding Function Calls Recap
1450 | ### Encoding Function Calls Directly
1451 | - [Function Selector](https://blog.openzeppelin.com/deconstructing-a-solidity-contract-part-iii-the-function-selector-6a9b6886ea49/)
1452 | - [Function Signature](https://twitter.com/PatrickAlphaC/status/1517156225670078465)
1453 | ### Creating an NFT TokenURI on-Chain
1454 | ### Making the NFT Dynamic
1455 | ### Deploy Script
1456 | ## Deploying the NFTs to a Testnet
1457 | ## Lesson 14 Recap
1458 |
1459 |
1460 | Extra credit:
1461 | - [Deconstructing Solidity](https://blog.openzeppelin.com/deconstructing-a-solidity-contract-part-ii-creation-vs-runtime-6b9d60ecb44c/)
1462 | - [Knowing and controlling your Smart Contract Address](https://www.youtube.com/watch?v=56K0FdosZ8g)
1463 | - [From Solidity to byte code](https://www.youtube.com/watch?v=RxL_1AfV7N4)
1464 |
1465 | # Lesson 15: NextJS NFT Marketplace (If you finish this lesson, you are a full-stack MONSTER!)
1466 |
1467 | *[⌨️ (23:37:03) Lesson 15: NextJS NFT Marketplace (Full Stack / Front End)](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=85023s)*
1468 |
1469 | ## Large Update, please read
1470 |
1471 | Moralis has recently updated to a self-hosted server over their own server. For this, you can do one of the following:
1472 | - [Learn how to run one yourself](https://www.youtube.com/watch?v=9GtysZs-FrA)
1473 | - Follow along to learn the concepts of this more interactive app, without actually coding along
1474 | - Skip to the section where we interact with the graph
1475 |
1476 | TL;DR: TheGraph code should work exactly the same as the video, however the Moralis code will not.
1477 |
1478 | 💻 Code:
1479 | - Backend (Contracts): https://github.com/PatrickAlphaC/hardhat-nft-marketplace-fcc
1480 | - Frontend (Moralis Indexer): https://github.com/PatrickAlphaC/nextjs-nft-marketplace-moralis-fcc
1481 | - Frontend (TheGraph Indexer): https://github.com/PatrickAlphaC/nextjs-nft-marketplace-thegraph-fcc
1482 | - The Graph: https://github.com/PatrickAlphaC/graph-nft-marketplace-fcc
1483 |
1484 | Special thanks to [Matt Durkin](https://twitter.com/mdurkin92) for help with this section.
1485 |
1486 | ## Introduction
1487 | - [Opensea](https://opensea.io/)
1488 | - [Artion](https://github.com/Fantom-foundation/Artion-Contracts)
1489 | ## Part I: NFT Marketplace Contracts
1490 | ### Hardhat Setup
1491 | ### NftMarketplace.sol
1492 | - [Pull Over Push](https://fravoll.github.io/solidity-patterns/pull_over_push.html)
1493 | ## Reentrancy
1494 | - [Reentrancy](https://solidity-by-example.org/hacks/re-entrancy)
1495 | - [Rekt.news](https://rekt.news/leaderboard/)
1496 | - [Openzeppelin NonReentrant](https://docs.openzeppelin.com/contracts/4.x/api/security#ReentrancyGuard)
1497 | ### NftMarketplace.sol - Continued
1498 | ### NftMarketplace.sol - Deploy Script
1499 | ### NftMarketplace.sol - Tests
1500 | ### NftMarketplace.sol - Scripts
1501 |
1502 | ## Part II: Moralis Front End
1503 | ### What is Moralis?
1504 | - [Special Guest Ivan Liljeqvist](https://twitter.com/IvanOnTech)
1505 | ### NextJS Setup
1506 | - [Link NextJS](https://nextjs.org/docs/api-reference/next/link)
1507 | ### Adding Tailwind
1508 | - [Tailwind with NextJS](https://tailwindcss.com/docs/guides/nextjs)
1509 | ### Introduction to Indexing in Web3
1510 | - [TheGraph](https://thegraph.com/en/)
1511 | - [Moralis](https://moralis.io/)
1512 | ### Connecting Moralis to our Local Hardhat Node
1513 | - [NextJS Environment Variables](https://nextjs.org/docs/basic-features/environment-variables)
1514 | - [Reverse Proxy FRP](https://github.com/fatedier/frp/releases)
1515 | - [Docs](https://docs.moralis.io/moralis-dapp/web3/setting-up-ganache)
1516 | - [Trouble Shooting](https://docs.moralis.io/faq#frpc)
1517 | - [Moralis Forum](https://forum.moralis.io/)
1518 | - [Moralis Admin CLI](https://docs.moralis.io/moralis-dapp/tools/moralis-admin-cli)
1519 | ### Moralis Event Sync
1520 | - [Moralis Add Event Sync From Code](https://docs.moralis.io/moralis-dapp/connect-the-sdk/connect-using-node#add-new-event-sync-from-code)
1521 | #### Reset Local Chain
1522 | ### Moralis Cloud Functions
1523 | - [Moralis Cloud Functions](https://docs.moralis.io/moralis-dapp/cloud-code/cloud-functions)
1524 | - [Moralis Logging](https://docs.moralis.io/moralis-dapp/tools/moralis-admin-cli#get-logs)
1525 | - [Hardhat Network Reference](https://hardhat.org/hardhat-network/reference/)
1526 | - Moralis Database only confirms a transaction with a block confirmation - so we need to move blocks on our hardhat local node.
1527 | - [Moralis Triggers](https://docs.moralis.io/moralis-dapp/cloud-code/triggers)
1528 | #### Practice Resetting the Local Chain
1529 | ### Moralis Cloud Functions II
1530 | ### Querying the Moralis Database
1531 | - [Moralis Queries](https://docs.moralis.io/moralis-dapp/database/queries)
1532 | ### Rendering the NFT Images
1533 | - [useNFTBalance](https://github.com/MoralisWeb3/react-moralis#usenftbalances)
1534 | - [fetch](https://www.npmjs.com/package/node-fetch)
1535 | - [next/image](https://nextjs.org/docs/api-reference/next/image#loader-configuration)
1536 | ### Update Listing Modal
1537 | ### Buy NFT Listing
1538 | ### Listing NFTs for Sale
1539 | - [web3uikit Form](https://web3uikit.com/)
1540 |
1541 | ## Part III: TheGraph Front End
1542 | ### Introduction
1543 | ### What is The Graph?
1544 | - [Special Guest Nader Dabit](https://twitter.com/dabit3)
1545 | ### Building a Subgraph
1546 | - [Example Subgraphs](https://thegraph.com/explorer/)
1547 | - [The Graph Studio](https://thegraph.com/studio/)
1548 | - [GraphQL VSCode Extension](https://marketplace.visualstudio.com/items?itemName=GraphQL.vscode-graphql)
1549 | - [GraphQL](https://graphql.org/)
1550 | ### Deploying our Subgraph
1551 | - [GraphQL Queries](https://www.tutorialspoint.com/graphql/graphql_query.htm)
1552 | ### Reading from The Graph
1553 | - [@apollo/client](https://www.npmjs.com/package/@apollo/client)
1554 | - [gql](https://www.npmjs.com/package/gql)
1555 | - [The Graph Docs](https://thegraph.com/docs/en/)
1556 | ### Hosting our Dapp
1557 |
1558 | 🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊 Completed Front End Basics! 🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊
1559 |
1560 | # Lesson 16: Hardhat Upgrades
1561 |
1562 | *[⌨️ (28:53:11) Lesson 16: Hardhat Upgrades](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=103991s)*
1563 |
1564 | 💻 Code: https://github.com/PatrickAlphaC/hardhat-upgrades-fcc
1565 |
1566 | ## Upgradable Smart Contracts Overview
1567 | - [Optional Video](https://www.youtube.com/watch?v=bdXJmWajZRY)
1568 | - [Links from Video]
1569 | ## Types of Upgrades
1570 | 1. Parameter
1571 | 2. Social Migrate
1572 | 3. Proxy
1573 | 1. Proxy Gotchas
1574 | 1. [Function Collisions](https://blog.openzeppelin.com/the-state-of-smart-contract-upgrades/#diamonds)
1575 | 2. [Storage Collisions](https://blog.openzeppelin.com/the-state-of-smart-contract-upgrades/#diamonds)
1576 | 2. [Metamorphic Upgrades](https://github.com/PatrickAlphaC/hardhat-metamorphic-upgrades-fcc)
1577 | 3. [Transparent](https://blog.openzeppelin.com/the-transparent-proxy-pattern/)
1578 | 4. [UUPS](https://forum.openzeppelin.com/t/uups-proxies-tutorial-solidity-javascript/7786)
1579 | 5. [Diamond](https://eips.ethereum.org/EIPS/eip-2535)
1580 | ## Delegatecall
1581 | - [delegatecall (solidity-by-example)](https://solidity-by-example.org/delegatecall)
1582 | - [Yul](https://docs.soliditylang.org/en/latest/yul.html)
1583 | ## Small Proxy Example
1584 | - [EIP 1967](https://eips.ethereum.org/EIPS/eip-1967)
1585 | ## Transparent Upgradable Smart Contract
1586 | - [Hardhat-deploy Proxies](https://github.com/wighawag/hardhat-deploy#deploying-and-upgrading-proxies)
1587 | - [Openzeppelin Upgrades Plugin](https://docs.openzeppelin.com/upgrades-plugins/1.x/)
1588 | - [Openzeppelin upgrades tutorial](https://forum.openzeppelin.com/t/openzeppelin-upgrades-step-by-step-tutorial-for-hardhat/3580)
1589 | - [hardhat deploy upgrades examples](https://github.com/wighawag/template-ethereum-contracts/tree/examples/openzeppelin-proxies/deploy)
1590 |
1591 |
1592 | # Lesson 17: Hardhat DAOs
1593 |
1594 | *[⌨️ (29:45:24) Lesson 17: Hardhat DAOs](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=107124s)*
1595 |
1596 | ⬆️ Up-to-date code: https://github.com/PatrickAlphaC/dao-template
1597 |
1598 | 💻 Code from video: https://github.com/PatrickAlphaC/hardhat-dao-fcc
1599 |
1600 | ## Introduction
1601 | ## What is a DAO?
1602 | - [What is a DAO?](https://www.youtube.com/watch?v=X_QKZzd68ro)
1603 | ## How to build a DAO
1604 | - [How to build a DAO](https://www.youtube.com/watch?v=AhJtmUqhAqg)
1605 | - That's Patrick
1606 | - [PY Code](https://github.com/brownie-mix/dao-mix)
1607 | - [Python Video](https://www.youtube.com/watch?v=rD8AxZ_wBA4)
1608 | - [Openzeppelin Governance](https://docs.openzeppelin.com/contracts/4.x/api/governance)
1609 | - [Compound Governance](https://compound.finance/governance)
1610 | - [Contract Wizard](https://docs.openzeppelin.com/contracts/4.x/wizard)
1611 | - [CastVoteBySig](https://forum.openzeppelin.com/t/what-is-votecastbysig/17069/2)
1612 |
1613 | # Lesson 18: Security & Auditing
1614 |
1615 | *[⌨️ (31:28:32) Lesson 18: Security & Auditing ](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=113312s)*
1616 |
1617 | 💻 Code: https://github.com/PatrickAlphaC/hardhat-security-fcc
1618 |
1619 | ## Introduction
1620 | - [Readiness Guide](https://learn.openzeppelin.com/security-audits/readiness-guide)
1621 | ## Slither
1622 | - [Install python](https://www.python.org/downloads/)
1623 | - [Slither](https://github.com/crytic/slither#how-to-install)
1624 | - [solc-select](https://github.com/crytic/solc-select)
1625 | - [Fuzz testing](https://en.wikipedia.org/wiki/Fuzzing)
1626 | ## Fuzzing and Eth Security Toolbox
1627 | - [Echidna](https://github.com/crytic/echidna)
1628 | - [Docker Install](https://docs.docker.com/get-docker/)
1629 | - [Eth-Security-ToolBox](https://github.com/trailofbits/eth-security-toolbox)
1630 | ## Closing Thoughts
1631 | - [Best Practices](https://consensys.github.io/smart-contract-best-practices/)
1632 | - [Attacks](https://consensys.github.io/smart-contract-best-practices/attacks/)
1633 | - [Oracle Attacks](https://hackernoon.com/how-dollar100m-got-stolen-from-defi-in-2021-price-oracle-manipulation-and-flash-loan-attacks-explained-3n6q33r1)
1634 | - [Re-entrancy Attacks](https://quantstamp.com/blog/what-is-a-re-entrancy-attack)
1635 | - [Damn Vulnerable Defi](https://www.damnvulnerabledefi.xyz/)
1636 | - [Ethernaut](https://ethernaut.openzeppelin.com/)
1637 | - Some Auditors:
1638 | - [OpenZeppelin](https://openzeppelin.com/)
1639 | - [SigmaPrime](https://sigmaprime.io/)
1640 | - [Trail of Bits](https://www.trailofbits.com/)
1641 |
1642 | # Congratulations
1643 |
1644 | 🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊 Completed The Course! 🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊
1645 |
1646 | ## Where do I go now?
1647 |
1648 | ### Learning More
1649 |
1650 | - [CryptoZombies](https://cryptozombies.io/)
1651 | - [Patrick Collins](https://www.youtube.com/channel/UCn-3f8tw_E1jZvhuHatROwA)
1652 | - [Dapp University](https://www.youtube.com/channel/UCY0xL8V6NzzFcwzHCgB8orQ)
1653 | - [ChainShot](https://www.chainshot.com/courses)
1654 | - [Cami Ramos Garzon](https://twitter.com/camiinthisthang)
1655 | - [Albert Hu](https://twitter.com/thatguyintech)
1656 | - [Ivan Liljeqvist](https://twitter.com/IvanOnTech)
1657 | - [Ally Haire](https://twitter.com/DeveloperAlly)
1658 | - [Stephen Fluin](https://twitter.com/stephenfluin)
1659 | - [Eat the Blocks](https://www.youtube.com/channel/UCZM8XQjNOyG2ElPpEUtNasA)
1660 | - [Austin Griffith](https://www.youtube.com/channel/UC_HI2i2peo1A-STdG22GFsA)
1661 | - [Nader Dabit](https://www.youtube.com/user/boyindasouth)
1662 | - [Ethereum.org](https://ethereum.org/en/)
1663 |
1664 | ### Community
1665 |
1666 | - [Twitter](https://twitter.com/PatrickAlphaC)
1667 | - [Hardhat Discord](https://hardhat.org/discord)
1668 | - [Ethereum Python Community Discord](https://discord.gg/9zk7snTfWe)
1669 | - [Chainlink Discord](https://discord.gg/2YHSAey)
1670 | - [Ethereum Discord](https://ethereum.org/en/)
1671 | - [Reddit ethdev](https://www.reddit.com/r/ethdev/)
1672 |
1673 | ### Hackathons
1674 |
1675 | - [CL Hackathon](https://chain.link/hackathon)
1676 | - [ETHGlobal](https://ethglobal.com/)
1677 | - [ETHIndia](https://ethindia.co/)
1678 |
1679 | Be sure to check out project grant programs!
1680 |
1681 | And make today an amazing day!
1682 |
1683 | # Thank you
1684 |
1685 | Thanks to everyone who is taking, participating in, and working on this course. It's been a passion project and a data dump of everything I've learnt in the web3 space to get you up to speed quickly. Also, a big thank you to Chainlink Labs for encouraging this course to come to light-and to the many Chainlink Labs team members who helped with various assets!
1686 |
1687 | [](https://twitter.com/PatrickAlphaC)
1688 | [](https://www.youtube.com/channel/UCn-3f8tw_E1jZvhuHatROwA)
1689 | [](https://www.linkedin.com/in/patrickalphac/)
1690 | [](https://medium.com/@patrick.collins_58673/)
1691 |
1692 |
1693 |
--------------------------------------------------------------------------------
/chronological-updates.md:
--------------------------------------------------------------------------------
1 | # Chronological Updates
2 |
3 | This file will contain all updates to sections.
4 |
5 | # Lesson 5
6 | ## Windows, WSL, & Ganache
7 | - Per [this question](https://github.com/smartcontractkit/full-blockchain-solidity-course-js/discussions/34#discussioncomment-2846436), if you're using WSL, for the ganache UI you'll have to use a different endpoint.
8 |
9 | You have 4 options to fix this:
10 | 1. Use the WSL endpoint on the ganache UI (this sometimes doesn't work)
11 | 2. Use `ganache` from the command line
12 | 3. Use `ganache-cli` from the command line (not recommended)
13 | 4. Just use `hardhat` from the command line (you'll have to use hardhat at some point anyways!)
14 |
15 | ### Using the WSL Endpoint
16 | On the Ganache UI, you can select a different hostname and connect to whatever IP you see. In the example below, you'd connect to `172.24.224.1`
17 |
18 | 
19 |
20 | You can also try to edit it by:
21 |
22 | 1. Inside Ganache in the top-right corner tap on the gear icon (settings).
23 | 2. Then in the server tab, change the HOSTNAME and select 0.0.0.0 - All Interfaces.
24 | 3. Now replace your RPC Server URL inside the code with this latest URL that will be something like: HTTP://0.0.0.0.7545. Recheck this from Ganache.
25 |
26 | ### Using `ganache`
27 |
28 | ```
29 | yarn global add ganache
30 | ganache
31 | ```
32 |
33 | Keep this running in it's own terminal, and use the endpoint it gives you. To kill it, press `CTRL` + `C`.
34 |
35 | [See the discussion here](https://github.com/smartcontractkit/full-blockchain-solidity-course-js/discussions/34)
36 |
37 | ### Using `ganache-cli` from the command line.
38 | Or, optionally, you can install `ganache-cli` [as this user did](https://github.com/smartcontractkit/full-blockchain-solidity-course-js/discussions/39#discussioncomment-2854165).
39 |
40 | ```
41 | yarn global add ganache-cli
42 | ganache-cli
43 | ```
44 |
45 | Keep this running in it's own terminal, and use the endpoint it gives you. To kill it, press `CTRL` + `C`.
46 |
47 | ### Using `hardhat`
48 |
49 | [See the discussion here](https://github.com/smartcontractkit/full-blockchain-solidity-course-js/discussions/90#discussioncomment-2871657)
50 |
51 | ```
52 | yarn add --dev hardhat
53 | yarn hardhat
54 | ```
55 |
56 | Then select the `Create an empty hardhat.config.js`
57 |
58 | Then run:
59 |
60 | ```
61 | yarn hardhat node
62 | ```
63 |
64 | Keep this running in it's own terminal, and use the endpoint it gives you. To kill it, press `CTRL` + `C`.
65 |
66 |
67 | --------
68 |
69 | # Lesson 6
70 |
71 | ## New Hardhat Setup
72 |
73 | As of `2.10.0` version of hardhat, when you first run `yarn hardhat` you'll get something like this instead:
74 |
75 | ```bash
76 | 888 888 888 888 888
77 | 888 888 888 888 888
78 | 888 888 888 888 888
79 | 8888888888 8888b. 888d888 .d88888 88888b. 8888b. 888888
80 | 888 888 "88b 888P" d88" 888 888 "88b "88b 888
81 | 888 888 .d888888 888 888 888 888 888 .d888888 888
82 | 888 888 888 888 888 Y88b 888 888 888 888 888 Y88b.
83 | 888 888 "Y888888 888 "Y88888 888 888 "Y888888 "Y888
84 |
85 | 👷 Welcome to Hardhat v2.10.0 👷
86 |
87 | ? What do you want to do? …
88 | ❯ Create a JavaScript project
89 | Create a TypeScript project
90 | Create an empty hardhat.config.js
91 | Quit
92 | ```
93 |
94 | It's _roughly_ similar to the options in our video, but you can just pick the `JavaScript project` whenever we don't pick the `empty hardhat.config.js`.
95 |
96 | [You can read more about the changes here.](https://twitter.com/HardhatHQ/status/1545124474470760449)
97 |
98 | ----------
99 |
100 | # Lesson 7
101 |
102 | ## New Hardhat Setup
103 |
104 | As the previous section has highlighted, changes in the hardhat version changed the hardhat startup menu. You can choose to go with the new menu but if you feel lost and still want to access the old one used in the video, you can do so by installing `hardhat v2.9.3`
105 |
106 | Run `yarn add --dev hardhat@2.9.3`
107 |
108 | ---------
109 |
110 | # Lesson 9
111 |
112 | ## Keepers new UI
113 |
114 | Per [this conversation](https://github.com/smartcontractkit/full-blockchain-solidity-course-js/discussions/606#discussioncomment-3037792), when you get to the new Keepers UI, select "Custom Logic"
115 |
116 | More information: https://github.com/smartcontractkit/full-blockchain-solidity-course-js/discussions/606#discussioncomment-3037792
117 |
118 | ## Keepers Not Kicking Off Troubleshooting
119 |
120 | If your keepers are not kicking off, run through this checklist to find out why.
121 |
122 | 1. Double check the subscription ID in your contract
123 | 2. Double check the subscription is funded with enough LINK
124 | 3. Is `checkUpkeep` returning true?
125 | 4. Can you call `performUpkeep` yourself? (If you can't the keeper can't!)
126 |
127 |
128 | -------
129 | # Lesson 14
130 |
131 | ## Math on NFT Chance Array
132 |
133 | The ```getBreedFromModdedRng()``` function in RandomIpfsNft.sol gets the math wrong.
134 |
135 | line 104,
136 | ```solidity
137 | if (moddedRng >= cumulativeSum && moddedRng < cumulativeSum + chanceArray[i]) {
138 | return Breed(i);
139 | }
140 | cumulativeSum = cumulativeSum + chanceArray[i];
141 | ```
142 | needs to be changed to
143 | ```solidity
144 | if (moddedRng >= cumulativeSum && moddedRng < chanceArray[i]) {
145 | return Breed(i);
146 | }
147 | cumulativeSum = chanceArray[i];
148 | ```
149 |
150 | The chanceArray[] array already has a cumulative probability distribution, no need to keep adding cumulativeSum to it.
151 |
152 | According to the current algorithm:
153 | ```
154 | moddedRng produced is between 0 and 99
155 | chanceArray=[10,30,100]
156 | ```
157 | ```
158 | PUG is produced if moddedRng is between [0,10) = span of 10
159 | SHIBA is produce if moddedRng is between [10,40) = span of 30
160 | BERNARD is produced if moddedRng is between [40,140] = span of 60 (since moddedRng<100)
161 | ```
162 | So the actual probabilities according to the current algo is
163 | ``` [10%,30%,60%] ```
164 | and not
165 | ``` [10%,20%,70%]```
166 | as would be expected from a proper cumulative probability distribution function.
167 |
168 | -------
169 |
170 | # Lesson 15
171 |
172 | ## Metamask Troubleshooting while using Gitpod
173 |
174 | - Remember if you are using gitpod then you cannot connect your local hardhat node with metamask. To resolve this you can use vs code or testnets instead of local node.
175 |
176 | # Large Update, please read
177 | Moralis has recently updated to a self-hosted server over their own server. For this, you can do one of the following:
178 |
179 | - Learn how to run one yourself
180 | - Follow along to learn the concepts of this more interactive app, without actually coding along
181 | - Skip to the section where we interact with the graph
182 |
183 | TL;DR: TheGraph code should work exactly the same as the video, however the Moralis code will not.
184 |
185 | --------
186 |
187 |
188 |
--------------------------------------------------------------------------------
/how-to-answer-a-question.md:
--------------------------------------------------------------------------------
1 | # How to answer questions
2 |
3 | Thank you for wanting to answer questions! This is how we grow as a community :)
4 |
5 | 1. Make sure the question follows the "how-to-ask-a-good-question" guide
6 | 2. Make sure your answer unblocks the user
7 | 3. Remember, this is living documentation!
8 | 4. Format your answers, like in the `how-to-ask-a-question` guide.
9 |
10 |
11 | # 1. Make sure the question follows the "how-to-ask-a-good-question" guide
12 |
13 | If the question is poorly formatted and you know how to reformat it reformat it and ask them next time to format their code.
14 |
15 | If the question is posted in the wrong place (like a theoretical question posted on stackoverflow) kindly let them know that it's in the wrong place.
16 |
17 | If the question has already been asked and answered, answer with a link to the question that has already been asked and answered and ask if that solves the problem.
18 |
19 | If the problem has a poor title, doesn't make sense to others, etc, feel free to edit the question to what does if you can understand it. If not, you can answer saying "I don't quite understand what you're asking, could you reformat your question following the "how to ask a question" guide?
20 |
21 | If they used screenshots, feel free to ask them to copy-paste the code.
22 |
23 | Or, feel free to ignore it. This is a community run forum and no one is "entitled to" answers! Be nice, be respectful, and have fun. But if you do know how to help someone, a little "could you please refactor your question" can go a long way!
24 |
25 | ### Don't feel obliged to help right away if they are not asking well-formatted questions. Make them ask a well-formatted question first before you answer!
26 |
27 | But don't be a jerk about it. If they just need a little formatting touch up, just touch up their question for them.
28 |
29 | # 2. Make sure your answer unblocks them
30 |
31 | Often times, people will ask questions where the answer might be X, but they are trying to do Y. Try to anticipate what people are trying to do. Answer the question at face value, and then maybe give more information on where to go next.
32 |
33 | Often, giving a summary of your answer at the top with copy pasteable code, and then a "more information" is a best practice.
34 |
35 | # 3. Remember this is living documentation!
36 |
37 | Treat it as such. Go back and update answers if you find them!
38 |
39 | # 4. Format your answers, like in the `how-to-ask-a-question` guide.
40 |
41 | See that guide for more information.
--------------------------------------------------------------------------------
/how-to-ask-a-question.md:
--------------------------------------------------------------------------------
1 | # How to ask a question
2 |
3 | > Note: Before reading this, you might want to read my guide on [top 6 tips to solve any software engineering error](https://medium.com/better-programming/top-6-tips-to-solve-any-software-engineering-error-a794a162fcaf).
4 |
5 | Also note, take this pledge: "I solemnly swear that after asking a question I will spend at least 5 minutes trying to answer someone else's question. I will consult the 'How to answer a question' page before I do so. "
6 |
7 | The internet is our documentation, and we want to treat is as such. **Every** *specific* question we have *should* be able to be found by typing it into a web search bar.
8 |
9 | Now, there are no "bad" questions, but there are poorly-formatted questions. A poorly formatted question has a low chance of being answered, poor chance of being discovered, and can "clutter up" forums and discussion boards. So let's make sure we strive for well-formatted questions!
10 |
11 | # Full Examples at the bottom!
12 |
13 | Here are the steps to ask a well-formatted question:
14 |
15 | 1. Search to see if the question has already been asked
16 | 2. Know where to post your question
17 | 3. Make a title that summarizes the problem
18 | 4. Introduce the problem before writing any code
19 | 5. Make sure you format code using backticks (```) and a language tag
20 | 6. Make sure you copy paste your code instead of using screenshots
21 | 7. Make sure your code is a minimal example
22 |
23 |
24 | # 1. Search to see if the question has already been asked
25 |
26 | ## Do not skip this step!
27 |
28 | We should think of the internet as one giant document. If a question has already been asked and you can find it on the first page of your search engine, it's good! Don't ask the question again!
29 |
30 | And if it's not on the first page of your search results, then **yes, you should 100% ask the question on a forum even if you know the answer.**
31 |
32 | We want every tech question ever to be:
33 |
34 | 1. Indexed by search engines
35 | 2. Easy to find
36 | 3. Easy to reproduce
37 |
38 | So that in 6 months when you forget the answer, you can just google it and it'll show up!
39 |
40 | We don't want there to be multiple questions, because that can fragment where people look! We want to add answers, comments, etc all in one place
41 |
42 | # 2. Know where to post your question
43 |
44 | I categorize questions into one of three:
45 |
46 | - Specific code based questions
47 | - Generic theoretical questions
48 | - "In the know", support, or emergency questions
49 |
50 | ## Specific code based questions
51 |
52 | These are what we strive for. These are reproducible questions that help the world. You'll want to put these questions in places like:
53 |
54 | - The "Q&A" discussions section of this course
55 | - stackoverflow
56 | - stack exchange ETH.
57 |
58 | These are questions that typically can have a "right" or "many right answers". Generally, these are not very opinionated questions.
59 |
60 | These are questions like "How to convert bytes32 to uint256".
61 |
62 | ## Generic Theoretical Questions
63 |
64 | These are questions that likely do not have a canonical answer. These are questions like "which blockchain should I deploy to?" or "How could I make a game that involves many random characters?". They belong in places like:
65 |
66 | - The "General" discussions section of this course
67 | - A generic forum like Reddit, Twitter
68 | - Discord (like some of the ones people have started here)
69 |
70 | Ideally, you put these on an indexed forum like reddit and the general discussions section instead of discord so others can do a web search for the problems.
71 |
72 | ## "In the know", support, or emergency questions
73 |
74 | These are very specific use cases and 99% of your questions will not be these kinds. These are questions like "we just got hacked, can you help us?", "Want to join my team", etc. They are questions that likely only apply to your situation and what you are doing. They belong in:
75 |
76 | - Discord DMs
77 | - Email
78 | - etc
79 |
80 | And should be used *very* sparingly.
81 |
82 | # 3. Make a title that summarizes the problem
83 |
84 | It should be minimal, searchable, indexable (by search engines).
85 |
86 | ## Examples:
87 | Bad:
88 | - I'm stuck, please help
89 |
90 | Good:
91 | - Could Not Detect Network using WSL & Ganache
92 |
93 | Bad:
94 | - hardhat error
95 |
96 | Good:
97 | - TypeError: Cannot read property 'length' of undefined - when deploying contract
98 |
99 | # 4. Introduce the problem before writing any code
100 |
101 | In the body of the question, say what you're trying to do, what you've done, and give a summary of your problem.
102 |
103 | With this course in the discussions tab, you may also give a timestamp of where you're getting the issue (in fact, please give a timestamp with a link to the location in the video).
104 |
105 | # 5. Make sure you format code using backticks (```) and a language tag
106 |
107 | You'll want to format your question so it's as easy as possible to read! Especially with your code snippets.
108 |
109 | Your code should show up like this:
110 |
111 | ```javascript
112 | // my code here
113 | ```
114 |
115 | In your question, you'll type it like this:
116 |
117 | ````
118 | ```javascript
119 | // my code here
120 | ```
121 | ````
122 |
123 | If it doesn't get formatted, you can edit your question (usually, you can click the three little dots at the top right of your question) to make it formatted nicely.
124 |
125 | # 6. Make sure you copy paste your code instead of using screenshots
126 |
127 | We want web crawlers to index every word you write, so even copy paste errors (and format them with 3 backticks!)
128 |
129 |
130 | # 7. Make sure your code is a minimal example
131 |
132 | There are two types of code questions:
133 |
134 | - Debug me
135 | - Specific questions
136 |
137 | Don't be a "Debug Me"
138 |
139 | ## Example of a poorly formatted question (a debug me question):
140 |
141 | Hi I'm confused my code isn't working here is all my code
142 |
143 | ```javascript
144 | // pretend I pasted like 300 lines of code here
145 | ```
146 |
147 | ## Example of a much better question
148 |
149 | I'm getting `error x` on line 42 of my code:
150 |
151 | ```javascript
152 | const some_var = "dog"
153 | // this is the line that is erroring
154 | ```
155 |
156 | [More information on reproducible code.](https://stackoverflow.com/help/minimal-reproducible-example)
157 |
158 |
159 |
160 |
--------------------------------------------------------------------------------
/img/blockchain1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PatrickAlphaC/full-blockchain-solidity-course-js/ef4b66a380b386651c695e3fc771f2c2e3e45a95/img/blockchain1.png
--------------------------------------------------------------------------------
/img/ganache-windows.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PatrickAlphaC/full-blockchain-solidity-course-js/ef4b66a380b386651c695e3fc771f2c2e3e45a95/img/ganache-windows.png
--------------------------------------------------------------------------------
/img/hh-fcc-background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PatrickAlphaC/full-blockchain-solidity-course-js/ef4b66a380b386651c695e3fc771f2c2e3e45a95/img/hh-fcc-background.png
--------------------------------------------------------------------------------