Lesson Name |
Week |
Day |
Github Link |
Objectives |
Homework |
Video Example |
References |
Expanded Curriculum |
Introduction |
1 |
Monday |
|
- Wallets and Transactions |
|
|
|
|
- How Ethereum Works
- Contract interaction: Token Swap
- Coding HelloWorld.sol
- Compiling and Deploying | Create Github Issues with your questions about this lesson
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
- Detailed contract structure
- Contract interaction
- Clean code and documentation | Create Github Issues with your questions about this lesson
Read the references | https://youtu.be/rrfKmaDUy1o | https://docs.soliditylang.org/en/latest/grammar.htmlhttps://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
- Variable declaration and definition
- Assertion and Modifiers
- Common Solidity Global Variables | Create Github Issues with your questions about this lesson
Read the references | https://youtu.be/DgPwjYwzbbk | https://docs.soliditylang.org/en/latest/introduction-to-smart-contracts.html#accountshttps://docs.soliditylang.org/en/latest/introduction-to-smart-contracts.html#storage-memory-and-the-stack
https://docs.soliditylang.org/en/latest/types.htmlhttps://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-exceptionshttps://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
- Using Scripts to Automate Operations
- Running Scripts
- Running Scripts with Arguments | 1. Read the references
- Finish covering other operations with scripts | https://youtu.be/fM3_mXWOYps | https://www.typescripttutorial.net/typescript-tutorial/typescript-hello-world/
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
- More on Ether.js functions and utilities
Bytes32 and Strings conversion
Helper functions inside test scripts
Unit tests structure and nested tests
Using scripts to automate operations
- Running a script with yarn and node, ts-node and/or hardhat
- Ballot deployment script
- Passing arguments
- Passing variables to the deployment script
- Environment files
- Providers
- Connecting to a testnet with a RPC Provider
- Running scripts on chain
- Script for giving voting rights to a given address
- Dealing with transactions in scripts
Running scripts
Running scripts with arguments |
| Weekend Project 1 | 1 | Friday - Sunday | https://mnl3tahqrcu.typeform.com/mayproject1 | 1. Form groups of 3 to 5 students.
- Structure scripts to:
- Deploy
- Query proposals
- Give vote right passing an address as input
- Cast a vote to a ballot passing contract address and proposal as input and using the wallet in * environment
- Delegate my vote passing user address as input and using the wallet in environment
- Query voting result and print to console
-
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
- Watching for Events in Tests
- Watching for events in scripts with Ethers.js
- Watching for events in scripts connected to the Testnet | 1. Read the references
- Expand the script for logging from the last activity:
(a) Voting right given
** Print address of the receiver
(b) Vote delegated
** Print address of the final delegate
** Print final voting weight of that delegate
** Print if the delegate has already voted
(c) Vote given
** Whenever a vote is cast, display the winning proposal
** (Optional Level 1) Also display its vote count
** (Optional Level 2) Also display the name and vote counts of all other proposals | https://youtu.be/3NmAmTFrVww | https://docs.soliditylang.org/en/latest/contracts.html#events
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
- Event syntax
- Event storage
- Event indexing
- Topics and filters
- Transaction structure
- State changes with events
Watching for events in tests
- Event syntax in waffle
- Triggering an event
- Checking arguments
Watching for events in scripts with Ethers.js
- Event syntax for Ethers.js library
- Filters, EventFilters and topics
- Event arguments
- Event listeners and memory usage
- Async logic
- Triggering functions inside the script
- Cleaning up after usage
Watching for events in scripts connected to the Testnet
- (Review) Connecting to a testnet with a RPC Provider
- Triggering events in a public blockchain
- Viewing events in etherscan
|
| ERC20 and ERC721 Tokens | 2 | Tuesday | https://github.com/Encode-Club-Solidity-Bootcamp-May/06-Tokens | - Quickstart with OpenZeppelin wizard
- Contract structure
- Operating the contracts with scripts | 1. Read the references
-
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://eips.ethereum.org/erc
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
- Overview about Ethereum Improvement Proposals (EIPs)
- Overview about Application-level standards and conventions (ERCs)
- Explain about OpenZeppelin Contracts library
- Overview about ERC20
- Overview about ERC721
- Using OpenZeppelin wizard
Contract structure
- Syntax about inheritance
- Overview about OpenZeppelin features for ERC20 and ERC721
- Overview about OpenZeppelin features for Access Control
- Overview about OpenZeppelin utilities and components
- Adding minting feature
- Adding RBAC feature
Operating the contracts with scripts
- (Review) Script operation
- (Review) Accounts and funding
- (Review) Providers
- (Review) Async operations
- (Review) Running scripts on test environment
- Running the scripts on chain
- Contract factory and json imports
- Transaction receipts and async complexities when running onchain |
| The NFT Shop Challenge | 2 | Wednesday | https://github.com/Encode-Club-Solidity-Bootcamp-May/07-NFT-Shop-Challenge | - Challenge explanation
- Tests layout
- Completing tests | 1. Read the references
-
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
- Buy a ERC20 with ETH for a fixed ratio
- Withdraw ETH by burning the ERC20 tokens
- Buy (Mint) a new ERC721 for a configured price
- Update owner account whenever a NFT is sold
- Allow owner to withdraw from account.
**Only half of sales value is available for withdraw
- Allow users to burn their NFTs to recover half of the purchase price
- Update the NFT Mint price
**Release from pool when decreasing price
**Require allowance to top up pool reserves for liquidity when increasing price
Architecture overview
Contract external calls
Tests layout
(Review) TDD methodology
Best practices on external calls
Dealing with decimals and divisions
- Shifting decimal points
- Underflow
- Overflow
(Review) Test syntax
(Review) Positive and negative tests
Integration tests
Completing tests
- Coding patterns and design patterns
- Avoiding Front Running advantages
- Looking out for other attack vectors
- (Bonus) Implementing pausable to prevent front runners to take advantage of privileged information over “normal” users
- (Bonus) Demonstrate the money flow from buying the ERC20, then the NFT, then withdrawing by the owner |
| Tokenized Votes | 2 | Thursday | https://github.com/Encode-Club-Solidity-Bootcamp-May/08-Tokenized-Votes | - The ERC20Votes ERC20 extension
- ERC20Votes and Ballot.sol | 1. Read the references
-
(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
- Snapshots
- Creating snapshots when supply changes
- Using snapshots
- Self delegation
- Contract overall operation
ERC20Votes and Ballot.sol
-
Complete the contracts together
-
Structure scripts to
- Deploy everything
- Interact with the ballot factory
- Query proposals for each ballot
- Operate scripts
-
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
- Gas limit and loops
- Fixing the contract | 1. Read the references
- Finish the weekend project if you couldn’t so far | https://youtu.be/shJ4MD8tjn8 | https://dl.acm.org/doi/10.1145/3324884.3416626
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
- (Review) Block, block size and gas
- Gas limit network variable
- Transaction stack
- Optimization patterns
- O(n) versus N*O(1)
Gas limit and loops 2
- Converting strings to bytes
- Comparing strings
- Dealing with bytes arrays
- Loop syntaxes
- Hitting gas limit
Fixing the contract
- Loop best practices
- Refactoring for N*O(1)
- Keeping track of operation progress
- Iteration until operation is completed
- Backups and safeguards
- Avoiding loops |
| Randomness | 3 | Tuesday | https://github.com/Encode-Club-Solidity-Bootcamp-May/10-Randomness | - Randomness sources
- Generating numbers from pseudorandom sources
- Theory: Other randomness sources
- Lottery contract | 1. Read the references
-
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
- (Review) Block hash and timestamp
- (Review) Hashing and bytes conversion
- Creating a random number from block.hash and/or block.timestamp
- Mining exploitation
- False randomness
Generating numbers from pseudorandom sources
- Using a trusted party for randomness
- Signing a message
- Verifying signature
- Sealing a message with signature
- Committing a sealed seed for randomness
- Revealing a seed and processing randomness
- Beware of hash collisions and parameter amplitude
Theory: Other randomness sources
- Bias in decentralized randomness generation
- Oracles
- Data sources
- Oracle patterns
- On-chain data
- VRF
- RANDAO
Lottery contract
- (Review) Design patterns
- Architecture overview
- Lottery structure |
| Lottery | 3 | Wednesday | https://github.com/Encode-Club-Solidity-Bootcamp-May/11-Lottery | - Coding the contract
- Incrementing the contract: update token address
- Incrementing the contract: canceling the lottery
- Clean code and documentation | 1. Read the references
-
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
- Implementing the time lock using block number
- Block time estimation
- Implementing the fee
**(Review) Dealing with decimals
- Withdrawing from pool and redeeming eth
Incrementing the contract: update token address
- Setting the payment token as variable
- Updating the payment token and safeguards
Incrementing the contract: canceling the lottery
- Canceling the lottery and enabling refunds
- (Review) Pull over push pattern
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
- Code review
- Git flow
- Pull requests
- Issue templates
- Open source contributions
- Peer code review
Gas optimization
- (Review) Gas costs
- (Review) Read and write operations
- (Review) Storage, memory and stack
- Compiler optimizer
- Converting state reads to local reads
- Converting multiple state writes to multiple local writes and single state write
- Packing Structs
Smart contract security
- (Review) Payable and Fallbacks
- (Review) Attack vectors
- Self destruct
- (Review) External calls
- (Review) Inspecting transactions to reveal data
- (Review) Overflow and Underflow
- Exploiting architecture flaws
- Live examples
**Ethernaut challenge 5
**Ethernaut challenge 8
**Ethernaut challenge 15 |
| Weekend Project 3 | 3 | Friday - Sunday | https://encodeclub.typeform.com/mayproject3 | 1. Form groups of 3 to 5 students
-
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
- Architecture design
- NestJS Framework
- Implementing the API | 1. Read the references
-
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://restfulapi.net/
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://docs.nestjs.com/
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
- API endpoints
- HTTP and HTTPS requests and responses
- Architectures
**RESTful, SOAP, GraphQL, gRPC, Falcor, Pure JSON and others
**Webhooks
**MVC
- Documentation
**Swagger and Postman
- Programming languages and Frameworks
Architecture design
- Information and data
- Object Modeling and resources
- Model URIs
- Controllers
- Services
- Database
NestJS Framework
- Running services with node
- Web server with node
- Using Express to run a node web server
- About using frameworks
- Using NestJS framework
- Overview of a NestJS project
- Using the CLI
- Initializing a project with NestJS
- Swagger plugin
Implementing the API
- The NestJS CLI
- Creating Resources
- Controllers, Services and Routes in NestJS
- Modules and injections (overview)
- Server configuration
- Serving scripts as services
- Params, DTOs and Payloads
- HTTP errors and messages
- (Review) Environment
- Implementing the features
|
| Frontend | 4 | Tuesday | https://github.com/Encode-Club-Solidity-Bootcamp-May/14-Frontend | - Architecture overview
- Design of User Experience and User Interface
- Frameworks
- Implementing the dApp | 1. Read the references
-
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-frameworkshttps://angular.io/docshttps://getbootstrap.com/docs/5.0/getting-started/introduction/https://ng-bootstrap.github.io/#/getting-startedhttps://getbootstrap.com/docs/5.1/examples/https://ng-bootstrap.github.io/#/components/accordion/exampleshttps://github.com/ng-bootstrap/ng-bootstrap/tree/master/demo/src/app/components
https://angular.io/clihttps://developer.mozilla.org/en-US/docs/Web/API/Window/localStoragehttps://angular.io/guide/reactive-forms | Architecture overview
- The browser
- HTML
- CSS
- Javascript
- Dynamic content
- Languages and frameworks
- Responsiveness
- Mobile development
Design of User Experience and User Interface
- Feature mapping
- User Experience
- User interface
- Page structure
- Application flow
**Public area
**Authentication or Registration
**Logged area
- Sketching wireframes
Frameworks
- The JQuery era and the need for dynamic content
- Modern programming languages and frameworks
- Picking a framework
- CSS Frameworks
- Angular
- Bootstrap
- Ng-bootstrap
- Using samples from examples
Implementing the dApp
- Creating the project
- Creating components and defining routes for each page
- Generating a wallet and storing at Local Storage on login
- Reading blockchain data on page load
- Displaying values in HTML using Angular
- Reactive features in the page
- Button actions and events |
| Integration | 4 | Wednesday | https://github.com/Encode-Club-Solidity-Bootcamp-May/15-Integration | - Coupling frontend and APIs
- Auth methods for the Web3.0
- File storage for the Web3.0 | 1. Finish the integration
-
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
- On-chain and off-chain features
- Keeping user Private Key private
- Authentication methods
- Using signatures as a form of authentication
- Mapping interactions, resources and payloads
- Handling errors
Auth methods for the Web3.0
- Consuming services from API
- Authentication and authorization
- Elliptic encryption
- Signing messages
- Message signature in body
- Verifying signatures
File storage for the Web3.0
- Files on the server
- Scalable centralized solutions
- Databases vs File servers
- Decentralized file storage principles
- Introducing IPFS
- IPFS as a File Server |
| IPFS | 4 | Thursday | https://github.com/Encode-Club-Solidity-Bootcamp-May/16-IPFS | - Using The IPFS
- Integrating IPFS in a NodeJS Server | 1. Read the references
- Experiment with IPFS with other files and folders | https://youtu.be/Imo0j9xl-0s | https://docs.ipfs.io/
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
- Hosting and Co-Hosting files with IPFS
- Running a node
- Connecting to a local node
- Uploading files
- Downloading files
- File hashes
Integrating IPFS in a NodeJS Server
- Handling file data over http
- Large files
- Implementing size limits and file type filters in the controller
- Mocking a database with a JSON file
**Dealing with file systems
**Writing records
**Reading records |
| Weekend Project 4 | 4 | Friday - Sunday | https://encodeclub.typeform.com/mayproject4 | 1. Build a NodeJS web server and API using NestJS
-
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
- Scaling overview
- Polygon (Matic)
Advanced Solidity and Assembly
- Encoding and string manipulation
- Positive and negative overflow and underflow
- Assembly
- ECDSA example | 1. Read the references
-
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_overflowhttps://en.wikipedia.org/wiki/Arithmetic_underflowhttps://docs.openzeppelin.com/contracts/4.x/api/utils#SafeMathhttps://docs.soliditylang.org/en/latest/080-breaking-changes.htmlhttps://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic
https://docs.soliditylang.org/en/latest/assembly.htmlhttps://docs.soliditylang.org/en/latest/yul.html#yulhttps://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Address.solhttps://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Create2.sol
https://eips.ethereum.org/EIPS/eip-191https://eth.wiki/en/fundamentals/rlphttps://docs.ethers.io/v5/api/signer/#Signer-signMessagehttps://docs.openzeppelin.com/contracts/4.x/utilities#checking_signatures_on_chainhttps://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/ECDSA.sol | Scaling overview
- The scalability trilemma
- Layer 1 solutions
- Layer 2 solutions
- Sharding
- Bridges
**Trusted
**Trustless
- Cross chain
- Consensus mechanisms for scaling
Polygon (Matic)
- Polygon project
- Plasma bridge
- PoS bridge
- Interacting with matic using Ethers.js library
- Matic.js library
- Coding bridges
Encoding and string manipulation
- What is ABI encoding
- Using ABI encoding to manipulate bytes
- Packing and unpacking
- Using ABI encoding to manipulate strings
- Using libraries
**Solidity Utilities by willitscale
**String utils by Arachnid
Positive and negative overflow and underflow
- The age of SafeMath
- Solidity 0.8.0
- Using overflow without reverting
**Valid use cases for overflow
**Command blocks inside solidity
**Using “Unchecked” block
- Misconceptions about underflow
Assembly
- Syntax overview for Yul
- Inline assembly
- Use cases
- Solidity conventions for using inline assembly
ECDSA example
- Overview about ECDSA signature
- The danger of signing messages
- EIP191 and avoiding unintentionally signing a RLP
- Verifying signatures
- ECDSA OpenZeppelin Utility
**Usage of string manipulation in function toEthSignedMessageHash
**Usage for inline assembly in function tryRecover |
| DeFi | 6 | Tuesday | https://github.com/Encode-Club-Solidity-Bootcamp-May/18-DeFi | - Projects overview
- Flash swaps and flash loans
- Implementing ERC20FlashMint | 1. Read the references
-
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://docs.makerdao.com/https://docs.aave.com/hub/https://uniswap.org/developershttps://curve.readthedocs.io/https://docs.convexfinance.com/convexfinance/https://docs.dydx.exchange/#generalhttps://docs.tornado.cash/general/readme
https://academy.binance.com/en/articles/what-are-flash-loans-in-defihttps://docs.aave.com/faq/flash-loanshttps://docs.uniswap.org/protocol/guides/flash-integrations/inheritance-constructorshttps://medium.com/coinmonks/tutorial-of-flash-swaps-of-uniswap-v3-73c0c846b822
https://eips.ethereum.org/EIPS/eip-3156https://docs.openzeppelin.com/contracts/4.x/api/token/erc20#ERC20FlashMinthttps://docs.openzeppelin.com/contracts/4.x/api/interfaces#IERC3156FlashLenderhttps://docs.openzeppelin.com/contracts/4.x/api/interfaces#IERC3156FlashBorrower | Projects overview
- The idea around DeFi
- Locked value
- Stablecoins, marketmakers and lending protocols
- Swaps and DEXs
- Assets and derivatives
- Payments
Flash swaps and flash loans
- Collateralized and unsecured loans
- Flash loans
- Flash loans attacks
- Flash swaps
- Multiple swap steps
- Gas fees
Implementing ERC20FlashMint
- EIP 3156 for Flash loans
- Implementing ERC20FlashMint
- Loan fees
- Implementing IERC3156FlashLender and IERC3156FlashBorrower
- Running a flash loan
- Ensuring that the loan can be paid |
| Upgradeability Patterns | 6 | Wednesday | https://github.com/Encode-Club-Solidity-Bootcamp-May/19-Upgradeability | - Patterns overview
- OpenZeppelin plugins and contracts
- Implementing a simple contract upgrade | 1. Read the references
- Try out other upgrade patterns | https://youtu.be/6mQpJL2J4cQ | https://mirror.xyz/0xB38709B8198d147cc9Ff9C133838a044d78B064B/M7oTptQkBGXxox-tk9VJjL66E1V8BUF0GF79MMK4YG0
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
- Upgrading the immutable
- The simple Interface Pattern
- The problem with migrating storage
- The problem with logic changes
- Flexible and storage efficient solutions
**Proxy contracts
**Unstructured and transparent proxies
**Storage patterns
**Diamond patterns
**Metamorphic contracts
OpenZeppelin plugins and contracts
- Upgrade Plugin
- Upgradeable variants
- Building upgradeable contracts with OpenZeppelin
- Constructor and Initializers
- Upgradeable Libraries
- Creating contracts
- Unsafe operations
- Restrictions
Implementing a simple contract upgrade
- Running upgrades with hardhat
- Implementing a proxy pattern
- (Review) Delegate calls
- Extending storage
- Changing logic
- Understanding the risks
- Calling updates
|
| Smart Contract Security | 6 | Thursday | https://github.com/Encode-Club-Solidity-Bootcamp-May/20-Smart-Contract-Security | - The Security Toolbox | 1. Read the references
- Analyze some of the contracts created in this bootcamp using these tools | https://youtu.be/7Yjs8n04yNY | https://github.com/crytic/slither
https://github.com/crytic/echidna
https://github.com/trailofbits/manticore
https://mythx.io/
https://github.com/eth-sri/securify2
https://github.com/scopelift/fakerdao | The Security Toolbox
- Docker
- Running images
- Tools
**Slither
**Echidna
**Manticore
**Mythx
**Securfy2
- Fakerdao sample project |
| Sponsor Workshops | 7 | Monday - Thursday | | | |
| | |
| Team Project Work | 8 | Monday - Thursday | | | | | | |