https://github.com/deltartificial/gas-puzzles-optimized
Optimized Gas Puzzles from RareSkills
https://github.com/deltartificial/gas-puzzles-optimized
Last synced: 4 months ago
JSON representation
Optimized Gas Puzzles from RareSkills
- Host: GitHub
- URL: https://github.com/deltartificial/gas-puzzles-optimized
- Owner: deltartificial
- Created: 2022-10-18T23:28:52.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-10-19T09:18:31.000Z (over 2 years ago)
- Last Synced: 2023-10-05T00:24:34.190Z (over 1 year ago)
- Language: Solidity
- Size: 7.81 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RareSkills Gas Puzzles - Optimized
## Non-Optimized Contract Gas
- Require (43 392 gas)
- ArraySum (23 399 gas)
- Distribute (71 953 gas)## Optimized Contract Gas (All Attempts)
- Require 1 (26 292 gas)
- Require 2 (26 282 gas)
- Require 3 (26 226 gas)
- ArraySum 1 ( gas)
- Distribute 1 ( gas)Rules
- you may not change the optimizer level
- you may not change the solidity version
- you may refactor functionality as long as you don't break the business logic
- you may make reasonable assumptions about what variable sizes are necessary to get things done
- you may remove unnecessary or redunant logic (some have been intentionally added)
- because making functions `payable` is a controversial optimization, you do not need to make functions `payable` to reach the gas target unless the function needs to be payable to fulfill its business logicOfficial Repo Link :
https://github.com/RareSkills/gas-puzzles