Solidity notes
Coding
license headers
pragma version
smart contract
- state variables
- functions
- function modifiers
- events
- struct types / enum types
Use cases?
- gaming and blockchain
- ethereum transactions over web3
- nft
- voting system!
- multi-signature accounts?
Tips / Best practices
- small uints in structs saves gas!
- clustered variables (next to each other) saves gas!
view
andpure
doesn’t cost gas if called internally/privately
Resources
- Solidity & Ethereum in React (Next JS): The Complete Guide : https://www.udemy.com/course/solidity-ethereum-in-react-next-js-the-complete-guide/
- Ethereum and Solidity: The Complete Developer’s Guide: https://www.udemy.com/course/ethereum-and-solidity-the-complete-developers-guide/
- Ethereum Blockchain Developer Bootcamp With Solidity (2021): https://www.udemy.com/course/blockchain-developer/
- Learn Solidity by playing: https://cryptozombies.io/
- some smart contracts: https://github.com/HashLips/solidity_smart_contracts/tree/main/contracts
- solmate: https://github.com/Rari-Capital/solmate
- solidity patterns: https://github.com/fravoll/solidity-patterns