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

Incorporate and finalize the proxy format to the APIv2 response #1701

Closed
Tracked by #1367
kuzdogan opened this issue Oct 15, 2024 · 3 comments
Closed
Tracked by #1367

Incorporate and finalize the proxy format to the APIv2 response #1701

kuzdogan opened this issue Oct 15, 2024 · 3 comments
Assignees

Comments

@kuzdogan
Copy link
Member

kuzdogan commented Oct 15, 2024

Following the PoC and what we learn at #1655, we should add the proxy info accordingly to the new APIv2. These related fields and their format is to be defined.

@manuelwedler
Copy link
Contributor

For the GET /contract endpoint of APIv2, I propose to gather all proxy related information under a propery proxyData for being able to filter via ?fields=proxyData.

I would follow the approach of #1655, and include the following fields:

  • Proxy contract:
    {
       ...
       "proxyData": {
          "isProxy": true,
          "proxyType": "EIP1967Proxy",
          "implementations": [
              {
                 address: "0x751D7C0Cf91a9b7704541b44E5fF7BeC3D2caA6F",
                 name: "Logic contract"
              }
           ]
       }
    }
    
  • Non-proxy contract:
    {
       ...
       "proxyData": {
          "isProxy": false,
          "proxyType": null,
          "implementations": []
       }
    }
    
  • Resolution error:
    {
       ...
       "proxyData": {
          "proxyResolutionError": "RPC failed"
       }
    }
    

@kuzdogan
Copy link
Member Author

Sounds good to me, thank you. I tend to change the proxyData name but I don't have a good candidate. Not a blocker and just a small thing.

@manuelwedler
Copy link
Contributor

Added the proxy format to the Stoplight API design: https://sourcify.stoplight.io/docs/sourcify-apiv2/branches/main/cqx62aqefyrje-get-verified-contract

I renamed the proxyData field to proxyResolution.

@github-project-automation github-project-automation bot moved this from Sprint - In Progress to Sprint - Done in Sourcify Public Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants