├── .gitignore
├── .DS_Store
├── img
├── blockchain1.png
├── ganache-windows.png
└── hh-fcc-background.png
├── .github
└── ISSUE_TEMPLATE
│ ├── config.yml
│ ├── repo_enhancement.yml
│ ├── video_mistake.yml
│ └── code_mistake.yml
├── how-to-answer-a-question.md
├── chronological-updates.md
├── how-to-ask-a-question.md
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | script.md
2 |
--------------------------------------------------------------------------------
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NFTMerchant/32hourcourse/HEAD/.DS_Store
--------------------------------------------------------------------------------
/img/blockchain1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NFTMerchant/32hourcourse/HEAD/img/blockchain1.png
--------------------------------------------------------------------------------
/img/ganache-windows.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NFTMerchant/32hourcourse/HEAD/img/ganache-windows.png
--------------------------------------------------------------------------------
/img/hh-fcc-background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NFTMerchant/32hourcourse/HEAD/img/hh-fcc-background.png
--------------------------------------------------------------------------------
/.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 |
--------------------------------------------------------------------------------
/.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 |
--------------------------------------------------------------------------------
/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.
--------------------------------------------------------------------------------
/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 | # Lesson 9
99 |
100 | ## Keepers new UI
101 |
102 | 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"
103 |
104 | More information: https://github.com/smartcontractkit/full-blockchain-solidity-course-js/discussions/606#discussioncomment-3037792
105 |
106 | ## Keepers Not Kicking Off Troubleshooting
107 |
108 | If your keepers are not kicking off, run through this checklist to find out why.
109 |
110 | 1. Double check the subscription ID in your contract
111 | 2. Double check the subscription is funded with enough LINK
112 | 3. Is `checkUpkeep` returning true?
113 | 4. Can you call `performUpkeep` yourself? (If you can't the keeper can't!)
114 |
115 |
116 | -------
117 | # Lesson 14
118 |
119 | ## Math on NFT Chance Array
120 |
121 | The ```getBreedFromModdedRng()``` function in RandomIpfsNft.sol gets the math wrong.
122 |
123 | line 104,
124 | ```solidity
125 | if (moddedRng >= cumulativeSum && moddedRng < cumulativeSum + chanceArray[i]) {
126 | return Breed(i);
127 | }
128 | cumulativeSum = cumulativeSum + chanceArray[i];
129 | ```
130 | needs to be changed to
131 | ```solidity
132 | if (moddedRng >= cumulativeSum && moddedRng < chanceArray[i]) {
133 | return Breed(i);
134 | }
135 | cumulativeSum = chanceArray[i];
136 | ```
137 |
138 | The chanceArray[] array already has a cumulative probability distribution, no need to keep adding cumulativeSum to it.
139 |
140 | According to the current algorithm:
141 | ```
142 | moddedRng produced is between 0 and 99
143 | chanceArray=[10,30,100]
144 | ```
145 | ```
146 | PUG is produced if moddedRng is between [0,10) = span of 10
147 | SHIBA is produce if moddedRng is between [10,40) = span of 30
148 | BERNARD is produced if moddedRng is between [40,140] = span of 60 (since moddedRng<100)
149 | ```
150 | So the actual probabilities according to the current algo is
151 | ``` [10%,30%,60%] ```
152 | and not
153 | ``` [10%,20%,70%]```
154 | as would be expected from a proper cumulative probability distribution function.
155 |
156 | -------
157 |
158 | # Lesson 15
159 |
160 | ## Metamask Troubleshooting while using Gitpod
161 |
162 | - 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.
163 |
164 |
165 | --------
166 |
167 |
168 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
12 | # Web3, Full Stack Solidity, Smart Contract & Blockchain - Beginner to Expert ULTIMATE Course | Javascript Edition
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | Welcome to the repository for the Ultimate Web3, Full Stack Solidity, and Smart Contract - Beginner to Expert Full Course | Javascript Edition FreeCodeCamp Course!
23 |
24 | # Link to video: https://www.youtube.com/watch?v=gyMwXuJrbJQ
25 |
26 | All code references have both a javascript and a typescript edition.
27 |
28 | Recommended Testnet: Rinkeby
29 |
30 | # [Testnet Faucets](https://faucets.chain.link)
31 | Main Faucet: https://faucets.chain.link
32 |
33 | Backup Faucet: https://rinkebyfaucet.com/
34 |
35 | > ⚠️ 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.
36 |
37 | # Resources For This Course
38 |
39 | ### Questions
40 |
41 | - [Github Discussions](https://github.com/smartcontractkit/full-blockchain-solidity-course-js/discussions)
42 | - Ask questions and chat about the course here!
43 | - [Stack Exchange Ethereum](https://ethereum.stackexchange.com/)
44 | - Great place for asking technical questions about Ethereum
45 | - [StackOverflow](https://stackoverflow.com/)
46 | - Great place for asking technical questions overall
47 |
48 |
49 | # Table of Contents
50 |
51 |
52 | Resources
53 |
54 | - Testnet Faucets
55 | - Resources For This Course
58 |
59 | - Table of Contents
60 |
61 |
62 |
63 | Lesson 0: The Edge of the Rabbit Hole
64 |
65 | -
66 | Welcome to the course!
67 |
68 | -
69 | Best Practices
70 |
71 |
72 |
73 |
74 | Lesson 1: Blockchain Basics
75 |
76 | -
77 | What is a Blockchain? What does a blockchain do?
78 |
79 | - The Purpose Of Smart Contracts
80 | - Other Blockchain Benefits
81 | - What have Smart Contracts done so far?
82 | - Making Your First Transaction
83 | - Gas I: Introduction to Gas
84 | - How Do Blockchains Work?
85 | - Signing Transactions
86 | - Gas II
87 | - High-Level Blockchain Fundamentals
88 |
89 |
90 |
91 | Lesson 2: Welcome to Remix! Simple Storage
92 |
93 | - Introduction
94 | - Setting Up Your First Contract
95 | - Basic Solidity: Types
96 | - Basic Solidity: Functions
97 | - Basic Solidity: Arrays & Structs
98 | - Basic Solidity: Compiler Errors and Warnings
99 | - Memory, Storage, Calldata (Intro)
100 | - Mappings
101 | - Deploying your First Contract
102 | - The EVM & A Recap of Lesson 2
103 |
104 |
105 |
106 | Lesson 3: Remix Storage Factory
107 |
108 | - Introduction
109 | - Basic Solidity: Importing Contracts into other Contracts
110 | - Basic Solidity: Interacting with other Contracts
111 | - Basic Solidity: Inheritance & Overrides
112 | - Lesson 3 Recap
113 |
114 |
115 |
116 | Lesson 4: Remix Fund Me
117 |
118 | - Introduction
119 | - Sending ETH Through a Function & Reverts
120 | - Chainlink & Oracles
121 | - Review of Sending ETH and working with Chainlink
122 | - Interfaces & Price Feeds
123 | - Importing from GitHub & NPM
124 | - Floating Point Math in Solidity
125 | - Basic Solidity: Arrays & Structs II
126 | - Review of Interfacs, Importing from GitHub, & Math in Solidity
127 | - Libraries
128 | - SafeMath, Overflow Checking, and the "unchecked" keywork
129 | - Basic Solidity: For Loop
130 | - Basic Solidity: Resetting an Array
131 | - Sending ETH from a Contract
132 | - Basic Solidity: Constructor
133 | - Basic Solidity: Modifiers
134 | - Testnet Demo
135 | - Advanced Solidity
141 |
142 |
143 | Lesson 5: Ethers.js Simple Storage
144 |
145 | - Effective Debugging Strategies & Getting Help
148 |
149 | - Installation & Setup
154 |
155 | - Local Development Introduction
158 |
159 | - Tiny Javascript Refresher
160 | - Asynchronous Programming in Javascript
161 | - Compiling our Solidity
162 | - Ganache & Networks
163 | - Introduction to Ethers.js
166 |
167 | - Adding Transaction Overrides
168 | - Transaction Receipts
169 | - Sending a "raw" Transaction in Ethersjs
170 | - Interacting with Contracts in Ethersjs
171 | - Environment Variables
172 | - Better Private Key Management
173 | - Optional Prettier Formatting
174 | - Deploying to a Testnet or a Mainnet
175 | - Verifying on Block Explorers from the UI
176 | - Alchemy Dashboard & The Mempool
177 | - Lesson 5 Recap
180 |
181 |
182 |
183 |
184 | Lesson 6: Hardhat Simple Storage
185 |
186 | - Introduction
187 | - Hardhat Setup
190 |
191 | - Hardhat Setup Continued
192 | - Deploying SimpleStorage from Hardhat
193 | - Networks in Hardhat
194 | - Programatic Verification
195 | - Interacting with Contracts in Hardhat
196 | - Artifacts Troubleshooting
197 | - Custom Hardhat Tasks
198 | - Hardhat Localhost Node
199 | - The Hardhat Console
200 | - Hardhat Tests
201 | - Hardhat Gas Reporter
202 | - Solidity Coverage
203 | - Hardhat Waffle
204 | - Lesson 6 Recap
207 |
208 |
209 |
210 |
211 | Lesson 7: Hardhat Fund Me
212 |
213 | - Introduction
214 | - Hardhat Setup - Fund Me
215 | - Linting
216 | - Hardhat Setup - Fund Me - Continued
217 | - Importing from NPM
218 | - Hardhat Deploy
219 | - Mocking
220 | - Utils Folder
221 | - Testnet Demo - Hardhat Fund Me
222 | - Solidity Style Guide
223 | - Testing Fund Me
224 | - Breakpoints & Debugging
225 | - Gas III:
226 | - console.log & Debugging
227 | - Testing Fund Me II
228 | - Storage in Solidity
229 | - Gas Optimizations using Storage Knowledge
230 | - Solidity Chainlink Style Guide
231 | - Storage Review
232 | - Staging Tests
233 | - Running Scripts on a Local Node
234 | - Adding Scripts to your package.json
235 | - Pushing to GitHub
236 | - 🐸🐦 Tweet Me (add your repo in)!
237 |
238 |
239 |
240 | Lesson 8: HTML / Javascript Fund Me (Full Stack / Front End)
241 |
242 | - Introduction
243 | - How Websites work with Web3 Wallets
244 | - HTML Setup
245 | - Connecting HTML to Metamask
246 | - Javascript in it's own file
247 | - ES6 vs Nodejs
248 | - Sending a transaction from a Website
249 | - Resetting an Account in Metamask
250 | - Listening for Events and Completed Transactions
251 | - Input Forms
252 | - Reading from the Blockchain
253 | - Withdraw Function
254 | - Lesson 8 Recap
257 |
258 |
259 |
260 |
261 | Lesson 9: Hardhat Smart Contract Lottery
262 |
263 | - Introduction
264 | - Hardhat Setup - Smart Contract Lottery
265 | - Raffle.sol Setup
266 | - Introduction to Events
267 | - Events in Raffle.sol
268 | - Introduction to Chainlink VRF
271 |
272 | - Implementing Chainlink VRF - Introduction
275 |
276 | - Implementing Chainlink VRF - The Request
277 | - Implementing Chainlink VRF - The FulFill
280 |
281 | - Introduction to Chainlink Keepers
282 | - Implementing Chainlink Keepers - checkUpkeep
285 |
286 | - Implementing Chainlink Keepers - checkUpkeep continued
287 | - Implementing Chainlink Keepers - performUpkeep
288 | - Code Cleanup
289 | - Deploying Raffle.sol
293 |
294 | - Raffle.sol Unit Tests
298 |
299 | - Hardhat Methods & Time Travel
302 |
303 | - Callstatic
308 |
309 | - Raffle.sol Staging Tests
310 | - Testing on a Testnet
313 |
314 | - Conclusion
315 | - Typescript - Smart Contract Lottery
316 |
317 |
318 |
319 | Lesson 10: NextJS Smart Contract Lottery (Full Stack / Front End)
320 |
321 | - Introduction
324 |
325 | - NextJS Setup
326 | - Manual Header I
329 |
330 | - Manual Header II
331 | - useEffect Hook
332 | - Local Storage
333 | - isWeb3EnabledLoading
334 | - web3uikit
335 | - Introduction to Calling Functions in Nextjs
339 |
340 | - useState
341 | - Calling Functions in NextJS
342 | - useNotification
343 | - Reading & Displaying Contract Data
344 | - A Note about
onSuccess
345 | - A Challenge to You
346 | - Tailwind & Styling
347 | - Introduction to Hosting your Site
348 | - IPFS
349 | - Hosting on IPFS
350 | - Hosting on IPFS & Filecoin using Fleek
351 | - Filecoin Overview
352 | - Lesson 10 Recap
353 |
354 |
355 |
356 | Lesson 11: Hardhat Starter Kit
357 |
358 |
359 |
360 | Lesson 12: Hardhat ERC20s
361 |
362 | - What is an ERC? What is an EIP?
363 | - What is an ERC20?
364 | - Manually Creating an ERC20 Token
365 | - Creating an ERC20 Token with Openzeppelin
366 | - Lesson 12 Recap
367 |
368 |
369 |
370 |
371 | Lesson 13: Hardhat DeFi & Aave
372 |
373 | - What is DeFi?
374 | - What is Aave?
375 | - Programatic Borrowing & Lending
376 | - WETH - Wrapped ETH
377 | - Forking Mainnet
378 | - Depositing into Aave
379 | - Borrowing from Aave
380 | - Repaying with Aave
381 | - Visualizing the Transactions
382 | - Lesson 13 Recap
383 | - Happy Bow-Tie Friday with Austin Griffith
386 |
387 |
388 |
389 |
390 |
391 | Lesson 14: Hardhat NFTs (EVERYTHING you need to know about NFTs)
392 |
393 | - What is an NFT?
394 | - Code Overview
395 | - Hardhat Setup
396 | - Basic NFT
399 |
400 | - Random IPFS NFT
411 |
412 | - Dynamic SVG On-Chain NFT
417 |
418 | - Advanced: EVM Opcodes, Encoding, and Calling
427 |
428 | - Deploying the NFTs to a Testnet
429 | - Lesson 14 Recap
430 |
431 |
432 |
433 |
434 | Lesson 15: NextJS NFT Marketplace (If you finish this lesson, you are a full-stack MONSTER!)
435 |
436 | - Introduction
437 | - Part I: NFT Marketplace Contracts
441 |
442 | - Reentrancy
448 |
449 | - Part II: Moralis Front End
470 |
471 | - Part III: TheGraph Front End
479 |
480 |
481 |
482 |
483 |
484 | Lesson 16: Hardhat Upgrades
485 |
486 | - Upgradeable Smart Contracts Overview
487 | - Types of Upgrades
488 | - Delegatecall
489 | - Small Proxy Example
490 | - Transparent Upgradeable Smart Contract
491 |
492 |
493 |
494 |
495 | Lesson 17: Hardhat DAOs
496 |
497 | - Introduction
498 | - What is a DAO?
499 | - How to build a DAO
500 |
501 |
502 |
503 | Lesson 18: Security & Auditing
504 |
505 | - Introduction
506 | - Slither
507 | - Fuzzing and Eth Security Toolbox
508 | - Closing Thoughts
509 |
510 |
511 |
512 | More Resources
513 |
524 |
525 |
526 |
527 | # Lesson 0: The Edge of the Rabbit Hole
528 | ## Welcome to the course!
529 | *[⌨️ (00:00:00) Lesson 0: Welcome To Blockchain](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=0s)*
530 | ## Best Practices
531 | - **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.
532 | - **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 :)
533 | - **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
534 | - **Take Breaks:** You will exhaust your mind and recall less if you go all out and watch the entire course in one sitting.
535 | **Suggested Strategy** every 25 minutes take a 5 min break, and every 2 hours take a longer 30 min break
536 | - **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.
537 |
538 | # Lesson 1: Blockchain Basics
539 | *[⌨️ (00:09:05) Lesson 1: Blockchain Basics](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=545s)*
540 | ## What is a Blockchain? What does a blockchain do?
541 | - [Bitcoin Whitepaper](https://bitcoin.org/bitcoin.pdf)
542 | - [Satoshi Nakamoto](https://en.wikipedia.org/wiki/Satoshi_Nakamoto)
543 | - [Ethereum Whitepaper](https://ethereum.org/en/whitepaper/)
544 | - [Vitalik Buterin](https://en.wikipedia.org/wiki/Vitalik_Buterin)
545 | - [What is a Smart Contract?](https://chain.link/education/smart-contracts)
546 | - [Nick Szabo](https://en.wikipedia.org/wiki/Nick_Szabo)
547 | - [Hybrid Smart Contracts](https://blog.chain.link/hybrid-smart-contracts-explained/)
548 | - [Blockchain Oracles](https://betterprogramming.pub/what-is-a-blockchain-oracle-f5ccab8dbd72?source=friends_link&sk=d921a38466df8a9176ed8dd767d8c77d)
549 | - [Terminology](https://connect.comptia.org/content/articles/blockchain-terminology)
550 | - [Web3](https://en.wikipedia.org/wiki/Web3)
551 | - [What is a blockchain](https://www.investopedia.com/terms/b/blockchain.asp)
552 |
553 | ## The Purpose Of Smart Contracts
554 | - 🎥 [Original Video](https://www.youtube.com/watch?v=_JeRq7Gwj5Y&feature=youtu.be)
555 | - 🦬 [My ETH Denver Talk](https://www.youtube.com/watch?v=06hXCX_jj2E)
556 | - 🍔 [McDonalds Scandal](https://www.chicagotribune.com/sns-mcdonalds-story.html)
557 | - ⛓ [More on the evolution of agreements](https://www.youtube.com/watch?v=ufVyX7JDCgg)
558 | - ✍️ [What is a Smart Contract?](https://www.youtube.com/watch?v=ZE2HxTmxfrI)
559 | - 🧱 [How does a blockchain work?](https://www.youtube.com/watch?v=SSo_EIwHSd4)
560 | - 🔮 [Chainlink & Oracles](https://www.youtube.com/watch?v=tIUHQ7sDoaU)
561 |
562 | ## Other Blockchain Benefits
563 | - Decentralized
564 | - Transparency & Flexibility
565 | - Speed & Efficiency
566 | - Security & Immutability
567 | - Counterparty Risk Removal
568 | - Trust Minimized Agreements
569 |
570 | ## What have Smart Contracts done so far?
571 | - [DeFi](https://chain.link/education/defi)
572 | - [Defi Llama](https://defillama.com/)
573 | - [Why DeFi is Important](https://medium.com/the-capital/why-defi-1519cc4d4bd3)
574 | - [DAOs](https://betterprogramming.pub/what-is-a-dao-what-is-the-architecture-of-a-dao-how-to-build-a-dao-high-level-d096a97162cc)
575 | - [NFTs](https://www.youtube.com/watch?v=9yuHz6g_P50)
576 |
577 | ## Making Your First Transaction
578 | - [Metamask Download Link](https://metamask.io/)
579 | - [What is a Private Key?](https://www.coinbase.com/learn/crypto-basics/what-is-a-private-key)
580 | - [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)
581 | - [Etherscan](https://etherscan.io/)
582 | - [Rinkeby Etherscan](https://rinkeby.etherscan.io/)
583 | - [Kovan Etherscan](https://kovan.etherscan.io/)
584 | - Rinkeby Faucet (Check the [link token contracts page](https://docs.chain.link/docs/link-token-contracts/#rinkeby))
585 | - 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/#rinkeby). If the faucet above is broken, check the chainlink documentation for the most up to date faucet.
586 | - OR, use the [Kovan ETH Faucet](https://faucets.chain.link/), just be sure to swap your metamask to kovan!
587 |
588 | ## Gas I: Introduction to Gas
589 | - [Gas and Gas Fees](https://ethereum.org/en/developers/docs/gas/)
590 | - [Wei, Gwei, and Ether Converter](https://eth-converter.com/)
591 | - [ETH Gas Station](https://ethgasstation.info/)
592 |
593 | ## How Do Blockchains Work?
594 | - [What is a hash?](https://techjury.net/blog/what-is-cryptographic-hash/)
595 | - [Blockchain Demo](https://andersbrownworth.com/blockchain/)
596 | - [Summary](https://ethereum.org/en/developers/docs/intro-to-ethereum/)
597 |
598 | ## Signing Transactions
599 | - [Public / Private Keys](https://andersbrownworth.com/blockchain/public-private-keys/keys)
600 | - [Layer 2 and Rollups](https://ethereum.org/en/developers/docs/scaling/layer-2-rollups/)
601 | - [Decentralized Blockchain Oracles](https://blog.chain.link/what-is-the-blockchain-oracle-problem/)
602 |
603 | ## Gas II
604 | - [Block Rewards](https://www.investopedia.com/terms/b/block-reward.asp)
605 | - Advanced Gas
606 | - [EIP 1559](https://www.youtube.com/watch?v=MGemhK9t44Q)
607 | - GWEI, WEI, and ETH
608 | - [ETH Converter](https://eth-converter.com/)
609 | ## Gas II Summary
610 | - [Run Your Own Ethereum Node](https://geth.ethereum.org/docs/getting-started)
611 |
612 | ## High-Level Blockchain Fundamentals
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 | - [Remix](https://remix.ethereum.org/)
629 | - [Solidity Documentation](https://docs.soliditylang.org/en/v0.8.6/index.html)
630 |
631 | ## Setting Up Your First Contract
632 | - Versioning
633 | - Take notes in your code!
634 | - [What is a software license](https://snyk.io/learn/what-is-a-software-license/)
635 | - SPDX License
636 | - Compiling
637 | - Contract Declaration
638 |
639 | ## Basic Solidity: Types
640 | - [Types & Declaring Variables](https://docs.soliditylang.org/en/v0.8.13/)
641 | - `uint256`, `int256`, `bool`, `string`, `address`, `bytes32`
642 | - [Solidity Types](https://docs.soliditylang.org/en/latest/types.html)
643 | - [Bits and Bytes](https://www.youtube.com/watch?v=Dnd28lQHquU)
644 | - Default Initializations
645 | - Comments
646 |
647 | ## Basic Solidity: Functions
648 | - Functions
649 | - Deploying a Contract
650 | - Smart Contracts have addresses just like our wallets
651 | - Calling a public state-changing Function
652 | - [Visibility](https://docs.soliditylang.org/en/v0.7.3/contracts.html#visibility-and-getters)
653 | - Gas III | An example
654 | - Scope
655 | - View & Pure Functions
656 |
657 | ## Basic Solidity: Arrays & Structs
658 | - Structs
659 | - Intro to Storage
660 | - Arrays
661 | - Dynamic & Fixed Sized
662 | - `push` array function
663 |
664 |
665 | ## Basic Solidity: Compiler Errors and Warnings
666 | - Yellow: Warnings are Ok
667 | - Red: Errors are not Ok
668 |
669 | ## Memory, Storage, Calldata (Intro)
670 | - 6 Places you can store and access data
671 | - calldata
672 | - memory
673 | - storage
674 | - code
675 | - logs
676 | - stack
677 |
678 | ## Mappings
679 | - [Mappings](https://solidity-by-example.org/mapping)
680 |
681 | ## Deploying your First Contract
682 | - A testnet or mainnet
683 | - Connecting Metamask
684 | - [Find a faucet here](https://docs.chain.link/docs/link-token-contracts/#rinkeby)
685 | - See the faucets at the top of this readme!
686 | - Interacting with Deployed Contracts
687 |
688 | ## The EVM & A Recap of Lesson 2
689 | - The EVM
690 |
691 | # Lesson 3: Remix Storage Factory
692 |
693 | *[⌨️ (03:05:34) Lesson 3: Remix Storage Factory](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=11134s)*
694 |
695 | 💻 Code: https://github.com/PatrickAlphaC/storage-factory-fcc
696 |
697 | ## Introduction
698 | - [Factory Pattern](https://betterprogramming.pub/learn-solidity-the-factory-pattern-75d11c3e7d29)
699 |
700 | ## Basic Solidity: Importing Contracts into other Contracts
701 | - [Composibility](https://chain.link/techtalks/defi-composability)
702 | - [Solidity new keyword](https://docs.soliditylang.org/en/v0.8.14/control-structures.html?highlight=new#creating-contracts-via-new)
703 | - [Importing Code in solidity](https://solidity-by-example.org/import)
704 |
705 | ## Basic Solidity: Interacting with other Contracts
706 | - To interact, you always need: ABI + Address
707 | - [ABI](https://docs.soliditylang.org/en/v0.8.14/abi-spec.html?highlight=abi)
708 |
709 | ## Basic Solidity: Inheritance & Overrides
710 | - [Inheritance](https://solidity-by-example.org/inheritance)
711 | - [Override & Virtual Keyword](https://docs.soliditylang.org/en/v0.8.14/contracts.html?highlight=override#function-overriding)
712 |
713 | ## Lesson 3 Recap
714 |
715 | # Lesson 4: Remix Fund Me
716 |
717 | *[⌨️ (03:31:55) Lesson 4: Remix Fund Me](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=12715s)*
718 |
719 | 💻 Code: https://github.com/PatrickAlphaC/fund-me-fcc
720 |
721 | ## Introduction
722 |
723 | ## Sending ETH Through a Function & Reverts
724 | - [Fields in a Transaction](https://ethereum.org/en/developers/docs/transactions/)
725 | - [More on v,r,s](https://ethereum.stackexchange.com/questions/15766/what-does-v-r-s-in-eth-gettransactionbyhash-mean)
726 | - [payable](https://solidity-by-example.org/payable)
727 | - [msg.value & Other global keywords](https://docs.soliditylang.org/en/v0.8.14/cheatsheet.html?highlight=cheatsheet#global-variables)
728 | - [require](https://codedamn.com/news/solidity/what-is-require-in-solidity)
729 | - [revert](https://medium.com/blockchannel/the-use-of-revert-assert-and-require-in-solidity-and-the-new-revert-opcode-in-the-evm-1a3a7990e06e)
730 |
731 | ## Chainlink & Oracles
732 | - [What is a blockchain oracle?](https://chain.link/education/blockchain-oracles)
733 | - [What is the oracle problem?](https://blog.chain.link/what-is-the-blockchain-oracle-problem/)
734 | - [Chainlink](https://chain.link/)
735 | - [Chainlink Price Feeds (Data Feeds)](https://docs.chain.link/docs/get-the-latest-price/)
736 | - [data.chain.link](https://data.chain.link/)
737 | - [Chainlink VRF](https://docs.chain.link/docs/chainlink-vrf/)
738 | - [Chainlink Keepers](https://docs.chain.link/docs/chainlink-keepers/introduction/)
739 | - [Chainlink API Calls](https://docs.chain.link/docs/request-and-receive-data/)
740 | - [Importing Tokens into your Metamask](https://consensys.net/blog/metamask/how-to-add-your-custom-tokens-in-metamask/)
741 | - [Request and Receive Chainlink Model](https://docs.chain.link/docs/architecture-request-model/)
742 |
743 | ## Review of Sending ETH and working with Chainlink
744 |
745 | ## Interfaces & Price Feeds
746 | - [Chainlink Price Feeds (Data Feeds)](https://docs.chain.link/docs/get-the-latest-price/)
747 | - [Chainlink GitHub](https://github.com/smartcontractkit/chainlink)
748 | - [Interface](https://solidity-by-example.org/interface)
749 |
750 | ## Importing from GitHub & NPM
751 | - [Chainlink NPM Package](https://www.npmjs.com/package/@chainlink/contracts)
752 |
753 | ## Floating Point Math in Solidtiy
754 | - [tuple](https://docs.soliditylang.org/en/v0.8.14/abi-spec.html?highlight=tuple#handling-tuple-types)
755 | - [Floating Point Numbers in Solidity](https://stackoverflow.com/questions/58277234/does-solidity-supports-floating-point-number)
756 | - [Type Casting](https://ethereum.stackexchange.com/questions/6891/type-casting-in-solidity)
757 | - Gas Estimation Failed
758 | - Someone should make an article explaining this error
759 |
760 | ## Basic Solidity: Arrays & Structs II
761 | - [msg.sender](https://docs.soliditylang.org/en/v0.8.14/cheatsheet.html?highlight=msg.sender)
762 |
763 | ## Review of Interfaces, Importing from GitHub, & Math in Solidity
764 |
765 | ## Libraries
766 | - [Library](https://docs.soliditylang.org/en/v0.8.14/contracts.html?highlight=library#libraries)
767 | - [Solidity-by-example Library](https://solidity-by-example.org/library)
768 |
769 | ## SafeMath, Overflow Checking, and the "unchecked" keyword
770 | - [Openzeppelin Safemath](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/math/SafeMath.sol)
771 | - [unchecked vs. checked](https://docs.soliditylang.org/en/v0.8.0/control-structures.html#checked-or-unchecked-arithmetic)
772 |
773 | ## Basic Solidity: For Loop
774 | - [For Loop](https://solidity-by-example.org/loop)
775 | - `/* */` is another way to make comments
776 |
777 | ## Basic Solidity: Resetting an Array
778 |
779 | ## Sending ETH from a Contract
780 | - [Transfer, Send, Call](https://solidity-by-example.org/sending-ether/)
781 | - [this keyword](https://ethereum.stackexchange.com/questions/1781/what-is-the-this-keyword-in-solidity)
782 |
783 | ## Basic Solidity: Constructor
784 | - [Constructor](https://solidity-by-example.org/constructor)
785 |
786 | ## Basic Solidity: Modifiers
787 | - [Double equals](https://www.geeksforgeeks.org/solidity-operators/)
788 | - [Modifier](https://solidity-by-example.org/function-modifier)
789 |
790 | ## Testnet Demo
791 | - [Disconnecting Metamask](https://help.1inch.io/en/articles/4666771-metamask-how-to-connect-disconnect-and-switch-accounts-with-metamask-on-1inch-network)
792 |
793 | ## Advanced Solidity
794 | ### Immutable & Constant
795 | - [Immutable](https://solidity-by-example.org/immutable)
796 | - [Constant](https://solidity-by-example.org/constants)
797 | - [Current ETH Gas Prices](https://etherscan.io/gastracker)
798 | - Don't stress about gas optimizations! (yet)
799 | - Naming Conventions
800 | - [Someone make this!](https://github.com/smartcontractkit/full-blockchain-solidity-course-js/issues/13)
801 |
802 | ### Custom Errors
803 | - [Custom Errors Introduction](https://blog.soliditylang.org/2021/04/21/custom-errors/)
804 |
805 | ### Receive & Fallback Functions
806 | - [Solidity Docs Special Functions](https://docs.soliditylang.org/en/v0.8.14/contracts.html?highlight=fallback#special-functions)
807 | - [Fallback](https://solidity-by-example.org/fallback)
808 | - [Receive](https://docs.soliditylang.org/en/v0.8.14/contracts.html?highlight=fallback#receive-ether-function)
809 |
810 | ## Lesson 4 Recap
811 |
812 | 🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊 Completed Solidity Basics! 🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊
813 |
814 | # Lesson 5: Ethers.js Simple Storage
815 |
816 | *[⌨️ (05:30:42) Lesson 5: Ethers.js Simple Storage](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=19842s)*
817 |
818 | 💻 Code: https://github.com/PatrickAlphaC/ethers-simple-storage-fcc
819 |
820 | 🧪 [Alchemy: https://alchemy.com/?a=673c802981](https://alchemy.com/?a=673c802981)
821 |
822 | ## Effective Debugging Strategies & Getting Help
823 | *[⌨️ (5:30:46) Effective Debugging Stategies & Getting Help](https://youtu.be/gyMwXuJrbJQ?t=19846)*
824 | 1. Tinker and isolate problem
825 | 1. For this course, take at LEAST 15 minutes to figure out a bug.
826 | 2. Google / Web Search the Exact problem
827 | 1. Go to this GitHub Repo / Discussions
828 | 3. Ask a question on a Forum like Stack Exchange Ethereum or Stack Overflow
829 | 1. Format your questions!!
830 | 2. Use [Markdown](https://www.markdowntutorial.com/)
831 |
832 | ### How to Debug Anything Video
833 | - [Patrick's Original Video](https://www.youtube.com/watch?v=XT8STflvwNo)
834 |
835 | ## Installation & Setup
836 | - [Visual Studio Code](https://code.visualstudio.com/)
837 | - [Crash Course](https://www.youtube.com/watch?v=WPqXP_kLzpo)
838 | - [NodeJS](https://nodejs.org/en/)
839 | - [VSCode Keybindings](https://code.visualstudio.com/docs/getstarted/keybindings)
840 | - [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
841 | - [What is a terminal?](https://code.visualstudio.com/docs/editor/integrated-terminal)
842 |
843 | ### Mac & Linux Setup
844 |
845 | ### Windows Setup
846 | - [WSL](https://docs.microsoft.com/en-us/windows/wsl/install)
847 | - When working in WSL, use Linux commands instead of Windows commands
848 | - [TroubleShooting](https://docs.microsoft.com/en-us/windows/wsl/troubleshooting)
849 | - `curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash`
850 |
851 | > ⚠️ Please use Gitpod as an absolute last resort
852 | ### Gitpod
853 | - [Gitpod](https://www.gitpod.io/)
854 | - **If using this, NEVER share a private key with real money on Gitpod**
855 | - Ideally you figure out the MacOS, Linux, or Windows install though
856 |
857 | ## Local Development Introduction
858 | - `CMD + K` or `CTRL + K` clears the terminal
859 | - `mkdir ethers-simple-storage-fcc`
860 | - `code .` to open VSCode in a new VSCode window
861 | ### Optional Javascript Crash Courses
862 | - [NodeJS Course](https://www.youtube.com/watch?v=RLtyhwFtXQA)
863 | - [Javascript Course](https://www.youtube.com/watch?v=jS4aFq5-91M)
864 | - Import your `SimpleStorage.sol`
865 | - [Solidity + Hardhat VSCode Extension](https://marketplace.visualstudio.com/items?itemName=NomicFoundation.hardhat-solidity)
866 |
867 | - Format your solidity code with:
868 | ```
869 | "[solidity]": {
870 | "editor.defaultFormatter": "NomicFoundation.hardhat-solidity"
871 | },
872 | "[javascript]":{
873 | "editor.defaultFormatter": "esbenp.prettier-vscode"
874 | }
875 | ```
876 | In your `.vscode/settings.json` file.
877 | - [Prettier Extension](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)
878 | ## Tiny Javascript Refresher
879 | - [Javascript Tips](https://www.freecodecamp.org/news/learn-javascript-free-js-courses-for-beginners/)
880 | ## Asynchronous Programming in Javascript
881 | - [Asynchronous Programming](https://www.bmc.com/blogs/asynchronous-programming/)
882 | - [async keyword](https://www.w3schools.com/JS//js_async.asp)
883 | - [Promise in Javascript](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)
884 | - [await keyword](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await)
885 | ## Compiling our Solidity
886 | - [Yarn Install](https://yarnpkg.com/getting-started/install)
887 | - [solc-js](https://github.com/ethereum/solc-js)
888 | - `yarn add solc@0.8.7-fixed`
889 | - [yarn scripts](https://classic.yarnpkg.com/lang/en/docs/cli/run/)
890 | ## Ganache & Networks
891 | - [Ganache](https://trufflesuite.com/ganache/)
892 | - Networks in Metamask
893 | - RPC URL
894 | - [Geth](https://github.com/ethereum/go-ethereum)
895 | - [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)
896 | ## Introduction to Ethers.js
897 | - [Ethers.js](https://docs.ethers.io/v5/getting-started/)
898 | - [prettier-plugin-solidity](https://github.com/prettier-solidity/prettier-plugin-solidity)
899 | ### A Note on the await Keyword
900 | ## Adding Transaction Overrides
901 | ## Transaction Receipts
902 | ## Sending a "raw" Transaction in Ethers.js
903 | ## Interacting with Contracts in Ethers.js
904 | - [EVM Decompiler](https://ethervm.io/decompile)
905 | - [BigNumber](https://docs.ethers.io/v5/api/utils/bignumber/)
906 | ## Environment Variables
907 | - [dotenv](https://www.npmjs.com/package/dotenv)
908 | - [.gitignore](https://www.atlassian.com/git/tutorials/saving-changes/gitignore)
909 | ## Better Private Key Management
910 | - [wallet.encrypt](https://docs.ethers.io/v5/api/signer/#Wallet-encrypt)
911 | - [THE .ENV PLEDGE](https://github.com/smartcontractkit/full-blockchain-solidity-course-js/discussions/5)
912 | ## Optional Prettier Formatting
913 | - [Prettier](https://prettier.io/docs/en/index.html)
914 | - [Best README Template](https://github.com/othneildrew/Best-README-Template)
915 | ## Deploying to a Testnet or a Mainnet
916 | - [Alchemy](https://alchemy.com/?a=673c802981)
917 | - [Getting your private key from Metamask](https://metamask.zendesk.com/hc/en-us/articles/360015289632-How-to-Export-an-Account-Private-Key)
918 | - `CTRL + C` stops any terminal command
919 | ## Verifying on Block Explorers from the UI
920 | ## Alchemy Dashboard & The Mempool
921 | - [Special Guest Albert Hu](https://twitter.com/thatguyintech)
922 | - [Mempool](https://ethereum.org/en/developers/tutorials/sending-transactions-using-web3-and-alchemy/#see-your-transaction-in-the-mempool)
923 | ## Lesson 5 Recap
924 | ### Typescript Ethers Simple Storage
925 |
926 | # Lesson 6: Hardhat Simple Storage
927 |
928 | *[⌨️ (08:20:17) Lesson 6: Hardhat Simple Storage](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=30017s)*
929 |
930 | 💻 Code: https://github.com/PatrickAlphaC/hardhat-simple-storage-fcc
931 |
932 | ## Introduction
933 | *[⌨️ (08:20:19) Introduction](https://youtu.be/gyMwXuJrbJQ?t=30019)*
934 | ## Hardhat Setup
935 | *[⌨️ (08:22:47) Hardhat Setup](https://youtu.be/gyMwXuJrbJQ?t=30167)*
936 | - [Hardhat Documentation](https://hardhat.org/)
937 | - [DevDependencies vs Dependencies](https://stackoverflow.com/questions/18875674/whats-the-difference-between-dependencies-devdependencies-and-peerdependencies)
938 | - [@ Sign node modules](https://stackoverflow.com/questions/36667258/what-is-the-meaning-of-the-at-prefix-on-npm-packages)
939 |
940 | ### Troubleshooting Hardhat Setup
941 | *[⌨️ (08:29:43) Troubleshooting Hardhat Setup](https://youtu.be/gyMwXuJrbJQ?t=30583)*
942 | - [Special Guest Cami Ramos Garzon](https://twitter.com/camiinthisthang)
943 | ## Hardhat Setup Continued
944 | *[⌨️ (08:31:48) Hardhat Setup Continued](https://youtu.be/gyMwXuJrbJQ?t=30708)*
945 | ## Deploying SimpleStorage from Hardhat
946 | *[⌨️ (08:33:10) Deploying SimpleStorage from Hardhat](https://youtu.be/gyMwXuJrbJQ?t=30790)*
947 | ## Networks in Hardhat
948 | *[⌨️ (08:41:44) Networks in Hardhat](https://youtu.be/gyMwXuJrbJQ?t=31304)*
949 | - [The Hardhat Network](https://hardhat.org/hardhat-network/)
950 | - [Hardhat configuration](https://hardhat.org/config/#configuration)
951 | - [Chain ID List](https://chainlist.org/)
952 | ## Programmatic Verification
953 | *[⌨️ (08:51:16) Programmatic Verification](https://youtu.be/gyMwXuJrbJQ?t=31876)*
954 | - [Etherscan Verify Tutorial](https://docs.etherscan.io/tutorials/verifying-contracts-programmatically)
955 | - [Etherscan Docs](https://docs.etherscan.io/)
956 | - [Hardhat-Etherscan](https://hardhat.org/plugins/nomiclabs-hardhat-etherscan.html)
957 | - [Etherscan API Keys](https://info.etherscan.com/api-keys/)
958 | - [Javascript == vs ===](https://stackoverflow.com/questions/359494/which-equals-operator-vs-should-be-used-in-javascript-comparisons)
959 | ## Interacting with Contracts in Hardhat
960 | *[⌨️ (09:06:37) Interacting with Contracts in Hardhat](https://youtu.be/gyMwXuJrbJQ?t=32797)*
961 | ## Artifacts Troubleshooting
962 | *[⌨️ (09:09:42) Artifacts Troubleshooting](https://youtu.be/gyMwXuJrbJQ?t=32982)*
963 | ## Custom Hardhat Tasks
964 | *[⌨️ (09:10:52) Custom Hardhat Tasks](https://youtu.be/gyMwXuJrbJQ?t=33052)*
965 | - [Hardhat Tasks](https://hardhat.org/guides/create-task.html)
966 | - [Javascript Arrow Functions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions)
967 | ## Hardhat Localhost Node
968 | *[⌨️ (09:18:12) Hardhat Localhost Node](https://youtu.be/gyMwXuJrbJQ?t=33492)*
969 | ## The Hardhat Console
970 | *[⌨️ (09:23:11) The Hardhat Console](https://youtu.be/gyMwXuJrbJQ?t=33791)*
971 | - [Hardhat Console](https://hardhat.org/guides/hardhat-console.html)
972 | ## Hardhat Tests
973 | *[⌨️ (09:26:13) Hardhat Tests](https://youtu.be/gyMwXuJrbJQ?t=33973)*
974 | - [Hardhat Tests](https://hardhat.org/tutorial/testing-contracts.html#_5-testing-contracts)
975 | - [Mocha Style Tests](https://mochajs.org/)
976 | - [Chai](https://www.npmjs.com/package/chai)
977 | - [Waffle Tests](https://ethereum-waffle.readthedocs.io/en/latest/)
978 | ## Hardhat Gas Reporter
979 | *[⌨️ (09:38:10) Hardhat Gas Reporter](https://youtu.be/gyMwXuJrbJQ?t=34690)*
980 | - [Hardhat Gas Reporter](https://www.npmjs.com/package/hardhat-gas-reporter)
981 | - [Coinmarketcap API](https://coinmarketcap.com/api/)
982 | ## Solidity Coverage
983 | *[⌨️ (09:44:40) Solidity Coverage](https://youtu.be/gyMwXuJrbJQ?t=35080)*
984 | - [Solidity Coverage](https://github.com/sc-forks/solidity-coverage)
985 | ## Hardhat Waffle
986 | *[⌨️ (09:47:02) Hardhat Waffle](https://youtu.be/gyMwXuJrbJQ?t=35222)*
987 | - [Hardhat-Waffle](https://npm.io/package/@nomiclabs/hardhat-waffle)
988 | ## Lesson 6 Recap
989 | *[⌨️ (09:47:37) Lesson 6 Recap](https://youtu.be/gyMwXuJrbJQ?t=35257)*
990 | ### Typescript Hardhat Simple Storage
991 | *[⌨️ (09:52:15) Typescript Hardhat Simple Storage](https://youtu.be/gyMwXuJrbJQ?t=35535)*
992 | - [Typechain](https://github.com/dethcrypto/TypeChain)
993 |
994 | ```
995 | yarn add --dev @typechain/ethers-v5 @typechain/hardhat @types/chai @types/node @types/mocha ts-node typechain typescript
996 | ```
997 |
998 | # Lesson 7: Hardhat Fund Me
999 |
1000 | *[⌨️ (10:00:48) Lesson 7: Hardhat Fund Me](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=36048s)*
1001 |
1002 | 💻 Code: https://github.com/PatrickAlphaC/hardhat-fund-me-fcc
1003 |
1004 | ## Introduction
1005 | *[⌨️ (10:00:50) Introduction](https://youtu.be/gyMwXuJrbJQ?t=36050)*
1006 | ## Hardhat Setup - Fund Me
1007 | *[⌨️ (10:03:41) Hardhat Setup - Fund Me](https://youtu.be/gyMwXuJrbJQ?t=36221)*
1008 | ## Linting
1009 | *[⌨️ (10:06:20) Linting](https://youtu.be/gyMwXuJrbJQ?t=36380)*
1010 | - [Eslint](https://eslint.org/)
1011 | - [Solhint](https://github.com/protofire/solhint)
1012 | - [Linting Code](https://www.perforce.com/blog/qac/what-lint-code-and-why-linting-important)
1013 | ## Hardhat Setup - Fund Me - Continued
1014 | *[⌨️ (10:07:47) Hardhat Setup - Fund Me - Continued](https://youtu.be/gyMwXuJrbJQ?t=36467)*
1015 | ## Importing from NPM
1016 | *[⌨️ (10:09:38) Importing from NPM](https://youtu.be/gyMwXuJrbJQ?t=36578)*
1017 | - [@chainlink/contracts](https://www.npmjs.com/package/@chainlink/contracts)
1018 | ## Hardhat Deploy
1019 | *[⌨️ (10:10:43) Hardhat Deploy](https://youtu.be/gyMwXuJrbJQ?t=36643)*
1020 | - [Hardhat Deploy](https://github.com/wighawag/hardhat-deploy)
1021 | ## Mocking
1022 | *[⌨️ (10:21:05) Mocking](https://youtu.be/gyMwXuJrbJQ?t=37265)*
1023 | - [Mocking](https://stackoverflow.com/questions/2665812/what-is-mocking)
1024 | - [Aave Github](https://github.com/aave/aave-v3-core)
1025 | - [Chainlink Github](https://github.com/smartcontractkit/chainlink)
1026 | - Multiple Versions of Solidity
1027 | - Tags in hardhat
1028 | ## Utils Folder
1029 | *[⌨️ (10:52:51) Utils Folder](https://youtu.be/gyMwXuJrbJQ?t=39171)*
1030 | ## Testnet Demo - Hardhat Fund Me
1031 | *[⌨️ (10:55:45) Testnet Demo - Hardhat Fund Me](https://youtu.be/gyMwXuJrbJQ?t=39345)*
1032 | - Hardhat Deploy Block Confirmations
1033 | ## Solidity Style Guide
1034 | *[⌨️ (11:00:10) Solidity Style Guide](https://youtu.be/gyMwXuJrbJQ?t=39610)*
1035 | - [Style Guide](https://docs.soliditylang.org/en/v0.8.15/style-guide.html)
1036 | - [NatSpec](https://docs.soliditylang.org/en/v0.8.15/natspec-format.html)
1037 | ## Testing Fund Me
1038 | *[⌨️ (11:08:36) Testing Fund Me](https://youtu.be/gyMwXuJrbJQ?t=40116)*
1039 | - [Unit Testing](https://en.wikipedia.org/wiki/Unit_testing)
1040 | - [Hardhat Deploy Fixtures](https://github.com/wighawag/hardhat-deploy#creating-fixtures)
1041 | - [ethers.getContract](https://github.com/wighawag/hardhat-deploy-ethers)
1042 | - [expect](https://ethereum-waffle.readthedocs.io/en/latest/matchers.html)
1043 | - [ethers.utils.parseUnits](https://docs.ethers.io/v5/api/utils/display-logic/#utils-parseUnits)
1044 | - [Waffle Chai Matchers](https://ethereum-waffle.readthedocs.io/en/latest/matchers.html)
1045 | ## Breakpoints & Debugging
1046 | *[⌨️ (11:30:39) Breakpoints & Debugging](https://youtu.be/gyMwXuJrbJQ?t=41439)*
1047 | - [VSCode Breakpoints](https://code.visualstudio.com/Docs/editor/debugging)
1048 | ## Gas III
1049 | *[⌨️ (11:33:40) Gas III](https://youtu.be/gyMwXuJrbJQ?t=41620)*
1050 | - [Transaction Response](https://docs.ethers.io/v5/api/providers/types/#providers-TransactionResponse)
1051 | - [Transaction Receipt](https://docs.ethers.io/v5/api/providers/types/#providers-TransactionReceipt)
1052 | ## console.log & Debugging
1053 | *[⌨️ (11:36:35) console.log & Debugging](https://youtu.be/gyMwXuJrbJQ?t=41795)*
1054 | - [Hardhat console.log](https://hardhat.org/hardhat-network/reference/#console-log)
1055 | ## Testing Fund Me II
1056 | *[⌨️ (11:37:31) Testing Fund Me II](https://youtu.be/gyMwXuJrbJQ?t=41851)*
1057 | ## Storage in Solidity
1058 | *[⌨️ (11:44:34) Storage in Solidity](https://youtu.be/gyMwXuJrbJQ?t=42274)*
1059 | - [Storage Layout](https://docs.soliditylang.org/en/v0.8.13/internals/layout_in_storage.html)
1060 | - [Purpose of the memory keyword](https://stackoverflow.com/questions/33839154/in-ethereum-solidity-what-is-the-purpose-of-the-memory-keyword)
1061 | - [getStorageAt](https://docs.ethers.io/v5/api/providers/provider/#Provider-getStorageAt)
1062 | ## Gas Optimizations using Storage Knowledge
1063 | *[⌨️ (11:52:38) Gas Optimizations using Storage Knowledge](https://youtu.be/gyMwXuJrbJQ?t=42758)*
1064 | - [Opcodes](https://ethereum.org/en/developers/docs/evm/opcodes/)
1065 | - [Opcodes by Gas](https://github.com/crytic/evm-opcodes)
1066 | - [Opcodes by Gas](https://evm.codes/)
1067 | - Append `s_` to storage variables
1068 | - Append `i_` to immutable variables
1069 | - Caps lock and underscore constant variables
1070 | ## Solidity Chainlink Style Guide
1071 | *[⌨️ (12:05:29) Solidity Chainlink Style Guide](https://youtu.be/gyMwXuJrbJQ?t=43529)*
1072 | - [Chainlink Solidity Style Guide](https://github.com/smartcontractkit/full-blockchain-solidity-course-js/issues/13)
1073 | ## Storage Review
1074 | *[⌨️ (12:09:59) Storage Review](https://youtu.be/gyMwXuJrbJQ?t=43799)*
1075 | ## Staging Tests
1076 | *[⌨️ (12:11:43) Staging Tests](https://youtu.be/gyMwXuJrbJQ?t=43903)*
1077 | - [Ternary](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_Operator)
1078 | ## Running Scripts on a Local Node
1079 | *[⌨️ (12:17:58) Running Scripts on a Local Node](https://youtu.be/gyMwXuJrbJQ?t=44278)*
1080 | ## Adding Scripts to your package.json
1081 | *[⌨️ (12:22:00) Adding Scripts to your package.json](https://youtu.be/gyMwXuJrbJQ?t=44520)*
1082 | ## Pushing to GitHub
1083 | *[⌨️ (12:25:17) Pushing to GitHub](https://youtu.be/gyMwXuJrbJQ?t=44717)*
1084 | - [Github Quickstart](https://docs.github.com/en/get-started/quickstart)
1085 | - [What is Git?](https://www.git-scm.com/book/en/v2/Getting-Started-What-is-Git%3F)
1086 | - [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)
1087 | - [Learn about git and GitHub](https://www.youtube.com/watch?v=RGOj5yH7evk)
1088 | ## 🐸🐦 [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!!)
1089 |
1090 | # Lesson 8: HTML / Javascript Fund Me (Full Stack / Front End)
1091 |
1092 | *[⌨️ (12:32:57) Lesson 8: HTML / Javascript Fund Me (Full Stack / Front End)](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=45177s)*
1093 |
1094 | 💻 Code: https://github.com/PatrickAlphaC/html-fund-me-fcc
1095 |
1096 | ## Introduction
1097 | ## How Websites work with Web3 Wallets
1098 | - [How to Connect your Smart Contracts to Metamask](https://www.youtube.com/watch?v=pdsYCkUWrgQ)
1099 | - 💻 Code from Video: https://github.com/PatrickAlphaC/full-stack-web3-metamask-connectors
1100 | - ✍️ Article from Video: https://betterprogramming.pub/everything-you-need-to-know-about-fullstack-web3-94c0f1b18019?sk=a2764bcbdae98bf05e1052931de77982
1101 | ## HTML Setup
1102 | - Live Server: ExtensionID: ritwickdey.LiveServer
1103 | ## Connecting HTML to Metamask
1104 | - [Metamask Docs](https://docs.metamask.io/guide/)
1105 | ## Javascript in it's own file
1106 | ## ES6 vs Nodejs
1107 | - [ES6 vs Nodesjs](https://stackoverflow.com/questions/31354559/using-node-js-require-vs-es6-import-export#31367852)
1108 | - [Ethers docs for web browser](https://docs.ethers.io/v5/getting-started/#getting-started--importing--web-browser)
1109 | - [module vs text/javascript](https://stackoverflow.com/questions/51418964/script-type-text-javascript-vs-script-type-module)
1110 | ## Sending a transaction from a Website
1111 | - [Web3Provider](https://docs.ethers.io/v5/api/providers/other/#Web3Provider)
1112 | - [Adding a network to metamask](https://metamask.zendesk.com/hc/en-us/articles/360043227612-How-to-add-a-custom-network-RPC)
1113 | ## Resetting an Account in Metamask
1114 | ```
1115 | MetaMask - RPC Error:
1116 | [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."}}}'
1117 | ```
1118 | ## Listening for Events and Completed Transactions
1119 | - [provider.once](https://docs.ethers.io/v5/api/providers/provider/#Provider-once)
1120 | - [Anonymous function](https://www.geeksforgeeks.org/javascript-anonymous-functions/)
1121 | - [Javascript Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)
1122 | ## Input Forms
1123 | ## Reading from the Blockchain
1124 | ## Withdraw Function
1125 | ## Lesson 8 Recap
1126 | ### Optional Links:
1127 | - [Browserify](https://browserify.org/)
1128 | - [Watchify](https://www.npmjs.com/package/watchify)
1129 |
1130 | # Lesson 9: Hardhat Smart Contract Lottery
1131 |
1132 | *[⌨️ (13:41:02) Lesson 9: Hardhat Smart Contract Lottery](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=49262s)*
1133 |
1134 | 💻 Code: https://github.com/PatrickAlphaC/hardhat-smartcontract-lottery-fcc
1135 |
1136 | ## Introduction
1137 | ## Hardhat Setup - Smart Contract Lottery
1138 | *[⌨️ (13:43:43) Hardhat Setup](https://youtu.be/gyMwXuJrbJQ?t=49423)*
1139 | - Install dependencies:
1140 | ```bash
1141 | 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
1142 | ```
1143 | - Install dependencies (Typescript version):
1144 | ```bash
1145 | 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
1146 | ```
1147 | ## Raffle.sol Setup
1148 | *[⌨️ (13:46:55) Raffle.sol Setup](https://youtu.be/gyMwXuJrbJQ?t=49615)*
1149 | - [Custom Errors in Solidity](https://blog.soliditylang.org/2021/04/21/custom-errors/)
1150 | ## Introduction to Events
1151 | *[⌨️ (13:54:02) Introduction to Events](https://youtu.be/gyMwXuJrbJQ?t=50042)*
1152 | - [Events & Logging Video](https://www.youtube.com/watch?v=KDYJC85eS5M)
1153 | - [Events & Logging in Hardhat](https://github.com/PatrickAlphaC/hardhat-events-logs)
1154 | ## Events in Raffle.sol
1155 | *[⌨️ (14:00:47) Events in Raffle.sol](https://youtu.be/gyMwXuJrbJQ?t=50447)*
1156 | ## Introduction to Chainlink VRF
1157 | *[⌨️ (14:02:30) Introduction to Chainlink VRF](https://youtu.be/gyMwXuJrbJQ?t=50550)*
1158 | - [Special Guest Stephen Fluin](https://twitter.com/stephenfluin)
1159 | ### Sub-Lesson: Chainlink VRF
1160 | > - [Chainlink VRFv2 Docs](https://docs.chain.link/docs/get-a-random-number/)
1161 | > - [Chainlink VRFv2 Walkthrough](https://www.youtube.com/watch?v=rdJ5d8j1RCg)
1162 | > - [Chainlink Contracts](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/VRFConsumerBase.sol)
1163 | ## Implementing Chainlink VRF - Introduction
1164 | *[⌨️ (14:09:53) Implementing Chainlink VRF](https://youtu.be/gyMwXuJrbJQ?t=50993)*
1165 | ### Hardhat Shorthand
1166 | - [Hardhat Shorthand](https://hardhat.org/guides/shorthand.html)
1167 | ## Implementing Chainlink VRF - The Request
1168 | ## Implementing Chainlink VRF - The FulFill
1169 | ### Modulo
1170 | - [Modulo](https://docs.soliditylang.org/en/v0.8.13/types.html?highlight=modulo#modulo)
1171 | ## Introduction to Chainlink Keepers
1172 | - [Chainlink Keepers Docs](https://docs.chain.link/docs/chainlink-keepers/introduction/)
1173 | - [Chainlink Keepers Walkthrough](https://www.youtube.com/watch?v=-Wkw5JVQGUo)
1174 | ## Implementing Chainlink Keepers - checkUpkeep
1175 | ### Enums
1176 | - [Enum](https://docs.soliditylang.org/en/v0.8.13/structure-of-a-contract.html?highlight=enum#enum-types)
1177 | ## Implementing Chainlink Keepers - checkUpkeep continued
1178 | - block.timestamp
1179 | ## Implementing Chainlink Keepers - performUpkeep
1180 | ## Code Cleanup
1181 | ## Deploying Raffle.sol
1182 | ### Mock Chainlink VRF Coordinator
1183 | ### Continued
1184 | - [LINK Token](https://docs.chain.link/docs/link-token-contracts/)
1185 | ## Raffle.sol Unit Tests
1186 | - We use `async function` in the describe blocks at the start, but we correctly take them out later.
1187 | ### Testing Events & Chai Matchers
1188 | - [Emit Chai Matcher](https://ethereum-waffle.readthedocs.io/en/latest/matchers.html#emitting-events)
1189 | ### Continued I
1190 | ## Hardhat Methods & Time Travel
1191 | - [Make Hardhat do whatever you want it to](https://hardhat.org/hardhat-network/reference/)
1192 | - [Special debugging hardhat methods](https://hardhat.org/hardhat-network/reference/#special-testing-debugging-methods)
1193 | ### Continued II
1194 | ## Callstatic
1195 | - [Callstatic](https://docs.ethers.io/v5/api/contract/contract/#contract-callStatic)
1196 | ### Continued III
1197 | ### Massive Promise Test
1198 | ### Continued IV
1199 | ## Raffle.sol Staging Tests
1200 | ## Testing on a Testnet
1201 | ### Recommended LINK amounts for Rinkeby Staging Test:
1202 | - Chainlink VRF: 2 LINK
1203 | - Chainlink Keepers: 8 LINK
1204 | ## Conclusion
1205 | ## Typescript - Smart Contract Lottery
1206 |
1207 | 🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊 Completed Hardhat Basics! 🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊
1208 |
1209 | # Lesson 10: NextJS Smart Contract Lottery (Full Stack / Front End)
1210 |
1211 | *[⌨️ (16:34:07) Lesson 10: NextJS Smart Contract Lottery (Full Stack / Front End)](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=59647s)*
1212 |
1213 | 💻 Code: https://github.com/PatrickAlphaC/nextjs-smartcontract-lottery-fcc
1214 |
1215 | ⚡️⚡️ Live Demo IPFS: ipfs://QmXwACyjcS8tL7UkYwimpqMqW9sKzSHUjE4uSZBSyQVuEH
1216 |
1217 | ⚡️⚡️ Live Demo Fleek: https://fancy-dream-3458.on.fleek.co/
1218 |
1219 | ## Introduction
1220 | We move into using [NextJS](https://nextjs.org/) for our front end. NextJS is a [React framework](https://reactjs.org/) for building websites.
1221 |
1222 | ### Optional Sub-Lesson: Full Stack Development & Other Libraries
1223 | - [6 Ways to connect your dapp to a wallet](https://www.youtube.com/watch?v=pdsYCkUWrgQ)
1224 | - [NextJS Crash Course](https://www.youtube.com/watch?v=mTz0GXj8NN0)
1225 | - Other React libraries:
1226 | - [Web3React](https://github.com/NoahZinsmeister/web3-react)
1227 | - [wagmi](https://github.com/tmm/wagmi)
1228 | - [react-moralis](https://www.npmjs.com/package/react-moralis)
1229 | - [useDapp](https://github.com/TrueFiEng/useDApp)
1230 | - [Web3Modal](https://github.com/Web3Modal/web3modal)
1231 | - [useMetamask](https://github.com/mdtanrikulu/use-metamask)
1232 | - Other Full Stack Web3 Templates
1233 | - [scaffold-eth](https://github.com/scaffold-eth/scaffold-eth)
1234 | - [ethereum-boilerplate](https://github.com/ethereum-boilerplate/ethereum-boilerplate)
1235 | - [create-eth-app](https://github.com/paulrberg/create-eth-app)
1236 | - [React being quite popular](https://insights.stackoverflow.com/survey/2021#section-most-popular-technologies-web-frameworks)
1237 | - [Why use react?](https://www.freecodecamp.org/news/why-use-react-for-web-development/)
1238 |
1239 | ## NextJS Setup
1240 | - [NextJS Documentation](https://nextjs.org/learn/basics/create-nextjs-app)
1241 | - [NextJS Minimal Ethers Example For Lottery](https://github.com/PatrickAlphaC/nextjs-ethers-introduction)
1242 |
1243 | ```
1244 | yarn create next-app .
1245 | ```
1246 | ## Manual Header I
1247 | - [What is a component?](https://www.w3schools.com/react/react_components.asp)
1248 | - [jsx](https://reactjs.org/docs/introducing-jsx.html)
1249 | - [Moralis](https://moralis.io/)
1250 | - [React Moralis](https://github.com/MoralisWeb3/react-moralis)
1251 | ### React Hooks
1252 | - [What is a react hook?](https://reactjs.org/docs/hooks-overview.html)
1253 | ## Manual Header II
1254 | ## useEffect Hook
1255 | - [useEffect Hook](https://reactjs.org/docs/hooks-effect.html)
1256 | - [More on useEffect](https://blog.logrocket.com/guide-to-react-useeffect-hook/)
1257 | - [React Context](https://www.freecodecamp.org/news/react-context-for-beginners/)
1258 | - [useEffect Firing Twice](https://stackoverflow.com/questions/60618844/react-hooks-useeffect-is-called-twice-even-if-an-empty-array-is-used-as-an-ar)
1259 | ## Local Storage
1260 | - [Local Storage](https://codinglead.co/javascript/what-is-localstorage)
1261 | ## isWeb3EnabledLoading
1262 | ## web3uikit
1263 | - [web3uikit](https://github.com/web3ui/web3uikit)
1264 | - [web3uikit interactive docs](https://web3ui.github.io/web3uikit/?path=/story/1-web3-blockie--custom-seed)
1265 | - [web3uikit connect button](https://web3ui.github.io/web3uikit/?path=/story/1-web3-connectbutton--default)
1266 | ## Introduction to Calling Functions in Nextjs
1267 | - [useWeb3Contract](https://github.com/MoralisWeb3/react-moralis#useweb3contract)
1268 | ### Automatic Constant Value UI Updater
1269 | - [ethers.utils.FormatTypes](https://docs.ethers.io/v5/api/utils/abi/fragments/#fragments--formats)
1270 | ### runContractFunction
1271 | - [Moralis Provider](https://github.com/MoralisWeb3/react-moralis#wrap-your-app-in-a-moralisprovider)
1272 | - [useMoralis](https://github.com/MoralisWeb3/react-moralis#usemoralis)
1273 | - [parseInt](https://www.w3schools.com/JSREF/jsref_parseint.asp)
1274 | ## useState
1275 | - [useState Hook](https://reactjs.org/docs/hooks-state.html)
1276 | ## Calling Functions in NextJS
1277 | ## useNotification
1278 | - Add `onError` to all your `runContractFunction` calls
1279 | ## Reading & Displaying Contract Data
1280 | ## A Note about `onSuccess`
1281 | - `onSuccess` just checks to see if MetaMask sends the transaction, not
1282 | ## A Challenge to You
1283 | ## Tailwind & Styling
1284 | - [Learn CSS](https://www.w3schools.com/css/)
1285 | - [Tailwindcss](https://tailwindcss.com/)
1286 | - [PostCSS Extension](https://marketplace.visualstudio.com/items?itemName=csstools.postcss)
1287 | - [Tailwind Extension](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss)
1288 | - [Install Tailwind into NextJS](https://tailwindcss.com/docs/guides/nextjs)
1289 | ## Introduction to Hosting your Site
1290 | *[⌨️ (18:12:50) Introdunction to Hosting your Site](https://youtu.be/gyMwXuJrbJQ?t=65570)*
1291 | - [Vercel](https://vercel.com/)
1292 | - [Moralis](https://moralis.io/)
1293 | - [Netilfy](https://www.netlify.com/)
1294 | - [IPFS](https://ipfs.io/)
1295 | ## IPFS
1296 | *[⌨️ (18:15:14) IPFS](https://youtu.be/gyMwXuJrbJQ?t=65714)*
1297 | - [What is IPFS](https://www.youtube.com/watch?v=5Uj6uR3fp-U)
1298 | - [IPFS](https://ipfs.io/)
1299 | ## Hosting on IPFS
1300 | *[⌨️ (18:18:51) Hosting on IPFS](https://youtu.be/gyMwXuJrbJQ?t=65931)*
1301 | - [IPFS Companion](https://chrome.google.com/webstore/detail/ipfs-companion/nibjojkomfdiaoajekhjakgkdhaomnch)
1302 | - [Brave Browser](https://brave.com/)
1303 | - `yarn build && yarn next export`
1304 | ## Hosting on IPFS & Filecoin using Fleek
1305 | *[⌨️ (18:25:45) Hosting on IPFS & Filecoin using Fleek](https://youtu.be/gyMwXuJrbJQ?t=66345)*
1306 | - [Fleek](https://fleek.co/)
1307 | ## Filecoin Overview
1308 | *[⌨️ (18:31:28) Filecoin Overview](https://youtu.be/gyMwXuJrbJQ?t=66688)*
1309 | - [Special Guest Ally Haire](https://twitter.com/DeveloperAlly)
1310 | - [IPFS URL of Ally's Video](ipfs://bafybeiasd6oxqiefoxgtskrokomexnb4zcq3fhwlcbyplx2paw65zmq2du)
1311 | ## Lesson 10 Recap
1312 |
1313 | # Lesson 11: Hardhat Starter Kit
1314 |
1315 | *[⌨️ (18:51:36) Lesson 11: Hardhat Starter Kit](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=67896s)*
1316 |
1317 | 💻 Code: https://github.com/smartcontractkit/hardhat-starter-kit
1318 |
1319 | # Lesson 12: Hardhat ERC20s
1320 |
1321 | *[⌨️ (18:59:24) Lesson 12: Hardhat ERC20s](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=68364s)*
1322 |
1323 | 💻 Code: https://github.com/PatrickAlphaC/hardhat-erc20-fcc
1324 |
1325 | ## What is an ERC? What is an EIP?
1326 | - [What is an EIP?](https://eips.ethereum.org/)
1327 | - [EIPs codebase](https://github.com/ethereum/EIPs)
1328 | ## What is an ERC20?
1329 | - [Video (using brownie/python)](https://youtu.be/8rpir_ZSK1g?t=39)
1330 | - [EIP-20](https://eips.ethereum.org/EIPS/eip-20)
1331 | - [ERC-677](https://github.com/ethereum/EIPs/issues/677)
1332 | - [EIP-777](https://eips.ethereum.org/EIPS/eip-777)
1333 | ## Manually Creating an ERC20 Token
1334 | ## Creating an ERC20 Token with Openzeppelin
1335 | - [Openzeppelin](https://openzeppelin.com/)
1336 | - [Openzeppelin Contracts](https://github.com/OpenZeppelin/openzeppelin-contracts)
1337 | - [Solmate (Openzeppelin alternative)](https://github.com/Rari-Capital/solmate)
1338 | ## Lesson 12 Recap
1339 |
1340 | # Lesson 13: Hardhat DeFi & Aave
1341 |
1342 | *[⌨️ (19:16:13) Lesson 13: Hardhat DeFi & Aave](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=69373s)*
1343 |
1344 | 💻 Code: https://github.com/PatrickAlphaC/hardhat-defi-fcc
1345 |
1346 | ## What is DeFi?
1347 | - [What is DeFi?](https://chain.link/education/defi)
1348 | - [DefiLlama](https://defillama.com/)
1349 | ## What is Aave?
1350 | - [Aave](https://aave.com/)
1351 | - [My Previous Aave Video on Shorting Assets](https://www.youtube.com/watch?v=TmNGAvI-RUA)
1352 | ## Programmatic Borrowing & Lending
1353 | - [DAI](https://makerdao.com/en/)
1354 | - [Uniswap](https://app.uniswap.org/)
1355 | ## WETH - Wrapped ETH
1356 | - [WETH Token Rinkeby Etherscan](https://rinkeby.etherscan.io/token/0xc778417e063141139fce010982780140aa0cd5ab#writeContract)
1357 | - [WETH Token Mainnet](https://etherscan.io/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2)
1358 | ## Forking Mainnet
1359 | - [Mainnet Forking](https://hardhat.org/hardhat-network/guides/mainnet-forking.html)
1360 | ## Depositing into Aave
1361 | - [Aave V2 Docs](https://docs.aave.com/developers/v/2.0/)
1362 | - [Aave NPM](https://www.npmjs.com/package/@aave/protocol-v2)
1363 | ## Borrowing from Aave
1364 | - [Aave Borrowing FAQs](https://docs.aave.com/faq/borrowing)
1365 | - [Health Factor](https://docs.aave.com/faq/borrowing#what-is-the-health-factor)
1366 | - [Aave Risk Parameters](https://docs.aave.com/risk/asset-risk/risk-parameters)
1367 | ## Repaying with Aave
1368 | ## Visualizing the Transactions
1369 | - [aTokens](https://docs.aave.com/developers/v/1.0/developing-on-aave/the-protocol/atokens)
1370 | ## Lesson 13 Recap
1371 | ## Happy Bow-Tie Friday with Austin Griffith
1372 | - [Special Guest Austin Griffith](https://twitter.com/austingriffith)!
1373 | - [Speed Run Ethereum](https://speedrunethereum.com/)
1374 | ### More DeFi Learnings:
1375 | - [Defi-Minimal](https://github.com/smartcontractkit/defi-minimal/tree/main/contracts)
1376 | - [Defi Dad](https://www.youtube.com/channel/UCatItl6C7wJp9txFMbXbSTg)
1377 |
1378 |
1379 | # Lesson 14: Hardhat NFTs (EVERYTHING you need to know about NFTs)
1380 |
1381 | *[⌨️ (20:28:51) Lesson 14: Hardhat NFTs ](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=73731s)*
1382 |
1383 | 💻 Code: https://github.com/PatrickAlphaC/hardhat-nft-fcc
1384 |
1385 | ## What is an NFT?
1386 | - [Video](https://www.youtube.com/watch?v=9yuHz6g_P50)
1387 | - [Optional: All on Chain SVG NFT](https://www.youtube.com/watch?v=9oERTH9Bkw0)
1388 | - [EIP-721](https://eips.ethereum.org/EIPS/eip-721)
1389 | ## Code Overview
1390 | - [Opensea Testnet](https://testnets.opensea.io/)
1391 | ## Hardhat Setup
1392 | ## Basic NFT
1393 | ### Write Tests
1394 | - [Openzeppelin NFT](https://docs.openzeppelin.com/contracts/4.x/)
1395 | ## Random IPFS NFT
1396 | ### Mapping Chainlink VRF Requests
1397 | ### Creating Rare NFTs
1398 | ### Setting the NFT Image
1399 | ### Setting an NFT Mint Price
1400 | ### Deploy Script
1401 | ### Uploading Token Images with Pinata
1402 | - [Pinata](https://pinata.cloud)
1403 | - [nft.storage](https://nft.storage)
1404 | - [Pinata NPM](https://www.npmjs.com/package/@pinata/sdk)
1405 | - [Pinata Docs](https://docs.pinata.cloud/)
1406 | ### Uploading Token URIs (metadata) with Pinata
1407 | ### Deploying
1408 | ### Tests
1409 | ## Dynamic SVG On-Chain NFT
1410 | - [Patrick's Original Video](https://www.youtube.com/watch?v=9oERTH9Bkw0)
1411 | ### What is an SVG?
1412 | - [SVG Tutorial](https://www.w3schools.com/graphics/svg_intro.asp)
1413 | - [On-Chain SVG Example](https://opensea.io/assets/matic/0x291ff90b9c410f56e047599bfee6b585c0c484d7/2)
1414 | ### Initial Code
1415 | ### Base64 Encoding
1416 | - [Base64 Encoding](https://en.wikipedia.org/wiki/Base64)
1417 | - [Example Encoder](https://base64.guru/converter/encode/image/svg)
1418 | - [base64-sol](https://www.npmjs.com/package/base64-sol/v/1.0.1)
1419 | ## Advanced: EVM Opcodes, Encoding, and Calling
1420 | ### abi.encode & abi.encodePacked
1421 | - [abi.encode](https://docs.soliditylang.org/en/v0.8.14/cheatsheet.html?highlight=cheatsheet#global-variables)
1422 | - [abi.encodePacked](https://docs.soliditylang.org/en/v0.8.14/cheatsheet.html?highlight=cheatsheet#global-variables)
1423 | Thanks to [Alex Roan](https://twitter.com/alexroan) for his help on this session!
1424 | - [Example Contract Creation Transaction](https://rinkeby.etherscan.io/tx/0x924f592458b0e37ee17024f9c826b97697455cd97f6946b802bc42296e77ae43)
1425 | What REALLY is the ABI?
1426 | - [EVM Opcodes](https://www.evm.codes/)
1427 | - [More EVM Opcodes](https://github.com/crytic/evm-opcodes)
1428 | - [Solidity Cheatsheet](https://docs.soliditylang.org/en/v0.8.13/cheatsheet.html?highlight=encodewithsignature)
1429 | - [abi.encode vs abi.encodePacked](https://ethereum.stackexchange.com/questions/91826/why-are-there-two-methods-encoding-arguments-abi-encode-and-abi-encodepacked)
1430 | ### Introduction to Encoding Function Calls Directly
1431 | ### Introduction to Encoding Function Calls Recap
1432 | ### Encoding Function Calls Directly
1433 | - [Function Selector](https://blog.openzeppelin.com/deconstructing-a-solidity-contract-part-iii-the-function-selector-6a9b6886ea49/)
1434 | - [Function Signature](https://twitter.com/PatrickAlphaC/status/1517156225670078465)
1435 | ### Creating an NFT TokenURI on-Chain
1436 | ### Making the NFT Dynamic
1437 | ### Deploy Script
1438 | ## Deploying the NFTs to a Testnet
1439 | ## Lesson 14 Recap
1440 |
1441 |
1442 | Extra credit:
1443 | - [Deconstructing Solidity](https://blog.openzeppelin.com/deconstructing-a-solidity-contract-part-ii-creation-vs-runtime-6b9d60ecb44c/)
1444 | - [Knowing and controlling your Smart Contract Address](https://www.youtube.com/watch?v=56K0FdosZ8g)
1445 | - [From Solidity to byte code](https://www.youtube.com/watch?v=RxL_1AfV7N4)
1446 |
1447 | # Lesson 15: NextJS NFT Marketplace (If you finish this lesson, you are a full-stack MONSTER!)
1448 |
1449 | *[⌨️ (23:37:03) Lesson 15: NextJS NFT Marketplace (Full Stack / Front End)](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=85023s)*
1450 |
1451 | 💻 Code:
1452 | - Backend (Contracts): https://github.com/PatrickAlphaC/hardhat-nft-marketplace-fcc
1453 | - Frontend (Moralis Indexer): https://github.com/PatrickAlphaC/nextjs-nft-marketplace-moralis-fcc
1454 | - Frontend (TheGraph Indexer): https://github.com/PatrickAlphaC/nextjs-nft-marketplace-thegraph-fcc
1455 | - The Graph: https://github.com/PatrickAlphaC/graph-nft-marketplace-fcc
1456 |
1457 | Special thanks to [Matt Durkin](https://twitter.com/mdurkin92) for help with this section.
1458 |
1459 | ## Introduction
1460 | - [Opensea](https://opensea.io/)
1461 | - [Artion](https://github.com/Fantom-foundation/Artion-Contracts)
1462 | ## Part I: NFT Marketplace Contracts
1463 | ### Hardhat Setup
1464 | ### NftMarketplace.sol
1465 | - [Pull Over Push](https://fravoll.github.io/solidity-patterns/pull_over_push.html)
1466 | ## Reentrancy
1467 | - [Reentrancy](https://solidity-by-example.org/hacks/re-entrancy)
1468 | - [Rekt.news](https://rekt.news/leaderboard/)
1469 | - [Openzeppelin NonReentrant](https://docs.openzeppelin.com/contracts/4.x/api/security#ReentrancyGuard)
1470 | ### NftMarketplace.sol - Continued
1471 | ### NftMarketplace.sol - Deploy Script
1472 | ### NftMarketplace.sol - Tests
1473 | ### NftMarketplace.sol - Scripts
1474 |
1475 | ## Part II: Moralis Front End
1476 | ### What is Moralis?
1477 | - [Special Guest Ivan Liljeqvist](https://twitter.com/IvanOnTech)
1478 | ### NextJS Setup
1479 | - [Link NextJS](https://nextjs.org/docs/api-reference/next/link)
1480 | ### Adding Tailwind
1481 | - [Tailwind with NextJS](https://tailwindcss.com/docs/guides/nextjs)
1482 | ### Introduction to Indexing in Web3
1483 | - [TheGraph](https://thegraph.com/en/)
1484 | - [Moralis](https://moralis.io/)
1485 | ### Connecting Moralis to our Local Hardhat Node
1486 | - [NextJS Environment Variables](https://nextjs.org/docs/basic-features/environment-variables)
1487 | - [Reverse Proxy FRP](https://github.com/fatedier/frp/releases)
1488 | - [Docs](https://docs.moralis.io/moralis-dapp/web3/setting-up-ganache)
1489 | - [Trouble Shooting](https://docs.moralis.io/faq#frpc)
1490 | - [Moralis Forum](https://forum.moralis.io/)
1491 | - [Moralis Admin CLI](https://docs.moralis.io/moralis-dapp/tools/moralis-admin-cli)
1492 | ### Moralis Event Sync
1493 | - [Moralis Add Event Sync From Code](https://docs.moralis.io/moralis-dapp/connect-the-sdk/connect-using-node#add-new-event-sync-from-code)
1494 | #### Reset Local Chain
1495 | ### Moralis Cloud Functions
1496 | - [Moralis Cloud Functions](https://docs.moralis.io/moralis-dapp/cloud-code/cloud-functions)
1497 | - [Moralis Logging](https://docs.moralis.io/moralis-dapp/tools/moralis-admin-cli#get-logs)
1498 | - [Hardhat Network Reference](https://hardhat.org/hardhat-network/reference/)
1499 | - Moralis Database only confirms a transaction with a block confirmation - so we need to move blocks on our hardhat local node.
1500 | - [Moralis Triggers](https://docs.moralis.io/moralis-dapp/cloud-code/triggers)
1501 | #### Practice Resetting the Local Chain
1502 | ### Moralis Cloud Functions II
1503 | ### Querying the Moralis Database
1504 | - [Moralis Queries](https://docs.moralis.io/moralis-dapp/database/queries)
1505 | ### Rendering the NFT Images
1506 | - [useNFTBalance](https://github.com/MoralisWeb3/react-moralis#usenftbalances)
1507 | - [fetch](https://www.npmjs.com/package/node-fetch)
1508 | - [next/image](https://nextjs.org/docs/api-reference/next/image#loader-configuration)
1509 | ### Update Listing Modal
1510 | ### Buy NFT Listing
1511 | ### Listing NFTs for Sale
1512 | - [web3uikit Form](https://web3uikit.com/)
1513 |
1514 | ## Part III: TheGraph Front End
1515 | ### Introduction
1516 | ### What is The Graph?
1517 | - [Special Guest Nader Dabit](https://twitter.com/dabit3)
1518 | ### Building a Subgraph
1519 | - [Example Subgraphs](https://thegraph.com/explorer/)
1520 | - [The Graph Studio](https://thegraph.com/studio/)
1521 | - [GraphQL VSCode Extension](https://marketplace.visualstudio.com/items?itemName=GraphQL.vscode-graphql)
1522 | - [GraphQL](https://graphql.org/)
1523 | ### Deploying our Subgraph
1524 | - [GraphQL Queries](https://www.tutorialspoint.com/graphql/graphql_query.htm)
1525 | ### Reading from The Graph
1526 | - [@apollo/client](https://www.npmjs.com/package/@apollo/client)
1527 | - [gql](https://www.npmjs.com/package/gql)
1528 | - [The Graph Docs](https://thegraph.com/docs/en/)
1529 | ### Hosting our Dapp
1530 |
1531 | 🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊 Completed Front End Basics! 🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊
1532 |
1533 | # Lesson 16: Hardhat Upgrades
1534 |
1535 | *[⌨️ (28:53:11) Lesson 16: Hardhat Upgrades](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=103991s)*
1536 |
1537 | 💻 Code: https://github.com/PatrickAlphaC/hardhat-upgrades-fcc
1538 |
1539 | ## Upgradable Smart Contracts Overview
1540 | - [Optional Video](https://www.youtube.com/watch?v=bdXJmWajZRY)
1541 | - [Links from Video]
1542 | ## Types of Upgrades
1543 | 1. Parameter
1544 | 2. Social Migrate
1545 | 3. Proxy
1546 | 1. Proxy Gotchas
1547 | 1. [Function Collisions](https://blog.openzeppelin.com/the-state-of-smart-contract-upgrades/#diamonds)
1548 | 2. [Storage Collisions](https://blog.openzeppelin.com/the-state-of-smart-contract-upgrades/#diamonds)
1549 | 2. [Metamorphic Upgrades](https://github.com/PatrickAlphaC/hardhat-metamorphic-upgrades-fcc)
1550 | 3. [Transparent](https://blog.openzeppelin.com/the-transparent-proxy-pattern/)
1551 | 4. [UUPS](https://forum.openzeppelin.com/t/uups-proxies-tutorial-solidity-javascript/7786)
1552 | 5. [Diamond](https://eips.ethereum.org/EIPS/eip-2535)
1553 | ## Delegatecall
1554 | - [delegatecall (solidity-by-example)](https://solidity-by-example.org/delegatecall)
1555 | - [Yul](https://docs.soliditylang.org/en/latest/yul.html)
1556 | ## Small Proxy Example
1557 | - [EIP 1967](https://eips.ethereum.org/EIPS/eip-1967)
1558 | ## Transparent Upgradable Smart Contract
1559 | - [Hardhat-deploy Proxies](https://github.com/wighawag/hardhat-deploy#deploying-and-upgrading-proxies)
1560 | - [Openzeppelin Upgrades Plugin](https://docs.openzeppelin.com/upgrades-plugins/1.x/)
1561 | - [Openzeppelin upgrades tutorial](https://forum.openzeppelin.com/t/openzeppelin-upgrades-step-by-step-tutorial-for-hardhat/3580)
1562 | - [hardhat deploy upgrades examples](https://github.com/wighawag/template-ethereum-contracts/tree/examples/openzeppelin-proxies/deploy)
1563 |
1564 |
1565 | # Lesson 17: Hardhat DAOs
1566 |
1567 | *[⌨️ (29:45:24) Lesson 17: Hardhat DAOs](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=107124s)*
1568 |
1569 | ⬆️ Up-to-date code: https://github.com/PatrickAlphaC/dao-template
1570 |
1571 | 💻 Code from video: https://github.com/PatrickAlphaC/hardhat-dao-fcc
1572 |
1573 | ## Introduction
1574 | ## What is a DAO?
1575 | - [What is a DAO?](https://www.youtube.com/watch?v=X_QKZzd68ro)
1576 | ## How to build a DAO
1577 | - [How to build a DAO](https://www.youtube.com/watch?v=AhJtmUqhAqg)
1578 | - That's Patrick
1579 | - [PY Code](https://github.com/brownie-mix/dao-mix)
1580 | - [Python Video](https://www.youtube.com/watch?v=rD8AxZ_wBA4)
1581 | - [Openzeppelin Governance](https://docs.openzeppelin.com/contracts/4.x/api/governance)
1582 | - [Compound Governance](https://compound.finance/governance)
1583 | - [Contract Wizard](https://docs.openzeppelin.com/contracts/4.x/wizard)
1584 | - [CastVoteBySig](https://forum.openzeppelin.com/t/what-is-votecastbysig/17069/2)
1585 |
1586 | # Lesson 18: Security & Auditing
1587 |
1588 | *[⌨️ (31:28:32) Lesson 18: Security & Auditing ](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=113312s)*
1589 |
1590 | 💻 Code: https://github.com/PatrickAlphaC/hardhat-security-fcc
1591 |
1592 | ## Introduction
1593 | - [Readiness Guide](https://learn.openzeppelin.com/security-audits/readiness-guide)
1594 | ## Slither
1595 | - [Install python](https://www.python.org/downloads/)
1596 | - [Slither](https://github.com/crytic/slither#how-to-install)
1597 | - [solc-select](https://github.com/crytic/solc-select)
1598 | - [Fuzz testing](https://en.wikipedia.org/wiki/Fuzzing)
1599 | ## Fuzzing and Eth Security Toolbox
1600 | - [Echidna](https://github.com/crytic/echidna)
1601 | - [Docker Install](https://docs.docker.com/get-docker/)
1602 | - [Eth-Security-ToolBox](https://github.com/trailofbits/eth-security-toolbox)
1603 | ## Closing Thoughts
1604 | - [Best Practices](https://consensys.github.io/smart-contract-best-practices/)
1605 | - [Attacks](https://consensys.github.io/smart-contract-best-practices/known_attacks/)
1606 | - [Oracle Attacks](https://hackernoon.com/how-dollar100m-got-stolen-from-defi-in-2021-price-oracle-manipulation-and-flash-loan-attacks-explained-3n6q33r1)
1607 | - [Re-entrancy Attacks](https://quantstamp.com/blog/what-is-a-re-entrancy-attack)
1608 | - [Damn Vulnerable Defi](https://www.damnvulnerabledefi.xyz/)
1609 | - [Ethernaut](https://ethernaut.openzeppelin.com/)
1610 | - Some Auditors:
1611 | - [OpenZeppelin](https://openzeppelin.com/)
1612 | - [SigmaPrime](https://sigmaprime.io/)
1613 | - [Trail of Bits](https://www.trailofbits.com/)
1614 |
1615 | # Congratulations
1616 |
1617 | 🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊 Completed The Course! 🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊
1618 |
1619 | ## Where do I go now?
1620 |
1621 | ### Learning More
1622 |
1623 | - [CryptoZombies](https://cryptozombies.io/)
1624 | - [Patrick Collins](https://www.youtube.com/channel/UCn-3f8tw_E1jZvhuHatROwA)
1625 | - [Dapp University](https://www.youtube.com/channel/UCY0xL8V6NzzFcwzHCgB8orQ)
1626 | - [ChainShot](https://www.chainshot.com/courses)
1627 | - [Cami Ramos Garzon](https://twitter.com/camiinthisthang)
1628 | - [Albert Hu](https://twitter.com/thatguyintech)
1629 | - [Ivan Liljeqvist](https://twitter.com/IvanOnTech)
1630 | - [Ally Haire](https://twitter.com/DeveloperAlly)
1631 | - [Stephen Fluin](https://twitter.com/stephenfluin)
1632 | - [Eat the Blocks](https://www.youtube.com/channel/UCZM8XQjNOyG2ElPpEUtNasA)
1633 | - [Austin Griffith](https://www.youtube.com/channel/UC_HI2i2peo1A-STdG22GFsA)
1634 | - [Nader Dabit](https://www.youtube.com/user/boyindasouth)
1635 | - [Ethereum.org](https://ethereum.org/en/)
1636 |
1637 | ### Community
1638 |
1639 | - [Twitter](https://twitter.com/PatrickAlphaC)
1640 | - [Hardhat Discord](https://discord.gg/9zk7snTfWe)
1641 | - [Chainlink Discord](https://discord.gg/2YHSAey)
1642 | - [Ethereum Discord](https://ethereum.org/en/)
1643 | - [Reddit ethdev](https://www.reddit.com/r/ethdev/)
1644 |
1645 | ### Hackathons
1646 |
1647 | - [CL Hackathon](https://chain.link/hackathon)
1648 | - [ETH Global](https://ethglobal.co/)
1649 | - [ETH India](https://twitter.com/ETHIndiaco)
1650 |
1651 | Be sure to check out project grant programs!
1652 |
1653 | And make today an amazing day!
1654 |
1655 | # Thank you
1656 |
1657 | 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!
1658 |
1659 | [](https://twitter.com/PatrickAlphaC)
1660 | [](https://www.youtube.com/channel/UCn-3f8tw_E1jZvhuHatROwA)
1661 | [](https://www.linkedin.com/in/patrickalphac/)
1662 | [](https://medium.com/@patrick.collins_58673/)
1663 |
1664 |
1665 |
--------------------------------------------------------------------------------