safe-react-apps icon indicating copy to clipboard operation
safe-react-apps copied to clipboard

Custom tx: Fetch implementation abi when contract is proxy

Open scottrepreneur opened this issue 1 year ago • 2 comments

What is the feature about

When using the custom tx builder and attempting to interact with a proxied contract the Abi is fetched for the proxy contract.

Rather we should detect that the contract is a proxy and additionally fetch the abi for the proxy's implementation.

The list of requirements

  • detect that input contract is a proxy via interface
  • fetch implementation abi
  • Parse functions from the implementation abi

Designs/sketches

Should largely happen behind the scenes. Show a message that we've detected a proxy and fetched the implementation abi.

This would greatly enhance usability for proxy contracts via the custom transaction builder.

scottrepreneur avatar Aug 28 '24 17:08 scottrepreneur

Isn’t that how it already works? If it detects a proxy, it offers to use the implementation ABI.

katspaugh avatar Aug 28 '24 17:08 katspaugh

It has not worked in my testing with the Base (Optimism) Portal contract. I've been needing to add the implementation ABI manually. https://etherscan.io/address/0x49048044d57e1c92a77f79988d21fa8faf74e97e#writeProxyContract

scottrepreneur avatar Aug 29 '24 23:08 scottrepreneur