safe-global / safe-react-apps

A repository for applications for Safe Web Interface
MIT License
100 stars 76 forks source link

Custom tx: Fetch implementation abi when contract is proxy #818

Open scottrepreneur opened 2 months ago

scottrepreneur commented 2 months ago

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

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.

katspaugh commented 2 months ago

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

scottrepreneur commented 2 months ago

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