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

Pull infrequent Transactions from Covalent API #24

Closed
2 of 3 tasks
DistributedDoge opened this issue Jan 3, 2024 · 4 comments · Fixed by #27
Closed
2 of 3 tasks

Pull infrequent Transactions from Covalent API #24

DistributedDoge opened this issue Jan 3, 2024 · 4 comments · Fixed by #27
Assignees
Labels
enhancement New feature or request

Comments

@DistributedDoge
Copy link
Collaborator

DistributedDoge commented Jan 3, 2024

For bulk data (e.g. all votes) it is probably best to use RPC approach outlined in #1 but for events/transactions that are less frequent, free tier of Covalent API could work as lightweight alternative.

As proof of concept I would start with Project Registry contract as it has few transactions so free covalent API can handle fetching them in reasonable time, across all important chains and without consuming too many free monthly credits.

Implementation outline would be:

  • Find address of ProjectRegistry contract on each interesting chain.
  • Create CovalentAPI resource configured with covalent_api_key secret.
  • Fetch all transactions targeting Contract Registry contracts.

End goal is knowing how much gas was spent on creating and updating project profiles on different chains + reconciling whatever Indexer is telling us with another source.

@DistributedDoge DistributedDoge changed the title Pull Infrequent Events/Transactions From Covalent API Pull infrequent Transactions from Covalent API Jan 3, 2024
@davidgasquez davidgasquez self-assigned this Jan 3, 2024
@davidgasquez davidgasquez added the enhancement New feature or request label Jan 3, 2024
@davidgasquez
Copy link
Owner

Agree! Love this idea and it actually moves "trust" in the right direction.

The ideal goal would be to get all the data from your own nodes, but that's only an ideal. The solution you propose moves us into that direction so let's go for it!

@davidgasquez
Copy link
Owner

As a side note, would love to check how long does it takes cryo to get the same data from the interesting networks.

Is the Project Registry contract you're thinking about 0x4AAcca72145e1dF2aeC137E1f3C5E3D75DB8b5f3?

@DistributedDoge
Copy link
Collaborator Author

DistributedDoge commented Jan 4, 2024

I am thinking about Allo v1 where contracts aren't as nicely lined up across chains, each having different address. Best source I found so far is deployment list in documentation -> chains.md.

I made a .parquet file with all contracts addresses + chain names and pinned it to IPFS here, data was extracted like so.

ProjectRegistry (proxy) for mainnet is here, 0x03506eD3f57892C85DB20C36846e9c808aFe9ef4

@davidgasquez
Copy link
Owner

You know what is the status of Allo v1 vs v2?

I made a .parquet file with all contracts addresses + chain names and pinned it to IPFS here, data was extracted like so.

Yessss! Should we put the extraction logic into it's own Dagster asset?

@davidgasquez davidgasquez linked a pull request Jan 11, 2024 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants