Skip to content

Conversation

silvekkk
Copy link
Contributor

close #11809

a new SourceifyIdentifier that fetches contract ABIs from Sourcify's public API without requiring an API key. integrates into the existing TraceIdentifiers system, checking Sourcify after local contracts but before Etherscan.

use it by calling .with_sourcify() when building TraceIdentifiers.

@silvekkk silvekkk changed the title Add Sourcify support to TraceIdentifiers feat: add Sourcify support to TraceIdentifiers Sep 25, 2025
Copy link
Collaborator

@grandizzy grandizzy left a comment

Choose a reason for hiding this comment

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

thank you, makes sense! left couple of nits, can you add a test too?

@silvekkk silvekkk requested a review from grandizzy September 25, 2025 10:50
@silvekkk
Copy link
Contributor Author

thank you, makes sense! left couple of nits, can you add a test too?

Fixed and test now.

@grandizzy
Copy link
Collaborator

thank you, have to get back on this, seems that the changes hangs CI (probably waiting on sourcify response) maybe you can run external tests locally and see if you figure it out

@silvekkk
Copy link
Contributor Author

thank you, have to get back on this, seems that the changes hangs CI (probably waiting on sourcify response) maybe you can run external tests locally and see if you figure it out

The CI hang was because tests were making real HTTP calls to Sourcify. Should be good now.

@grandizzy
Copy link
Collaborator

thank you, have to get back on this, seems that the changes hangs CI (probably waiting on sourcify response) maybe you can run external tests locally and see if you figure it out

The CI hang was because tests were making real HTTP calls to Sourcify. Should be good now.

CI should make real HTTP calls to sourcify when running external tests (they clone known projects and run forge tests on them)

@silvekkk
Copy link
Contributor Author

CI should make real HTTP calls to sourcify when running external tests (they clone known projects and run forge tests on them)

Thanks for the clarification!

Simplified the approach - removed the cfg!(test) guard and instead added a 5-second timeout to prevent infinite hangs.
The tests now is good and forge integration tests pass normally without hanging.

@silvekkk silvekkk requested a review from kuzdogan September 29, 2025 20:43
Copy link

@kuzdogan kuzdogan left a comment

Choose a reason for hiding this comment

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

The changes that use APIv2 LGTM

Just a comment if it should only work for Ethereum Mainnet.

@DaniPopes DaniPopes self-assigned this Sep 30, 2025
@silvekkk silvekkk requested a review from kuzdogan September 30, 2025 19:05
@onbjerg onbjerg marked this pull request as draft October 1, 2025 18:12
@DaniPopes
Copy link
Member

Taken over in #11917, taken a different approach and will take a bit more to get through since of various requirements, and this being turned on by default. Thanks for the PR anwyay

@DaniPopes DaniPopes closed this Oct 1, 2025
@github-project-automation github-project-automation bot moved this to Done in Foundry Oct 1, 2025
@jenpaff jenpaff moved this from Done to Completed in Foundry Oct 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

Implement Sourcify TraceIdentifier
4 participants