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

refactor!: use chainhook to listen for chain events instead of a direct stacks api connection #200

Open
wants to merge 50 commits into
base: develop
Choose a base branch
from

Conversation

rafaelcr
Copy link
Collaborator

@rafaelcr rafaelcr commented Mar 3, 2024

This PR replaces the direct connection between this API and the Stacks Blockchain API DB with a Chainhook predicate that feeds every Stacks block for analysis. This API then checks for token contract deployments, metadata notifications, and token mints in order to fetch their metadata.

Also:

  • Add ON DELETE CASCADE to related tables for re-org (chainhook rollback) management
  • Persist received SIP-019 notifications in DB
  • Update AdminRPC to work with new DB schema
  • Update ENV requirements
  • Group tests in suites for parallel GH action runs

This PR significantly changes the DB schema so it represents a breaking change.

Copy link

github-actions bot commented Mar 3, 2024

Vercel deployment URL: https://token-metadata-rmwxyxke0-hirosystems.vercel.app 🚀

@rafaelcr rafaelcr marked this pull request as ready for review July 18, 2024 15:43
@rafaelcr rafaelcr changed the title refactor!: use chainhook to monitor contracts, tokens and notifications refactor!: use chainhook to listen for chain events instead of a direct stacks api connection Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 👀 In Review
1 participant