Skip to content

Update API and WebSocket URLs to new production endpoint#137

Open
starknetdev wants to merge 5 commits intomainfrom
fix/update-api-endpoint
Open

Update API and WebSocket URLs to new production endpoint#137
starknetdev wants to merge 5 commits intomainfrom
fix/update-api-endpoint

Conversation

@starknetdev
Copy link
Copy Markdown
Member

@starknetdev starknetdev commented Mar 17, 2026

Summary

  • Switch client API URL from summit-production-69ed to summit-api-production-2 Railway deployment
  • Switch client WebSocket URL to match new API endpoint
  • Minor formatting cleanup (trailing commas, quote style) applied by linter

Test plan

  • Verify client connects to new API endpoint
  • Verify WebSocket real-time updates work
  • Verify leaderboard, beast stats, and consumables load correctly

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes

    • Prevented leaderboard errors when player address information is missing, improving name lookup reliability.
  • Chores

    • Updated network endpoints and configuration values for the backend services.
    • Adjusted indexing start point and formatting of configuration data for more consistent runtime behavior.

Switch client network config from summit-production-69ed to summit-api-production-2 Railway deployment.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
summit Ready Ready Preview, Comment Mar 17, 2026 0:06am

Request Review

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request updates the client's network configuration to utilize new production API and WebSocket endpoints, ensuring seamless connectivity to the latest services. It also incorporates minor code formatting improvements to maintain code style consistency across the project.

Highlights

  • API and WebSocket URL Update: The client's API and WebSocket URLs have been updated to point to a new production endpoint, summit-api-production-2.up.railway.app, replacing the older summit-production-69ed.up.railway.app.
  • Code Formatting: Minor formatting adjustments, including trailing commas and quote styles, were applied by a linter for consistency.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • client/src/utils/networkConfig.ts
    • Updated the apiUrl and wsUrl for the SN_MAIN network to reflect the new production endpoint.
    • Added trailing commas to several object properties within TOKEN_ADDRESS and NETWORKS configurations.
    • Adjusted formatting for the SUMMIT_ADDRESS assignment and within the policies object, specifically for contract and method definitions, to align with linter rules.
Activity
  • No specific activity (comments, reviews, or progress updates) was found in the provided context.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@railway-app
Copy link
Copy Markdown

railway-app Bot commented Mar 17, 2026

🚅 Deployed to the summit-pr-137 environment in Summit stack

Service Status Web Updated (UTC)
summit-indexer ✅ Success (View Logs) Mar 17, 2026 at 12:06 pm
1 service not affected by this PR
  • summit-api

@claude
Copy link
Copy Markdown

claude Bot commented Mar 17, 2026

Claude finished @starknetdev's task —— View job


Claude Review - General Engineering Review

Todo List

  • Run git diff to analyze changes in scope (excluding contracts/, client/, indexer/, api/)
  • Review findings for correctness, reliability, performance, maintainability, and testing gaps
  • Provide structured review feedback

run=23191258747 attempt=1 sha=bc559a9c7074ce2441eccb8f3f60fdcc616c35a5 scope=general

Analysis Results

The git diff command targeting files outside the core app packages (contracts/, client/, indexer/, api/) returned no output. The only file changed in this PR is client/src/utils/networkConfig.ts, which falls outside the scope of this general engineering review.

This PR contains:

  • 1 changed file: client/src/utils/networkConfig.ts (excluded from review scope)
  • Changes are limited to updating API and WebSocket URLs within the client package

Review Findings

No issues found.

Summary: 0 CRITICAL, 0 HIGH, 0 MEDIUM, 0 LOW, 0 INFO

The changes in this PR are entirely within the client package and do not affect repository tooling, CI/CD workflows, shared configuration, or other general engineering concerns that fall within the scope of this review.

@github-actions
Copy link
Copy Markdown

Codex Review - General Engineering Review

Review process failed to complete.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the API and WebSocket URLs to a new production endpoint. It also includes several formatting changes, such as adding trailing commas and standardizing object key quoting, which appear to be from a linter. The changes are consistent with the pull request's description. I have reviewed the changes and found no issues.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 17, 2026

Warning

Rate limit exceeded

@starknetdev has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 3 minutes and 29 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 83167277-9ddb-4cff-8bc3-1ef4b1d540cf

📥 Commits

Reviewing files that changed from the base of the PR and between 0da3787 and 6d3ee9c.

📒 Files selected for processing (2)
  • indexer/migrations/0004_add_consumables.sql
  • indexer/migrations/meta/_journal.json
📝 Walkthrough

Walkthrough

Added a defensive check in the Leaderboard address collection to skip falsy owners. Updated network configuration data (token addresses formatting, SN_MAIN API/WS URLs, object key formatting). Changed Summit indexer startingBlock value; minor string reformatting elsewhere.

Changes

Cohort / File(s) Summary
Leaderboard Address Lookup
client/src/components/Leaderboard.jsx
Added conditional push of player.owner into addressesToLookup only when the owner is truthy, preventing falsy addresses from being used for name resolution.
Network Configuration Updates
client/src/utils/networkConfig.ts
Data and formatting edits: multi-line TOKEN_ADDRESS entries, trailing commas added in NETWORKS.SN_MAIN lists, updated apiUrl/wsUrl for SN_MAIN, and several object literals reformatted (quoted → unquoted keys). No signature changes.
Indexer / Summit Config
indexer/apibara.config.ts
Adjusted startingBlock for the Summit config (70772252209820) and reflowed some string literals; other runtime config values unchanged.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 I nibble code at dawn's first light,
Falsy owners hop out of sight,
Tokens tidy, endpoints gleam,
Blocks reset to chase a dream,
A little rabbit fixes things tonight. 🥕

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers the key changes and includes a test plan, but is missing several required template sections including scope checkboxes, change type, validation commands, area-specific verification, risk level, and other critical sections. Complete the PR description template by filling in all required sections: mark scope areas (client, indexer), select change type, provide validation commands run, verify area-specific checks completed, specify risk level, and include rollout plan.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main changes in the pull request—updating API and WebSocket URLs to a new production endpoint, which is the primary focus of the PR.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/update-api-endpoint
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Guard against null player.owner when building address lookup list,
preventing TypeError on .replace() when leaderboard data contains
entries with null owners.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

Codex Review - General Engineering Review

Review process failed to complete.

@claude
Copy link
Copy Markdown

claude Bot commented Mar 17, 2026

Claude finished @starknetdev's task —— View job


Claude Review - General Engineering Review

Todo List

  • Run git diff to analyze changes in scope (excluding contracts/, client/, indexer/, api/)
  • Review findings for correctness, reliability, performance, maintainability, and testing gaps
  • Provide structured review feedback

run=23191323675 attempt=1 sha=0a43e8bd386a817f50fc9f7af0aff7c6823b26a8 scope=general

Analysis Results

The git diff command targeting files outside the core app packages (contracts/, client/, indexer/, api/) returned no output. The only files changed in this PR are client/src/utils/networkConfig.ts and client/src/components/Leaderboard.jsx, which fall outside the scope of this general engineering review.

This PR contains:

  • 2 changed files: both within the client package (excluded from review scope)
  • Changes are limited to updating API and WebSocket URLs within the client package

Review Findings

No issues found.

Summary: 0 CRITICAL, 0 HIGH, 0 MEDIUM, 0 LOW, 0 INFO

The changes in this PR are entirely within the client package and do not affect repository tooling, CI/CD workflows, shared configuration, or other general engineering concerns that fall within the scope of this review.

…data

Start indexing earlier to ensure beast Transfer events are captured
before RewardsEarned events, preventing null owner entries in the
rewards_earned table.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@railway-app railway-app Bot temporarily deployed to Summit stack / summit-pr-137 March 17, 2026 11:52 Destroyed
@claude
Copy link
Copy Markdown

claude Bot commented Mar 17, 2026

Claude finished @starknetdev's task —— View job


Claude Review - General Engineering Review

Todo List

  • Run git diff to analyze changes in scope (excluding contracts/, client/, indexer/, api/)
  • Review findings for correctness, reliability, performance, maintainability, and testing gaps
  • Provide structured review feedback

run=23192833096 attempt=1 sha=0da378719aaa847be383c5365331cf3f04a18618 scope=general

Analysis Results

The git diff command targeting files outside the core app packages (contracts/, client/, indexer/, api/) returned no output. The only files changed in this PR are client/src/utils/networkConfig.ts, client/src/components/Leaderboard.jsx, and indexer/apibara.config.ts, which all fall outside the scope of this general engineering review.

This PR contains:

  • 3 changed files: all within the client and indexer packages (excluded from review scope)
  • Changes are limited to updating API and WebSocket URLs and minor formatting cleanup

Review Findings

No issues found.

Summary: 0 CRITICAL, 0 HIGH, 0 MEDIUM, 0 LOW, 0 INFO

The changes in this PR are entirely within the client and indexer packages and do not affect repository tooling, CI/CD workflows, shared configuration, or other general engineering concerns that fall within the scope of this review.

@github-actions
Copy link
Copy Markdown

Codex Review - General Engineering Review

Review process failed to complete.

@claude
Copy link
Copy Markdown

claude Bot commented Mar 17, 2026

Claude finished @starknetdev's task —— View job


Claude Review - Indexer/API Review

Todo List

  • Run git diff to analyze changes in scope (indexer/ and api/ only)
  • Review findings for data correctness, filters, event decoding, finality, schema, reliability, and testing
  • Provide structured review feedback with severity levels

run=23192833096 attempt=1 sha=0da378719aaa847be383c5365331cf3f04a18618 scope=indexer-api

Analysis Results

The git diff shows changes only in indexer/apibara.config.ts within the scope of this review. No files in the api/ directory were modified.

The changes in indexer/apibara.config.ts are:

  1. Formatting changes: Multi-line formatting applied to contract addresses and token addresses (lines 7-35)
  2. Critical configuration change: startingBlock changed from "7077225" to "2209820" (line 39)

Review Findings

[MEDIUM] indexer/apibara.config.ts:39 - Starting block lowered from 7077225 to 2209820 without justification or migration strategy
Impact: This change will cause the indexer to reprocess ~4.8M additional blocks (approximately 4,867,405 blocks). This could:

  • Significantly increase indexing time and resource consumption
  • Potentially introduce duplicate data if not handled with proper idempotent operations
  • Risk overwhelming the database with historical event processing
    Fix: Verify this change is intentional and ensure:
  1. Database schema supports idempotent replay of historical events
  2. Conflict resolution strategies are in place for existing data
  3. Resource capacity planning accounts for the additional block range
  4. Consider if a gradual rollback approach would be safer

Positive Observations

The formatting changes (lines 7-35) improve code readability by breaking long hex addresses into multi-line format, which aligns with standard linting practices.

Summary: 0 CRITICAL, 0 HIGH, 1 MEDIUM, 0 LOW, 0 INFO

@github-actions
Copy link
Copy Markdown

Codex Review - Indexer/API Review

Review process failed to complete.

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@railway-app railway-app Bot temporarily deployed to Summit stack / production-2 March 17, 2026 11:54 Inactive
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@indexer/apibara.config.ts`:
- Line 39: The change to startingBlock in apibara.config.ts sets startingBlock
to "2209820" which conflicts with the project baseline (should be 6767900) and
won't take effect when persistState is enabled; either restore startingBlock to
the baseline value (6767900) in apibara.config.ts or, if the rollback is
intentional, include a concise runbook that instructs operators to reset the
persisted checkpoint state referenced by persistState in
indexer/indexers/summit.indexer.ts (steps to stop the indexer, delete/clear the
checkpoint store, and restart) and add a brief comment in apibara.config.ts
noting the intentional deviation and linking to the runbook.
- Around line 7-8: The summitContractAddress value in apibara.config.ts is using
the wrong mainnet address; update the summitContractAddress entry to the
repo-standard mainnet value
"0x0455c73741519a2d661cad966913ee5ccb24596c518ad67dd1d189b49c15d4fa" (leave the
key name summitContractAddress unchanged) so the indexer targets the correct
stream, and while here confirm other contract address entries (e.g., Beast NFT,
Dojo World) match the provided mainnet addresses in the coding guidelines.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 074d20e4-a962-415b-8b53-1b73ad4411d0

📥 Commits

Reviewing files that changed from the base of the PR and between 0a43e8b and 0da3787.

📒 Files selected for processing (1)
  • indexer/apibara.config.ts

Comment thread indexer/apibara.config.ts
Comment on lines +7 to +8
summitContractAddress:
"0x01aa95ea66e7e01acf7dc3fda8be0d8661230c4c36b0169e2bab8ab4d6700dfc",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Summit contract address does not match the required mainnet address.

Line 8 uses a different Summit address than the repo-standard mainnet value, which can index the wrong event stream.

Suggested fix
-      summitContractAddress:
-        "0x01aa95ea66e7e01acf7dc3fda8be0d8661230c4c36b0169e2bab8ab4d6700dfc",
+      summitContractAddress:
+        "0x0455c73741519a2d661cad966913ee5ccb24596c518ad67dd1d189b49c15d4fa",

As per coding guidelines: Use mainnet contract addresses: Summit 0x0455c73741519a2d661cad966913ee5ccb24596c518ad67dd1d189b49c15d4fa, Beast NFT 0x046da8955829adf2bda310099a0063451923f02e648cf25a1203aac6335cf0e4, Dojo World 0x02ef591697f0fd9adc0ba9dbe0ca04dabad80cf95f08ba02e435d9cb6698a28a.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
summitContractAddress:
"0x01aa95ea66e7e01acf7dc3fda8be0d8661230c4c36b0169e2bab8ab4d6700dfc",
summitContractAddress:
"0x0455c73741519a2d661cad966913ee5ccb24596c518ad67dd1d189b49c15d4fa",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@indexer/apibara.config.ts` around lines 7 - 8, The summitContractAddress
value in apibara.config.ts is using the wrong mainnet address; update the
summitContractAddress entry to the repo-standard mainnet value
"0x0455c73741519a2d661cad966913ee5ccb24596c518ad67dd1d189b49c15d4fa" (leave the
key name summitContractAddress unchanged) so the indexer targets the correct
stream, and while here confirm other contract address entries (e.g., Beast NFT,
Dojo World) match the provided mainnet addresses in the coding guidelines.

Comment thread indexer/apibara.config.ts
streamUrl: process.env.STREAM_URL,
// Starting block - use earliest block needed for Dojo events
startingBlock: "7077225",
startingBlock: "2209820",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

startingBlock change needs explicit state-reset handling (and conflicts with baseline config rule).

Line 39 changes startingBlock to "2209820". Two problems:

  1. It diverges from the configured baseline expected for this file.
  2. With persisted checkpoint state enabled in indexer/indexers/summit.indexer.ts (persistState: true), this rollback will not take effect on existing deployments unless indexer state/checkpoint is reset.

If this rollback is intentional, ship the reset/runbook with this PR; otherwise restore the baseline value.

As per coding guidelines: indexer/**/apibara.config.ts should configure runtime settings including starting block 6767900.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@indexer/apibara.config.ts` at line 39, The change to startingBlock in
apibara.config.ts sets startingBlock to "2209820" which conflicts with the
project baseline (should be 6767900) and won't take effect when persistState is
enabled; either restore startingBlock to the baseline value (6767900) in
apibara.config.ts or, if the rollback is intentional, include a concise runbook
that instructs operators to reset the persisted checkpoint state referenced by
persistState in indexer/indexers/summit.indexer.ts (steps to stop the indexer,
delete/clear the checkpoint store, and restart) and add a brief comment in
apibara.config.ts noting the intentional deviation and linking to the runbook.

The consumables table was defined in schema.ts but had no corresponding
migration file, causing "relation does not exist" errors on fresh databases.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@railway-app railway-app Bot temporarily deployed to Summit stack / summit-pr-137 March 17, 2026 11:59 Destroyed
@railway-app railway-app Bot temporarily deployed to Summit stack / production-2 March 17, 2026 11:59 Inactive
@claude
Copy link
Copy Markdown

claude Bot commented Mar 17, 2026

Claude finished @starknetdev's task —— View job


Claude Review - General Engineering Review

Todo List

  • Run git diff to analyze changes in scope (excluding contracts/, client/, indexer/, api/)
  • Review findings for correctness, reliability, performance, maintainability, and testing gaps
  • Provide structured review feedback

run=23193099896 attempt=1 sha=ea586b2b1d8901d31a4859e07d7f3ad7feab3cc5 scope=general

Analysis Results

The git diff command targeting files outside the core app packages (contracts/, client/, indexer/, api/) returned no output. All files changed in this PR are within the excluded directories:

  • client/src/components/Leaderboard.jsx
  • client/src/utils/networkConfig.ts
  • indexer/apibara.config.ts
  • indexer/migrations/0004_add_consumables.sql
  • indexer/migrations/meta/_journal.json

This PR contains:

  • 5 changed files: all within client/ and indexer/ packages (excluded from review scope)
  • Changes are limited to updating API and WebSocket URLs and adding database migration

Review Findings

No issues found.

Summary: 0 CRITICAL, 0 HIGH, 0 MEDIUM, 0 LOW, 0 INFO

The changes in this PR are entirely within the client and indexer packages and do not affect repository tooling, CI/CD workflows, shared configuration, or other general engineering concerns that fall within the scope of this review.

@github-actions
Copy link
Copy Markdown

Codex Review - General Engineering Review

Review process failed to complete.

@github-actions
Copy link
Copy Markdown

Codex Review - Indexer/API Review

Review process failed to complete.

@claude
Copy link
Copy Markdown

claude Bot commented Mar 17, 2026

Claude encountered an error —— View job


Claude Review - Indexer/API Review

Todo List

  • Run git diff to analyze changes in scope (indexer/ and api/ only)
  • Review findings for data correctness, filters, event decoding, finality, schema, reliability, and testing
  • Provide structured review feedback with severity levels

run=23193099896 attempt=1 sha=ea586b2b1d8901d31a4859e07d7f3ad7feab3cc5 scope=indexer-api

Analysis Results

The git diff shows changes in two areas:

  1. indexer/apibara.config.ts: Formatting changes and critical startingBlock modification
  2. indexer/migrations/: New consumables table migration added

No changes in api/ directory were found.

Prevents failure when table was already created manually.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@claude
Copy link
Copy Markdown

claude Bot commented Mar 17, 2026

Claude finished @starknetdev's task —— View job


Claude Review - General Engineering Review

run=23193334610 attempt=1 sha=6d3ee9cb7145ce442b7268093ab35f4debd89698 scope=general

Todo List

  • Run git diff command to analyze changes in scope (excluding contracts/, client/, indexer/, api/)
  • Review findings for correctness, reliability, performance, maintainability, and testing gaps
  • Provide structured review feedback with severity levels

Analysis Results

The git diff command targeting files outside the core app packages (contracts/, client/, indexer/, api/) returned no output. All files changed in this PR are within the excluded directories:

  • client/src/components/Leaderboard.jsx
  • client/src/utils/networkConfig.ts
  • indexer/apibara.config.ts
  • indexer/migrations/0004_add_consumables.sql
  • indexer/migrations/meta/_journal.json

This PR contains:

  • 5 changed files: all within client/ and indexer/ packages (excluded from review scope)
  • Changes are limited to updating API and WebSocket URLs and adding database migration

Review Findings

No issues found.

Summary: 0 CRITICAL, 0 HIGH, 0 MEDIUM, 0 LOW, 0 INFO

The changes in this PR are entirely within the client and indexer packages and do not affect repository tooling, CI/CD workflows, shared configuration, or other general engineering concerns that fall within the scope of this review.


View job

@github-actions
Copy link
Copy Markdown

Codex Review - General Engineering Review

Review process failed to complete.

@claude
Copy link
Copy Markdown

claude Bot commented Mar 17, 2026

Claude finished @starknetdev's task —— View job


Claude Review - Indexer/API Review

Todo List

  • Run git diff to analyze changes in scope (indexer/ and api/ only)
  • Review findings for data correctness, filters, event decoding, finality, schema, reliability, and testing gaps
  • Provide structured review feedback with severity levels

run=23193334610 attempt=1 sha=6d3ee9cb7145ce442b7268093ab35f4debd89698 scope=indexer-api

Analysis Results

The git diff shows changes in two areas:

  1. indexer/apibara.config.ts: Formatting changes and critical startingBlock modification
  2. indexer/migrations/: New consumables table migration added

No changes in api/ directory were found.

Review Findings

[CRITICAL] indexer/apibara.config.ts:8 - Summit contract address mismatch with canonical mainnet address
Impact: The indexer is configured with 0x01aa95ea66e7e01acf7dc3fda8be0d8661230c4c36b0169e2bab8ab4d6700dfc but the canonical mainnet Summit contract per AGENTS.md is 0x0455c73741519a2d661cad966913ee5ccb24596c518ad67dd1d189b49c15d4fa. This will cause the indexer to listen to the wrong contract's events, resulting in missing all game data.
Fix: Update summitContractAddress to "0x0455c73741519a2d661cad966913ee5ccb24596c518ad67dd1d189b49c15d4fa"

[HIGH] indexer/apibara.config.ts:39 - Starting block changed without checkpoint reset strategy
Impact: startingBlock changed from "7077225" to "2209820" (rollback of ~4.8M blocks). Since persistState: true is enabled in summit.indexer.ts with indexerName: "summit", this rollback will not take effect on existing deployments unless the persisted checkpoint state is manually reset. This could lead to missing events between the old and new starting blocks.
Fix: Either: (1) Restore startingBlock to "7077225" to maintain current behavior, or (2) Include runbook instructions for operators to reset indexer state by stopping the indexer, clearing checkpoint storage for indexer name "summit", and restarting

[MEDIUM] indexer/apibara.config.ts:23-35 - Consumable token addresses mismatch with canonical addresses
Impact: Several consumable token addresses don't match the canonical mainnet addresses from AGENTS.md:

  • corpseContractAddress uses 0x0103eafe79f8631932530cc687dfcdeb013c883a82619ebf81be393e2953a87a but should be 0x01f40a78e8d3e0687e30fc173a28cc62cdf976187f23f778b792a71f16e4482f
  • skullContractAddress uses 0x01c3c8284d7eed443b42f47e764032a56eaf50a9079d67993b633930e3689814 but should be 0x05dff27b8cdef20e537b5a33bf1feb4dbc5fb0ebfcb59e33cd95a075f5eb8916
  • Token addresses for ATTACK, REVIVE, EXTRA LIFE, POISON also don't match canonical values
    Fix: Update all contract addresses to match the canonical mainnet addresses listed in AGENTS.md

Positive Observations

  • The new consumables table schema follows proper patterns with UUID primary key, owner unique constraint, and default values
  • The migration includes IF NOT EXISTS for safe deployment
  • Formatting changes improve code readability by breaking long addresses into multi-line format

Summary: 1 CRITICAL, 1 HIGH, 1 MEDIUM, 0 LOW, 0 INFO

The critical issue with the wrong Summit contract address must be fixed immediately as it would cause complete indexer failure. The starting block rollback needs either reversion or proper state reset documentation.

@github-actions
Copy link
Copy Markdown

Codex Review - Indexer/API Review

Review process failed to complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant