Open yohamta opened 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! :)
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. :)
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
DiamondProxy
, do not resolve the implementation ABIs whenfollowProxies: false
is set.isProxyResolved
flag toAutoloadResult
to indicate whether the proxy has been resolved (e.g., when the ABI for the implementation address has been resolved in cases likeDiamondProxy
, this flag would be set totrue
).autoload
resolves the implementation ABI, return an emptyproxies
field inAutoloadResult
.I'm not entirely sure which option would be the most suitable at the moment. What do you think?