Find a function declaration with a clashing selector!
-
You can use this tool to pentest against selector clashing attack
https://forum.openzeppelin.com/t/beware-of-the-proxy-learn-how-to-exploit-function-clashing/1070
-
For original use cases
Example by 1inch:
Install the project:
cd rust/eth_function_selector
Custom args and prefix:
cargo run -- --func_name transfer --params "(address,uint256)"
Install the project:
nvm use
yarn
Basic search:
yarn start --targetFunc "transfer(address,uint256)"
Custom args and prefix:
yarn start --targetFunc "transfer(address,uint256)" --args "uint,bool" --prefix "myFunc_"
Short version:
yarn start -t "transfer(address,uint256)" -a "uint,bool" -p "myFunc_"
Only first N bytes (for a quick search):
yarn start -t "transfer(address,uint256)" --firstNBytes 1