GoodDollar / GoodDAPP

GoodDollar.org Wallet is the simplest access point to Claim your daily G$. It Is based on web3 and React native web.
good-dapp.vercel.app
MIT License
100 stars 53 forks source link

4079: Show address or name instead of unknown #4145

Closed L03TJ3 closed 8 months ago

L03TJ3 commented 9 months ago

Description

We used to show unknown for non-gd wallets or contracts other then bridge.

About # (link your issue here)

4079

vercel[bot] commented 9 months ago

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

Name Status Preview Comments Updated (UTC)
good-dapp ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 5, 2023 7:36am
2 Ignored Deployments | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **gooddollar-delta** | ⬜️ Ignored ([Inspect](https://vercel.com/gooddollarteam/gooddollar-delta/GKaCkGokyHmFqkerRQrDxYZNdbH6)) | [Visit Preview](https://gooddollar-delta-git-4079-contract-names-gooddollarteam.vercel.app) | | Dec 5, 2023 7:36am | | **goodid** | ⬜️ Ignored ([Inspect](https://vercel.com/gooddollarteam/goodid/GFN6LK9f1pWXhTUqW68yYV8aZbAp)) | [Visit Preview](https://goodid-git-4079-contract-names-gooddollarteam.vercel.app) | | Dec 5, 2023 7:36am |
L03TJ3 commented 9 months ago

@johnsmith-gooddollar @sirpy For all new gd contracts (I didn't see a reason to start refactoring the existing code for the gd contracts) or 3rd party contracts this fix should solve it either return contractName or when its a proxy, obtain the implementation name

However, after debugging I believe to understand that for the new buygd contracts this currently would display: 'UniswapV3Pool'

According to current flow below would be the event that is registered as 'hit' as its the log for the receiving of g$'s The from address here is the uniswapv3pool. There is no way to go from that pool contract > buygdclone right? (through querying explorer)

image

the other 'Transfer' events in logs are the sending of the cUsd (to other receiver addresses ofcourse) and the 'Initalized' event, which holds the buygdclone address

So the questions:

  1. should this be part of this pr or create a new issue for it?
  2. Am I right in the analysis that if we want to show BuyGD(clone/factory) as contract name this cannot be done by querying explorer, but needs to be handled in code (like we do the other gd events?) 2a. also not sure yet how? is it filtering on the InitializedEvent log?
L03TJ3 commented 8 months ago

@johnsmith-gooddollar @sirpy In favor of the release of tomorrow I am merging this, and make the proper showing of buygd contract part of an action item next sprint (either hotfix, or release later) The original issue 'Show contract name or address' is solved with this