Repair Highlight Base ingestor - #72
Conversation
Review Summary by QodoMigrate Highlight ingestor to use current GraphQL API
WalkthroughsDescription• Migrate from deprecated Reservoir/Marketplace endpoints to Highlight's GraphQL API • Extract mint vector, pricing, and creator metadata directly from API response • Remove redundant async calls for vector ID and pricing data • Simplify timestamp handling by parsing dates from API response Diagramflowchart LR
A["Old Approach:<br/>Multiple API Calls"] -->|"Deprecated Endpoints"| B["Reservoir/Marketplace<br/>APIs"]
B --> C["Separate Calls for<br/>Vector ID & Price"]
C --> D["On-chain Metadata<br/>Lookups"]
E["New Approach:<br/>Single GraphQL Call"] -->|"Current API"| F["Highlight GraphQL<br/>getPublicCollectionDetails"]
F --> G["Complete Data:<br/>Vector, Price, Creator"]
G --> H["Direct Parsing<br/>No Extra Calls"]
style A fill:#ff9999
style E fill:#99ff99
File Changes1. src/ingestors/highlight/index.ts
|
Code Review by Qodo
1.
|
|
Follow-up pushed in d3e7350 addressing the Qodo findings:\n\n- resolves Highlight on-chain URLs through getCollectionByOnChainId and supports both Ethereum (1) and Base (8453)\n- derives the mint contract from onchainMintVectorId instead of hardcoding Base\n- returns unsupported when creator metadata is missing rather than accepting then failing later\n- treats missing/invalid price or mintFee as missing required data\n- validates start/end timestamps before building template dates\n- adds an Ethereum Highlight fixture covering URL and contract ingestion\n\nVerified locally:\n- FLOOR_PACKAGES_AUTH_TOKEN=dummy yarn build-types\n- FLOOR_PACKAGES_AUTH_TOKEN=dummy yarn lint\n- FLOOR_PACKAGES_AUTH_TOKEN=dummy ALCHEMY_API_KEY=dummy SIMULATE_DURING_TESTS=false NODE_OPTIONS="--loader ts-node/esm" ./node_modules/.bin/mocha --no-config --require ts-node/register --extension ts --timeout 20000 --exit test/ingestors/highlight.test.ts |
Fixes #62.\n\nThis updates the Highlight ingestor to use Highlight's current public GraphQL collection details API instead of the old marketplace/reservoir endpoints, and derives the mint vector id, creator metadata, price including mint fee, image, and sale timestamps from that API response.\n\nVerification:\n- FLOOR_PACKAGES_AUTH_TOKEN=dummy yarn build-types\n- FLOOR_PACKAGES_AUTH_TOKEN=dummy yarn lint\n- FLOOR_PACKAGES_AUTH_TOKEN=dummy ALCHEMY_API_KEY=dummy SIMULATE_DURING_TESTS=false NODE_OPTIONS="--loader ts-node/esm" ./node_modules/.bin/mocha --no-config --require ts-node/register --extension ts --timeout 20000 --exit test/ingestors/highlight.test.ts\n\nNote: the full repo test command currently exercises unrelated live-network ingestors and fails here without real Alchemy/Rarible credentials; the targeted Highlight suite passes 11/11.