-
Notifications
You must be signed in to change notification settings - Fork 111
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: remove old token metadata processor #1747
Conversation
Codecov Report
@@ Coverage Diff @@
## nakamoto #1747 +/- ##
===========================================
Coverage ? 71.28%
===========================================
Files ? 86
Lines ? 11453
Branches ? 2470
===========================================
Hits ? 8164
Misses ? 3139
Partials ? 150 |
Vercel deployment URL: https://stacks-blockchain-7h5xjkqyt-blockstack.vercel.app 🚀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
* refactor: remove old processor, start fetching data from contract * refactor: remove old tests * fix: tests and lint * fix: use lru cache * chore: delete old tables * chore: fix comments [skip ci] * fix: env comment block [skip ci] * chore: avoid duplicate RPC lookups * fix: make an incremental migration to drop tables * fix: re-add metadata processing ENV flag --------- Co-authored-by: Matthew Little <[email protected]>
🎉 This PR is included in version 7.4.0-nakamoto.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 7.6.0-nakamoto.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 7.6.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Removes the old FT/NFT token metadata processor. We already have the Token Metadata API live and all current traffic is being redirected there.
This change will optimize block ingestion times because the API will no longer need to analyze the ABI of all deployed contracts to determine if they deploy FTs or NFTs. Also, it will no longer need to maintain token queues and notify listeners when the queues are updated.
Rosetta
This change impacts Rosetta, because FT operations still need to be displayed in blocks and transactions with the proper
symbol
anddecimals
. To solve this, a FT metadata retrieval class is added that just queries the relevant contracts for this info before operations are displayed, keeping it in an in-memory LRU cache for quicker access in the future.