프로젝트
GitHub에서 보기
kadenzipfel/gas-optimizations
소개
Solidity 스마트 계약 최적화 목록
학습 및 교육측정된 스타 증가
- in 24h
- 0
- in 7 days
- +1
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalGas Optimizations in Solidity
Gas Costly Patterns
- Comparison with Unilateral Outcome in a Loop
- Constant Outcome of a Loop
- Dead Code
- Expensive Operations in a Loop
- Loop Fusion
- Opaque Predicate
- Repeated Computations in a Loop
- Storage Variable as Loop Length
- Unnecessary Libraries
Gas Saving Patterns
- Proper Data Types
- Explicit Function Visibility
- Short Circuiting
- Constants and Immutables
- Struct Bit Packing
Gas Golfing
- Short Revert Strings
- Unchecked Arithmetic
- Optimal Comparison Operator
- Payable Functions
- Function Ordering
- Using Mulmod Over Mul & Div
- Optimal Increment and Decrement Operators
Sources/References
- https://medium.com/coinmonks/optimizing-your-solidity-contracts-gas-usage-9d65334db6c7
- https://ethereum.stackexchange.com/questions/28813/how-to-write-an-optimized-gas-cost-smart-contract
- https://arxiv.org/pdf/1703.03994.pdf
- https://ethereum.stackexchange.com/questions/3067/why-does-uint8-cost-more-gas-than-uint256
- https://www.youtube.com/watch?v=qwBkeJ84d2g&feature=youtu.be&t=68
- https://ethereum.stackexchange.com/questions/11556/use-string-type-or-bytes32
- https://gist.github.com/hrkrshnn/ee8fabd532058307229d65dcd5836ddc
- https://github.com/ZeroEkkusu/re-golf-course
관련 프로젝트 살펴보기
불러오는 중…