diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
new file mode 100644
index 00000000..18c91471
--- /dev/null
+++ b/CODE_OF_CONDUCT.md
@@ -0,0 +1,128 @@
+# Contributor Covenant Code of Conduct
+
+## Our Pledge
+
+We as members, contributors, and leaders pledge to make participation in our
+community a harassment-free experience for everyone, regardless of age, body
+size, visible or invisible disability, ethnicity, sex characteristics, gender
+identity and expression, level of experience, education, socio-economic status,
+nationality, personal appearance, race, religion, or sexual identity
+and orientation.
+
+We pledge to act and interact in ways that contribute to an open, welcoming,
+diverse, inclusive, and healthy community.
+
+## Our Standards
+
+Examples of behavior that contributes to a positive environment for our
+community include:
+
+* Demonstrating empathy and kindness toward other people
+* Being respectful of differing opinions, viewpoints, and experiences
+* Giving and gracefully accepting constructive feedback
+* Accepting responsibility and apologizing to those affected by our mistakes,
+ and learning from the experience
+* Focusing on what is best not just for us as individuals, but for the
+ overall community
+
+Examples of unacceptable behavior include:
+
+* The use of sexualized language or imagery, and sexual attention or
+ advances of any kind
+* Trolling, insulting or derogatory comments, and personal or political attacks
+* Public or private harassment
+* Publishing others' private information, such as a physical or email
+ address, without their explicit permission
+* Other conduct which could reasonably be considered inappropriate in a
+ professional setting
+
+## Enforcement Responsibilities
+
+Community leaders are responsible for clarifying and enforcing our standards of
+acceptable behavior and will take appropriate and fair corrective action in
+response to any behavior that they deem inappropriate, threatening, offensive,
+or harmful.
+
+Community leaders have the right and responsibility to remove, edit, or reject
+comments, commits, code, wiki edits, issues, and other contributions that are
+not aligned to this Code of Conduct, and will communicate reasons for moderation
+decisions when appropriate.
+
+## Scope
+
+This Code of Conduct applies within all community spaces, and also applies when
+an individual is officially representing the community in public spaces.
+Examples of representing our community include using an official e-mail address,
+posting via an official social media account, or acting as an appointed
+representative at an online or offline event.
+
+## Enforcement
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be
+reported to the community leaders responsible for enforcement at
+.
+All complaints will be reviewed and investigated promptly and fairly.
+
+All community leaders are obligated to respect the privacy and security of the
+reporter of any incident.
+
+## Enforcement Guidelines
+
+Community leaders will follow these Community Impact Guidelines in determining
+the consequences for any action they deem in violation of this Code of Conduct:
+
+### 1. Correction
+
+**Community Impact**: Use of inappropriate language or other behavior deemed
+unprofessional or unwelcome in the community.
+
+**Consequence**: A private, written warning from community leaders, providing
+clarity around the nature of the violation and an explanation of why the
+behavior was inappropriate. A public apology may be requested.
+
+### 2. Warning
+
+**Community Impact**: A violation through a single incident or series
+of actions.
+
+**Consequence**: A warning with consequences for continued behavior. No
+interaction with the people involved, including unsolicited interaction with
+those enforcing the Code of Conduct, for a specified period of time. This
+includes avoiding interactions in community spaces as well as external channels
+like social media. Violating these terms may lead to a temporary or
+permanent ban.
+
+### 3. Temporary Ban
+
+**Community Impact**: A serious violation of community standards, including
+sustained inappropriate behavior.
+
+**Consequence**: A temporary ban from any sort of interaction or public
+communication with the community for a specified period of time. No public or
+private interaction with the people involved, including unsolicited interaction
+with those enforcing the Code of Conduct, is allowed during this period.
+Violating these terms may lead to a permanent ban.
+
+### 4. Permanent Ban
+
+**Community Impact**: Demonstrating a pattern of violation of community
+standards, including sustained inappropriate behavior, harassment of an
+individual, or aggression toward or disparagement of classes of individuals.
+
+**Consequence**: A permanent ban from any sort of public interaction within
+the community.
+
+## Attribution
+
+This Code of Conduct is adapted from the [Contributor Covenant][homepage],
+version 2.0, available at
+https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
+
+Community Impact Guidelines were inspired by [Mozilla's code of conduct
+enforcement ladder](https://github.com/mozilla/diversity).
+
+[homepage]: https://www.contributor-covenant.org
+
+For answers to common questions about this code of conduct, see the FAQ at
+https://www.contributor-covenant.org/faq. Translations are available at
+https://www.contributor-covenant.org/translations.
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 00000000..a382e8b1
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,35 @@
+# How do I make a contribution?
+
+Never made an open-source contribution before? Wondering how contributions work in this project? Here's a quick run-down!
+
+- Find an issue that you want to address or a feature that you want to add.
+
+- Fork the repository associated with the issue to your local GitHub organization. This means that you will have a copy of the repository under `your-GitHub-username/repository-name`.
+
+- Clone the forked repository to your local machine using `git clone https://github.com/github-username/repository-name.git`. E.g. for a repo named "xyzRepo", the user can run https://github.com/github-username/xyzRepo.git.
+
+- Create a new branch for your fix using `git checkout -b branch-name-here`. E.g `git checkout -b main`
+
+- Make the appropriate changes for the issue you are trying to address or the feature that you want to add.
+
+- Use `git add insert-paths-of-changed-files-here` to add the file contents of the changed files to the "snapshot" git uses to manage the state of the project, also known as the index.
+
+- Use `git commit -m "Insert a short message of the changes made here"` to store the contents of the index with a descriptive message.
+
+- Push the changes to the remote repository using `git push origin branch-name-here`.
+
+- Submit a pull request to the upstream repository.
+
+- Title the pull request with a short description of the changes made and the issue or bug number associated with your change. For example, you can title an issue like so **"Added more log outputting to resolve #4352"**.
+
+- In the description of the pull request, explain the changes that you made, any issues you think exist with the pull request you made, and any questions you have for the maintainer. It's OK if your pull request is not perfect (no pull request is), the reviewer will be able to help you fix any problems and improve it!
+
+- Wait for the pull request to be reviewed by a maintainer.
+
+- Make changes to the pull request if the reviewing maintainer recommends them.
+
+- Celebrate your success after your pull request is merged!
+
+# Where can I go for help?
+
+If you need help, you can ask questions on our **discussions** tab.
diff --git a/README.md b/README.md
index 6dc901b9..785d079f 100644
--- a/README.md
+++ b/README.md
@@ -1,13 +1,8 @@
-
-
-
+# Update: Head to Cyfrin Updraft
+> **ℹ️ Important:**
+> This repo is no longer actively maintained as there have been changes in Hardhat tooling. The video is out of sync with the code, and you can still follow along with the video, but you will likely need to troubleshoot the changes in the tooling and dependencies. Note also that best practices have evolved since this video was made.
+> If you'd like to continue your training with more up-to-date material, you can take a look at [Cyfrin Updraft](https://updraft.cyfrin.io/). That content is developed with love by Patrick & Cyfrin <3. However note that Cyfrin Updraft training uses Foundry, not Hardhat, so there will be tooling changes involved.
# Web3, Full Stack Solidity, Smart Contract & Blockchain - Beginner to Expert ULTIMATE Course | Javascript Edition
@@ -25,26 +20,27 @@ Welcome to the repository for the Ultimate Web3, Full Stack Solidity, and Smart
All code references have both a javascript and a typescript edition.
-Recommended Testnet: Rinkeby
+Recommended Testnet: Sepolia
+
+_We have updated the repos to work with Sepolia due to Rinkeby and Kovan being sunset, and Goerli being a disaster. Let us know if any of the changes break stuff!_
# [Testnet Faucets](https://faucets.chain.link)
-Main Faucet: https://faucets.chain.link
-Backup Faucet: https://rinkebyfaucet.com/
+Main Faucet: https://faucets.chain.link
+Backup Faucet: https://sepoliafaucet.com/
-> ⚠️ 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.
+> ⚠️ 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.
# Resources For This Course
### Questions
-- [Github Discussions](https://github.com/smartcontractkit/full-blockchain-solidity-course-js/discussions)
- - Ask questions and chat about the course here!
-- [Stack Exchange Ethereum](https://ethereum.stackexchange.com/)
- - Great place for asking technical questions about Ethereum
-- [StackOverflow](https://stackoverflow.com/)
- - Great place for asking technical questions overall
-
+- [Github Discussions](https://github.com/smartcontractkit/full-blockchain-solidity-course-js/discussions)
+ - Ask questions and chat about the course here!
+- [Stack Exchange Ethereum](https://ethereum.stackexchange.com/)
+ - Great place for asking technical questions about Ethereum
+- [StackOverflow](https://stackoverflow.com/)
+ - Great place for asking technical questions overall
# Table of Contents
@@ -308,7 +304,7 @@ Backup Faucet: https://rinkebyfaucet.com/
Raffle.sol Staging Tests
Testing on a Testnet
Conclusion
@@ -525,32 +521,42 @@ Backup Faucet: https://rinkebyfaucet.com/
# Lesson 0: The Edge of the Rabbit Hole
+
## Welcome to the course!
-*[⌨️ (00:00:00) Lesson 0: Welcome To Blockchain](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=0s)*
-## Best Practices
+
+_[⌨️ (00:00:00) Lesson 0: Welcome To Blockchain](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=0s)_
+
+## Best Practices
+
- **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.
- **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 :)
- **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
-- **Take Breaks:** You will exhaust your mind and recall less if you go all out and watch the entire course in one siting.
+- **Take Breaks:** You will exhaust your mind and recall less if you go all out and watch the entire course in one sitting.
**Suggested Strategy** every 25 minutes take a 5 min break, and every 2 hours take a longer 30 min break
- **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.
# Lesson 1: Blockchain Basics
-*[⌨️ (00:09:05) Lesson 1: Blockchain Basics](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=545s)*
-## What is a Blockchain? What does a blockchain do?
-- [Bitcoin Whitepaper](https://bitcoin.org/bitcoin.pdf)
- - [Satoshi Nakamoto](https://en.wikipedia.org/wiki/Satoshi_Nakamoto)
-- [Ethereum Whitepaper](https://ethereum.org/en/whitepaper/)
- - [Vitalik Buterin](https://en.wikipedia.org/wiki/Vitalik_Buterin)
-- [What is a Smart Contract?](https://chain.link/education/smart-contracts)
-- [Nick Szabo](https://en.wikipedia.org/wiki/Nick_Szabo)
-- [Hybrid Smart Contracts](https://blog.chain.link/hybrid-smart-contracts-explained/)
-- [Blockchain Oracles](https://betterprogramming.pub/what-is-a-blockchain-oracle-f5ccab8dbd72?source=friends_link&sk=d921a38466df8a9176ed8dd767d8c77d)
-- [Terminology](https://connect.comptia.org/content/articles/blockchain-terminology)
-- [Web3](https://en.wikipedia.org/wiki/Web3)
-- [What is a blockchain](https://www.investopedia.com/terms/b/blockchain.asp)
+
+_[⌨️ (00:09:05) Lesson 1: Blockchain Basics](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=545s)_
+
+## What is a Blockchain? What does a blockchain do?
+
+- [Bitcoin Whitepaper](https://bitcoin.org/bitcoin.pdf)
+ - [Satoshi Nakamoto](https://en.wikipedia.org/wiki/Satoshi_Nakamoto)
+- [Ethereum Whitepaper](https://ethereum.org/en/whitepaper/)
+ - [Vitalik Buterin](https://en.wikipedia.org/wiki/Vitalik_Buterin)
+- [What is a Smart Contract?](https://chain.link/education/smart-contracts)
+- [Nick Szabo](https://en.wikipedia.org/wiki/Nick_Szabo)
+- [Hybrid Smart Contracts](https://blog.chain.link/hybrid-smart-contracts-explained/)
+- [Blockchain Oracles](https://betterprogramming.pub/what-is-a-blockchain-oracle-f5ccab8dbd72?source=friends_link&sk=d921a38466df8a9176ed8dd767d8c77d)
+- [Terminology](https://connect.comptia.org/content/articles/blockchain-terminology)
+- [Web3](https://en.wikipedia.org/wiki/Web3)
+- [What is a blockchain](https://www.investopedia.com/terms/b/blockchain.asp)
## The Purpose Of Smart Contracts
+
+_[⌨️ (00:18:27) The Purpose of Smart Contracts](https://youtu.be/gyMwXuJrbJQ?t=1107)_
+
- 🎥 [Original Video](https://www.youtube.com/watch?v=_JeRq7Gwj5Y&feature=youtu.be)
- 🦬 [My ETH Denver Talk](https://www.youtube.com/watch?v=06hXCX_jj2E)
- 🍔 [McDonalds Scandal](https://www.chicagotribune.com/sns-mcdonalds-story.html)
@@ -560,6 +566,9 @@ Backup Faucet: https://rinkebyfaucet.com/
- 🔮 [Chainlink & Oracles](https://www.youtube.com/watch?v=tIUHQ7sDoaU)
## Other Blockchain Benefits
+
+_[⌨️ (00:30:41) Other Blockchain Benefits](https://youtu.be/gyMwXuJrbJQ?t=1841)_
+
- Decentralized
- Transparency & Flexibility
- Speed & Efficiency
@@ -567,7 +576,10 @@ Backup Faucet: https://rinkebyfaucet.com/
- Counterparty Risk Removal
- Trust Minimized Agreements
-## What have Smart Contracts done so far?
+## What have Smart Contracts done so far?
+
+_[⌨️ (00:36:36) What have Smart Contracts done so far?](https://youtu.be/gyMwXuJrbJQ?t=2196)_
+
- [DeFi](https://chain.link/education/defi)
- [Defi Llama](https://defillama.com/)
- [Why DeFi is Important](https://medium.com/the-capital/why-defi-1519cc4d4bd3)
@@ -575,98 +587,139 @@ Backup Faucet: https://rinkebyfaucet.com/
- [NFTs](https://www.youtube.com/watch?v=9yuHz6g_P50)
## Making Your First Transaction
-- [Metamask Download Link](https://metamask.io/)
- - [What is a Private Key?](https://www.coinbase.com/learn/crypto-basics/what-is-a-private-key)
- - [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)
-- [Etherscan](https://etherscan.io/)
-- [Rinkeby Etherscan](https://rinkeby.etherscan.io/)
-- [Kovan Etherscan](https://kovan.etherscan.io/)
-- Rinkeby Faucet (Check the [link token contracts page](https://docs.chain.link/docs/link-token-contracts/#rinkeby))
- - 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.
-- OR, use the [Kovan ETH Faucet](https://faucets.chain.link/), just be sure to swap your metamask to kovan!
+
+_[⌨️ (00:39:17) Making Your First Transaction](https://youtu.be/gyMwXuJrbJQ?t=2357)_
+
+- [Metamask Download Link](https://metamask.io/)
+ - [What is a Private Key?](https://www.coinbase.com/learn/crypto-basics/what-is-a-private-key)
+ - [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)
+- [Etherscan](https://etherscan.io/)
+- [Sepolia Etherscan](https://sepolia.etherscan.io/)
+- Sepolia Faucet (Check the [link token contracts page](https://docs.chain.link/docs/link-token-contracts/#sepolia))
+ - NOTE: The Chainlink documentation always has the most up to date faucets on their [link token contracts page](https://docs.chain.link/docs/link-token-contracts/#sepolia). If the faucet above is broken, check the chainlink documentation for the most up to date faucet.
+- OR, use the [Sepolia ETH Faucet](https://faucets.chain.link/), just be sure to swap your metamask to Sepolia!
## Gas I: Introduction to Gas
-- [Gas and Gas Fees](https://ethereum.org/en/developers/docs/gas/)
-- [Wei, Gwei, and Ether Converter](https://eth-converter.com/)
-- [ETH Gas Station](https://ethgasstation.info/)
+
+_[⌨️ (00:58:59) Gas I: Introduction to Gas](https://youtu.be/gyMwXuJrbJQ?t=3539)_
+
+- [Gas and Gas Fees](https://ethereum.org/en/developers/docs/gas/)
+- [Wei, Gwei, and Ether Converter](https://eth-converter.com/)
+- [ETH Gas Station](https://ethgasstation.info/)
## How Do Blockchains Work?
+
+_[⌨️ (01:05:32) How Do Blockchains Work](https://youtu.be/gyMwXuJrbJQ?t=3932)_
+
- [What is a hash?](https://techjury.net/blog/what-is-cryptographic-hash/)
- [Blockchain Demo](https://andersbrownworth.com/blockchain/)
- [Summary](https://ethereum.org/en/developers/docs/intro-to-ethereum/)
## Signing Transactions
-- [Public / Private Keys](https://andersbrownworth.com/blockchain/public-private-keys/keys)
-- [Layer 2 and Rollups](https://ethereum.org/en/developers/docs/scaling/layer-2-rollups/)
-- [Decentralized Blockchain Oracles](https://blog.chain.link/what-is-the-blockchain-oracle-problem/)
+
+_[⌨️ (01:22:55) Signing Transactions](https://youtu.be/gyMwXuJrbJQ?t=4975)_
+
+- [Public / Private Keys](https://andersbrownworth.com/blockchain/public-private-keys/keys)
+- [Layer 2 and Rollups](https://ethereum.org/en/developers/docs/scaling/layer-2-rollups/)
+- [Decentralized Blockchain Oracles](https://blog.chain.link/what-is-the-blockchain-oracle-problem/)
## Gas II
-- [Block Rewards](https://www.investopedia.com/terms/b/block-reward.asp)
-- Advanced Gas
- - [EIP 1559](https://www.youtube.com/watch?v=MGemhK9t44Q)
- - GWEI, WEI, and ETH
- - [ETH Converter](https://eth-converter.com/)
+
+_[⌨️ (01:30:22) Gas II: Block Rewards & EIP 1559](https://youtu.be/gyMwXuJrbJQ?t=5422)_
+
+- [Block Rewards](https://www.investopedia.com/terms/b/block-reward.asp)
+- Advanced Gas
+ - [EIP 1559](https://www.youtube.com/watch?v=MGemhK9t44Q)
+ - GWEI, WEI, and ETH
+ - [ETH Converter](https://eth-converter.com/)
+
## Gas II Summary
-- [Run Your Own Ethereum Node](https://geth.ethereum.org/docs/getting-started)
+
+_[⌨️ (01:36:44) Gas II Summary](https://youtu.be/gyMwXuJrbJQ?t=5804)_
+
+- [Run Your Own Ethereum Node](https://geth.ethereum.org/docs/getting-started)
## High-Level Blockchain Fundamentals
-- [Consensus](https://wiki.polkadot.network/docs/learn-consensus)
-- [Proof of Stake](https://ethereum.org/en/developers/docs/consensus-mechanisms/pos/)
-- [Proof of Work](https://ethereum.org/en/developers/docs/consensus-mechanisms/pow/)
-- [Nakamoto Consensus](https://blockonomi.com/nakamoto-consensus/)
-- [Ethereum 2 (the merge)](https://ethereum.org/en/eth2/)
-🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊 Completed Blockchain Basics! 🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊
+_[⌨️ (01:39:32) High-Level Blockchain Fundamentals]https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=5972s()_
+
+- [Consensus](https://wiki.polkadot.network/docs/learn-consensus)
+- [Proof of Stake](https://ethereum.org/en/developers/docs/consensus-mechanisms/pos/)
+- [Proof of Work](https://ethereum.org/en/developers/docs/consensus-mechanisms/pow/)
+- [Nakamoto Consensus](https://blockonomi.com/nakamoto-consensus/)
+- [Ethereum 2 (the merge)](https://ethereum.org/en/eth2/)
+
+🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊 Completed Blockchain Basics! 🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊
# Lesson 2: [Welcome to Remix! Simple Storage](https://github.com/PatrickAlphaC/simple-storage-fcc)
-*[⌨️ (02:01:16) Lesson 2: Welcome to Remix! Simple Storage](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=7276s)*
+_[⌨️ (02:01:16) Lesson 2: Welcome to Remix! Simple Storage](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=7276s)_
💻 Code: https://github.com/PatrickAlphaC/simple-storage-fcc
## Introduction
+
+_[⌨️ (02:03:05) Introduction](https://youtu.be/gyMwXuJrbJQ?t=7385)_
+
- [Remix](https://remix.ethereum.org/)
-- [Solidity Documentation](https://docs.soliditylang.org/en/v0.8.6/index.html)
+- [Solidity Documentation](https://docs.soliditylang.org/en/latest/index.html)
## Setting Up Your First Contract
-- Versioning
-- Take notes in your code!
-- [What is a software license](https://snyk.io/learn/what-is-a-software-license/)
-- SPDX License
-- Compiling
-- Contract Declaration
+
+_[⌨️ (02:05:18) Setting Up Your First Contract](https://youtu.be/gyMwXuJrbJQ?t=7518)_
+
+- Versioning
+- Take notes in your code!
+- [What is a software license](https://snyk.io/learn/what-is-a-software-license/)
+- SPDX License
+- Compiling
+- Contract Declaration
## Basic Solidity: Types
-- [Types & Declaring Variables](https://docs.soliditylang.org/en/v0.8.13/)
- - `uint256`, `int256`, `bool`, `string`, `address`, `bytes32`
- - [Solidity Types](https://docs.soliditylang.org/en/latest/types.html)
- - [Bits and Bytes](https://www.youtube.com/watch?v=Dnd28lQHquU)
-- Default Initializations
-- Comments
+
+_[⌨️ (02:12:28) Basic Solidity Types](https://youtu.be/gyMwXuJrbJQ?t=7948)_
+
+- [Types & Declaring Variables](https://docs.soliditylang.org/en/v0.8.13/)
+ - `uint256`, `int256`, `bool`, `string`, `address`, `bytes32`
+ - [Solidity Types](https://docs.soliditylang.org/en/latest/types.html)
+ - [Bits and Bytes](https://www.youtube.com/watch?v=Dnd28lQHquU)
+- Default Initializations
+- Comments
## Basic Solidity: Functions
-- Functions
-- Deploying a Contract
- - Smart Contracts have addresses just like our wallets
-- Calling a public state-changing Function
-- [Visibility](https://docs.soliditylang.org/en/v0.7.3/contracts.html#visibility-and-getters)
-- Gas III | An example
-- Scope
-- View & Pure Functions
+
+_[⌨️ (02:18:40) Basic Solidity Functions](https://youtu.be/gyMwXuJrbJQ?t=8320)_
+
+- Functions
+- Deploying a Contract
+ - Smart Contracts have addresses just like our wallets
+- Calling a public state-changing Function
+- [Visibility](https://docs.soliditylang.org/en/latest/contracts.html#visibility-and-getters)
+- Gas III | An example
+- Scope
+- View & Pure Functions
## Basic Solidity: Arrays & Structs
-- Structs
-- Intro to Storage
-- Arrays
-- Dynamic & Fixed Sized
-- `push` array function
+_[⌨️ (02:35:30) Basic Solidity Arrays & Structs](https://youtu.be/gyMwXuJrbJQ?t=9331)_
+
+- Structs
+- Intro to Storage
+- Arrays
+- Dynamic & Fixed Sized
+- `push` array function
## Basic Solidity: Compiler Errors and Warnings
+
+_[⌨️ (02:45:35) Basic Solidity Errors & Warnings](https://youtu.be/gyMwXuJrbJQ?t=9935)_
+
- Yellow: Warnings are Ok
- Red: Errors are not Ok
## Memory, Storage, Calldata (Intro)
+
+_[⌨️ (02:46:34) Basic Solidity Memory, Storage, & Calldata (Intro)](https://youtu.be/gyMwXuJrbJQ?t=9994)_
+
- 6 Places you can store and access data
- calldata
- memory
@@ -676,59 +729,84 @@ Backup Faucet: https://rinkebyfaucet.com/
- stack
## Mappings
+
+_[⌨️ (02:50:17) Basic Solidity Mappings](https://youtu.be/gyMwXuJrbJQ?t=10217)_
+
- [Mappings](https://solidity-by-example.org/mapping)
## Deploying your First Contract
-- A testnet or mainnet
-- Connecting Metamask
-- [Find a faucet here](https://docs.chain.link/docs/link-token-contracts/#rinkeby)
-- See the faucets at the top of this readme!
-- Interacting with Deployed Contracts
+
+_[⌨️ (02:53:38) Deploying your First Contract](https://youtu.be/gyMwXuJrbJQ?t=10418)_
+
+- A testnet or mainnet
+- Connecting Metamask
+- [Find a faucet here](https://docs.chain.link/docs/link-token-contracts/#Sepolia)
+- See the faucets at the top of this readme!
+- Interacting with Deployed Contracts
## The EVM & A Recap of Lesson 2
-- The EVM
+
+_[⌨️ (03:03:07) The EVM & A Recap of Lesson 2](https://youtu.be/gyMwXuJrbJQ?t=10987)_
+
+- The EVM
# Lesson 3: Remix Storage Factory
-*[⌨️ (03:05:34) Lesson 3: Remix Storage Factory](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=11134s)*
+_[⌨️ (03:05:34) Lesson 3: Remix Storage Factory](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=11134s)_
💻 Code: https://github.com/PatrickAlphaC/storage-factory-fcc
## Introduction
+
+_[⌨️ (03:06:06) Introduction](https://youtu.be/gyMwXuJrbJQ?t=11166)_
+
- [Factory Pattern](https://betterprogramming.pub/learn-solidity-the-factory-pattern-75d11c3e7d29)
## Basic Solidity: Importing Contracts into other Contracts
+
+_[⌨️ (03:07:29) Importing Contracts into other Contracts](https://youtu.be/gyMwXuJrbJQ?t=11249)_
+
- [Composibility](https://chain.link/techtalks/defi-composability)
-- [Solidity new keyword](https://docs.soliditylang.org/en/v0.8.14/control-structures.html?highlight=new#creating-contracts-via-new)
+- [Solidity new keyword](https://docs.soliditylang.org/en/latest/control-structures.html?highlight=new#creating-contracts-via-new)
- [Importing Code in solidity](https://solidity-by-example.org/import)
## Basic Solidity: Interacting with other Contracts
+
+_[⌨️ (03:16:36) Interacting with other contracts](https://youtu.be/gyMwXuJrbJQ?t=11796)_
+
- To interact, you always need: ABI + Address
-- [ABI](https://docs.soliditylang.org/en/v0.8.14/abi-spec.html?highlight=abi)
+- [ABI](https://docs.soliditylang.org/en/latest/abi-spec.html?highlight=abi)
## Basic Solidity: Inheritance & Overrides
-- [Inheritance](https://solidity-by-example.org/inheritance)
-- [Override & Virtual Keyword](https://docs.soliditylang.org/en/v0.8.14/contracts.html?highlight=override#function-overriding)
+
+_[⌨️ (03:25:23) Inheritance & Overrides](https://youtu.be/gyMwXuJrbJQ?t=12323)_
+
+- [Inheritance](https://solidity-by-example.org/inheritance)
+- [Override & Virtual Keyword](https://docs.soliditylang.org/en/latest/contracts.html?highlight=override#function-overriding)
## Lesson 3 Recap
+_[⌨️ (03:30:29) Lesson 3 Recap](https://youtu.be/gyMwXuJrbJQ?t=12629)_
+
# Lesson 4: Remix Fund Me
-*[⌨️ (03:31:55) Lesson 4: Remix Fund Me](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=12715s)*
+_[⌨️ (03:31:55) Lesson 4: Remix Fund Me](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=12715s)_
💻 Code: https://github.com/PatrickAlphaC/fund-me-fcc
## Introduction
## Sending ETH Through a Function & Reverts
+
- [Fields in a Transaction](https://ethereum.org/en/developers/docs/transactions/)
- [More on v,r,s](https://ethereum.stackexchange.com/questions/15766/what-does-v-r-s-in-eth-gettransactionbyhash-mean)
- [payable](https://solidity-by-example.org/payable)
-- [msg.value & Other global keywords](https://docs.soliditylang.org/en/v0.8.14/cheatsheet.html?highlight=cheatsheet#global-variables)
+- [msg.value & Other global keywords](https://docs.soliditylang.org/en/latest/cheatsheet.html?highlight=cheatsheet#global-variables)
- [require](https://codedamn.com/news/solidity/what-is-require-in-solidity)
- [revert](https://medium.com/blockchannel/the-use-of-revert-assert-and-require-in-solidity-and-the-new-revert-opcode-in-the-evm-1a3a7990e06e)
## Chainlink & Oracles
+
- [What is a blockchain oracle?](https://chain.link/education/blockchain-oracles)
- [What is the oracle problem?](https://blog.chain.link/what-is-the-blockchain-oracle-problem/)
- [Chainlink](https://chain.link/)
@@ -740,58 +818,71 @@ Backup Faucet: https://rinkebyfaucet.com/
- [Importing Tokens into your Metamask](https://consensys.net/blog/metamask/how-to-add-your-custom-tokens-in-metamask/)
- [Request and Receive Chainlink Model](https://docs.chain.link/docs/architecture-request-model/)
-## Review of Sending ETH and working with Chainlink
+## Review of Sending ETH and working with Chainlink
## Interfaces & Price Feeds
+
- [Chainlink Price Feeds (Data Feeds)](https://docs.chain.link/docs/get-the-latest-price/)
-- [Chainlink GitHub](https://github.com/smartcontractkit/chainlink)
+- [Chainlink GitHub](https://github.com/smartcontractkit/chainlink)
- [Interface](https://solidity-by-example.org/interface)
## Importing from GitHub & NPM
+
- [Chainlink NPM Package](https://www.npmjs.com/package/@chainlink/contracts)
-## Floating Point Math in Solidtiy
-- [tuple](https://docs.soliditylang.org/en/v0.8.14/abi-spec.html?highlight=tuple#handling-tuple-types)
+## Floating Point Math in Solidity
+
+- [tuple](https://docs.soliditylang.org/en/latest/abi-spec.html?highlight=tuple#handling-tuple-types)
- [Floating Point Numbers in Solidity](https://stackoverflow.com/questions/58277234/does-solidity-supports-floating-point-number)
- [Type Casting](https://ethereum.stackexchange.com/questions/6891/type-casting-in-solidity)
- Gas Estimation Failed
- Someone should make an article explaining this error
## Basic Solidity: Arrays & Structs II
-- [msg.sender](https://docs.soliditylang.org/en/v0.8.14/cheatsheet.html?highlight=msg.sender)
-## Review of Interfacs, Importing from GitHub, & Math in Solidity
+- [msg.sender](https://docs.soliditylang.org/en/latest/cheatsheet.html?highlight=msg.sender)
+
+## Review of Interfaces, Importing from GitHub, & Math in Solidity
## Libraries
+
- [Library](https://docs.soliditylang.org/en/v0.8.14/contracts.html?highlight=library#libraries)
- [Solidity-by-example Library](https://solidity-by-example.org/library)
-## SafeMath, Overflow Checking, and the "unchecked" keywork
+## SafeMath, Overflow Checking, and the "unchecked" keyword
+
- [Openzeppelin Safemath](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/math/SafeMath.sol)
-- [unchecked vs. checked](https://docs.soliditylang.org/en/v0.8.0/control-structures.html#checked-or-unchecked-arithmetic)
+- [unchecked vs. checked](https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic)
## Basic Solidity: For Loop
+
- [For Loop](https://solidity-by-example.org/loop)
- `/* */` is another way to make comments
## Basic Solidity: Resetting an Array
## Sending ETH from a Contract
+
- [Transfer, Send, Call](https://solidity-by-example.org/sending-ether/)
- [this keyword](https://ethereum.stackexchange.com/questions/1781/what-is-the-this-keyword-in-solidity)
## Basic Solidity: Constructor
+
- [Constructor](https://solidity-by-example.org/constructor)
## Basic Solidity: Modifiers
+
- [Double equals](https://www.geeksforgeeks.org/solidity-operators/)
- [Modifier](https://solidity-by-example.org/function-modifier)
## Testnet Demo
+
- [Disconnecting Metamask](https://help.1inch.io/en/articles/4666771-metamask-how-to-connect-disconnect-and-switch-accounts-with-metamask-on-1inch-network)
-## Advanced Solidity
+## Advanced Solidity
+
### Immutable & Constant
+
- [Immutable](https://solidity-by-example.org/immutable)
- [Constant](https://solidity-by-example.org/constants)
- [Current ETH Gas Prices](https://etherscan.io/gastracker)
@@ -800,27 +891,31 @@ Backup Faucet: https://rinkebyfaucet.com/
- [Someone make this!](https://github.com/smartcontractkit/full-blockchain-solidity-course-js/issues/13)
### Custom Errors
+
- [Custom Errors Introduction](https://blog.soliditylang.org/2021/04/21/custom-errors/)
### Receive & Fallback Functions
-- [Solidity Docs Special Functions](https://docs.soliditylang.org/en/v0.8.14/contracts.html?highlight=fallback#special-functions)
+
+- [Solidity Docs Special Functions](https://docs.soliditylang.org/en/latest/contracts.html?highlight=fallback#special-functions)
- [Fallback](https://solidity-by-example.org/fallback)
-- [Receive](https://docs.soliditylang.org/en/v0.8.14/contracts.html?highlight=fallback#receive-ether-function)
+- [Receive](https://docs.soliditylang.org/en/latest/contracts.html?highlight=fallback#receive-ether-function)
## Lesson 4 Recap
-🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊 Completed Solidity Basics! 🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊
+🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊 Completed Solidity Basics! 🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊
# Lesson 5: Ethers.js Simple Storage
-*[⌨️ (05:30:42) Lesson 5: Ethers.js Simple Storage](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=19842s)*
+_[⌨️ (05:30:42) Lesson 5: Ethers.js Simple Storage](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=19842s)_
💻 Code: https://github.com/PatrickAlphaC/ethers-simple-storage-fcc
🧪 [Alchemy: https://alchemy.com/?a=673c802981](https://alchemy.com/?a=673c802981)
## Effective Debugging Strategies & Getting Help
-*[⌨️ (5:30:46) Effective Debugging Stategies & Getting Help](https://youtu.be/gyMwXuJrbJQ?t=19846)*
+
+_[⌨️ (5:30:46) Effective Debugging Stategies & Getting Help](https://youtu.be/gyMwXuJrbJQ?t=19846)_
+
1. Tinker and isolate problem
1. For this course, take at LEAST 15 minutes to figure out a bug.
2. Google / Web Search the Exact problem
@@ -830,11 +925,13 @@ Backup Faucet: https://rinkebyfaucet.com/
2. Use [Markdown](https://www.markdowntutorial.com/)
### How to Debug Anything Video
+
- [Patrick's Original Video](https://www.youtube.com/watch?v=XT8STflvwNo)
## Installation & Setup
-- [Visual Studio Code](https://code.visualstudio.com/)
- - [Crash Course](https://www.youtube.com/watch?v=WPqXP_kLzpo)
+
+- [Visual Studio Code](https://code.visualstudio.com/)
+ - [Crash Course](https://www.youtube.com/watch?v=WPqXP_kLzpo)
- [NodeJS](https://nodejs.org/en/)
- [VSCode Keybindings](https://code.visualstudio.com/docs/getstarted/keybindings)
- [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
@@ -843,28 +940,35 @@ Backup Faucet: https://rinkebyfaucet.com/
### Mac & Linux Setup
### Windows Setup
+
- [WSL](https://docs.microsoft.com/en-us/windows/wsl/install)
- When working in WSL, use Linux commands instead of Windows commands
- [TroubleShooting](https://docs.microsoft.com/en-us/windows/wsl/troubleshooting)
- `curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash`
> ⚠️ Please use Gitpod as an absolute last resort
+
### Gitpod
+
- [Gitpod](https://www.gitpod.io/)
- **If using this, NEVER share a private key with real money on Gitpod**
- Ideally you figure out the MacOS, Linux, or Windows install though
## Local Development Introduction
+
- `CMD + K` or `CTRL + K` clears the terminal
- `mkdir ethers-simple-storage-fcc`
- `code .` to open VSCode in a new VSCode window
+
### Optional Javascript Crash Courses
- - [NodeJS Course](https://www.youtube.com/watch?v=RLtyhwFtXQA)
- - [Javascript Course](https://www.youtube.com/watch?v=jS4aFq5-91M)
+
+- [NodeJS Course](https://www.youtube.com/watch?v=RLtyhwFtXQA)
+- [Javascript Course](https://www.youtube.com/watch?v=jS4aFq5-91M)
- Import your `SimpleStorage.sol`
- [Solidity + Hardhat VSCode Extension](https://marketplace.visualstudio.com/items?itemName=NomicFoundation.hardhat-solidity)
-- Format your solidity code with:
+- Format your solidity code with:
+
```
"[solidity]": {
"editor.defaultFormatter": "NomicFoundation.hardhat-solidity"
@@ -873,122 +977,198 @@ Backup Faucet: https://rinkebyfaucet.com/
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
```
+
In your `.vscode/settings.json` file.
+
- [Prettier Extension](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)
+
## Tiny Javascript Refresher
+
- [Javascript Tips](https://www.freecodecamp.org/news/learn-javascript-free-js-courses-for-beginners/)
+
## Asynchronous Programming in Javascript
+
- [Asynchronous Programming](https://www.bmc.com/blogs/asynchronous-programming/)
- [async keyword](https://www.w3schools.com/JS//js_async.asp)
- [Promise in Javascript](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)
- [await keyword](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await)
+
## Compiling our Solidity
+
- [Yarn Install](https://yarnpkg.com/getting-started/install)
- [solc-js](https://github.com/ethereum/solc-js)
- `yarn add solc@0.8.7-fixed`
- [yarn scripts](https://classic.yarnpkg.com/lang/en/docs/cli/run/)
+
## Ganache & Networks
+
- [Ganache](https://trufflesuite.com/ganache/)
- Networks in Metamask
- RPC URL
- [Geth](https://github.com/ethereum/go-ethereum)
- [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)
+
## Introduction to Ethers.js
+
- [Ethers.js](https://docs.ethers.io/v5/getting-started/)
- [prettier-plugin-solidity](https://github.com/prettier-solidity/prettier-plugin-solidity)
+
### A Note on the await Keyword
+
## Adding Transaction Overrides
+
## Transaction Receipts
-## Sending a "raw" Transaction in Ethersjs
-## Interacting with Contracts in Ethersjs
+
+## Sending a "raw" Transaction in Ethers.js
+
+## Interacting with Contracts in Ethers.js
+
- [EVM Decompiler](https://ethervm.io/decompile)
- [BigNumber](https://docs.ethers.io/v5/api/utils/bignumber/)
+
## Environment Variables
+
- [dotenv](https://www.npmjs.com/package/dotenv)
- [.gitignore](https://www.atlassian.com/git/tutorials/saving-changes/gitignore)
+
## Better Private Key Management
+
- [wallet.encrypt](https://docs.ethers.io/v5/api/signer/#Wallet-encrypt)
- [THE .ENV PLEDGE](https://github.com/smartcontractkit/full-blockchain-solidity-course-js/discussions/5)
+
## Optional Prettier Formatting
+
- [Prettier](https://prettier.io/docs/en/index.html)
- [Best README Template](https://github.com/othneildrew/Best-README-Template)
+
## Deploying to a Testnet or a Mainnet
+
- [Alchemy](https://alchemy.com/?a=673c802981)
- [Getting your private key from Metamask](https://metamask.zendesk.com/hc/en-us/articles/360015289632-How-to-Export-an-Account-Private-Key)
- `CTRL + C` stops any terminal command
+
## Verifying on Block Explorers from the UI
+
## Alchemy Dashboard & The Mempool
+
- [Special Guest Albert Hu](https://twitter.com/thatguyintech)
- [Mempool](https://ethereum.org/en/developers/tutorials/sending-transactions-using-web3-and-alchemy/#see-your-transaction-in-the-mempool)
+
## Lesson 5 Recap
+
### Typescript Ethers Simple Storage
# Lesson 6: Hardhat Simple Storage
-*[⌨️ (08:20:17) Lesson 6: Hardhat Simple Storage](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=30017s)*
+_[⌨️ (08:20:17) Lesson 6: Hardhat Simple Storage](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=30017s)_
💻 Code: https://github.com/PatrickAlphaC/hardhat-simple-storage-fcc
## Introduction
-*[⌨️ (08:20:19) Introduction](https://youtu.be/gyMwXuJrbJQ?t=30019)*
+
+_[⌨️ (08:20:19) Introduction](https://youtu.be/gyMwXuJrbJQ?t=30019)_
+
## Hardhat Setup
-*[⌨️ (08:22:47) Hardhat Setup](https://youtu.be/gyMwXuJrbJQ?t=30167)*
+
+_[⌨️ (08:22:47) Hardhat Setup](https://youtu.be/gyMwXuJrbJQ?t=30167)_
+
- [Hardhat Documentation](https://hardhat.org/)
- [DevDependencies vs Dependencies](https://stackoverflow.com/questions/18875674/whats-the-difference-between-dependencies-devdependencies-and-peerdependencies)
- [@ Sign node modules](https://stackoverflow.com/questions/36667258/what-is-the-meaning-of-the-at-prefix-on-npm-packages)
### Troubleshooting Hardhat Setup
-*[⌨️ (08:29:43) Troubleshooting Hardhat Setup](https://youtu.be/gyMwXuJrbJQ?t=30583)*
+
+_[⌨️ (08:29:43) Troubleshooting Hardhat Setup](https://youtu.be/gyMwXuJrbJQ?t=30583)_
+
- [Special Guest Cami Ramos Garzon](https://twitter.com/camiinthisthang)
+
## Hardhat Setup Continued
-*[⌨️ (08:31:48) Hardhat Setup Continued](https://youtu.be/gyMwXuJrbJQ?t=30708)*
+
+_[⌨️ (08:31:48) Hardhat Setup Continued](https://youtu.be/gyMwXuJrbJQ?t=30708)_
+
## Deploying SimpleStorage from Hardhat
-*[⌨️ (08:33:10) Deploying SimpleStorage from Hardhat](https://youtu.be/gyMwXuJrbJQ?t=30790)*
+
+_[⌨️ (08:33:10) Deploying SimpleStorage from Hardhat](https://youtu.be/gyMwXuJrbJQ?t=30790)_
+
## Networks in Hardhat
-*[⌨️ (08:41:44) Networks in Hardhat](https://youtu.be/gyMwXuJrbJQ?t=31304)*
+
+_[⌨️ (08:41:44) Networks in Hardhat](https://youtu.be/gyMwXuJrbJQ?t=31304)_
+
- [The Hardhat Network](https://hardhat.org/hardhat-network/)
- [Hardhat configuration](https://hardhat.org/config/#configuration)
- [Chain ID List](https://chainlist.org/)
+
## Programmatic Verification
-*[⌨️ (08:51:16) Programmatic Verification](https://youtu.be/gyMwXuJrbJQ?t=31876)*
+
+_[⌨️ (08:51:16) Programmatic Verification](https://youtu.be/gyMwXuJrbJQ?t=31876)_
+
- [Etherscan Verify Tutorial](https://docs.etherscan.io/tutorials/verifying-contracts-programmatically)
- [Etherscan Docs](https://docs.etherscan.io/)
- [Hardhat-Etherscan](https://hardhat.org/plugins/nomiclabs-hardhat-etherscan.html)
- [Etherscan API Keys](https://info.etherscan.com/api-keys/)
- [Javascript == vs ===](https://stackoverflow.com/questions/359494/which-equals-operator-vs-should-be-used-in-javascript-comparisons)
+
## Interacting with Contracts in Hardhat
-*[⌨️ (09:06:37) Interacting with Contracts in Hardhat](https://youtu.be/gyMwXuJrbJQ?t=32797)*
+
+_[⌨️ (09:06:37) Interacting with Contracts in Hardhat](https://youtu.be/gyMwXuJrbJQ?t=32797)_
+
## Artifacts Troubleshooting
-*[⌨️ (09:09:42) Artifacts Troubleshooting](https://youtu.be/gyMwXuJrbJQ?t=32982)*
+
+_[⌨️ (09:09:42) Artifacts Troubleshooting](https://youtu.be/gyMwXuJrbJQ?t=32982)_
+
## Custom Hardhat Tasks
-*[⌨️ (09:10:52) Custom Hardhat Tasks](https://youtu.be/gyMwXuJrbJQ?t=33052)*
+
+_[⌨️ (09:10:52) Custom Hardhat Tasks](https://youtu.be/gyMwXuJrbJQ?t=33052)_
+
- [Hardhat Tasks](https://hardhat.org/guides/create-task.html)
- [Javascript Arrow Functions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions)
+
## Hardhat Localhost Node
-*[⌨️ (09:18:12) Hardhat Localhost Node](https://youtu.be/gyMwXuJrbJQ?t=33492)*
+
+_[⌨️ (09:18:12) Hardhat Localhost Node](https://youtu.be/gyMwXuJrbJQ?t=33492)_
+
## The Hardhat Console
-*[⌨️ (09:23:11) The Hardhat Console](https://youtu.be/gyMwXuJrbJQ?t=33791)*
+
+_[⌨️ (09:23:11) The Hardhat Console](https://youtu.be/gyMwXuJrbJQ?t=33791)_
+
- [Hardhat Console](https://hardhat.org/guides/hardhat-console.html)
+
## Hardhat Tests
-*[⌨️ (09:26:13) Hardhat Tests](https://youtu.be/gyMwXuJrbJQ?t=33973)*
+
+_[⌨️ (09:26:13) Hardhat Tests](https://youtu.be/gyMwXuJrbJQ?t=33973)_
+
- [Hardhat Tests](https://hardhat.org/tutorial/testing-contracts.html#_5-testing-contracts)
- [Mocha Style Tests](https://mochajs.org/)
- [Chai](https://www.npmjs.com/package/chai)
- [Waffle Tests](https://ethereum-waffle.readthedocs.io/en/latest/)
+
## Hardhat Gas Reporter
-*[⌨️ (09:38:10) Hardhat Gas Reporter](https://youtu.be/gyMwXuJrbJQ?t=34690)*
+
+_[⌨️ (09:38:10) Hardhat Gas Reporter](https://youtu.be/gyMwXuJrbJQ?t=34690)_
+
- [Hardhat Gas Reporter](https://www.npmjs.com/package/hardhat-gas-reporter)
- [Coinmarketcap API](https://coinmarketcap.com/api/)
+
## Solidity Coverage
-*[⌨️ (09:44:40) Solidity Coverage](https://youtu.be/gyMwXuJrbJQ?t=35080)*
+
+_[⌨️ (09:44:40) Solidity Coverage](https://youtu.be/gyMwXuJrbJQ?t=35080)_
+
- [Solidity Coverage](https://github.com/sc-forks/solidity-coverage)
+
## Hardhat Waffle
-*[⌨️ (09:47:02) Hardhat Waffle](https://youtu.be/gyMwXuJrbJQ?t=35222)*
+
+_[⌨️ (09:47:02) Hardhat Waffle](https://youtu.be/gyMwXuJrbJQ?t=35222)_
+
- [Hardhat-Waffle](https://npm.io/package/@nomiclabs/hardhat-waffle)
+
## Lesson 6 Recap
-*[⌨️ (09:47:37) Lesson 6 Recap](https://youtu.be/gyMwXuJrbJQ?t=35257)*
+
+_[⌨️ (09:47:37) Lesson 6 Recap](https://youtu.be/gyMwXuJrbJQ?t=35257)_
+
### Typescript Hardhat Simple Storage
-*[⌨️ (09:52:15) Typescript Hardhat Simple Storage](https://youtu.be/gyMwXuJrbJQ?t=35535)*
+
+_[⌨️ (09:52:15) Typescript Hardhat Simple Storage](https://youtu.be/gyMwXuJrbJQ?t=35535)_
+
- [Typechain](https://github.com/dethcrypto/TypeChain)
```
@@ -997,218 +1177,364 @@ yarn add --dev @typechain/ethers-v5 @typechain/hardhat @types/chai @types/node @
# Lesson 7: Hardhat Fund Me
-*[⌨️ (10:00:48) Lesson 7: Hardhat Fund Me](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=36048s)*
+_[⌨️ (10:00:48) Lesson 7: Hardhat Fund Me](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=36048s)_
💻 Code: https://github.com/PatrickAlphaC/hardhat-fund-me-fcc
## Introduction
-*[⌨️ (10:00:50) Introduction](https://youtu.be/gyMwXuJrbJQ?t=36050)*
+
+_[⌨️ (10:00:50) Introduction](https://youtu.be/gyMwXuJrbJQ?t=36050)_
+
## Hardhat Setup - Fund Me
-*[⌨️ (10:03:41) Hardhat Setup - Fund Me](https://youtu.be/gyMwXuJrbJQ?t=36221)*
+
+_[⌨️ (10:03:41) Hardhat Setup - Fund Me](https://youtu.be/gyMwXuJrbJQ?t=36221)_
+
## Linting
-*[⌨️ (10:06:20) Linting](https://youtu.be/gyMwXuJrbJQ?t=36380)*
+
+_[⌨️ (10:06:20) Linting](https://youtu.be/gyMwXuJrbJQ?t=36380)_
+
- [Eslint](https://eslint.org/)
- [Solhint](https://github.com/protofire/solhint)
- [Linting Code](https://www.perforce.com/blog/qac/what-lint-code-and-why-linting-important)
+
## Hardhat Setup - Fund Me - Continued
-*[⌨️ (10:07:47) Hardhat Setup - Fund Me - Continued](https://youtu.be/gyMwXuJrbJQ?t=36467)*
+
+_[⌨️ (10:07:47) Hardhat Setup - Fund Me - Continued](https://youtu.be/gyMwXuJrbJQ?t=36467)_
+
## Importing from NPM
-*[⌨️ (10:09:38) Importing from NPM](https://youtu.be/gyMwXuJrbJQ?t=36578)*
+
+_[⌨️ (10:09:38) Importing from NPM](https://youtu.be/gyMwXuJrbJQ?t=36578)_
+
- [@chainlink/contracts](https://www.npmjs.com/package/@chainlink/contracts)
+
## Hardhat Deploy
-*[⌨️ (10:10:43) Hardhat Deploy](https://youtu.be/gyMwXuJrbJQ?t=36643)*
+
+_[⌨️ (10:10:43) Hardhat Deploy](https://youtu.be/gyMwXuJrbJQ?t=36643)_
+
- [Hardhat Deploy](https://github.com/wighawag/hardhat-deploy)
+
## Mocking
-*[⌨️ (10:21:05) Mocking](https://youtu.be/gyMwXuJrbJQ?t=37265)*
+
+_[⌨️ (10:21:05) Mocking](https://youtu.be/gyMwXuJrbJQ?t=37265)_
+
- [Mocking](https://stackoverflow.com/questions/2665812/what-is-mocking)
- [Aave Github](https://github.com/aave/aave-v3-core)
- [Chainlink Github](https://github.com/smartcontractkit/chainlink)
- Multiple Versions of Solidity
- Tags in hardhat
+
## Utils Folder
-*[⌨️ (10:52:51) Utils Folder](https://youtu.be/gyMwXuJrbJQ?t=39171)*
+
+_[⌨️ (10:52:51) Utils Folder](https://youtu.be/gyMwXuJrbJQ?t=39171)_
+
## Testnet Demo - Hardhat Fund Me
-*[⌨️ (10:55:45) Testnet Demo - Hardhat Fund Me](https://youtu.be/gyMwXuJrbJQ?t=39345)*
+
+_[⌨️ (10:55:45) Testnet Demo - Hardhat Fund Me](https://youtu.be/gyMwXuJrbJQ?t=39345)_
+
- Hardhat Deploy Block Confirmations
+
+### TypeScript
+
+- [Code file](https://github.com/PatrickAlphaC/hardhat-fund-me-fcc/blob/84271e7002e55d86c90b26466ff27bc067f25de0/deploy/01-deploy-fund-me.ts#L29) (TypeScript edition)
+- Define blockConfirmations in the `helper-hardhat-config.ts` file instead of `hardhat-config.js`.
+
## Solidity Style Guide
-*[⌨️ (11:00:10) Solidity Style Guide](https://youtu.be/gyMwXuJrbJQ?t=39610)*
-- [Style Guide](https://docs.soliditylang.org/en/v0.8.13/style-guide.html)
-- [NatSpec](https://docs.soliditylang.org/en/v0.8.13/natspec-format.html#natspec)
+
+_[⌨️ (11:00:10) Solidity Style Guide](https://youtu.be/gyMwXuJrbJQ?t=39610)_
+
+- [Style Guide](https://docs.soliditylang.org/en/latest/style-guide.html)
+- [NatSpec](https://docs.soliditylang.org/en/latest/natspec-format.html)
+
## Testing Fund Me
-*[⌨️ (11:08:36) Testing Fund Me](https://youtu.be/gyMwXuJrbJQ?t=40116)*
+
+_[⌨️ (11:08:36) Testing Fund Me](https://youtu.be/gyMwXuJrbJQ?t=40116)_
+
- [Unit Testing](https://en.wikipedia.org/wiki/Unit_testing)
- [Hardhat Deploy Fixtures](https://github.com/wighawag/hardhat-deploy#creating-fixtures)
- [ethers.getContract](https://github.com/wighawag/hardhat-deploy-ethers)
- [expect](https://ethereum-waffle.readthedocs.io/en/latest/matchers.html)
- [ethers.utils.parseUnits](https://docs.ethers.io/v5/api/utils/display-logic/#utils-parseUnits)
- [Waffle Chai Matchers](https://ethereum-waffle.readthedocs.io/en/latest/matchers.html)
+
## Breakpoints & Debugging
-*[⌨️ (11:30:39) Breakpoints & Debugging](https://youtu.be/gyMwXuJrbJQ?t=41439)*
+
+_[⌨️ (11:30:39) Breakpoints & Debugging](https://youtu.be/gyMwXuJrbJQ?t=41439)_
+
- [VSCode Breakpoints](https://code.visualstudio.com/Docs/editor/debugging)
-## Gas III
-*[⌨️ (11:33:40) Gas III](https://youtu.be/gyMwXuJrbJQ?t=41620)*
+
+## Gas III
+
+_[⌨️ (11:33:40) Gas III](https://youtu.be/gyMwXuJrbJQ?t=41620)_
+
- [Transaction Response](https://docs.ethers.io/v5/api/providers/types/#providers-TransactionResponse)
- [Transaction Receipt](https://docs.ethers.io/v5/api/providers/types/#providers-TransactionReceipt)
+
## console.log & Debugging
-*[⌨️ (11:36:35) console.log & Debugging](https://youtu.be/gyMwXuJrbJQ?t=41795)*
+
+_[⌨️ (11:36:35) console.log & Debugging](https://youtu.be/gyMwXuJrbJQ?t=41795)_
+
- [Hardhat console.log](https://hardhat.org/hardhat-network/reference/#console-log)
+
## Testing Fund Me II
-*[⌨️ (11:37:31) Testing Fund Me II](https://youtu.be/gyMwXuJrbJQ?t=41851)*
+
+_[⌨️ (11:37:31) Testing Fund Me II](https://youtu.be/gyMwXuJrbJQ?t=41851)_
+
## Storage in Solidity
-*[⌨️ (11:44:34) Storage in Solidity](https://youtu.be/gyMwXuJrbJQ?t=42274)*
-- [Storage Layout](https://docs.soliditylang.org/en/v0.8.13/internals/layout_in_storage.html)
+
+_[⌨️ (11:44:34) Storage in Solidity](https://youtu.be/gyMwXuJrbJQ?t=42274)_
+
+- [Storage Layout](https://docs.soliditylang.org/en/latest/internals/layout_in_storage.html)
- [Purpose of the memory keyword](https://stackoverflow.com/questions/33839154/in-ethereum-solidity-what-is-the-purpose-of-the-memory-keyword)
- [getStorageAt](https://docs.ethers.io/v5/api/providers/provider/#Provider-getStorageAt)
+
## Gas Optimizations using Storage Knowledge
-*[⌨️ (11:52:38) Gas Optimizations using Storage Knowledge](https://youtu.be/gyMwXuJrbJQ?t=42758)*
+
+_[⌨️ (11:52:38) Gas Optimizations using Storage Knowledge](https://youtu.be/gyMwXuJrbJQ?t=42758)_
+
- [Opcodes](https://ethereum.org/en/developers/docs/evm/opcodes/)
- [Opcodes by Gas](https://github.com/crytic/evm-opcodes)
- [Opcodes by Gas](https://evm.codes/)
- Append `s_` to storage variables
- Append `i_` to immutable variables
- Caps lock and underscore constant variables
+
## Solidity Chainlink Style Guide
-*[⌨️ (12:05:29) Solidity Chainlink Style Guide](https://youtu.be/gyMwXuJrbJQ?t=43529)*
+
+_[⌨️ (12:05:29) Solidity Chainlink Style Guide](https://youtu.be/gyMwXuJrbJQ?t=43529)_
+
- [Chainlink Solidity Style Guide](https://github.com/smartcontractkit/full-blockchain-solidity-course-js/issues/13)
+
## Storage Review
-*[⌨️ (12:09:59) Storage Review](https://youtu.be/gyMwXuJrbJQ?t=43799)*
+
+_[⌨️ (12:09:59) Storage Review](https://youtu.be/gyMwXuJrbJQ?t=43799)_
+
## Staging Tests
-*[⌨️ (12:11:43) Staging Tests](https://youtu.be/gyMwXuJrbJQ?t=43903)*
+
+_[⌨️ (12:11:43) Staging Tests](https://youtu.be/gyMwXuJrbJQ?t=43903)_
+
- [Ternary](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_Operator)
+
## Running Scripts on a Local Node
-*[⌨️ (12:17:58) Running Scripts on a Local Node](https://youtu.be/gyMwXuJrbJQ?t=44278)*
+
+_[⌨️ (12:17:58) Running Scripts on a Local Node](https://youtu.be/gyMwXuJrbJQ?t=44278)_
+
## Adding Scripts to your package.json
-*[⌨️ (12:22:00) Adding Scripts to your package.json](https://youtu.be/gyMwXuJrbJQ?t=44520)*
+
+_[⌨️ (12:22:00) Adding Scripts to your package.json](https://youtu.be/gyMwXuJrbJQ?t=44520)_
+
## Pushing to GitHub
-*[⌨️ (12:25:17) Pushing to GitHub](https://youtu.be/gyMwXuJrbJQ?t=44717)*
+
+_[⌨️ (12:25:17) Pushing to GitHub](https://youtu.be/gyMwXuJrbJQ?t=44717)_
+
- [Github Quickstart](https://docs.github.com/en/get-started/quickstart)
- [What is Git?](https://www.git-scm.com/book/en/v2/Getting-Started-What-is-Git%3F)
- [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)
- [Learn about git and GitHub](https://www.youtube.com/watch?v=RGOj5yH7evk)
+
## 🐸🐦 [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!!)
# Lesson 8: HTML / Javascript Fund Me (Full Stack / Front End)
-*[⌨️ (12:32:57) Lesson 8: HTML / Javascript Fund Me (Full Stack / Front End)](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=45177s)*
+_[⌨️ (12:32:57) Lesson 8: HTML / Javascript Fund Me (Full Stack / Front End)](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=45177s)_
💻 Code: https://github.com/PatrickAlphaC/html-fund-me-fcc
## Introduction
+
## How Websites work with Web3 Wallets
+
- [How to Connect your Smart Contracts to Metamask](https://www.youtube.com/watch?v=pdsYCkUWrgQ)
- 💻 Code from Video: https://github.com/PatrickAlphaC/full-stack-web3-metamask-connectors
- ✍️ Article from Video: https://betterprogramming.pub/everything-you-need-to-know-about-fullstack-web3-94c0f1b18019?sk=a2764bcbdae98bf05e1052931de77982
+
## HTML Setup
+
- Live Server: ExtensionID: ritwickdey.LiveServer
+
## Connecting HTML to Metamask
+
- [Metamask Docs](https://docs.metamask.io/guide/)
+
## Javascript in it's own file
+
## ES6 vs Nodejs
+
- [ES6 vs Nodesjs](https://stackoverflow.com/questions/31354559/using-node-js-require-vs-es6-import-export#31367852)
- [Ethers docs for web browser](https://docs.ethers.io/v5/getting-started/#getting-started--importing--web-browser)
- [module vs text/javascript](https://stackoverflow.com/questions/51418964/script-type-text-javascript-vs-script-type-module)
+
## Sending a transaction from a Website
+
- [Web3Provider](https://docs.ethers.io/v5/api/providers/other/#Web3Provider)
- [Adding a network to metamask](https://metamask.zendesk.com/hc/en-us/articles/360043227612-How-to-add-a-custom-network-RPC)
+
## Resetting an Account in Metamask
+
```
MetaMask - RPC Error:
[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."}}}'
```
+
## Listening for Events and Completed Transactions
+
- [provider.once](https://docs.ethers.io/v5/api/providers/provider/#Provider-once)
- [Anonymous function](https://www.geeksforgeeks.org/javascript-anonymous-functions/)
- [Javascript Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)
+
## Input Forms
+
## Reading from the Blockchain
+
## Withdraw Function
+
## Lesson 8 Recap
+
### Optional Links:
+
- [Browserify](https://browserify.org/)
- [Watchify](https://www.npmjs.com/package/watchify)
# Lesson 9: Hardhat Smart Contract Lottery
-*[⌨️ (13:41:02) Lesson 9: Hardhat Smart Contract Lottery](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=49262s)*
+_[⌨️ (13:41:02) Lesson 9: Hardhat Smart Contract Lottery](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=49262s)_
💻 Code: https://github.com/PatrickAlphaC/hardhat-smartcontract-lottery-fcc
## Introduction
+
## Hardhat Setup - Smart Contract Lottery
-*[⌨️ (13:43:43) Hardhat Setup](https://youtu.be/gyMwXuJrbJQ?t=49423)*
+
+_[⌨️ (13:43:43) Hardhat Setup](https://youtu.be/gyMwXuJrbJQ?t=49423)_
+
- Install dependencies:
+
```bash
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
```
+
- Install dependencies (Typescript version):
+
```bash
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
```
+
## Raffle.sol Setup
-*[⌨️ (13:46:55) Raffle.sol Setup](https://youtu.be/gyMwXuJrbJQ?t=49615)*
+
+_[⌨️ (13:46:55) Raffle.sol Setup](https://youtu.be/gyMwXuJrbJQ?t=49615)_
+
- [Custom Errors in Solidity](https://blog.soliditylang.org/2021/04/21/custom-errors/)
+
## Introduction to Events
-*[⌨️ (13:54:02) Introduction to Events](https://youtu.be/gyMwXuJrbJQ?t=50042)*
+
+_[⌨️ (13:54:02) Introduction to Events](https://youtu.be/gyMwXuJrbJQ?t=50042)_
+
- [Events & Logging Video](https://www.youtube.com/watch?v=KDYJC85eS5M)
- [Events & Logging in Hardhat](https://github.com/PatrickAlphaC/hardhat-events-logs)
+
## Events in Raffle.sol
-*[⌨️ (14:00:47) Events in Raffle.sol](https://youtu.be/gyMwXuJrbJQ?t=50447)*
+
+_[⌨️ (14:00:47) Events in Raffle.sol](https://youtu.be/gyMwXuJrbJQ?t=50447)_
+
## Introduction to Chainlink VRF
-*[⌨️ (14:02:30) Introduction to Chainlink VRF](https://youtu.be/gyMwXuJrbJQ?t=50550)*
+
+_[⌨️ (14:02:30) Introduction to Chainlink VRF](https://youtu.be/gyMwXuJrbJQ?t=50550)_
+
- [Special Guest Stephen Fluin](https://twitter.com/stephenfluin)
+
### Sub-Lesson: Chainlink VRF
+
> - [Chainlink VRFv2 Docs](https://docs.chain.link/docs/get-a-random-number/)
> - [Chainlink VRFv2 Walkthrough](https://www.youtube.com/watch?v=rdJ5d8j1RCg)
> - [Chainlink Contracts](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/VRFConsumerBase.sol)
+
## Implementing Chainlink VRF - Introduction
-*[⌨️ (14:09:53) Implementing Chainlink VRF](https://youtu.be/gyMwXuJrbJQ?t=50993)*
+
+_[⌨️ (14:09:53) Implementing Chainlink VRF](https://youtu.be/gyMwXuJrbJQ?t=50993)_
+
### Hardhat Shorthand
+
- [Hardhat Shorthand](https://hardhat.org/guides/shorthand.html)
+
## Implementing Chainlink VRF - The Request
+
## Implementing Chainlink VRF - The FulFill
+
### Modulo
-- [Modulo](https://docs.soliditylang.org/en/v0.8.13/types.html?highlight=modulo#modulo)
+
+- [Modulo](https://docs.soliditylang.org/en/latest/types.html?highlight=modulo#modulo)
+
## Introduction to Chainlink Keepers
+
- [Chainlink Keepers Docs](https://docs.chain.link/docs/chainlink-keepers/introduction/)
- [Chainlink Keepers Walkthrough](https://www.youtube.com/watch?v=-Wkw5JVQGUo)
+
## Implementing Chainlink Keepers - checkUpkeep
+
### Enums
-- [Enum](https://docs.soliditylang.org/en/v0.8.13/structure-of-a-contract.html?highlight=enum#enum-types)
+
+- [Enum](https://docs.soliditylang.org/en/latest/structure-of-a-contract.html?highlight=enum#enum-types)
+
## Implementing Chainlink Keepers - checkUpkeep continued
+
- block.timestamp
+
## Implementing Chainlink Keepers - performUpkeep
+
## Code Cleanup
+
## Deploying Raffle.sol
+
### Mock Chainlink VRF Coordinator
+
### Continued
+
- [LINK Token](https://docs.chain.link/docs/link-token-contracts/)
+
## Raffle.sol Unit Tests
-- We use `async function` in the describe blocks at the start, but we correctly take them out later.
+
+- We use `async function` in the describe blocks at the start, but we correctly take them out later.
+
### Testing Events & Chai Matchers
+
- [Emit Chai Matcher](https://ethereum-waffle.readthedocs.io/en/latest/matchers.html#emitting-events)
+
### Continued I
+
## Hardhat Methods & Time Travel
+
- [Make Hardhat do whatever you want it to](https://hardhat.org/hardhat-network/reference/)
- [Special debugging hardhat methods](https://hardhat.org/hardhat-network/reference/#special-testing-debugging-methods)
+
### Continued II
+
## Callstatic
+
- [Callstatic](https://docs.ethers.io/v5/api/contract/contract/#contract-callStatic)
+
### Continued III
+
### Massive Promise Test
+
### Continued IV
+
## Raffle.sol Staging Tests
+
## Testing on a Testnet
-### Recommended LINK amounts for Rinkeby Staging Test:
+
+### Recommended LINK amounts for Sepolia Staging Test:
+
- Chainlink VRF: 2 LINK
- Chainlink Keepers: 8 LINK
+
## Conclusion
+
## Typescript - Smart Contract Lottery
-🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊 Completed Hardhat Basics! 🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊
+🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊 Completed Hardhat Basics! 🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊
# Lesson 10: NextJS Smart Contract Lottery (Full Stack / Front End)
-*[⌨️ (16:34:07) Lesson 10: NextJS Smart Contract Lottery (Full Stack / Front End)](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=59647s)*
+_[⌨️ (16:34:07) Lesson 10: NextJS Smart Contract Lottery (Full Stack / Front End)](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=59647s)_
💻 Code: https://github.com/PatrickAlphaC/nextjs-smartcontract-lottery-fcc
@@ -1217,9 +1543,11 @@ yarn add --dev @nomiclabs/hardhat-ethers@npm:hardhat-deploy-ethers ethers @nomic
⚡️⚡️ Live Demo Fleek: https://fancy-dream-3458.on.fleek.co/
## Introduction
-We move into using [NextJS](https://nextjs.org/) for our front end. NextJS is a [React framework](https://reactjs.org/) for building websites.
+
+We move into using [NextJS](https://nextjs.org/) for our front end. NextJS is a [React framework](https://reactjs.org/) for building websites.
### Optional Sub-Lesson: Full Stack Development & Other Libraries
+
- [6 Ways to connect your dapp to a wallet](https://www.youtube.com/watch?v=pdsYCkUWrgQ)
- [NextJS Crash Course](https://www.youtube.com/watch?v=mTz0GXj8NN0)
- Other React libraries:
@@ -1237,305 +1565,479 @@ We move into using [NextJS](https://nextjs.org/) for our front end. NextJS is a
- [Why use react?](https://www.freecodecamp.org/news/why-use-react-for-web-development/)
## NextJS Setup
+
- [NextJS Documentation](https://nextjs.org/learn/basics/create-nextjs-app)
- [NextJS Minimal Ethers Example For Lottery](https://github.com/PatrickAlphaC/nextjs-ethers-introduction)
```
yarn create next-app .
```
+
## Manual Header I
+
- [What is a component?](https://www.w3schools.com/react/react_components.asp)
- [jsx](https://reactjs.org/docs/introducing-jsx.html)
- [Moralis](https://moralis.io/)
- [React Moralis](https://github.com/MoralisWeb3/react-moralis)
+
### React Hooks
+
- [What is a react hook?](https://reactjs.org/docs/hooks-overview.html)
+
## Manual Header II
+
## useEffect Hook
+
- [useEffect Hook](https://reactjs.org/docs/hooks-effect.html)
- [More on useEffect](https://blog.logrocket.com/guide-to-react-useeffect-hook/)
- [React Context](https://www.freecodecamp.org/news/react-context-for-beginners/)
- [useEffect Firing Twice](https://stackoverflow.com/questions/60618844/react-hooks-useeffect-is-called-twice-even-if-an-empty-array-is-used-as-an-ar)
+
## Local Storage
+
- [Local Storage](https://codinglead.co/javascript/what-is-localstorage)
+
## isWeb3EnabledLoading
+
## web3uikit
+
- [web3uikit](https://github.com/web3ui/web3uikit)
- [web3uikit interactive docs](https://web3ui.github.io/web3uikit/?path=/story/1-web3-blockie--custom-seed)
- [web3uikit connect button](https://web3ui.github.io/web3uikit/?path=/story/1-web3-connectbutton--default)
+
## Introduction to Calling Functions in Nextjs
+
- [useWeb3Contract](https://github.com/MoralisWeb3/react-moralis#useweb3contract)
+
### Automatic Constant Value UI Updater
+
- [ethers.utils.FormatTypes](https://docs.ethers.io/v5/api/utils/abi/fragments/#fragments--formats)
+
### runContractFunction
+
- [Moralis Provider](https://github.com/MoralisWeb3/react-moralis#wrap-your-app-in-a-moralisprovider)
- [useMoralis](https://github.com/MoralisWeb3/react-moralis#usemoralis)
- [parseInt](https://www.w3schools.com/JSREF/jsref_parseint.asp)
+
## useState
+
- [useState Hook](https://reactjs.org/docs/hooks-state.html)
+
## Calling Functions in NextJS
+
## useNotification
+
- Add `onError` to all your `runContractFunction` calls
+
## Reading & Displaying Contract Data
+
## A Note about `onSuccess`
-- `onSuccess` just checks to see if MetaMask sends the transaction, not
+
+- `onSuccess` just checks to see if MetaMask sends the transaction, not
+
## A Challenge to You
+
## Tailwind & Styling
+
- [Learn CSS](https://www.w3schools.com/css/)
- [Tailwindcss](https://tailwindcss.com/)
- [PostCSS Extension](https://marketplace.visualstudio.com/items?itemName=csstools.postcss)
- [Tailwind Extension](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss)
- [Install Tailwind into NextJS](https://tailwindcss.com/docs/guides/nextjs)
+
## Introduction to Hosting your Site
+
+_[⌨️ (18:12:50) Introdunction to Hosting your Site](https://youtu.be/gyMwXuJrbJQ?t=65570)_
+
- [Vercel](https://vercel.com/)
- [Moralis](https://moralis.io/)
- [Netilfy](https://www.netlify.com/)
- [IPFS](https://ipfs.io/)
+
## IPFS
+
+_[⌨️ (18:15:14) IPFS](https://youtu.be/gyMwXuJrbJQ?t=65714)_
+
- [What is IPFS](https://www.youtube.com/watch?v=5Uj6uR3fp-U)
- [IPFS](https://ipfs.io/)
+
## Hosting on IPFS
+
+_[⌨️ (18:18:51) Hosting on IPFS](https://youtu.be/gyMwXuJrbJQ?t=65931)_
+
- [IPFS Companion](https://chrome.google.com/webstore/detail/ipfs-companion/nibjojkomfdiaoajekhjakgkdhaomnch)
- [Brave Browser](https://brave.com/)
- `yarn build && yarn next export`
+
## Hosting on IPFS & Filecoin using Fleek
+
+_[⌨️ (18:25:45) Hosting on IPFS & Filecoin using Fleek](https://youtu.be/gyMwXuJrbJQ?t=66345)_
+
- [Fleek](https://fleek.co/)
+
## Filecoin Overview
+
+_[⌨️ (18:31:28) Filecoin Overview](https://youtu.be/gyMwXuJrbJQ?t=66688)_
+
- [Special Guest Ally Haire](https://twitter.com/DeveloperAlly)
- [IPFS URL of Ally's Video](ipfs://bafybeiasd6oxqiefoxgtskrokomexnb4zcq3fhwlcbyplx2paw65zmq2du)
+
## Lesson 10 Recap
# Lesson 11: Hardhat Starter Kit
-*[⌨️ (18:51:36) Lesson 11: Hardhat Starter Kit](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=67896s)*
+_[⌨️ (18:51:36) Lesson 11: Hardhat Starter Kit](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=67896s)_
💻 Code: https://github.com/smartcontractkit/hardhat-starter-kit
# Lesson 12: Hardhat ERC20s
-*[⌨️ (18:59:24) Lesson 12: Hardhat ERC20s](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=68364s)*
+_[⌨️ (18:59:24) Lesson 12: Hardhat ERC20s](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=68364s)_
💻 Code: https://github.com/PatrickAlphaC/hardhat-erc20-fcc
## What is an ERC? What is an EIP?
+
- [What is an EIP?](https://eips.ethereum.org/)
- [EIPs codebase](https://github.com/ethereum/EIPs)
+
## What is an ERC20?
+
- [Video (using brownie/python)](https://youtu.be/8rpir_ZSK1g?t=39)
- [EIP-20](https://eips.ethereum.org/EIPS/eip-20)
- [ERC-677](https://github.com/ethereum/EIPs/issues/677)
- [EIP-777](https://eips.ethereum.org/EIPS/eip-777)
+
## Manually Creating an ERC20 Token
+
## Creating an ERC20 Token with Openzeppelin
+
- [Openzeppelin](https://openzeppelin.com/)
- [Openzeppelin Contracts](https://github.com/OpenZeppelin/openzeppelin-contracts)
- [Solmate (Openzeppelin alternative)](https://github.com/Rari-Capital/solmate)
+
## Lesson 12 Recap
# Lesson 13: Hardhat DeFi & Aave
-*[⌨️ (19:16:13) Lesson 13: Hardhat DeFi & Aave](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=69373s)*
+_[⌨️ (19:16:13) Lesson 13: Hardhat DeFi & Aave](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=69373s)_
💻 Code: https://github.com/PatrickAlphaC/hardhat-defi-fcc
## What is DeFi?
+
- [What is DeFi?](https://chain.link/education/defi)
- [DefiLlama](https://defillama.com/)
+
## What is Aave?
+
- [Aave](https://aave.com/)
- [My Previous Aave Video on Shorting Assets](https://www.youtube.com/watch?v=TmNGAvI-RUA)
-## Programatic Borrowing & Lending
+
+## Programmatic Borrowing & Lending
+
- [DAI](https://makerdao.com/en/)
- [Uniswap](https://app.uniswap.org/)
+
## WETH - Wrapped ETH
-- [WETH Token Rinkeby Etherscan](https://rinkeby.etherscan.io/token/0xc778417e063141139fce010982780140aa0cd5ab#writeContract)
+
+- [WETH Token Sepolia Etherscan](https://sepolia.etherscan.io/address/0xdd13E55209Fd76AfE204dBda4007C227904f0a81)
- [WETH Token Mainnet](https://etherscan.io/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2)
+
## Forking Mainnet
+
- [Mainnet Forking](https://hardhat.org/hardhat-network/guides/mainnet-forking.html)
+
## Depositing into Aave
+
- [Aave V2 Docs](https://docs.aave.com/developers/v/2.0/)
- [Aave NPM](https://www.npmjs.com/package/@aave/protocol-v2)
+
## Borrowing from Aave
+
- [Aave Borrowing FAQs](https://docs.aave.com/faq/borrowing)
- [Health Factor](https://docs.aave.com/faq/borrowing#what-is-the-health-factor)
- [Aave Risk Parameters](https://docs.aave.com/risk/asset-risk/risk-parameters)
-## Repaying with Aave
+
+## Repaying with Aave
+
## Visualizing the Transactions
+
- [aTokens](https://docs.aave.com/developers/v/1.0/developing-on-aave/the-protocol/atokens)
+
## Lesson 13 Recap
+
## Happy Bow-Tie Friday with Austin Griffith
+
- [Special Guest Austin Griffith](https://twitter.com/austingriffith)!
-- [Speed Run Ethereum](https://speedrunethereum.com/)
-### More DeFi Learnings:
- [Speed Run Ethereum](https://speedrunethereum.com/)
+
+### More DeFi Learnings:
+
- [Defi-Minimal](https://github.com/smartcontractkit/defi-minimal/tree/main/contracts)
- [Defi Dad](https://www.youtube.com/channel/UCatItl6C7wJp9txFMbXbSTg)
-
# Lesson 14: Hardhat NFTs (EVERYTHING you need to know about NFTs)
-*[⌨️ (20:28:51) Lesson 14: Hardhat NFTs ](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=73731s)*
+_[⌨️ (20:28:51) Lesson 14: Hardhat NFTs ](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=73731s)_
💻 Code: https://github.com/PatrickAlphaC/hardhat-nft-fcc
-## What is an NFT?
+## What is an NFT?
+
- [Video](https://www.youtube.com/watch?v=9yuHz6g_P50)
- [Optional: All on Chain SVG NFT](https://www.youtube.com/watch?v=9oERTH9Bkw0)
- [EIP-721](https://eips.ethereum.org/EIPS/eip-721)
+
## Code Overview
+
- [Opensea Testnet](https://testnets.opensea.io/)
+
## Hardhat Setup
+
## Basic NFT
-### Write Tests
+
+### Write Tests
+
- [Openzeppelin NFT](https://docs.openzeppelin.com/contracts/4.x/)
+
## Random IPFS NFT
+
### Mapping Chainlink VRF Requests
+
### Creating Rare NFTs
+
### Setting the NFT Image
+
### Setting an NFT Mint Price
+
### Deploy Script
+
### Uploading Token Images with Pinata
+
- [Pinata](https://pinata.cloud)
- [nft.storage](https://nft.storage)
- [Pinata NPM](https://www.npmjs.com/package/@pinata/sdk)
- [Pinata Docs](https://docs.pinata.cloud/)
+
### Uploading Token URIs (metadata) with Pinata
+
### Deploying
+
### Tests
+
## Dynamic SVG On-Chain NFT
+
- [Patrick's Original Video](https://www.youtube.com/watch?v=9oERTH9Bkw0)
+
### What is an SVG?
+
- [SVG Tutorial](https://www.w3schools.com/graphics/svg_intro.asp)
- [On-Chain SVG Example](https://opensea.io/assets/matic/0x291ff90b9c410f56e047599bfee6b585c0c484d7/2)
-### Initial Code
+
+### Initial Code
+
### Base64 Encoding
+
- [Base64 Encoding](https://en.wikipedia.org/wiki/Base64)
- [Example Encoder](https://base64.guru/converter/encode/image/svg)
- [base64-sol](https://www.npmjs.com/package/base64-sol/v/1.0.1)
+
## Advanced: EVM Opcodes, Encoding, and Calling
+
### abi.encode & abi.encodePacked
-- [abi.encode](https://docs.soliditylang.org/en/v0.8.14/cheatsheet.html?highlight=cheatsheet#global-variables)
-- [abi.encodePacked](https://docs.soliditylang.org/en/v0.8.14/cheatsheet.html?highlight=cheatsheet#global-variables)
-Thanks to [Alex Roan](https://twitter.com/alexroan) for his help on this session!
-- [Example Contract Creation Transaction](https://rinkeby.etherscan.io/tx/0x924f592458b0e37ee17024f9c826b97697455cd97f6946b802bc42296e77ae43)
-What REALLY is the ABI?
+
+- [abi.encode](https://docs.soliditylang.org/en/latest/cheatsheet.html?highlight=cheatsheet#global-variables)
+- [abi.encodePacked](https://docs.soliditylang.org/en/latest/cheatsheet.html?highlight=cheatsheet#global-variables)
+ Thanks to [Alex Roan](https://twitter.com/alexroan) for his help on this session!
+- [Example Contract Creation Transaction](https://etherscan.io/tx/0x112133a0a74af775234c077c397c8b75850ceb61840b33b23ae06b753da40490)
+ What REALLY is the ABI?
- [EVM Opcodes](https://www.evm.codes/)
- [More EVM Opcodes](https://github.com/crytic/evm-opcodes)
-- [Solidity Cheatsheet](https://docs.soliditylang.org/en/v0.8.13/cheatsheet.html?highlight=encodewithsignature)
+- [Solidity Cheatsheet](https://docs.soliditylang.org/en/latest/cheatsheet.html?highlight=encodewithsignature)
- [abi.encode vs abi.encodePacked](https://ethereum.stackexchange.com/questions/91826/why-are-there-two-methods-encoding-arguments-abi-encode-and-abi-encodepacked)
+
### Introduction to Encoding Function Calls Directly
+
### Introduction to Encoding Function Calls Recap
+
### Encoding Function Calls Directly
+
- [Function Selector](https://blog.openzeppelin.com/deconstructing-a-solidity-contract-part-iii-the-function-selector-6a9b6886ea49/)
-- [Function Signature](https://twitter.com/PatrickAlphaC/status/1517156225670078465)
+- [Function Signature](https://twitter.com/PatrickAlphaC/status/1517156225670078465)
+
### Creating an NFT TokenURI on-Chain
+
### Making the NFT Dynamic
+
### Deploy Script
+
## Deploying the NFTs to a Testnet
-## Lesson 14 Recap
+## Lesson 14 Recap
Extra credit:
- - [Deconstructing Solidity](https://blog.openzeppelin.com/deconstructing-a-solidity-contract-part-ii-creation-vs-runtime-6b9d60ecb44c/)
- - [Knowing and controlling your Smart Contract Address](https://www.youtube.com/watch?v=56K0FdosZ8g)
- - [From Solidity to byte code](https://www.youtube.com/watch?v=RxL_1AfV7N4)
+
+- [Deconstructing Solidity](https://blog.openzeppelin.com/deconstructing-a-solidity-contract-part-ii-creation-vs-runtime-6b9d60ecb44c/)
+- [Knowing and controlling your Smart Contract Address](https://www.youtube.com/watch?v=56K0FdosZ8g)
+- [From Solidity to byte code](https://www.youtube.com/watch?v=RxL_1AfV7N4)
# Lesson 15: NextJS NFT Marketplace (If you finish this lesson, you are a full-stack MONSTER!)
-*[⌨️ (23:37:03) Lesson 15: NextJS NFT Marketplace (Full Stack / Front End)](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=85023s)*
+_[⌨️ (23:37:03) Lesson 15: NextJS NFT Marketplace (Full Stack / Front End)](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=85023s)_
+
+## Large Update, please read
+
+Moralis has recently updated to a self-hosted server over their own server. For this, you can do one of the following:
+
+- [Learn how to run one yourself](https://www.youtube.com/watch?v=9GtysZs-FrA)
+- Follow along to learn the concepts of this more interactive app, without actually coding along
+- Skip to the section where we interact with the graph
+
+TL;DR: TheGraph code should work exactly the same as the video, however the Moralis code will not.
+
+💻 Code:
-💻 Code:
- - Backend (Contracts): https://github.com/PatrickAlphaC/hardhat-nft-marketplace-fcc
- - Frontend (Moralis Indexer): https://github.com/PatrickAlphaC/nextjs-nft-marketplace-moralis-fcc
- - Frontend (TheGraph Indexer): https://github.com/PatrickAlphaC/nextjs-nft-marketplace-thegraph-fcc
- - The Graph: https://github.com/PatrickAlphaC/graph-nft-marketplace-fcc
+- Backend (Contracts): https://github.com/PatrickAlphaC/hardhat-nft-marketplace-fcc
+- Frontend (Moralis Indexer): https://github.com/PatrickAlphaC/nextjs-nft-marketplace-moralis-fcc
+- Frontend (TheGraph Indexer): https://github.com/PatrickAlphaC/nextjs-nft-marketplace-thegraph-fcc
+ - The Graph: https://github.com/PatrickAlphaC/graph-nft-marketplace-fcc
-Special thanks to [Matt Durkin](https://twitter.com/mdurkin92) for help with this section.
+Special thanks to [Matt Durkin](https://twitter.com/mdurkin92) for help with this section.
## Introduction
+
- [Opensea](https://opensea.io/)
- [Artion](https://github.com/Fantom-foundation/Artion-Contracts)
+
## Part I: NFT Marketplace Contracts
+
### Hardhat Setup
+
### NftMarketplace.sol
+
- [Pull Over Push](https://fravoll.github.io/solidity-patterns/pull_over_push.html)
+
## Reentrancy
+
- [Reentrancy](https://solidity-by-example.org/hacks/re-entrancy)
- [Rekt.news](https://rekt.news/leaderboard/)
- [Openzeppelin NonReentrant](https://docs.openzeppelin.com/contracts/4.x/api/security#ReentrancyGuard)
+
### NftMarketplace.sol - Continued
+
### NftMarketplace.sol - Deploy Script
+
### NftMarketplace.sol - Tests
+
### NftMarketplace.sol - Scripts
## Part II: Moralis Front End
+
### What is Moralis?
+
- [Special Guest Ivan Liljeqvist](https://twitter.com/IvanOnTech)
+
### NextJS Setup
+
- [Link NextJS](https://nextjs.org/docs/api-reference/next/link)
+
### Adding Tailwind
+
- [Tailwind with NextJS](https://tailwindcss.com/docs/guides/nextjs)
+
### Introduction to Indexing in Web3
+
- [TheGraph](https://thegraph.com/en/)
- [Moralis](https://moralis.io/)
+
### Connecting Moralis to our Local Hardhat Node
+
- [NextJS Environment Variables](https://nextjs.org/docs/basic-features/environment-variables)
- [Reverse Proxy FRP](https://github.com/fatedier/frp/releases)
- [Docs](https://docs.moralis.io/moralis-dapp/web3/setting-up-ganache)
- [Trouble Shooting](https://docs.moralis.io/faq#frpc)
- [Moralis Forum](https://forum.moralis.io/)
- [Moralis Admin CLI](https://docs.moralis.io/moralis-dapp/tools/moralis-admin-cli)
+
### Moralis Event Sync
+
- [Moralis Add Event Sync From Code](https://docs.moralis.io/moralis-dapp/connect-the-sdk/connect-using-node#add-new-event-sync-from-code)
+
#### Reset Local Chain
+
### Moralis Cloud Functions
+
- [Moralis Cloud Functions](https://docs.moralis.io/moralis-dapp/cloud-code/cloud-functions)
- [Moralis Logging](https://docs.moralis.io/moralis-dapp/tools/moralis-admin-cli#get-logs)
- [Hardhat Network Reference](https://hardhat.org/hardhat-network/reference/)
-- Moralis Database only confirms a transaction with a block confirmation - so we need to move blocks on our hardhat local node.
+- Moralis Database only confirms a transaction with a block confirmation - so we need to move blocks on our hardhat local node.
- [Moralis Triggers](https://docs.moralis.io/moralis-dapp/cloud-code/triggers)
+
#### Practice Resetting the Local Chain
+
### Moralis Cloud Functions II
+
### Querying the Moralis Database
+
- [Moralis Queries](https://docs.moralis.io/moralis-dapp/database/queries)
+
### Rendering the NFT Images
+
- [useNFTBalance](https://github.com/MoralisWeb3/react-moralis#usenftbalances)
- [fetch](https://www.npmjs.com/package/node-fetch)
- [next/image](https://nextjs.org/docs/api-reference/next/image#loader-configuration)
+
### Update Listing Modal
+
### Buy NFT Listing
+
### Listing NFTs for Sale
+
- [web3uikit Form](https://web3uikit.com/)
## Part III: TheGraph Front End
+
### Introduction
-### What is The Graph?
+
+### What is The Graph?
+
- [Special Guest Nader Dabit](https://twitter.com/dabit3)
+
### Building a Subgraph
+
- [Example Subgraphs](https://thegraph.com/explorer/)
- [The Graph Studio](https://thegraph.com/studio/)
- [GraphQL VSCode Extension](https://marketplace.visualstudio.com/items?itemName=GraphQL.vscode-graphql)
- [GraphQL](https://graphql.org/)
+
### Deploying our Subgraph
+
- [GraphQL Queries](https://www.tutorialspoint.com/graphql/graphql_query.htm)
+
### Reading from The Graph
+
- [@apollo/client](https://www.npmjs.com/package/@apollo/client)
- [gql](https://www.npmjs.com/package/gql)
- [The Graph Docs](https://thegraph.com/docs/en/)
+
### Hosting our Dapp
-🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊 Completed Front End Basics! 🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊
+🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊 Completed Front End Basics! 🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊
# Lesson 16: Hardhat Upgrades
-*[⌨️ (28:53:11) Lesson 16: Hardhat Upgrades](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=103991s)*
+_[⌨️ (28:53:11) Lesson 16: Hardhat Upgrades](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=103991s)_
💻 Code: https://github.com/PatrickAlphaC/hardhat-upgrades-fcc
-## Upgradeable Smart Contracts Overview
+## Upgradable Smart Contracts Overview
+
- [Optional Video](https://www.youtube.com/watch?v=bdXJmWajZRY)
- [Links from Video]
+
## Types of Upgrades
+
1. Parameter
2. Social Migrate
3. Proxy
@@ -1546,30 +2048,39 @@ Special thanks to [Matt Durkin](https://twitter.com/mdurkin92) for help with thi
3. [Transparent](https://blog.openzeppelin.com/the-transparent-proxy-pattern/)
4. [UUPS](https://forum.openzeppelin.com/t/uups-proxies-tutorial-solidity-javascript/7786)
5. [Diamond](https://eips.ethereum.org/EIPS/eip-2535)
+
## Delegatecall
+
- [delegatecall (solidity-by-example)](https://solidity-by-example.org/delegatecall)
- [Yul](https://docs.soliditylang.org/en/latest/yul.html)
+
## Small Proxy Example
+
- [EIP 1967](https://eips.ethereum.org/EIPS/eip-1967)
-## Transparent Upgradeable Smart Contract
+
+## Transparent Upgradable Smart Contract
+
- [Hardhat-deploy Proxies](https://github.com/wighawag/hardhat-deploy#deploying-and-upgrading-proxies)
- [Openzeppelin Upgrades Plugin](https://docs.openzeppelin.com/upgrades-plugins/1.x/)
- [Openzeppelin upgrades tutorial](https://forum.openzeppelin.com/t/openzeppelin-upgrades-step-by-step-tutorial-for-hardhat/3580)
- [hardhat deploy upgrades examples](https://github.com/wighawag/template-ethereum-contracts/tree/examples/openzeppelin-proxies/deploy)
-
# Lesson 17: Hardhat DAOs
-*[⌨️ (29:45:24) Lesson 17: Hardhat DAOs](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=107124s)*
+_[⌨️ (29:45:24) Lesson 17: Hardhat DAOs](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=107124s)_
⬆️ Up-to-date code: https://github.com/PatrickAlphaC/dao-template
💻 Code from video: https://github.com/PatrickAlphaC/hardhat-dao-fcc
## Introduction
+
## What is a DAO?
+
- [What is a DAO?](https://www.youtube.com/watch?v=X_QKZzd68ro)
+
## How to build a DAO
+
- [How to build a DAO](https://www.youtube.com/watch?v=AhJtmUqhAqg)
- That's Patrick
- [PY Code](https://github.com/brownie-mix/dao-mix)
@@ -1581,68 +2092,76 @@ Special thanks to [Matt Durkin](https://twitter.com/mdurkin92) for help with thi
# Lesson 18: Security & Auditing
-*[⌨️ (31:28:32) Lesson 18: Security & Auditing ](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=113312s)*
+_[⌨️ (31:28:32) Lesson 18: Security & Auditing ](https://www.youtube.com/watch?v=gyMwXuJrbJQ&t=113312s)_
💻 Code: https://github.com/PatrickAlphaC/hardhat-security-fcc
## Introduction
+
- [Readiness Guide](https://learn.openzeppelin.com/security-audits/readiness-guide)
+
## Slither
+
- [Install python](https://www.python.org/downloads/)
- [Slither](https://github.com/crytic/slither#how-to-install)
- [solc-select](https://github.com/crytic/solc-select)
- [Fuzz testing](https://en.wikipedia.org/wiki/Fuzzing)
+
## Fuzzing and Eth Security Toolbox
+
- [Echidna](https://github.com/crytic/echidna)
- [Docker Install](https://docs.docker.com/get-docker/)
- [Eth-Security-ToolBox](https://github.com/trailofbits/eth-security-toolbox)
+
## Closing Thoughts
-- [Best Practices](https://consensys.github.io/smart-contract-best-practices/)
-- [Attacks](https://consensys.github.io/smart-contract-best-practices/known_attacks/)
- - [Oracle Attacks](https://hackernoon.com/how-dollar100m-got-stolen-from-defi-in-2021-price-oracle-manipulation-and-flash-loan-attacks-explained-3n6q33r1)
- - [Re-entrancy Attacks](https://quantstamp.com/blog/what-is-a-re-entrancy-attack)
-- [Damn Vulnerable Defi](https://www.damnvulnerabledefi.xyz/)
-- [Ethernaut](https://ethernaut.openzeppelin.com/)
-- Some Auditors:
- - [OpenZeppelin](https://openzeppelin.com/)
- - [SigmaPrime](https://sigmaprime.io/)
- - [Trail of Bits](https://www.trailofbits.com/)
+
+- [Best Practices](https://consensys.github.io/smart-contract-best-practices/)
+- [Attacks](https://consensys.github.io/smart-contract-best-practices/attacks/)
+ - [Oracle Attacks](https://hackernoon.com/how-dollar100m-got-stolen-from-defi-in-2021-price-oracle-manipulation-and-flash-loan-attacks-explained-3n6q33r1)
+ - [Re-entrancy Attacks](https://quantstamp.com/blog/what-is-a-re-entrancy-attack)
+- [Damn Vulnerable Defi](https://www.damnvulnerabledefi.xyz/)
+- [Ethernaut](https://ethernaut.openzeppelin.com/)
+- Some Auditors:
+ - [OpenZeppelin](https://openzeppelin.com/)
+ - [SigmaPrime](https://sigmaprime.io/)
+ - [Trail of Bits](https://www.trailofbits.com/)
# Congratulations
-🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊 Completed The Course! 🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊
+🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊 Completed The Course! 🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊🎊
## Where do I go now?
### Learning More
-- [CryptoZombies](https://cryptozombies.io/)
-- [Patrick Collins](https://www.youtube.com/channel/UCn-3f8tw_E1jZvhuHatROwA)
-- [Dapp University](https://www.youtube.com/channel/UCY0xL8V6NzzFcwzHCgB8orQ)
-- [ChainShot](https://www.chainshot.com/courses)
-- [Cami Ramos Garzon](https://twitter.com/camiinthisthang)
-- [Albert Hu](https://twitter.com/thatguyintech)
-- [Ivan Liljeqvist](https://twitter.com/IvanOnTech)
-- [Ally Haire](https://twitter.com/DeveloperAlly)
-- [Stephen Fluin](https://twitter.com/stephenfluin)
-- [Eat the Blocks](https://www.youtube.com/channel/UCZM8XQjNOyG2ElPpEUtNasA)
-- [Austin Griffith](https://www.youtube.com/channel/UC_HI2i2peo1A-STdG22GFsA)
-- [Nader Dabit](https://www.youtube.com/user/boyindasouth)
-- [Ethereum.org](https://ethereum.org/en/)
+- [CryptoZombies](https://cryptozombies.io/)
+- [Patrick Collins](https://www.youtube.com/channel/UCn-3f8tw_E1jZvhuHatROwA)
+- [Dapp University](https://www.youtube.com/channel/UCY0xL8V6NzzFcwzHCgB8orQ)
+- [ChainShot](https://www.chainshot.com/courses)
+- [Cami Ramos Garzon](https://twitter.com/camiinthisthang)
+- [Albert Hu](https://twitter.com/thatguyintech)
+- [Ivan Liljeqvist](https://twitter.com/IvanOnTech)
+- [Ally Haire](https://twitter.com/DeveloperAlly)
+- [Stephen Fluin](https://twitter.com/stephenfluin)
+- [Eat the Blocks](https://www.youtube.com/channel/UCZM8XQjNOyG2ElPpEUtNasA)
+- [Austin Griffith](https://www.youtube.com/channel/UC_HI2i2peo1A-STdG22GFsA)
+- [Nader Dabit](https://www.youtube.com/user/boyindasouth)
+- [Ethereum.org](https://ethereum.org/en/)
### Community
-- [Twitter](https://twitter.com/PatrickAlphaC)
-- [Hardhat Discord](https://discord.gg/9zk7snTfWe)
-- [Chainlink Discord](https://discord.gg/2YHSAey)
-- [Ethereum Discord](https://ethereum.org/en/)
-- [Reddit ethdev](https://www.reddit.com/r/ethdev/)
+- [Twitter](https://twitter.com/PatrickAlphaC)
+- [Hardhat Discord](https://hardhat.org/discord)
+- [Ethereum Python Community Discord](https://discord.gg/9zk7snTfWe)
+- [Chainlink Discord](https://discord.gg/2YHSAey)
+- [Ethereum Discord](https://ethereum.org/en/)
+- [Reddit ethdev](https://www.reddit.com/r/ethdev/)
### Hackathons
-- [CL Hackathon](https://chain.link/hackathon)
-- [ETH Global](https://ethglobal.co/)
-- [ETH India](https://twitter.com/ETHIndiaco)
+- [CL Hackathon](https://chain.link/hackathon)
+- [ETHGlobal](https://ethglobal.com/)
+- [ETHIndia](https://ethindia.co/)
Be sure to check out project grant programs!
@@ -1656,5 +2175,3 @@ Thanks to everyone who is taking, participating in, and working on this course.
[](https://www.youtube.com/channel/UCn-3f8tw_E1jZvhuHatROwA)
[](https://www.linkedin.com/in/patrickalphac/)
[](https://medium.com/@patrick.collins_58673/)
-
-
diff --git a/chronological-updates.md b/chronological-updates.md
index 2bae69ac..ce8192d2 100644
--- a/chronological-updates.md
+++ b/chronological-updates.md
@@ -66,8 +66,55 @@ Keep this running in it's own terminal, and use the endpoint it gives you. To ki
--------
+# Lesson 6
+
+## New Hardhat Setup
+
+As of `2.10.0` version of hardhat, when you first run `yarn hardhat` you'll get something like this instead:
+
+```bash
+888 888 888 888 888
+888 888 888 888 888
+888 888 888 888 888
+8888888888 8888b. 888d888 .d88888 88888b. 8888b. 888888
+888 888 "88b 888P" d88" 888 888 "88b "88b 888
+888 888 .d888888 888 888 888 888 888 .d888888 888
+888 888 888 888 888 Y88b 888 888 888 888 888 Y88b.
+888 888 "Y888888 888 "Y88888 888 888 "Y888888 "Y888
+
+👷 Welcome to Hardhat v2.10.0 👷
+
+? What do you want to do? …
+❯ Create a JavaScript project
+ Create a TypeScript project
+ Create an empty hardhat.config.js
+ Quit
+```
+
+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`.
+
+[You can read more about the changes here.](https://twitter.com/HardhatHQ/status/1545124474470760449)
+
+----------
+
+# Lesson 7
+
+## New Hardhat Setup
+
+As the previous section has highlighted, changes in the hardhat version changed the hardhat startup menu. You can choose to go with the new menu but if you feel lost and still want to access the old one used in the video, you can do so by installing `hardhat v2.9.3`
+
+Run `yarn add --dev hardhat@2.9.3`
+
+---------
+
# Lesson 9
+## Keepers new UI
+
+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"
+
+More information: https://github.com/smartcontractkit/full-blockchain-solidity-course-js/discussions/606#discussioncomment-3037792
+
## Keepers Not Kicking Off Troubleshooting
If your keepers are not kicking off, run through this checklist to find out why.
@@ -77,8 +124,64 @@ If your keepers are not kicking off, run through this checklist to find out why.
3. Is `checkUpkeep` returning true?
4. Can you call `performUpkeep` yourself? (If you can't the keeper can't!)
+
+-------
+# Lesson 14
+
+## Math on NFT Chance Array
+
+The ```getBreedFromModdedRng()``` function in RandomIpfsNft.sol gets the math wrong.
+
+line 104,
+```solidity
+if (moddedRng >= cumulativeSum && moddedRng < cumulativeSum + chanceArray[i]) {
+ return Breed(i);
+}
+cumulativeSum = cumulativeSum + chanceArray[i];
+```
+needs to be changed to
+```solidity
+if (moddedRng >= cumulativeSum && moddedRng < chanceArray[i]) {
+ return Breed(i);
+}
+cumulativeSum = chanceArray[i];
+```
+
+The chanceArray[] array already has a cumulative probability distribution, no need to keep adding cumulativeSum to it.
+
+According to the current algorithm:
+```
+moddedRng produced is between 0 and 99
+chanceArray=[10,30,100]
+```
+```
+PUG is produced if moddedRng is between [0,10) = span of 10
+SHIBA is produce if moddedRng is between [10,40) = span of 30
+BERNARD is produced if moddedRng is between [40,140] = span of 60 (since moddedRng<100)
+```
+So the actual probabilities according to the current algo is
+``` [10%,30%,60%] ```
+and not
+``` [10%,20%,70%]```
+ as would be expected from a proper cumulative probability distribution function.
+
+-------
+
# Lesson 15
## Metamask Troubleshooting while using Gitpod
- 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.
+
+# Large Update, please read
+Moralis has recently updated to a self-hosted server over their own server. For this, you can do one of the following:
+
+- Learn how to run one yourself
+- Follow along to learn the concepts of this more interactive app, without actually coding along
+- Skip to the section where we interact with the graph
+
+TL;DR: TheGraph code should work exactly the same as the video, however the Moralis code will not.
+
+--------
+
+
diff --git a/how-to-answer-a-question.md b/how-to-answer-a-question.md
new file mode 100644
index 00000000..9f04e108
--- /dev/null
+++ b/how-to-answer-a-question.md
@@ -0,0 +1,41 @@
+# How to answer questions
+
+Thank you for wanting to answer questions! This is how we grow as a community :)
+
+1. Make sure the question follows the "how-to-ask-a-good-question" guide
+2. Make sure your answer unblocks the user
+3. Remember, this is living documentation!
+4. Format your answers, like in the `how-to-ask-a-question` guide.
+
+
+# 1. Make sure the question follows the "how-to-ask-a-good-question" guide
+
+If the question is poorly formatted and you know how to reformat it reformat it and ask them next time to format their code.
+
+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.
+
+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.
+
+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?
+
+If they used screenshots, feel free to ask them to copy-paste the code.
+
+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!
+
+### 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!
+
+But don't be a jerk about it. If they just need a little formatting touch up, just touch up their question for them.
+
+# 2. Make sure your answer unblocks them
+
+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.
+
+Often, giving a summary of your answer at the top with copy pasteable code, and then a "more information" is a best practice.
+
+# 3. Remember this is living documentation!
+
+Treat it as such. Go back and update answers if you find them!
+
+# 4. Format your answers, like in the `how-to-ask-a-question` guide.
+
+See that guide for more information.
\ No newline at end of file
diff --git a/how-to-ask-a-question.md b/how-to-ask-a-question.md
new file mode 100644
index 00000000..b610aacc
--- /dev/null
+++ b/how-to-ask-a-question.md
@@ -0,0 +1,159 @@
+# How to ask a question
+
+> 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).
+
+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. "
+
+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.
+
+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!
+
+# Full Examples at the bottom!
+
+Here are the steps to ask a well-formatted question:
+
+1. Search to see if the question has already been asked
+2. Know where to post your question
+3. Make a title that summarizes the problem
+4. Introduce the problem before writing any code
+5. Make sure you format code using backticks (```) and a language tag
+6. Make sure you copy paste your code instead of using screenshots
+7. Make sure your code is a minimal example
+
+
+# 1. Search to see if the question has already been asked
+
+## Do not skip this step!
+
+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!
+
+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.**
+
+We want every tech question ever to be:
+
+1. Indexed by search engines
+2. Easy to find
+3. Easy to reproduce
+
+So that in 6 months when you forget the answer, you can just google it and it'll show up!
+
+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
+
+# 2. Know where to post your question
+
+I categorize questions into one of three:
+
+- Specific code based questions
+- Generic theoretical questions
+- "In the know", support, or emergency questions
+
+## Specific code based questions
+
+These are what we strive for. These are reproducible questions that help the world. You'll want to put these questions in places like:
+
+- The "Q&A" discussions section of this course
+- stackoverflow
+- stack exchange ETH.
+
+These are questions that typically can have a "right" or "many right answers". Generally, these are not very opinionated questions.
+
+These are questions like "How to convert bytes32 to uint256".
+
+## Generic Theoretical Questions
+
+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:
+
+- The "General" discussions section of this course
+- A generic forum like Reddit, Twitter
+- Discord (like some of the ones people have started here)
+
+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.
+
+## "In the know", support, or emergency questions
+
+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:
+
+- Discord DMs
+- Email
+- etc
+
+And should be used *very* sparingly.
+
+# 3. Make a title that summarizes the problem
+
+It should be minimal, searchable, indexable (by search engines).
+
+## Examples:
+Bad:
+- I'm stuck, please help
+
+Good:
+- Could Not Detect Network using WSL & Ganache
+
+Bad:
+- hardhat error
+
+Good:
+- TypeError: Cannot read property 'length' of undefined - when deploying contract
+
+# 4. Introduce the problem before writing any code
+
+In the body of the question, say what you're trying to do, what you've done, and give a summary of your problem.
+
+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).
+
+# 5. Make sure you format code using backticks (```) and a language tag
+
+You'll want to format your question so it's as easy as possible to read! Especially with your code snippets.
+
+Your code should show up like this:
+
+```javascript
+// my code here
+```
+
+In your question, you'll type it like this:
+
+````
+```javascript
+// my code here
+```
+````
+
+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.
+
+# 6. Make sure you copy paste your code instead of using screenshots
+
+We want web crawlers to index every word you write, so even copy paste errors (and format them with 3 backticks!)
+
+
+# 7. Make sure your code is a minimal example
+
+There are two types of code questions:
+
+- Debug me
+- Specific questions
+
+Don't be a "Debug Me"
+
+## Example of a poorly formatted question (a debug me question):
+
+Hi I'm confused my code isn't working here is all my code
+
+```javascript
+// pretend I pasted like 300 lines of code here
+```
+
+## Example of a much better question
+
+I'm getting `error x` on line 42 of my code:
+
+```javascript
+const some_var = "dog"
+// this is the line that is erroring
+```
+
+[More information on reproducible code.](https://stackoverflow.com/help/minimal-reproducible-example)
+
+
+