shazow / whatsabi

Extract the ABI (and resolve proxies, and get other metadata) from Ethereum bytecode, even without source code.
https://shazow.github.io/whatsabi/
MIT License
1.07k stars 76 forks source link

Proposal: Handling `DiamondProxy` in autoload: Respecting `followProxies: false` #132

Open yohamta opened 1 month ago

yohamta commented 1 month ago

Proposal

Currently, when using autoload with DiamondProxy, facet addresses and ABIs are resolved even when followProxies: false is set. This behavior might not align with the expected use case when users want to retrieve proxies and implementations separately.

Options

I'm not entirely sure which option would be the most suitable at the moment. What do you think?

shazow commented 1 month ago

Ah I think you're right, this is a bug. If followProxies: false, then the DiamondProxy resolving should be bundled into the result.followProxies() callback.

I'll try that fix, but there might have been a reason I didn't do that in the first place, let's find out! :)

shazow commented 1 month ago

This was undone in https://github.com/shazow/whatsabi/commit/fe8fa90b53b7ea789c6a85e59e6a29e145622cdb since we weren't sure what behaviour we want yet.

Also might be a good excuse to refactor autoload into more modular pieces to avoid recursing with repeated getCode.

Punting it to a future release, so we can get the current changes published. :)