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

Open
marcocastignoli opened this issue Sep 19, 2024 · 1 comment

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.

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

2 participants