safe-global / safe-wallet-web

Safe{Wallet} – multisig EVM wallet
https://app.safe.global
GNU General Public License v3.0
354 stars 424 forks source link

Feature to allow decoding of call data for contracts that are proxies/diamonds #2657

Open startswithaj opened 1 year ago

startswithaj commented 1 year ago

What is needed?

For Users that use proxy contracts or diamonds ERC-2535 the SAFE UI does not decode the transaction data. This is a known issue. Users are also not able to upload the abi for these contracts in anyway.

I first submitted this over at https://github.com/safe-global/safe-transaction-service/issues/1709

Feature:

  1. In the address book allow users to configure an ABI for the address.
  2. In the transaction panel (pictured below) add a button [Decode Data With Custom ABI].

This has been a problem for years for many users. Currently we must use a tool like https://lab.miguelmota.com/ethereum-input-data-decoder/example/ to verify call data or other custom tooling

Alternative:

Add a button that uses the https://www.4byte.directory/ or https://openchain.xyz/signatures api to check if there is a result for the function signature and if found use it to decode the call data.

Background

Screenshot 2023-10-17 at 2 37 59 pm

URL

https://app.safe.global/transactions/

katspaugh commented 1 year ago

Thanks for the proposal! Sounds like there's a real pain point for some users. I'll bring this up for discussion in the team.

kirkkonen commented 1 year ago

Hi guys! I'm Andrei, Safe{Wallet} PM. Thanks for pointing out this one and providing the proposed solution! No surprise but we got limited dev resource and 2023 schedule fully packed with features.

There can be potentially 2 paths for this one to speed things up:

1) If you could compose some Dune dashboard to illustrate the usage of Safe <> ERC-2535 transaction quantity and volume that would help us re-prioritize in case that's smth frequent. 2) Given that the UI is open source feel free to make a PR which will be reviewed by our dev team and merged if all good :)

Hope that works for you!

startswithaj commented 1 year ago

hey @kirkkonen appreciate the response.

Its not just ERC-2535, its any Transparent, UUPS, Upgradeable, or DelegateCall Proxy, basically any form of proxy because the proxy's ABI doesn't contain the functions that are being called. They all suffer the same fate, which is the Safe UI cannot display the decoded function name and parameters. If you have a look at the issues list on https://github.com/safe-global/safe-transaction-service/issues there's many people requesting to be able to upload the abi for there proxies implementation. The resounding response is that Safe doesn't support proxies.

I've written some custom internal tooling that solves this for us using https://openchain.xyz/signatures and wont have time in the short to medium term to open a PR but I will definitely look into it when time allows.