Home

Awesome

Journey-to-become-a-Blockchain-Engineer

I'm sharing everything I'm learning to become a Blockchain Engineer

Blockchain

<p align="center"> Day 1 </p>
Blockchain
- Bitcoin
- Ethereum
- Smart Contracts
- Bitcoin Vs Ethereum
- Oracle Problem & Solution
- Hybrid Smart Contracts
- Chainlink
- Importance of Ethereum
- Chainlink features
- Summary
Features of blockchain and smart contracts
- Decentralized
- Transparency & Flexibility
- Speed & Efficiency
- Security & Immutability
- Removal of Counterparty risks
- Trust Minimized Agreements
- Summary
DAOs
<p align="center"> Day 2 </p>
A Live Ethereum Transaction
- Wallet Creation
- Etherscan
- Multiple Accounts
- Public and private keys, as well as mnemonics
- Mnemonic vs Private vs Public keys
- Mainnet & Testnets
- Initiating our first transaction
- Transaction details
- Gas fees, Transaction fees, Gas limit, Gas price
- Gas vs Gas price vs Gas Limit vs Transaction fee
- Gas estimator
How Blockchain Works/What Happens Inside Blockchain
- Hash or Hashing or SHA256
- Block
- Blockchain
- Decentralized/Distributed Blockchain
- Tokens/Transaction History
- Summary
<p align="center"> Day 3 </p>
Signing and Verifying a Transaction
- Public & Private Keys
- Signatures
- Transactions
- Summary
Concepts are same
- Nodes
- Centralized entity vs Decentralized Blockchain
- Transactions are Listed
- Consensus
- proof of work/Sybil resistance mechanism
- Blocktime
- Chain selection rule
- Nakamoto consensus
- Block Confirmations
- Block rewards & transaction fees
- Sybil attack
- 51% attack
- Drawbacks of pow
- proof of stake/sybil resistance mechanism
- Validators
- pros & cons of pos
- Scalability problem & Sharding solution
- Layer 1 & Layer 2
- Rollups
- Summary
<p align="center"> Day 4 </p>
Solidity
Remix IDE & its features
- Solidity version
- Defining a Contract
- Variable types & Declaration
- Solidity Documentation
- Initializing
- Functions or methods
- Deploying a Contract
- Public , Internal , private , External Visibility
- Modifying a Variable
- Scope
- View functions
- Pure function
- Structs
- Intro to storage
- Arrays
- Dynamic array
- Fixed array
- Adding to an array
- Compiler Errors
- Memory Keyword
- Storage keyword
- Mappings Datastructure
- SPDX license
- Deploying to a live network
- Interacting with deployed contracts
- EVM
- Summary
<p align="center"> Day 5 </p>
StorageFactory
- Factory pattern
- New contract StorageFactory
- Import 1 contract into another
- Deploy a Contract from a Contract
- Track simple storage contracts
- Interacting with Contract deployed Contract
- Calling Store & Retrieve Functions from SF
- Address & ABI
- Compiling & storing in SS through SF
- Adding Retrieve Function
- Compiling
- Making the Code lil bit Simpler
- Additional Note
- Inheritance
- Overrides
- Recap
<p align="center"> Day 6 </p>
Fund me
- purpose of this contract
- Payable function , wei , gwei & ether
- Mapping , msg. sender , msg.value
- Funding
- ETH -> USD /conversion
- Deterministic problem & Oracle solution
- Centralized Oracles
- Decentralized Oracle Networks
- Chainlink Datafeeds
- Chainlink Code documentation on ETH/USD
- Importing Datafeed code from Chainlink NPM package
- Interfaces
- ABI/Application Binary Interface
- Interacting with an Interface Contract
- Finding the Pricefeed Address
- Deploying
- Getprice function
- Tuples
- Typecasting
- deploying
- Clearing unused Tuple Variables & Deploying
- Making the contract look Clean
- Wei/Gwei Standard (Matching Units)
- getting the price using Get conversion rate
- deploying
<p align="center"> Day 7 </p>
- Safemath & Integer Overflow
- Libraries
- Setting Threshold
- Require statement
- Revert
- Deplying & Transaction
- Withdraw Function
- Transfer , Balance , This
- Deploying
- Owner , Constructor Function
- Deploying
- Modifiers
- Deploying
- Resetting the Funders Balances to Zero
- For loop
- Summary
- Deploying & Transaction
- Forcing a Trasacttion
- Libraries
- Advanced Solidity Immutable & Constant
- Custom Errors
- Receive & Fallback
<p align="center"> Day 8 </p>
Web3. py SimpleStorage
- Limitations of Remix
- VScode , Python , Solidity Setup
- VScode features
- Testing python install & Troubleshooting
- Creating a new folder
- SimpleStorage. sol
- Remember to save
- VScode Solidity Settings
- Python Formatter & settings
- Author's recommended Settings
- working with python
- Reading our solidity file in python
- Running in Python
- Keyboard Shortcuts
- Py-Solc-x
- Importing solcx
- Compiled_sol
- Bracket pair colorized
- pysolcx documentation
- Printing Compiled_sol
- Comparison wih remix (Lowlevelstuffs , ABI)
- Saving Compiled Code/writing
- import Json
- Json formatting/settings
- Deploying in Python (Bytecode , ABI)
- Which Blockchain/Where to deploy
- Ganache Chain
- Ganache UI
- Introduction to Web3. py
- pip install web3
- import web3
- Http/Rpc provider
- Connecting to Ganache(RPC server,Documentation,Chain ID,address,Privatekey)
- Deploy to Ganache
- Building a Transaction
- Nonce
- Getting Nonce
- Create a Transaction
- Transaction Parameters
- Signing Our Transaction(signed_txn)
- Never Hardcode your Private keys
- Environment Variables
- Setting Environment variables
- Limitations of Exporting Environment Variables
- Private key PSA
- Accessing Environment Variables
- .env file, .gitignore, pip install python-dotenv
- load_dotenv()
- Sending the signed Transaction
- Deployment
<p align="center"> Day 9 </p>
- Block confirmation(wait_for_transaction_reciept)
- interact/work with thee contract
- Address & ABI
- Retrieve() , Call & Transact
- Store function
- Creating Transaction(Store_transaction)
- Signing Transaction(signed_store_txn)
- Sending Transaction(send_store_tx,tx_receipt)
- Deployment
- some nice syntax & deployment
- ganache-cli
- install Nodejs
- install yarn
- Run ganache cli , ganache documentation
- update privatekeys,addresses,http provider
- open new terminal & deploy
- deploy to testnet/mainnet
- Infura, Alchemy
- Create project
- update the rinkeby url, Chain id , address & private key
- Deploying
- summary/recap
<p align="center"> Day 10 </p>
Brownie Simple Storage
- Brownie Intro & Features
- install Brownie
- 1st brownie simplestorage project
- Brownie Folders
- brownie compile & store
- brownie deploy
- brownie runscripts/deploy. py & default brownie network
- brownie Advantages over web3. py in deploying
- getting address & private key using Accounts package
- add default ganache account using index
- add accounts using Commandline
- add accounts using env variables
- adding wallets in yaml file and updating in account
- importing contract simplestorage
- importing & deploying in brownie vs web3. py
- recreating web3 .py script in brownie
- tests
- Deploying to a Testnet
- Brownie console
<p align="center"> Day 11 </p>
Brownie Fund Me
- Initial Setup
- Dependencies
- Remappings
- Rinkeby Deploy Script
- init.py
- Deploying to Rinkeby
- Deploying to ganache
- Mock
- Constructor Parameters
<p align="center"> Day 12 </p>
- Refactoring
- Deploying to a persistant ganache
- Adding network to brownie
- Withdraw and Fund
- Testing
- Default Network
- Mainnet fork
- Custom mainnet-fork
- Adding to Github
- Where should I run my tests?
<p align="center"> Day 13 </p>
SmartContract Lottery
- Decentralized Lottery
- Setup
- Wait..is this really decentralized?
- Could we make it decentralized?
- Chainlink Keepers
- Lottery.sol
- Main functions of Lottery.sol
- address payable[]
- require minimum payment
- getEntranceFee
- Testing
- Enum
- startLottery
- Randomness
- pseudorandom numbers
- True Randomness with Chainlink VRF
- Oracle Gas and Transaction Gas
- Request and Receive
- Kovan
- Gas Estimation Failed
- After Link transaction completes
- After transaction completes
- Request and Receive
- Asynchronous 2 Transactions
- Clarification
<p align="center"> Day 14 </p>
- endLottery
- returns(type variableName)
- fulfillRandomness
- override
- Modulo(Mod Operation %)
- Lottery Testing
- deploy_lottery.py
- get_account refactored
- contract_to_mock
- Contract.from_abi
- Adding vrfCoordinatorMock
- Start Lottery
- enter_lottery
- end_lottery
- Funding with LINK
- brownie interfaces
- waiting for callback
- Integration Tests Vs Unit Tests
- Unit Testing
- pytest.skip
- test_cant_enter_unless_started
- test_can_start_and_enter_lottery
- test_can_end_lottery
- test_can_pick_winner_correctly
- Events and Logs
- callBackWithRandomness
- Integration Test
- Test deployment
- Topics
- Conftest.py
<p align="center"> Day 15 </p>
Chainlink Mix
ERC20s, EIPs, and Token Standards
- Why make an ERC20?
- How do we build one of these tokens?
- Solidity 0.8
- 1_deploy_token.py
<p align="center"> Day 16 </p>
Defi & Aave
- Decentralized Exchange(DEX)
- Depositing tokens/ Lending
- WETHGateway
- Interest Bearing Token (aToken)
- Why borrow?
- Stable Vs Variable Interest Rate
- Reward token / Governance token
- Programmatic interactions with Aave
- Qunt Defi Engineer
- No contract deployments here
- aave_borrow.py
- Converting ETH -> WETH
- Get the WETH interface
- Why not get_contract?
<p align="center"> Day 17 </p>
- aave_borrow.py
- Lending Pool
- LendingPool Address Provider
- Fixing Importing Dependencies
- deposit function
- getUserAccountData
- liquidation threshold
- Getting DAI conversion rate
- Aave Testnet Token Addresses
- Repaying
- Testing
<p align="center"> Day 18 </p>
NFTs
- ERC-721
- Metadata
- Token URI
- Let's start Coding
- Initial Setup
- SimpleCollectible.sol
- Factory Contract
- _safeMint
- How do I "see" the NFT?
- Is this decentralized?
- Ethereum Size and dStorage
- IPFS
- deploy_and_create.py
- IPFS companion
- Testing
- What else with NFTs?
<p align="center"> Day 19 </p>
Advanced NFT
- Double Inherited Constructor
- tokenIDToBreed
- setTokenURI
- _isApprovedOrOwner
- Best Practice
<p align="center"> Day 20 </p>
- Advanced deploy_and_create.py
- Refactoring
- Deploying AdvancedCollectible
- Continuing our deploy script
- create_collectible.py
- Back to testing
- Unit Testing
<p align="center"> Day 21 </p>
- Integration Testing
- create_metadata.py
- get_breed
- sample_metadata.py
- Uploading Image to IPFS
- Download IPFS Command Line
- HTTP IPFS DOCS
- Alternative: Pinata
- Upload to Pinata
- Refactor to not re-upload to IPFS
- Setting the TokenURI
- End to End Mannual Test
<p align="center"> Day 22 </p>
Upgrades
- Not Really / Parameterize
- Who the admins?
- Are upgradeable smart contracts decentralized?
- Social YEET / Migration
- Proxies
- Biggest Gotchas
- Transparent Proxy Pattern
- Universal Upgradeable Proxies
- Gas Saver!!
- Diamond Pattern
<p align="center"> Day 23 </p>
- Coding Upgradeable Smart Contracts
- Box.sol
- Getting Proxy Contracts
- Hooking up a proxy to our implementation contract
- Initializer
- encoding the initializer function
- get_encode_function
- Assigning V2 to proxy
- Upgrade Python Function
- Testing our upgrades
- Testing our proxy
- Upgrades on a testnet
<p align="center"> Day 24 </p>
Full Stack Defi
- Staking and Depositing
- DappToken.sol
- TokenFarm.sol
- tokenIsAllowed
- Valued Staked Tokens
- issueTokens
- getUserTotalValue
<p align="center"> Day 25 </p>
- unStakeTokens
- Can this be reentrancy attacked?
- Scripts and Tests
<p align="center"> Day 26 </p>
- Testing
<p align="center"> Day 27 </p>
Front End / Full Stack
- React and Typescript
- create react app
- install packages
- Create React App Layout
- connecting your wallets
- Header Component
- Material-UI
- Sending brownie config to the UI
- Helper Config
<p align="center"> Day 28 </p>
- YourWallet
- State Hook
- Stake Form
- Calling Approve
- useContractFunction
- useEffect
- Notifications
- Make it pretty
<p align="center"> Day 29 </p>
Events and Logging in Solidity
- Events
Multicall
- Batch Requests
<p align="center"> Day 30 </p>
Leveraged Trading in DeFi
- AAVE UI
- Doing Programmatically
<p align="center"> Day 31 </p>
Flash Loans
<p align="center"> Day 32 </p>
Ethers.js Simple Storage
- Installation
- Tiny JavaScript Refresher
- Asynchronous programming in JavaScript
- Compiling our Solidity
- Ganache & Networks
- Introduction to Ethers.js
<p align="center"> Day 33 </p>
- A note on Await Keyword
- Adding Transaction Overrides
- Transaction Receipts
- Sending a "raw" transaction in etherjs
- Interacting with Contracts in Ethersjs
- Environment variables
- Better Private Key Management
- Optional Prettier Fromatting
- Deploying to a Testnet or a Mainnet
<p align="center"> Day 34 </p>
Hardhat Simple Storage
- Hardhat
- Hardhat Setup
- Deploying SimpleStorage from Hardhat
- Networks in Hardhat
<p align="center"> Day 35 </p>
- Programatic Verification
- Interacting with Contracts in Hardhat
- Custome Hardhat Tasks
- Hardhat Localhost Node
- The Hardhat Console
- Running Tests
- Hardhat Gas Reporter
- Solidity Coverage
- Hardhat Waffle
<p align="center"> Day 36 </p>
Hardhat Fund Me
- Hardhat Setup
- Linting
- Importing from NPM
- Hardhat Deploy
- Mocking & helper-hardhat-config
- Utils Folder
- Testnet Demo
<p align="center"> Day 37 </p>
- Solidity Style Guide
- Testing FundMe
- Breakpoints & Debugging
- Gas
- Console.log & Debugging
- Testing FundMe II
<p align="center"> Day 38 </p>
- Storage in Solidity
- Gas Optimizations using storage keyword
- Solidity Chainlink Style Guide
- Staging Tests
- Running Scripts on a Local Node
- Adding scripts to your package.json
<p align="center"> Day 39 </p>
HTML / JavaScript Fund Me
- Intro to front end / full stack
- How websites work with web3 wallet?
- HTML Setup
- Connecting HTML to MetaMask
- JavaScript in it’s own files
- ES6 (FrontEnd JS) VS NodeJS
- Sending a Transaction from a Website
- Resetting an Account in MetaMask
- Listening for Events and Completed Transactions
- Input Forms
- Reading from the blockchain
- Withdraw Function
<p align="center"> Day 40 </p>
Hardhat Smart Contract Lottery / Raffle
- Hardhat Setup
- Raffle.sol Setup
- Events
- Chainlink VRF (Randomess in Web3)
- Implementing Chainlink VRF
- Hardhat Shorthand
- Implementing chainlink VRF (The Request)
- Implementing Chainlink VRF (The Fulfill)
<p align="center"> Day 41 </p>
- Introduction to Chainlink Keepers
- Implementing Chainlink Keepers (checkUpkeep)
- Enums
- Implementing Chainlink Keepers (checkUpkeep continued)
- Implementing Chainlink Keepers (performUpkeep)
- Code Cleanup
<p align="center"> Day 42 </p>
- Mock Chainlink VRFCoordinator
- Raffle.sol Unit Tests
- Testing Events & Chai Matchers
- Raffle.sol Unit Tests Continued
- Hardhat Methods & “Time Travel”
- Callstatic
- Massive Promise Test
- Raffle.sol Staging Tests
- Testing on a Testnet
<p align="center"> Day 43 </p>
NextJS Smart Contract Lottery
- NextJS Intro
- NextJS Setup
- Manual Header I
- React Hooks
- Mannual Header II
- useEffect Hook
- Local Storage
- isWeb3Enable Loading
- web3uikit
- Introduction to Calling Functions in NextJS
- Automatic Constant Value UI Updater
<p align="center"> Day 44 </p>
- runContractFunction
- useState
- Calling Functions in NextJS
- useNotification
- Reading and Displaying Contract Data
- A note about onSuccess
- Tailwind & Styling
- Introduction to Hosting your Site
- IPFS
- Hosting on IPFS
- Hosting on IPFS & Filecoin using Fleek
- Filecoin Overview
- Summary
<p align="center"> Day 45 </p>
Hardhat Starter Kit
Hardhat ERC20s
- What is an ERC?
- What is an EIP?
- What is an ERC20?
- Why make an ERC20?
- Manually Creating an ERC20 Token
- Creating an ERC20 Token with OpenZeppelin
- Recap
<p align="center"> Day 46 </p>
Hardhat Defi and Aave
- What is Aave?
- Programatic Borrowing and Lending
- WETH (Wrapped ETH)
- Forking Mainnet
- Depositing into Aave
- Borrowing from Aave
- Repaying with Aave
<p align="center"> Day 47 </p>
The Ultimate NFT
- Hardhat Setup
- Basic NFT
<p align="center"> Day 48 </p>
Random NFT
- Mapping ChainLink VRF Requests
- Creating Rare NFTs
- Setting the NFT Image
- Setting an NFT Mint Price
- Recap
<p align="center"> Day 49 </p>
Deploy
- Uploading token images with Pinata
- Uploading Metadata with Pinata
- NFT tests
<p align="center"> Day 50 </p>
Dynamic SVG On-Chain NFT
- What is a SVG?
- Initial Code
- Base64 Encoding
Advanced Section Encoding, Opcodes and Calls
- abi.encode & abi.encodePacked
- Introduction to Encoding Function Calls Directly
- Encoding Recap
- Encoding Function Calls Directly
<p align="center"> Day 51 </p>
Dynamic SVG On-Chain NFT
- Creating an NFT TokenURI On-Chain
- Making the NFT Dynamic
- Dynamic SVG On-Chain NFT Deploy Script
<p align="center"> Day 52 </p>
Full Stack NFT Marketplace
- NFT Marketplace Contracts
- Hardhat Setup
- NFTMarketplace.sol
- listItem function
- buyItem function
- Reentrancy Attacks
- Marketplace.sol Continued
- NFTMarketplace Deploy Script
- NFT Marketplace Tests
- NFT Marketplace Scripts
<p align="center"> Day 53 </p>
Moralis Front End
- NextJS Setup
- Adding Tailwind
- Introducing to Indexing in Web3
- What is Moralis?
- Connecting Moralis to our Local Hardhat Node
<p align="center"> Day 54 </p>
- Moralis Event Sync
<p align="center"> Day 55 </p>
- Resetting the Local Chain
- Moralis Cloud Functions
- Moralis Cloud Functions II
- Querying the Moralis Database
- Rendering the NFT Images
<p align="center"> Day 56 </p>
- Updating the Listing
- Buy NFT Listing
- Sell Page Listing NFTs for Sale
<p align="center"> Day 57 </p>
The Graph Front End
- What is The Graph?
- Building a Subgraph
- Deploying our Subgraph
- Reading from The Graph
- Hosting our Dapp
<p align="center"> Day 58 </p>
Hardhat Upgrades
- Delegate call
- Small Proxy Example
- Function Selector Clashes
- Transparent Upgradeable Proxy Contract
<p align="center"> Day 59 </p>
Build a DAO
- What is a DAO?
- How to build a DAO?
<p align="center"> Day 60 </p>
Security and Auditing
- What is an Audit?
- Process
- Slither
- Fuzzing and eth-security-toolbox
<p align="center"> Day 61 </p>
Deep Dive into DEFI
Traditional Finance System
- Income Statement
- Fractional Reserve
- The multiplier effect and the money supply
- Bank Notes
- Bank notes and checks
- Giving out loans without giving out gold
- Reserve ratios
- Reserve ratio requirement
- Leverage
- Reserve Bank
- Treasury (government debt)
- Open market operations
<p align="center"> Day 62 </p>
- The Federal Funds Rate
- More on the fed funds rate
- How do target interest rates differ from money supply?
- What happened to the gold?
- Overall discussion
- The discount rate
- Repurchase agreements (repo transactions)
- Fractional reserve banking
- Deposit insurance
- Big picture
- LIBOR
<p align="center"> Day 63 </p>
Connecting TradFi and DeFi
Stablecoins
- Volatility
- Liquidity
- Collateral
- Floating and Fixed Interest Rates
- Currency pegs
Types of stablecoins and comparison
- USDT
- USDC
- BUSD
- DAI
<p align="center"> Day 64 </p>
- Tether(USDT)
MakerDAO
- DAI and MakerDAO
Mechanism Design of Maker (DAI and MKR)
- Dual Token Mechanism
- Reserve Mechanism
- Creating DAI and How it works
- Maintaining Stability
- Crashes, Liquidations
- How is this different from lending and borrowing?
- Transparency
- Global Settlement
- Interacting with a Maker Vault
<p align="center"> Day 65 </p>
Smart contract module of MakerDAO
<p align="center"> Day 66 </p>
Decentralized Exchanges (DEXs)
- Stocks
- Financial Instruments
- Order Book
- Market
- Exchange
- Broker-Dealer
- Market Makers
- Market Index
- Long Trade vs. Short Trade
- Leverage
- Margin Trading
- Counterparty risks
- Trade Slippage
<p align="center"> Day 67 </p>
- DEX risk
- How a Decentralized Cryptocurrency Exchange Works
- Atomic Swaps
Liquidity pools and automated market makers
- Liquidity pools
- AMM
- impermanent loss
- Rug Pull
<p align="center"> Day 68 </p>
Uniswap
High Level Working of Uniswap
- Creating markets using Uniswap Exchange Factories
- Adding liquidity to markets via Uniswap Exchanges
- Swapping Ether for Tokens
- Swapping tokens for Ether
- Swapping tokens for tokens
Comparison of Unswap v1 vs v2 vs v3
- Uniswap V1
- Uniswap V2
- Uniswap V3
Frontrunning and sandwich attacks
- How is it related to slippage?
- MemPool
<p align="center"> Day 69 </p>
Balancer
- Index
- Index fund
- What is Balancer?
- Liquidity bootstrapping pools
How does the balancer work?
Smart Contract walkthrough
- BFactory.sol
- BPool.sol
<p align="center"> Day 70 </p>
Curve Finance
- Why not Uniswap?
- How does curve finance work?
- Math behind Curve Finance
<p align="center"> Day 71 </p>
Bancor
Smart contract walkthrough
- Vault.sol
- MasterVault.sol
- ExternalProtectionVault.sol
- ExternalRewardsVault.sol
<p align="center"> Day 72 </p>
- BancorArbitrage.sol
<p align="center"> Day 73 </p>
Carbon
- Asymmetric Liquidity
- Overview
- features of Carbon