]> git.ardis.lu - 4-byte-gen/summary
 
descriptionSimple web app to generate optimized function selectors for Solidity.
last changeThu, 23 Apr 2026 06:44:00 +0000 (23:44 -0700)
readme

4-byte-gen

Simple web app to generate optimized function selectors for Solidity.

Similar projects:

Code repository mirrors: GitHub, Codeberg, git.ardis.lu

Example

Demonstration of the 4-byte-gen web UI finding optimized function names for standard ERC-20 functions.

  1. Input the standard ERC-20 functions transfer, transferFrom, and approve. You can copy the function definition directly from your Solidity code without modification.
  2. Adjust "Minimum number of zero bytes" to the desired number of zero bytes to mine for. Check out 4-byte-gas-test for a comparison of gas costs between functions with zero bytes.
  3. Click "Parse functions" and the tool will normalize the function definitions (i.e., remove spaces, input names, and extraneous keywords).
  4. Click "Start all" and the tool will start mining for optimized function names (each function is mined using its own web worker, so they are mined in parallel).
shortlog
2026-04-23 Ardis LuOptimize image main
2026-01-12 Ardis LuAdd code repository mirrors
2026-01-11 Ardis LuAdd MIT license
2024-10-06 Ardis LuFurther minify by mangling props and strings
2024-04-06 Ardis LuUse precise terminology
2024-03-27 Ardis LuUpgrade noble-hashes to 1.4.0
2024-03-13 Ardis LuDisable spellcheck for textarea
2024-02-23 Ardis LuFix issue where multi-line definitions with the same...
2024-02-18 Ardis LuAdd usage example
2024-02-12 Ardis LuAdd basic lookahead for multi-line function definitions
2024-02-12 Ardis LuAdd additional check for strict mode
2024-02-11 Ardis LuParse functions with space between identifier and paren...
2024-01-28 Ardis LuAdd data attributes to ignore other password managers
2023-12-24 Ardis LuPreload all assets
2023-12-21 Ardis LuUpgrade noble-hashes to 1.3.3
2023-11-22 Ardis LuPreserve tuples in parameterTypes
...
heads
5 months ago main
This page took 0.05461 seconds and 7 git commands to generate.