Lesson Name | Week | Day | Github Link | Objectives | Homework | Video Example | References | Expanded Curriculum |
---|---|---|---|---|---|---|---|---|
Introduction | 1 | Monday | ‣ | - Wallets and Transactions |
Read introduction and topics table from references | https://youtu.be/F3i3F0uwVTg | https://remix-ide.readthedocs.io/en/latest/
| Wallets and Transactions What is a wallet What wallets are out there Using metamasks Creating a public-private key pair Connecting to ropsten testnet Funding via a Faucet Sending a ETH transaction
How Ethereum Works Explaining Etherscan Transactions Gas Blocks Consensus and finality State changes The EVM Accounts
Contract Interaction: Token Swap What is a state change inside a smart contract operation?
Coding HelloWorld.sol Solidity philosophy OOP basics of Solidity Contract Structure (SPDX License Identifier; Pragmas; Imports; Comments, Contract definition) Variables Storage areas (Account storage; Memory; Stack) Constructor function Functions Visibility Typing Return values
Compiling and Deploying Compilation parameters (Compiler version; EVM Version; Optimization) Bytecode ABI Deployment parameters (Environment; Account; Gas; Contract) Attaching Deploying Inspect transaction on Etherscan Inspect state changes occurred | | Building HelloWorld.sol in Remix | 1 | Tuesday | ‣ | - Coding HelloWorld.sol
Read the references | https://youtu.be/rrfKmaDUy1o | https://docs.soliditylang.org/en/latest/grammar.html
https://docs.soliditylang.org/en/latest/structure-of-a-contract.html
https://docs.soliditylang.org/en/latest/natspec-format.html#natspec | Coding HelloWorld.sol Solidity philosophyOOP basics of Solidity Contract Structure SPDX License Identifier Pragmas Imports Comments Contract definition Variables Storage areas Account storage Memory Stack Constructor function Functions Visibility Typing Return values
Detailed contract structure (Review) Contract structure (Review) Variables (Review) Storage What are objects (contracts and interfaces) Multiple objects per file
Contract interaction Part 1 Contract interactions using Remix Viewing state changes through functions Part 2 State changing calls Using interfaces Part 3 Payable functions Experimenting with payable calls
Clean code and documentation (Review) Readability and standardization The Style guide Using the Linter Function order Layout Naming conventions Documentation NatSpec Format | | Syntax and Structure | 1 | Wednesday | ‣ | - Function definition
Read the references | https://youtu.be/DgPwjYwzbbk | https://docs.soliditylang.org/en/latest/introduction-to-smart-contracts.html#accounts
https://docs.soliditylang.org/en/latest/introduction-to-smart-contracts.html#storage-memory-and-the-stack
https://docs.soliditylang.org/en/latest/types.html
https://www.oreilly.com/library/view/solidity-programming-essentials/9781788831383/5d112969-a63d-48df-a58f-e45638a7e3dd.xhtml
https://docs.soliditylang.org/en/latest/control-structures.html#error-handling-assert-require-revert-and-exceptions
https://docs.soliditylang.org/en/latest/structure-of-a-contract.html#function-modifiers
https://docs.soliditylang.org/en/latest/units-and-global-variables.html | Function definition Storage locations Account storage Replacing memory with calldata when stack is enough Definitions Visibility State mutability Modifiers Virtual Override
Variable declaration and definition Elementary types Booleans Integers Fixed Address Bytes Strings State Variables Constants Data locations (again) Arrays Mappings Access Encapsulation
Assertion and Modifiers How errors are handled on solidity (briefly) Assertion Require statements Modifiers Where to use modifiers
Common Solidity Global Variables Reserved words and global variables that a programmer should know Global variables about blockchain state Global variables about the transaction Global variables about the transaction message | | Tests and Scripts | 1 | Thursday | https://github.com/Encode-Club-Solidity-Bootcamp-May/04-Tests-Scripts | - Writing Unit Tests for Ballot.sol
https://nodejs.org/docs/latest/api/process.html#processargv
https://docs.ethers.io/v5/api/providers/
https://docs.ethers.io/v5/api/contract/contract-factory/ | Writing unit tests for Ballot.sol
Using scripts to automate operations
**Running scripts
Running scripts with arguments** | | Weekend Project 1 | 1 | Friday - Sunday | https://encodeclub.typeform.com/mayproject1 | 1. Form groups of 3 to 5 students.
Publish the project in Github
Run the scripts with a set of proposals, cast and delegate votes and inspect results
Write a report detailing the addresses, transaction hashes, description of the operation script * being executed and console output from script execution for each step (Deployment, giving voting * rights, casting/delegating and querying results).
(Extra) Use TDD methodology | - | - | - | - | | Events | 2 | Monday | https://github.com/Encode-Club-Solidity-Bootcamp-May/05-Events | - Events with Solidity
https://ethereum-waffle.readthedocs.io/en/latest/matchers.html#emitting-events
https://docs.ethers.io/v5/concepts/events/
https://docs.ethers.io/v5/api/contract/contract/#Contract--events
https://docs.ethers.io/v5/api/providers/types/#providers-Filter
https://docs.ethers.io/v5/api/providers/types/#providers-EventFilter
https://github.com/NomicFoundation/hardhat/issues/1692#issuecomment-905674692
https://docs.soliditylang.org/en/latest/abi-spec.html#events
| Events with solidity
Watching for events in tests - Event syntax in waffle
Watching for events in scripts with Ethers.js - Event syntax for Ethers.js library
Watching for events in scripts connected to the Testnet
| | ERC20 and ERC721 Tokens | 2 | Tuesday | https://github.com/Encode-Club-Solidity-Bootcamp-May/06-Tokens | - Quickstart with OpenZeppelin wizard
Complete the operation scripts for ERC20 and ERC721
(Optional) Study test structure for ERC20 contract from OpenZeppelin Contracts Library
(Optional) Study test structure for ERC721 contract from OpenZeppelin Contracts Library
(Optional) Study what is “supportsInterface” function and ERC165 | https://youtu.be/o1ScQgWvnJ4 | https://eips.ethereum.org/
https://docs.openzeppelin.com/contracts/4.x/
https://docs.openzeppelin.com/contracts/4.x/erc20
https://docs.openzeppelin.com/contracts/4.x/erc721
https://docs.openzeppelin.com/contracts/4.x/wizard
https://www.npmjs.com/package/@openzeppelin/contracts
https://docs.openzeppelin.com/contracts/4.x/extending-contracts
https://docs.openzeppelin.com/contracts/4.x/access-control | Quickstart with OpenZeppelin wizard
Contract structure
Operating the contracts with scripts
Get to know the Coding Patterns and Design Patterns in the reference
(Optional) Experiment with dynamic pricing models for buying/selling the ERC20 and NFTs | https://youtu.be/-ALKeh2td3c | https://consensys.github.io/smart-contract-best-practices/development-recommendations/general/external-calls/
https://docs.soliditylang.org/en/latest/types.html#division
https://github.com/wissalHaji/solidity-coding-advices/blob/master/best-practices/rounding-errors-with-division.md
https://fravoll.github.io/solidity-patterns/
https://dev.to/jamiescript/design-patterns-in-solidity-1i28
https://halborn.com/what-is-a-front-running-attack/
https://quantstamp.com/blog/what-is-a-re-entrancy-attack
https://github.com/wissalHaji/solidity-coding-advices/tree/master/known-attack-patterns
https://ethereum-contract-security-techniques-and-tips.readthedocs.io/en/latest/known_attacks/
https://github.com/wissalHaji/solidity-coding-advices/tree/master/design-patterns/security | Challenge explanation Application Features
Tests layout (Review) TDD methodology Best practices on external calls Dealing with decimals and divisions
Completing tests
(Optional) Study how ERC20Permit works https://docs.openzeppelin.com/contracts/4.x/api/token/erc20#ERC20Permit
(Optional) Study and try out a full governance example from https://docs.openzeppelin.com/contracts/4.x/governance | https://www.youtube.com/watch?v=ee24MmxgWsc | https://docs.openzeppelin.com/contracts/4.x/api/token/erc20#ERC20Votes
https://docs.openzeppelin.com/contracts/4.x/api/token/erc20#ERC20Snapshot | The ERC20Votes ERC20 extension - ERC20Votes properties
ERC20Votes and Ballot.sol
Complete the contracts together
Structure scripts to
Publish the project in Github
Run the scripts with a few set of proposals, play around with token balances, cast and delegate votes, create ballots from snapshots, interact with the ballots and inspect results
Write a report detailing the addresses, transaction hashes, description of the operation script being executed and console output from script execution for each step
(Extra) Use TDD methodology | - | | - | - | | Gas Limit | 3 | Monday | https://github.com/Encode-Club-Solidity-Bootcamp-May/09-Gas-Limit | - Weekend Project Review
https://blog.b9lab.com/getting-loopy-with-solidity-1d51794622ad
https://docs.soliditylang.org/en/latest/types.html#bytes-and-string-as-arrays
https://github.com/wissalHaji/solidity-coding-advices/blob/master/best-practices/be-careful-with-loops.md | Weekend project review
Gas limit and loops
Gas limit and loops 2
Fixing the contract
Complete test scenarios for Lottery.sol
(Optional) Try to implement some contract features
(Optional) Experiment with the Randomness sources presented | https://youtu.be/HNN6Xwbx0Ew | https://github.com/wissalHaji/solidity-coding-advices/blob/master/best-practices/timestamp-can-be-manipulated.md
https://fravoll.github.io/solidity-patterns/randomness.html
https://blockchain-academy.hs-mittweida.de/courses/solidity-coding-beginners-to-intermediate/lessons/solidity-11-coding-patterns/topic/commit-reveal/
https://en.wikipedia.org/wiki/Hash_collision
https://fravoll.github.io/solidity-patterns/oracle.html
https://betterprogramming.pub/how-to-generate-truly-random-numbers-in-solidity-and-blockchain-9ced6472dbdf
https://docs.chain.link/docs/chainlink-vrf/
https://github.com/randao/randao
https://coinsbench.com/how-to-create-a-lottery-smart-contract-with-solidity-4515ff6f849a | Randomness sources
Generating numbers from pseudorandom sources
Theory: Other randomness sources
Lottery contract
Complete the NatSpec documenting of Lottery.sol
(Optional) Implement Radspec | https://youtu.be/rVrl_d7uH5U | https://docs.soliditylang.org/en/latest/style-guide.html
https://docs.soliditylang.org/en/latest/natspec-format.html#natspec | Coding the contract - Implementing the relatively unsafe randomness source from block information
Incrementing the contract: update token address
Incrementing the contract: canceling the lottery
Clean code and documentation
(Optional) Complete the security challenges from Ethernaut
(Optional) Play and finish Capture the Ether | https://youtu.be/CcvLYe6cC2Q | https://github.com/stevemao/github-issue-templates
https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow
https://smartbear.com/learn/code-review/best-practices-for-peer-code-review/
https://hardhat.org/guides/compile-contracts.html#configuring-the-compiler
https://eip2535diamonds.substack.com/p/smart-contract-gas-optimization-with
https://github.com/iskdrews/awesome-solidity-gas-optimization
https://ethereum-contract-security-techniques-and-tips.readthedocs.io/en/latest/known_attacks/
https://ethernaut.openzeppelin.com/ | Code Review
Gas optimization
Smart contract security - (Review) Payable and Fallbacks
Peer review each others code from last classes
Propose changes
Open issues and discussions on github repositories
Create pull requests to address issues discussed in your github repositories | - | - | - | - | | APIs | 4 | Monday | https://github.com/Encode-Club-Solidity-Bootcamp-May/13-APIs | - Architecture overview
Implement GET methods to query total supply, allowance from a given address to another address, transaction status by transaction hash and transaction receipt of a transaction by transaction hash
(Optional) Remove the wallet from the environment, and implement a method to setup a wallet passing the private key as parameter
https://leapgraph.com/rest-api-alternatives/
https://futurice.com/blog/api-services-mvc
https://merehead.com/blog/development-trends-best-backend-frameworks-in-2022/
https://restfulapi.net/rest-api-design-tutorial-with-example/
https://www.coreycleary.me/what-is-the-difference-between-controllers-and-services-in-node-rest-apis/
https://nodejs.org/en/docs/guides/getting-started-guide/
****https://devdocs.io/express-getting-started/
****https://github.com/brocoders/nestjs-boilerplate
https://docs.nestjs.com/openapi/introduction
https://docs.nestjs.com/cli/overview
https://docs.nestjs.com/recipes/crud-generator | Architecture overview
Architecture design
NestJS Framework
Implementing the API
| | Frontend | 4 | Tuesday | https://github.com/Encode-Club-Solidity-Bootcamp-May/14-Frontend | - Architecture overview
Implement a feature for importing a wallet by pasting a seed phrase of private key as an alternative to creating a new one
(Optional) Implement more features you might find interesting
(Optional +) Rewrite the dApp using another framework of your choice | https://youtu.be/8rFy-5_Mqio | https://en.wikipedia.org/wiki/Web_application
https://fuzzymath.com/blog/components-of-good-ui-design-examples/
https://blog.logrocket.com/the-history-and-legacy-of-jquery/
https://existek.com/blog/top-front-end-frameworks-2021/
https://www.browserstack.com/guide/top-css-frameworks
https://angular.io/docshttps://getbootstrap.com/docs/5.0/getting-started/introduction/
https://ng-bootstrap.github.io/#/getting-started
https://getbootstrap.com/docs/5.1/examples/
https://ng-bootstrap.github.io/#/components/accordion/examples
https://github.com/ng-bootstrap/ng-bootstrap/tree/master/demo/src/app/components
https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage
https://angular.io/guide/reactive-forms | Architecture overview
Design of User Experience and User Interface - Feature mapping
Frameworks
Implementing the dApp - Creating the project
Study about IPFS
(Optional) Implement more features to integrate frontend and backend from previous classes | https://youtu.be/5MKTUGfnmC4 | https://en.wikipedia.org/wiki/Loose_coupling
https://en.wikipedia.org/wiki/Authentication_protocol
https://dev.to/lparvinsmith/signatures-as-authentication-in-web3-3kod
https://ipfs.io/ | Coupling frontend and APIs
Auth methods for the Web3.0
File storage for the Web3.0
https://docs.ipfs.io/how-to/command-line-quick-start/
https://docs.nestjs.com/techniques/file-upload
https://www.npmjs.com/package/node-json-db | Using The IPFS
Integrating IPFS in a NodeJS Server
Run a local node of IPFS
Upload 10 images to this node
Create a JSON and build metadata descriptions for 10 NFTs, each using one unique image
Make a GET method in the API to get the metadata by id
Deploy a NFT Collection and mint 10 NFTs, and assign the API endpoint to the token URI
Integrate this NFT Collection and APIs in a frontend application to display NFTs metadata and images | - | - | - | - | | Sponsor Week | 5 | Monday - Thursday | | | | https://youtu.be/NUCMVJjtc4w, https://youtu.be/wFbwKQOrS_o, https://youtu.be/CUpvS0H9tQc | | | | Scaling & Advanced Solidity and Assembly | 6 | Monday | https://github.com/Encode-Club-Solidity-Bootcamp-May/17-Scaling | Scaling Blockchain
Advanced Solidity and Assembly
Test more Polygon features
(Optional) Test other scaling solutions you find interesting
Test other functions from the libraries presented
Test other cases of overflow
(Optional) Recreate ERC20 in assembly as this example | https://youtu.be/rjBJUOFdZKc | https://www.gemini.com/cryptopedia/blockchain-trilemma-decentralization-scalability-definition
https://vitalik.ca/general/2021/04/07/sharding.html
https://vitalik.ca/general/2021/05/23/scaling.html
https://ethereum.org/en/bridges/
https://docs.matic.today/docs/develop/getting-started/
https://docs.polygon.technology/docs/develop/ethereum-polygon/plasma/getting-started/
https://docs.matic.today/docs/develop/ethereum-matic/pos/getting-started/
https://maticnetwork.github.io/matic.js/docs/get-started/
https://docs.soliditylang.org/en/develop/abi-spec.html
https://betterprogramming.pub/solidity-playing-with-strings-aca62d118ae5
https://en.wikipedia.org/wiki/Integer_overflow
https://en.wikipedia.org/wiki/Arithmetic_underflow
https://docs.openzeppelin.com/contracts/4.x/api/utils#SafeMath
https://docs.soliditylang.org/en/latest/080-breaking-changes.html
https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic
https://docs.soliditylang.org/en/latest/assembly.html
https://docs.soliditylang.org/en/latest/yul.html#yul
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Address.sol
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Create2.sol
https://eips.ethereum.org/EIPS/eip-191
https://eth.wiki/en/fundamentals/rlp
https://docs.ethers.io/v5/api/signer/#Signer-signMessage
https://docs.openzeppelin.com/contracts/4.x/utilities#checking_signatures_on_chain
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/ECDSA.sol | Scaling overview
Polygon (Matic)
Encoding and string manipulation - What is ABI encoding
Positive and negative overflow and underflow
Assembly
ECDSA example - Overview about ECDSA signature
Test some DeFi projects in testnet
Try around with Flash Swaps and Flash Loans | https://youtu.be/-x3ffr_l-C4 | https://www.defipulse.com/
https://uniswap.org/developers
https://docs.convexfinance.com/convexfinance/
https://docs.dydx.exchange/#general
https://docs.tornado.cash/general/readme
https://academy.binance.com/en/articles/what-are-flash-loans-in-defi
https://docs.aave.com/faq/flash-loans
https://docs.uniswap.org/protocol/guides/flash-integrations/inheritance-constructors
https://medium.com/coinmonks/tutorial-of-flash-swaps-of-uniswap-v3-73c0c846b822
https://eips.ethereum.org/EIPS/eip-3156
https://docs.openzeppelin.com/contracts/4.x/api/token/erc20#ERC20FlashMint
https://docs.openzeppelin.com/contracts/4.x/api/interfaces#IERC3156FlashLender
https://docs.openzeppelin.com/contracts/4.x/api/interfaces#IERC3156FlashBorrower | Projects overview
Flash swaps and flash loans - Collateralized and unsecured loans
Implementing ERC20FlashMint
https://medium.com/@shub.sharma350/upgradability-patterns-in-solidity-part-1-13e23ce1f144
https://medium.com/@shub.sharma350/upgradability-patterns-in-solidity-part-2-8a2e531d80f8
https://medium.com/@shub.sharma350/upgradability-patterns-in-solidity-part-3-cba09b164497
https://medium.com/@shub.sharma350/upgradability-patterns-in-solidity-part-4-99a2ae29876e
https://docs.openzeppelin.com/upgrades
https://docs.openzeppelin.com/learn/upgrading-smart-contracts
https://docs.openzeppelin.com/contracts/4.x/api/proxy
https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable
https://docs.openzeppelin.com/upgrades-plugins/1.x/proxies
https://docs.openzeppelin.com/contracts/4.x/upgradeable
https://docs.openzeppelin.com/upgrades-plugins/1.x/hardhat-upgrades | Patterns overview
OpenZeppelin plugins and contracts
Implementing a simple contract upgrade
| | Smart Contract Security | 6 | Thursday | https://github.com/Encode-Club-Solidity-Bootcamp-May/20-Smart-Contract-Security | - The Security Toolbox | 1. Read the references
https://github.com/crytic/echidna
https://github.com/trailofbits/manticore
https://github.com/eth-sri/securify2
https://github.com/scopelift/fakerdao | The Security Toolbox