Find out what events are in Solidity and how they are useful. I will show you how to get past events and how to subscribe to incoming events using the DAI stablecoin contract.
Let's start building our multi-sig wallet app using React and Typescript. In this video I will show you 3 things.
1. How to initialize a React application using Typescript.
2. How to setup Truffle for UI development
3. How to write a function to unlock accounts managed by MetaMask and a function that will keep an eye on the current account used in MetaMask, checking back every second. This isn't the only way to write such functions but this will be a good starting point.
Demo: https://multi-sig.netlify.app/
Code: https://github.com/t4sk/multi-sig-wallet
Notes: https://smartcontractprogrammer.com/courses/multi-sig-wallet/chapter-02/01-setup/
Metamask: https://metamask.io/
Truffle: https://www.trufflesuite.com/docs/truffle/overview
Remix IDE: http://remix.ethereum.org
Solidity: https://solidity.readthedocs.io
Follow on Twitter: @ProgrammerSmart https://twitter.com/ProgrammerSmart
Join me on Discord: https://discord.gg/Ny8sPaj
Website: https://smartcontractprogrammer.com
...
https://www.youtube.com/watch?v=D-y2XK3YABc
Mapping in Solidity is not iterable unless you internally store all keys that were inserted.
#Solidity #SmartContract #Ethereum #スマートコントラクト
Remix
https://remix.ethereum.org
Code
https://solidity-by-example.org/app/iterable-mapping/
Take a course
https://www.smartcontract.engineer/
Follow
https://twitter.com/ProgrammerSmart
https://discord.gg/bt8FK2wkcW
https://t.me/smartcontractprogrammer
https://smartcontractprogrammer.com
...
https://www.youtube.com/watch?v=YOjo_lvUhj8
How to write basic tests in Foundry
0:00 - Intro
1:00 - Test setup
1:52 - Passing test
3:52 - Test for error
5:37 - Expect revert
6:36 - Test dec
7:17 - Test verbosity
8:31 - Gas report
Code
https://github.com/t4sk/hello-foundry
Book
https://book.getfoundry.sh/
Solidity by Example
https://solidity-by-example.org/
Take a course
https://www.smartcontract.engineer/
#Solidity #SmartContract #Ethereum #スマートコントラクト
Remix
https://remix.ethereum.org
Follow
https://odysee.com/@SmartContractProgrammer:8
https://twitter.com/ProgrammerSmart
https://discord.gg/bt8FK2wkcW
https://t.me/smartcontractprogrammer
https://smartcontractprogrammer.com
...
https://www.youtube.com/watch?v=HA0GWauMOsU
Constants are variables that cannot be modified. Replacing variables with constants can reduce gas cost of calling function on the smart contract.
#Solidity #SmartContract #Ethereum #スマートコントラクト
Remix
https://remix.ethereum.org
Code
https://solidity-by-example.org/constants/
Take a course
https://www.smartcontract.engineer/
Follow
https://twitter.com/ProgrammerSmart
https://discord.gg/bt8FK2wkcW
https://t.me/smartcontractprogrammer
https://smartcontractprogrammer.com
...
https://www.youtube.com/watch?v=y5uiQ9IJhMc
Vyper has an easy way to protect contracts from re-entrancy. This video explains how to use the @nonreentrant decorator.
#Vyper #ReEntrancy #SmartContract #Ethereum
Hand crafted re-entrancy lock 0:23
Non re-entrant decorator 2:21
Grouping re-entrancy locks 4:19
Code: https://github.com/t4sk/vyper-by-example
# References
Remix IDE: http://remix.ethereum.org
Vyper: https://vyper.readthedocs.io
Follow on Twitter: @ProgrammerSmart https://twitter.com/ProgrammerSmart
Join me on Discord: https://discord.gg/Ny8sPaj
Website: https://smartcontractprogrammer.com
...
https://www.youtube.com/watch?v=hxQr7G9ErIg
Curve StableSwap has complex code, difficult to understand, one of them being the function get_y. This video explains how the function get_y is implemented.
https://github.com/t4sk/defi-by-example/blob/main/notes/StableSwap.vy
#DeFi #Curve #SmartContract #Ethereum
# References
Curve https://curve.fi/
Follow on Twitter: @ProgrammerSmart https://twitter.com/ProgrammerSmart
Join me on Discord: https://discord.gg/Ny8sPaj
Website: https://smartcontractprogrammer.com
...
https://www.youtube.com/watch?v=jAhKbxoeskQ