プロジェクト
GitHubで見る
kadenzipfel/gas-optimizations
概要
Solidityのスマートコントラクト最適化一覧
学習・教育計測したスター増加
- 24時間
- 0
- 7日間
- +1
- 15日間
- 0
- 1か月
- 履歴を収集中
期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。
README.md
オリジナルGas 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
関連プロジェクトを探す
読み込み中…