View Code? Open in Web Editor
NEW
Thinks i learned and documented from the FCC 32 hrs Web3 and solidity course
Solidity 43.42%
TypeScript 16.92%
HTML 3.22%
JavaScript 36.45%
solidity's Introduction
Web3 and Solidity - FreeCodeCamp Course
![Solidity](https://camo.githubusercontent.com/ac49c973a2591b68aad1d2e4d48b2ca5415b528b76bce79b65e3a37df78cdd05/68747470733a2f2f7777772e63726970746f6e6f7469636961732e636f6d2f77702d636f6e74656e742f75706c6f6164732f323032312f30322f736f6c69646974792d6c656e6775616a652d70726f6772616d6163696f6e2d61637475616c697a6163696f6e2e6a7067)
- Nonce: transaction count for the account
- Gas Price: ptice per unit of gas (wei)
- Gas Limit: max gas that can be used for the transaction
- To: address of the account to send the transaction to
- Value: amount of ether to send (wei)
- Data: what to send to the To address
- V, R, S: signature of the transaction
- pragma: version of the compiler
- contract: like a class in OOP
- constructor: a function that runs once when the contract is created
- public: can be accessed from outside the contract
- view: can be called without spending gas
- pure: does not read from or modify the state and does not spend gas
- memory: temporary place to store data
- storage: permanent place to store data
- mapping: like a hash table
- require: like an if statement
- msg.sender: address of the account that called the function
- msg.value: amount of ether that was sent along with the function call
- address(this): address of the contract
- address payable: address that can send ether
- modifier: like a function that is run before the function it is applied to
- receive function: a special function in solidity that is run when the contract receives ether without a function call
- fallback function: a special function in solidity that is run when the contract receives ether and the function call does not match any other function
Optimization (Gas Efficiency)
- immutable: variables that cannot be changed after the contract is deployed
- constant: variables that cannot be changed after the contract is deployed and can be accessed from outside the contract
- if and custom errors instead of require: require uses more gas than if statements and custom errors
- view: functions that do not change the state of the contract
- pure: functions that do not read from or modify the state of the contract
solidity's People
Contributors
Watchers