Skip to content

Use Sourcify v2 API in sourcify plugin #4629

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

allezxandre
Copy link
Contributor

This PR upgrades the Sourcify plugin API endpoint from the deprecated V1 to the V2 endpoint.

FYI, it should also solve an issue where it was not possible to fetch partial-matched contracts. I hope this doesn’t break anything, but the V2 API does not seem to make the distinction anymore.

See here: https://docs.sourcify.dev/docs/api/

Copy link

changeset-bot bot commented Apr 14, 2025

🦋 Changeset detected

Latest commit: c64d581

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@wagmi/cli Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Apr 14, 2025

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

Name Status Preview Comments Updated (UTC)
wagmi ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 16, 2025 3:22pm

Copy link
Member

@tmm tmm left a comment

Choose a reason for hiding this comment

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

@allezxandre
Copy link
Contributor Author

It appears the script you mentionned @tmm is using a non-deprecated API endpoint. The Sourcify documentation still lists it under ”Others”: https://docs.sourcify.dev/docs/api/#other

Do you think there is something to be done there?

@kuzdogan
Copy link

kuzdogan commented Apr 16, 2025

Hey thanks! This works too but you can also use ?fields=abi directly and get response.abi instead of the metadata.

The /server/chains endpoint will not be deprecated

@allezxandre allezxandre marked this pull request as draft April 16, 2025 12:18
@allezxandre
Copy link
Contributor Author

This works too but you can also use ?fields=abi directly and get response.abi instead of the metadata.

Got it, I'll update this PR to use that instead

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.

3 participants