Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: fetch implementation abi in transaction builder for proxy contracts #124

Conversation

gsteenkamp89
Copy link

motivation

DAOs might want to call functions on either the proxy contract OR the implementation contract for a given proposal.
atm users have 2 options:

  1. paste in your own ABI manually
  2. pste in an address, in which case the app will ONLY fetch the proxy's ABI, which means the functions are limited to things like changeAdmin() or upgrade() etc.

We want to extend the fetching logic for proxy contracts, allowing for 3 possible options:

  1. paste in your own ABI manually
  2. paste in an address, and fetch the proxy contract's ABI, list those "admin" functions.
  3. Fetch the implementation ABI as well and list those functions.

The UX here has not been decided on, but for an initial draft I've gone the same route as etherscan, a familiar pattern for us to test with, giving the user a dropdown so they can choose between

  • "Write contract"
  • "Write as proxy"

Copy link

linear bot commented Feb 7, 2024

Copy link

vercel bot commented Feb 7, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
snapshot ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 12, 2024 9:01am
snapshot-goerli ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 12, 2024 9:01am

@gsteenkamp89 gsteenkamp89 marked this pull request as ready for review February 12, 2024 13:54
@gsteenkamp89 gsteenkamp89 requested a review from daywiss February 12, 2024 13:54
@gsteenkamp89 gsteenkamp89 changed the title Gerhard/uma 2372 fetch implementation abi if proxy feat: fetch implementation abi in transaction builder for proxy contracts Feb 12, 2024
Copy link

@daywiss daywiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets merge this into tenderly branch so we can rebase againsts those form fixes and continue testing

@gsteenkamp89 gsteenkamp89 merged commit 332182f into gerhard/uma-2153-ui-render-the-tenderly-simulation-button-in-the-tx-builder Feb 13, 2024
4 checks passed
@gsteenkamp89 gsteenkamp89 deleted the gerhard/uma-2372-fetch-implementation-abi-if-proxy branch February 13, 2024 15:11
daywiss added a commit that referenced this pull request Feb 22, 2024
* create base component logic

* update styling

* validate payload, handle request and update styles

* better mobile styles

* use separate reset button

* feat: show warning if gas exceeds 500_000, refactor state (#121)

* feat: add simulation in proposal view (#122)

* feat: fetch implementation abi in transaction builder for proxy contracts (#124)

* use isValid flag to check transactions in simulation

* better feedback for EOA in "to" field & ABI with no write functions

* clean up

* reset parameters if ABI changes

* revert extra green & red variables

* fix typo

* use better icon convention

---------

Co-authored-by: Gerhard Steenkamp <gerhard@umaproject.org>
Co-authored-by: Gerhard Steenkamp <51655063+gsteenkamp89@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants