refactor: replace SQL HTTP with gRPC in edge marketplace client#289
Open
MartianGreed wants to merge 2 commits intoponderingdemocritus/nft-sqlfrom
Open
refactor: replace SQL HTTP with gRPC in edge marketplace client#289MartianGreed wants to merge 2 commits intoponderingdemocritus/nft-sqlfrom
MartianGreed wants to merge 2 commits intoponderingdemocritus/nft-sqlfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…ient Replace raw SQL queries over HTTP (/sql endpoint) with structured gRPC calls, aligning the edge client with the dojo client's transport layer. Based on ponderingdemocritus/nft-sql branch optimizations. Changes: - client.edge.ts: rewritten to use fetchToriis/fetchCollectionTokens/ fetchTokenBalances (gRPC) + SDK entity queries instead of fetchToriisSql (HTTP POST to /sql) - getTokenContracts/getTokens for collection metadata - fetchCollectionTokens for token listing and metadata batch - fetchTokenBalances for ownership verification - ToriiQueryBuilder with KeysClause/MemberClause for Order/Book entities - Updated all tests to mock gRPC transport - Simplified edge-runtime smoke test
3a07039 to
8484e46
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces raw SQL queries over HTTP (
/sqlendpoint) in the edge marketplace client with structured gRPC calls via@dojoengine/sdkandToriiClient.Based on
ponderingdemocritus/nft-sqlbranch.Changes
client.edge.ts: Rewritten to use gRPC transport instead of SQL HTTPfetchToriis→getTokenContracts/getTokensfor collection metadatafetchCollectionTokensfor token listing andgetCollectionTokenMetadataBatchfetchTokenBalancesfor ownership verificationToriiQueryBuilderwithKeysClause/MemberClausefor Order and Book entity queries (same patterns asclient.dojo.ts)fetchToriis,fetchCollectionTokens,fetchTokenBalances)Notes
torii-sql-fetchermodule is still used byfilters.tsand remains in the codebase-499lines net reduction by reusing sharedtokens.tshelpers