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

Update url handling in SourcifyDatabase to support SourcifyDB-only and SourcifyDB+repov2 configurations #1640

Closed
marcocastignoli opened this issue Sep 19, 2024 · 2 comments
Assignees

Comments

@marcocastignoli
Copy link
Member

Currently, the getTree() function retrieves the file tree from repositoryV1, which forces you to run RepositoryV1Service (+ an http server) together with SourcifyDatabase. This prevents running sourcify with SourcifyDatabaseService alone or in combination with RepositoryV2Service.

In the current implementation, URLs are constructed using repositoryV1.serverUrl. We should directly use the https://sourcify.dev/server/repository/contracts/{full_match | partial_match}/{chain}/{address}/{filePath} API for URL construction.

@marcocastignoli marcocastignoli converted this from a draft issue Sep 19, 2024
@kuzdogan
Copy link
Member

Ah ok, I thought we were reading the literal file tree from repositoryV1 like tree -L 2 /Users/kuzdogan/sourcify/repositoryV1/contracts/full_match/1/0x025030BdAa159f281cAe63873E68313a703725A5 and that's why I preferred not working on this now.

If we are using that for the URLs only and it's a simple fix, we can do this after #1637

@marcocastignoli
Copy link
Member Author

Fixed with #1677

@github-project-automation github-project-automation bot moved this from Sprint - Needs Review to Sprint - Done in Sourcify Public Oct 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