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

Implement Sourcify to VerA script #1396

Merged
merged 3 commits into from
May 21, 2024
Merged

Conversation

marcocastignoli
Copy link
Member

This script is needed to push all verified_contracts from Sourcify to VerA database. VerA is a live database in which other entities are writing while the script is running.

  1. CURRENT_VERIFIED_CONTRACT is a variable stored in a permanent file, default 1.
  2. Extract N verified_contracts starting from CURRENT_VERIFIED_CONTRACT
  3. For each verified_contract:
    a. Update the CURRENT_VERIFIED_CONTRACT counter
    b. Get all information from verified_contracts
    c. Get all the FK information
    d. Insert all the verified_contracts dependencies (compiled_contracts,contract_deployments,contracts,code) and verified_contracts using the new ids as FKs

@marcocastignoli marcocastignoli linked an issue May 15, 2024 that may be closed by this pull request
@marcocastignoli marcocastignoli marked this pull request as ready for review May 16, 2024 08:50
@manuelwedler manuelwedler self-assigned this May 16, 2024
Copy link
Collaborator

@manuelwedler manuelwedler left a comment

Choose a reason for hiding this comment

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

There is the missing loop, but other than that looks good to me

services/verifier-alliance/main.mjs Outdated Show resolved Hide resolved
Copy link
Collaborator

@manuelwedler manuelwedler left a comment

Choose a reason for hiding this comment

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

Looks good!

@marcocastignoli marcocastignoli merged commit 884e91e into staging May 21, 2024
6 checks passed
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 a script to copy Sourcify contracts to VerA database
2 participants