From: Ardis Lu Date: Sat, 6 Apr 2024 22:19:23 +0000 (-0700) Subject: Use precise terminology X-Git-Url: https://git.ardis.lu/?a=commitdiff_plain;h=7f09ff7377c0801ebc2bf79fcc5186626174f521;p=4-byte-gen Use precise terminology "Signature" can be confused for a cryptographic signature. --- diff --git a/README.md b/README.md index 6f42aa4..d541e25 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # 4-byte-gen -Simple web app to generate optimized function signatures for Solidity. +Simple web app to generate optimized function selectors for Solidity. Similar projects: - [jeffreyscholz/solidity-zero-finder-rust](https://github.com/jeffreyscholz/solidity-zero-finder-rust) @@ -13,5 +13,5 @@ Similar projects: 1. Input the standard [ERC-20](https://ercs.ethereum.org/ERCS/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`](https://4-byte-gas.ardis.lu/) for a comparison of gas costs between functions with zero bytes. -3. Click "Parse functions" and the tool will normalize the function signatures (i.e., remove spaces, input names, and extraneous keywords). +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](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API), so they are mined in parallel). diff --git a/index.html b/index.html index 92d9d9d..319832d 100644 --- a/index.html +++ b/index.html @@ -4,9 +4,9 @@ - + - + @@ -469,7 +469,7 @@ functionRegex = /^(function )(?[a-zA-Z$_][a-zA-Z0-9$_]*) *\((?.*?)(?!.+\))/; } else { - fn = fn.replaceAll(/[;'"]/g, ''); // Clean all characters that definitely do not affect the signature + fn = fn.replaceAll(/[;'"]/g, ''); // Clean all characters that definitely do not affect the selector functionRegex = /^(function )?(?[a-zA-Z$_][a-zA-Z0-9$_]*) *\((?.*?)(?!.+\))/; }