Skip to content

Simple web app to generate optimized function selectors for Solidity.

Notifications You must be signed in to change notification settings

ardislu/4-byte-gen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

4-byte-gen

Simple web app to generate optimized function selectors for Solidity.

Similar projects:

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).

About

Simple web app to generate optimized function selectors for Solidity.

Topics

Resources

Stars

Watchers

Forks