{"repo":"Laugharne/select0r","free":true,"listed":false,"github":"https://github.com/Laugharne/select0r","clone":"git clone https://github.com/Laugharne/select0r.git","description":"Selector value optimizer, find better EVM function name to optimize Gas cost. Solidity functions can achieve higher efficiency when their function selector consists mainly of zeros.","language":"Rust","stars":12,"topics":["contracts","gas","keccak","keccak-256","optimization","rust","rust-lang","solidity","solidity-contracts","zeros"],"license":"MIT","category":"blockchain-web3","readme_excerpt":"Select0r - Select0r - 🔭 Overview - 📦 Install Rust - 🔧 Build - 🚀 How to run - 💻 Usage - ✏️ Parameters - 👉 Examples - 📝 Results - 🎉 Yad bonus ! - 📦 Installation - 💻 Script - TO DO 🔭 Overview Solidity functions can achieve higher efficiency when their function selector consists mainly of zeros. This tool helps you to generate a new selector for your Solidity contracts and save gas costs by using the smallest possible selector. For instance : - sendValue(uint256 amount) is invalid . - sendValue(uint256) is the correct format. The gas cost of a function name equals 4 times the number of zero bytes and 16 times the number of non-zero bytes. Therefore, the gas cost ranges from 28 gas ( 3 zeros and 1 non-zero ) in the best case to 64 gas ( 4 non-zero bytes ) in the worst case. 1. It's important to note that an all-zero function selector won't compile because it conflicts with the fallback function. Consequently, mint 22F5A30(uint256) ( 0a000000 ) is more gas-efficient than mint(uint256) ( a0712d68 ). 2. Function selectors with leading zeros affect the operation of the function dispatcher and can be processed more quickly with less gas consumption. This Rust program ( select0r ) is designed to find better names for an EVM (Ethereum Virtual Machine) function to optimize gas cost. It takes a function signature as input and performs calculations to find the best EVM function names in terms of gas cost. For more informations about gas optimisation related to function names , go","default_branch":null,"files":null,"tree":[],"storefront":"/r/Laugharne","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Laugharne/select0r/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}