slither icon indicating copy to clipboard operation
slither copied to clipboard

Identify Functions that use delegatecall and msg.data for Echidna Printer

Open man715 opened this issue 3 years ago • 3 comments

Describe the desired feature

Echidna should be able to access implementation contracts via a proxy contract that utilizes delegatecall with msg.data. This will allow easier fuzzing on proxy contracts. Currently, the user needs to create a wrapper for each of the functions that are in the implementation contract.

Ideally, the Slither printer would extract functions that use msg.data and associate the functions of the called contract into the calling contract.

man715 avatar May 09 '22 14:05 man715

To identify functions with msg.data, I think you can use the same method used here and add that info to the dictionary. Getting that working would be a good first step, and then we can discuss filtering for only fallback functions (it's not obvious that it wouldn't be useful for all functions).

0xalpharush avatar May 09 '22 14:05 0xalpharush

I have created added the information to the dictionary in PR https://github.com/crytic/slither/pull/1204

man715 avatar May 09 '22 18:05 man715

To identify functions with msg.data, I think you can use the same method used here and add that info to the dictionary. Getting that working would be a good first step, and then we can discuss filtering for only fallback functions (it's not obvious that it wouldn't be useful for all functions).

I was able to get that function working. I agree it may not be needed that the fallback be filtered out.

man715 avatar May 13 '22 01:05 man715