Skip to content

Migrate client to new summit#125

Merged
Await-0x merged 4 commits intomainfrom
migrate-client-to-new-summit
Feb 23, 2026
Merged

Migrate client to new summit#125
Await-0x merged 4 commits intomainfrom
migrate-client-to-new-summit

Conversation

@Await-0x
Copy link
Copy Markdown
Member

@Await-0x Await-0x commented Feb 23, 2026

Summary

What changed

Why this change

Scope

  • contracts/** (Cairo/Starknet contracts)
  • client/** (frontend client)
  • indexer/** (indexer pipeline)
  • api/** (backend/API)
  • Other (docs/chore/infra only)

Change Type

  • feat (new behavior)
  • fix (bug fix)
  • refactor (no behavior change)
  • perf (performance improvement)
  • test (tests only)
  • docs (documentation only)
  • chore (maintenance/tooling)

Validation

Commands run

# example:
# cd client && pnpm lint && pnpm build

Area-specific verification

If contracts/** changed

  • cd contracts && scarb build
  • cd contracts && scarb test (or targeted tests listed below)
  • Security-sensitive paths (auth, external calls, arithmetic, state transitions) reviewed

If client/** changed

  • cd client && pnpm lint
  • cd client && pnpm build
  • Manual smoke test completed for impacted routes/states
  • Visual evidence attached for UI changes (screenshots/GIF)

If indexer/** or api/** changed

  • Build/lint/test commands run (listed above)
  • Schema/migration changes included when required
  • Replay/idempotency/reorg or data-consistency impact reviewed

Risk and Rollout

Risk level

  • Low
  • Medium
  • High

Rollout / rollback plan

Breaking Changes

  • No breaking changes
  • Breaking changes included (describe below)

Assumptions

  • Assumption:
    Validation:

Exceptions

  • Exception:
    Reason:
    Approval/Context:

Workarounds

  • Workaround:
    Why needed:
    Removal plan (owner + trigger/date):

Linked Issues

Reviewer Notes

Codex review routing reminder

  • Cairo review: contracts/**
  • Frontend review: client/**
  • Indexer/API review: indexer/** + api/**

Summary by CodeRabbit

  • New Features
    • Quest board now appears for connected users.
  • UI Changes
    • Summit section and action bar render unconditionally (removed migration gating).
  • Chores
    • Updated Mainnet contract reference and indexer start point.
    • Wallet connector enhanced to allow overriding preset policies.
    • Token query behavior adjusted to broaden listing results.

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 23, 2026

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

Project Deployment Actions Updated (UTC)
summit Ready Ready Preview, Comment Feb 23, 2026 4:19pm

Request Review

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @Await-0x, 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 performs a crucial migration of the client and indexer components to align with a new deployment of the Summit game contract. The changes ensure that all parts of the application correctly reference the updated contract address and synchronize data from the appropriate blockchain state, alongside minor adjustments to client-side data fetching and controller configuration to maintain compatibility and functionality with the new contract version.

Highlights

  • Summit Game Contract Address Update: The primary Summit Game contract address has been updated across the README.md, client-side environment variables, and the indexer's configuration to point to a new deployment.
  • Client Configuration Adjustment: The client's Starknet context configuration for the cartridge controller now includes shouldOverridePresetPolicies: true.
  • Game Token Query Refinement: A conditional greaterThanClause was removed from the SQL query responsible for fetching game tokens in the client-side logic.
  • Indexer Starting Block Update: The startingBlock for the indexer's Apibara configuration has been updated to a newer block number, aligning with the new contract deployment.

🧠 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
  • README.md
    • Updated the Summit Game contract address in the contract table.
  • client/.env
    • Updated the VITE_PUBLIC_SUMMIT_ADDRESS environment variable to the new Summit contract address.
  • client/src/contexts/starknet.tsx
    • Added shouldOverridePresetPolicies: true to the cartridgeController configuration.
  • client/src/dojo/useGameTokens.ts
    • Removed the greaterThanClause from the SQL query used to fetch game tokens.
  • indexer/apibara.config.ts
    • Updated the summitContractAddress to reflect the new Summit game contract.
    • Modified the startingBlock for the indexer's data stream.
Activity
  • No human activity has been recorded on this pull request yet.
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.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 23, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f9e1095 and 68585c0.

📒 Files selected for processing (1)
  • client/src/pages/MainPage.tsx

📝 Walkthrough

Walkthrough

Updated Summit Game contract address and related start block; adjusted Starknet controller options; removed a token filter from a DAO query; simplified MainPage by removing the MIGRATING flow and adding QuestBoard usage.

Changes

Cohort / File(s) Summary
Contract Address & Indexer
README.md, client/.env, indexer/apibara.config.ts
Replaced Summit Game contract address with 0x01aa95ea66e7e01acf7dc3fda8be0d8661230c4c36b0169e2bab8ab4d6700dfc; updated indexer startingBlock from 6866000 to 7077225.
Starknet Controller Configuration
client/src/contexts/starknet.tsx
Added shouldOverridePresetPolicies: true to the ControllerConnector initialization (new boolean option passed in config).
Token Query Logic
client/src/dojo/useGameTokens.ts
Removed the greaterThanClause filter from the SQL WHERE clause, so token_id is no longer constrained by that max claimed adventurer_id filter.
Main UI Simplification
client/src/pages/MainPage.tsx
Removed MIGRATING flag and Migrating usage; always render Summit when present, render ActionBar unconditionally, and show QuestBoard when an address exists; added TermsOfServiceModal and useController imports.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • add migrating box #124 — Related changes to client/src/pages/MainPage.tsx around the MIGRATING flag and Migrating component usage.

Poem

🐇 A hop, a patch, a new hex in sight,
Addresses shifted by moonlit byte,
Policies toggled, queries set free,
QuestBoard awakens — come play with me! ✨

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is a blank template with no filled-in details—critical sections like 'What changed', 'Why this change', scope checkboxes, change type, validation commands, and risk level are all empty or unchecked. Complete the description by filling in actual changes (5 files modified), motivation (new Summit deployment), affected scopes (client and indexer), validation results, risk assessment, and any breaking changes or assumptions.
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 'Migrate client to new summit' is related to the changeset and reflects the main objective of updating Summit contract addresses across multiple files.

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

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch migrate-client-to-new-summit

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.

@claude
Copy link
Copy Markdown

claude Bot commented Feb 23, 2026

Claude finished @Await-0x's task —— View job


Claude Review - General Engineering Review

run=22314405918 attempt=1 sha=f9e10951b04fb286880672545841acd3d7068136 scope=general

Todo List

  • Examine the diff for files outside core app packages
  • Analyze README.md changes for behavioral impact
  • Provide review findings in required format

Analysis

I reviewed the changes in scope for this PR, which focuses on files outside the core app packages (contracts/, client/, indexer/, api/). The only file in scope is README.md.

Change Summary:

  • README.md line 83: Updated Summit Game contract address from 0x0214d382e80781f8c1059a751563d6b46e717c652bb670bf230e8a64a68e6064 to 0x01aa95ea66e7e01acf7dc3fda8be0d8661230c4c36b0169e2bab8ab4d6700dfc

Review Findings

No issues found.

The change is a straightforward documentation update that reflects the new Summit Game contract deployment. This is a pure documentation change with no behavioral impact on CI, workflows, automation, or developer tooling. The Voyager.online link is properly updated to match the new contract address, ensuring documentation accuracy.

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

@github-actions
Copy link
Copy Markdown

Codex Review - General Engineering Review

No issues found.
Summary: 0 CRITICAL, 0 HIGH, 0 MEDIUM, 0 LOW, 0 INFO

@claude
Copy link
Copy Markdown

claude Bot commented Feb 23, 2026

Claude finished @Await-0x's task —— View job


Claude Review - Indexer/API Review

run=22314405918 attempt=1 sha=f9e10951b04fb286880672545841acd3d7068136 scope=indexer-api

No issues found.

Analysis

Only one file within the indexer/API scope was changed: indexer/apibara.config.ts. This file contains two changes:

  1. Summit Contract Address Update: summitContractAddress changed from 0x0214d382e80781f8c1059a751563d6b46e717c652bb670bf230e8a64a68e6064 to 0x01aa95ea66e7e01acf7dc3fda8be0d8661230c4c36b0169e2bab8ab4d6700dfc

  2. Starting Block Update: startingBlock changed from "6866000" to "7077225"

7-Area Review Framework Applied:

1. Data Correctness and Idempotency: ✅ The indexer logic in summit.indexer.ts uses proper conflict resolution with onConflictDoUpdate for mutable tables and onConflictDoNothing for append-only tables. Contract address change doesn't affect idempotency patterns.

2. Filters, Selectors, and Stream Efficiency: ✅ The contract address is correctly used as a filter in the event stream configuration (line 936). The address format is properly normalized with .toLowerCase() as required by DNA.

3. Event Decoding and Serde Safety: ✅ No decoder logic changes. The existing decoder functions remain valid for the new contract deployment.

4. Finality, Reorgs, and Indexer State: ✅ Starting block update from 6,866,000 to 7,077,225 (+211,225 blocks) is appropriate for a new contract deployment. The indexer maintains persistState: true and stable indexerName: "summit" for continuity.

5. Schema, Constraints, and Migrations: ✅ No schema changes required. Configuration-only changes don't affect database structure.

6. Reliability, Operations, and Config: ✅ Contract address and starting block are properly externalized in configuration. No hardcoded values or hidden dependencies.

7. Testing and Verification: ✅ Configuration changes are deterministic and easily verifiable against blockchain state.

Migration Impact Assessment

This appears to be a deployment migration from an old Summit contract to a new one. The changes are consistent:

  • New contract address points to a fresh deployment
  • Starting block is advanced to skip old contract history
  • All other contract addresses (Beasts NFT, Dojo World, token contracts) remain unchanged

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

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 migrates the client to a new summit contract address. The changes mostly involve updating contract addresses across the codebase, which appears to be done correctly. However, I've identified a significant issue in client/src/dojo/useGameTokens.ts where a filtering clause has been removed from a query, but the logic to generate that clause remains. This has resulted in dead code and a potential performance regression that should be addressed.

Comment on lines 47 to 50
WHERE o.owner = "${addAddressPadding(owner.toLowerCase())}"
AND mr.minter_address = "${addAddressPadding(currentNetworkConfig.dungeon)}"
AND tm.game_over = 1
${greaterThanClause}
`
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

The ${greaterThanClause} has been removed from this query. However, the logic to calculate this variable (lines 25-39) still exists, making it dead code. This includes an API call to fetch claimedAdventurerIds which are now unused.

This has two implications:

  1. Maintainability: The unused code should be removed to keep the codebase clean and prevent confusion.
  2. Performance: Removing this filter might cause the function to fetch and process more data than necessary, potentially leading to performance degradation by re-fetching adventurers that have already been claimed.

If this filtering is no longer necessary, please remove the dead code. If it is still required, the clause should be re-added.

@github-actions
Copy link
Copy Markdown

Codex Review - Indexer/API Review

[HIGH] indexer/apibara.config.ts:7 - Summit contract source changed, but checkpoint namespace is still shared (persistState: true + indexerName: "summit" in indexer/indexers/summit.indexer.ts:991 and indexer/indexers/summit.indexer.ts:992), so existing deployments will resume old state instead of cleanly reindexing for the new contract.
Impact: production behavior becomes deployment-history dependent (mixed old/new summit data, stale rows, and startingBlock effectively ignored when a prior checkpoint exists).
Fix: version the indexer state namespace for this migration (for example indexerName: "summit-v2") and pair it with an explicit DB reset/backfill plan for mutable tables before cutover.

[MEDIUM] indexer/apibara.config.ts:28 - startingBlock moved forward from 6866000 to 7077225 (+211,225 blocks) while ownership/derived state is event-built (for example Beast Transfer drives beast_owners in indexer/indexers/summit.indexer.ts:1273 and upsert in indexer/indexers/summit.indexer.ts:599).
Impact: fresh reindex from empty DB will skip all qualifying events in that window, causing missing/incorrect baseline state until later events happen to repair it.
Fix: set startingBlock to the true earliest required block for all tracked contracts, or add a deterministic bootstrap/backfill step (owners, consumables, and other stateful tables) and document it in rollout instructions.

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

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f9e10951b0

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines 49 to 50
AND tm.game_over = 1
${greaterThanClause}
`
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Restore corpse-claim filter in Torii query

The Torii SQL no longer appends greaterThanClause, so getValidAdventurers now includes adventurer IDs that the /adventurers/:player API already returned as claimed. That makes adventurerCollection and corpse totals include already-claimed entries, and those IDs are then sent again in claim_corpse_reward batches from ClaimRewardsButton, which can prevent users from claiming remaining valid corpses once a batch contains previously claimed IDs; this is also inconsistent with the existing contract of useGameTokens captured by client/src/dojo/useGameTokens.test.tsx (it expects AND tm.id > ... to be present).

Useful? React with 👍 / 👎.

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: 4

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

Inline comments:
In `@client/.env`:
- Line 2: The file client/.env is missing a trailing newline which causes
dotenv-linter to fail; open the .env containing VITE_PUBLIC_SUMMIT_ADDRESS and
add a single blank line (newline character) at EOF so the file ends with a
newline character, then save to satisfy POSIX and the linter.
- Line 2: Replace the incorrect Summit contract address value for
VITE_PUBLIC_SUMMIT_ADDRESS with the canonical mainnet address
0x0455c73741519a2d661cad966913ee5ccb24596c518ad67dd1d189b49c15d4fa in the
environment and update the mirrored hardcoded value in apibara.config.ts so both
use the same mainnet address; leave client/src/utils/networkConfig.ts as-is
since it already reads VITE_PUBLIC_SUMMIT_ADDRESS at runtime and verify the env
var name VITE_PUBLIC_SUMMIT_ADDRESS is unchanged.

In `@indexer/apibara.config.ts`:
- Line 7: Update the incorrect Summit contract address by replacing the value
assigned to summitContractAddress (in apibara config) and the
VITE_PUBLIC_SUMMIT_ADDRESS entry in the client env with the correct mainnet
address 0x0455c73741519a2d661cad966913ee5ccb24596c518ad67dd1d189b49c15d4fa; also
verify that the configured startingBlock (startingBlock) corresponds to the
block where that Summit contract was deployed and, if it does not, change
startingBlock to the documented reference 6767900 (or the actual deployment
block) so both indexer and client use the correct address and aligned start
block.

In `@README.md`:
- Line 83: Replace the outdated Summit mainnet contract address in AGENTS.md
(currently 0x0455c73741519a2d661cad966913ee5ccb24596c518ad67dd1d189b49c15d4fa at
line ~104) with the new address
0x01aa95ea66e7e01acf7dc3fda8be0d8661230c4c36b0169e2bab8ab4d6700dfc to match
README.md, and make the identical update in client/README.md (around line ~48)
so both documents reference the same canonical Summit contract address.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between dd8f019 and f9e1095.

📒 Files selected for processing (5)
  • README.md
  • client/.env
  • client/src/contexts/starknet.tsx
  • client/src/dojo/useGameTokens.ts
  • indexer/apibara.config.ts
💤 Files with no reviewable changes (1)
  • client/src/dojo/useGameTokens.ts

Comment thread client/.env
@@ -1,2 +1,2 @@
VITE_PUBLIC_CHAIN=SN_MAIN
VITE_PUBLIC_SUMMIT_ADDRESS=0x0214d382e80781f8c1059a751563d6b46e717c652bb670bf230e8a64a68e6064 No newline at end of file
VITE_PUBLIC_SUMMIT_ADDRESS=0x01aa95ea66e7e01acf7dc3fda8be0d8661230c4c36b0169e2bab8ab4d6700dfc No newline at end of file
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 | 🟡 Minor

Missing blank line at end of file.

dotenv-linter flags a missing newline at EOF. Add a trailing newline to comply with POSIX and the linter.

🔧 Proposed fix
 VITE_PUBLIC_CHAIN=SN_MAIN
 VITE_PUBLIC_SUMMIT_ADDRESS=0x01aa95ea66e7e01acf7dc3fda8be0d8661230c4c36b0169e2bab8ab4d6700dfc
+
📝 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
VITE_PUBLIC_SUMMIT_ADDRESS=0x01aa95ea66e7e01acf7dc3fda8be0d8661230c4c36b0169e2bab8ab4d6700dfc
VITE_PUBLIC_SUMMIT_ADDRESS=0x01aa95ea66e7e01acf7dc3fda8be0d8661230c4c36b0169e2bab8ab4d6700dfc
🧰 Tools
🪛 dotenv-linter (4.0.0)

[warning] 2-2: [EndingBlankLine] No blank line at the end of the file

(EndingBlankLine)

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

In `@client/.env` at line 2, The file client/.env is missing a trailing newline
which causes dotenv-linter to fail; open the .env containing
VITE_PUBLIC_SUMMIT_ADDRESS and add a single blank line (newline character) at
EOF so the file ends with a newline character, then save to satisfy POSIX and
the linter.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check current state of networkConfig.ts
echo "=== Content of networkConfig.ts ==="
cat client/src/utils/networkConfig.ts

echo -e "\n=== Check for Summit address references in codebase ==="
rg -n "0x0214d382e80781f8c1059a751563d6b46e717c652bb670bf230e8a64a68e6064|0x0455c73741519a2d661cad966913ee5ccb24596c518ad67dd1d189b49c15d4fa|0x01aa95ea66e7e01acf7dc3fda8be0d8661230c4c36b0169e2bab8ab4d6700dfc" --type ts --type txt -A 2 -B 2

Repository: Provable-Games/summit

Length of output: 11888


The Summit address in this PR does not match the mainnet guideline.

The .env file uses 0x01aa95ea66e7e01acf7dc3fda8be0d8661230c4c36b0169e2bab8ab4d6700dfc, but the coding guidelines specify the mainnet Summit address should be 0x0455c73741519a2d661cad966913ee5ccb24596c518ad67dd1d189b49c15d4fa. The indexer/apibara.config.ts mirrors this incorrect address. While client/src/utils/networkConfig.ts correctly reads the address from the environment at runtime, the environment itself points to the wrong contract for mainnet deployment.

🧰 Tools
🪛 dotenv-linter (4.0.0)

[warning] 2-2: [EndingBlankLine] No blank line at the end of the file

(EndingBlankLine)

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

In `@client/.env` at line 2, Replace the incorrect Summit contract address value
for VITE_PUBLIC_SUMMIT_ADDRESS with the canonical mainnet address
0x0455c73741519a2d661cad966913ee5ccb24596c518ad67dd1d189b49c15d4fa in the
environment and update the mirrored hardcoded value in apibara.config.ts so both
use the same mainnet address; leave client/src/utils/networkConfig.ts as-is
since it already reads VITE_PUBLIC_SUMMIT_ADDRESS at runtime and verify the env
var name VITE_PUBLIC_SUMMIT_ADDRESS is unchanged.

Comment thread indexer/apibara.config.ts
summit: {
// Summit game contract address (mainnet)
summitContractAddress: "0x0214d382e80781f8c1059a751563d6b46e717c652bb670bf230e8a64a68e6064",
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

🧩 Analysis chain

🏁 Script executed:

cat -n indexer/apibara.config.ts | head -50

Repository: Provable-Games/summit

Length of output: 2330


🏁 Script executed:

rg "0x01aa95ea|0x0455c737" --type ts

Repository: Provable-Games/summit

Length of output: 423


🏁 Script executed:

rg "summitContractAddress|Summit.*0x" client/src/utils/networkConfig.ts client/.env --type ts --type txt -A 1

Repository: Provable-Games/summit

Length of output: 47


🏁 Script executed:

rg "0x0455c737|0x01aa95ea" client/ -t ts -t txt -t env

Repository: Provable-Games/summit

Length of output: 92


🏁 Script executed:

cat client/.env | grep -i summit

Repository: Provable-Games/summit

Length of output: 158


🏁 Script executed:

cat client/src/utils/networkConfig.ts | grep -i "0x0455c737\|0x01aa95ea\|summitContractAddress" -A 2 -B 2

Repository: Provable-Games/summit

Length of output: 47


🏁 Script executed:

head -100 client/src/utils/networkConfig.ts | grep -i "0x\|summit" -A 1 -B 1

Repository: Provable-Games/summit

Length of output: 1219


🏁 Script executed:

git log --oneline --all -- client/src/utils/networkConfig.ts indexer/apibara.config.ts client/.env | head -20

Repository: Provable-Games/summit

Length of output: 605


Incorrect Summit contract address across indexer and client configuration.

The summitContractAddress in indexer/apibara.config.ts line 7 is 0x01aa95ea66e7e01acf7dc3fda8be0d8661230c4c36b0169e2bab8ab4d6700dfc, but the project guidelines require the mainnet address 0x0455c73741519a2d661cad966913ee5ccb24596c518ad67dd1d189b49c15d4fa. This same incorrect address is also present in client/.env as VITE_PUBLIC_SUMMIT_ADDRESS. Update both files to use the correct mainnet address.

Additionally, the startingBlock at line 28 is 7077225, which deviates from the documented reference value of 6767900. Confirm this block number aligns with the deployment of the correct Summit contract.

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

In `@indexer/apibara.config.ts` at line 7, Update the incorrect Summit contract
address by replacing the value assigned to summitContractAddress (in apibara
config) and the VITE_PUBLIC_SUMMIT_ADDRESS entry in the client env with the
correct mainnet address
0x0455c73741519a2d661cad966913ee5ccb24596c518ad67dd1d189b49c15d4fa; also verify
that the configured startingBlock (startingBlock) corresponds to the block where
that Summit contract was deployed and, if it does not, change startingBlock to
the documented reference 6767900 (or the actual deployment block) so both
indexer and client use the correct address and aligned start block.

Comment thread README.md
| Contract | Address |
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Summit Game | [`0x0214d382e80781f8c1059a751563d6b46e717c652bb670bf230e8a64a68e6064`](https://voyager.online/contract/0x0214d382e80781f8c1059a751563d6b46e717c652bb670bf230e8a64a68e6064) |
| Summit Game | [`0x01aa95ea66e7e01acf7dc3fda8be0d8661230c4c36b0169e2bab8ab4d6700dfc`](https://voyager.online/contract/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 | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# Find AGENTS.md file
fd -t f "AGENTS\.md" .

Repository: Provable-Games/summit

Length of output: 153


🏁 Script executed:

# Search for old and new Summit addresses in markdown files
echo "=== Old Summit address references ==="
rg -n "0x0455c73741519a2d661cad966913ee5ccb24596c518ad67dd1d189b49c15d4fa" --type md

echo ""
echo "=== New Summit address references ==="
rg -n "0x01aa95ea66e7e01acf7dc3fda8be0d8661230c4c36b0169e2bab8ab4d6700dfc" --type md

Repository: Provable-Games/summit

Length of output: 556


🏁 Script executed:

# Check if AGENTS.md exists and show its content if it does
if [ -f "AGENTS.md" ]; then
  echo "=== AGENTS.md exists, showing full content ==="
  cat -n "AGENTS.md"
else
  echo "AGENTS.md not found at root"
  # Search for any AGENTS.md in subdirectories
  find . -name "AGENTS.md" -type f 2>/dev/null
fi

Repository: Provable-Games/summit

Length of output: 7871


Update AGENTS.md line 104 to the new Summit mainnet contract address.

The canonical address documentation in AGENTS.md (line 104) still references the old Summit address 0x0455c73741519a2d661cad966913ee5ccb24596c518ad67dd1d189b49c15d4fa. Update it to match the new address 0x01aa95ea66e7e01acf7dc3fda8be0d8661230c4c36b0169e2bab8ab4d6700dfc from README.md. Also update client/README.md line 48 for consistency.

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

In `@README.md` at line 83, Replace the outdated Summit mainnet contract address
in AGENTS.md (currently
0x0455c73741519a2d661cad966913ee5ccb24596c518ad67dd1d189b49c15d4fa at line ~104)
with the new address
0x01aa95ea66e7e01acf7dc3fda8be0d8661230c4c36b0169e2bab8ab4d6700dfc to match
README.md, and make the identical update in client/README.md (around line ~48)
so both documents reference the same canonical Summit contract address.

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 23, 2026

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
client/src/pages/MainPage.tsx 0.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@claude
Copy link
Copy Markdown

claude Bot commented Feb 23, 2026

Claude encountered an error —— View job


I'll analyze this and get back to you.

@github-actions
Copy link
Copy Markdown

Codex Review - General Engineering Review

No review output was produced.

@claude
Copy link
Copy Markdown

claude Bot commented Feb 23, 2026

Claude finished @Await-0x's task —— View job


Claude Review - General Engineering Review

run=22314735845 attempt=1 sha=68585c079b0a9528cb5353e52310fb17be5df79f scope=general

Todo List

  • Examine the diff for files outside core app packages
  • Analyze README.md changes for behavioral impact
  • Provide review findings in required format

Analysis

I reviewed the changes in scope for this PR, which focuses on files outside the core app packages (contracts/, client/, indexer/, api/). The only file in scope is README.md.

Change Summary:

  • README.md line 83: Updated Summit Game contract address from 0x0214d382e80781f8c1059a751563d6b46e717c652bb670bf230e8a64a68e6064 to 0x01aa95ea66e7e01acf7dc3fda8be0d8661230c4c36b0169e2bab8ab4d6700dfc

Review Findings

No issues found.

The change is a straightforward documentation update that reflects the new Summit Game contract deployment. This is a pure documentation change with no behavioral impact on CI, workflows, automation, or developer tooling. The Voyager.online link is properly updated to match the new contract address, ensuring documentation accuracy.

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


@claude
Copy link
Copy Markdown

claude Bot commented Feb 23, 2026

Claude finished @Await-0x's task —— View job


Claude Review - Indexer/API Review

run=22314735845 attempt=1 sha=68585c079b0a9528cb5353e52310fb17be5df79f scope=indexer-api

Todo List

  • Get diff for indexer/ and api/ changes
  • Analyze changes against 7-area review framework
  • Check contract address migration issues
  • Verify indexer state management
  • Post comprehensive findings

Analysis

Only one file within the indexer/API scope was changed: indexer/apibara.config.ts. This file contains two critical changes for migrating to a new Summit contract deployment:

  1. Summit Contract Address Update: summitContractAddress changed from 0x0214d382e80781f8c1059a751563d6b46e717c652bb670bf230e8a64a68e6064 to 0x01aa95ea66e7e01acf7dc3fda8be0d8661230c4c36b0169e2bab8ab4d6700dfc

  2. Starting Block Update: startingBlock changed from "6866000" to "7077225" (+211,225 blocks)

Critical Findings

[HIGH] indexer/apibara.config.ts:7 - Indexer state namespace collision will cause mixed old/new contract data
Impact: The indexer maintains persistState: true with indexerName: "summit" (lines 991-992 in summit.indexer.ts). When redeployed, the indexer will resume from its existing checkpoint, continuing to process from the old contract state instead of cleanly starting from the new contract's deployment block. This results in stale/mixed data from both old and new Summit contracts.
Fix: Version the indexer namespace for this migration (e.g., indexerName: "summit-v2") to ensure clean state separation, paired with an explicit database reset/migration plan.

[MEDIUM] indexer/apibara.config.ts:28 - Starting block jump may cause incomplete baseline state
Impact: The startingBlock advanced 211,225 blocks while the indexer builds stateful data like beast_owners from Transfer events (line 1273 in summit.indexer.ts). A fresh reindex from empty database will miss all qualifying events in this window, potentially causing incorrect baseline ownership state until later events repair it.
Fix: Ensure the new starting block corresponds to the true earliest required events for all tracked contracts, or implement a deterministic bootstrap strategy for stateful tables before cutover.

7-Area Review Framework Applied

1. Data Correctness and Idempotency: ✅ The indexer uses proper conflict resolution with onConflictDoUpdate for mutable tables and onConflictDoNothing for append-only tables. However, the state namespace issue affects replay determinism.

2. Filters, Selectors, and Stream Efficiency: ✅ Contract address is correctly used as a filter in event stream configuration. Address format properly normalized.

3. Event Decoding and Serde Safety: ✅ No decoder changes. Existing decoders remain valid for new contract.

4. Finality, Reorgs, and Indexer State: ❌ Critical issue with indexer state management - namespace collision will prevent clean migration.

5. Schema, Constraints, and Migrations: ✅ No schema changes. Configuration-only change.

6. Reliability, Operations, and Config: ❌ Missing migration strategy for production state transition.

7. Testing and Verification: ⚠️ Configuration change needs verification against actual contract deployment blocks.

Migration Recommendations

This appears to be a deployment migration requiring careful operational planning:

  • Immediate: Version the indexer name to prevent state collision
  • Before Deploy: Plan database migration/reset strategy for clean cutover
  • Verify: Confirm starting block aligns with actual contract deployment
  • Document: Include rollout plan for production indexer restart

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


View job

@github-actions
Copy link
Copy Markdown

Codex Review - General Engineering Review

No issues found.
Summary: 0 CRITICAL, 0 HIGH, 0 MEDIUM, 0 LOW, 0 INFO

@github-actions
Copy link
Copy Markdown

Codex Review - Indexer/API Review

[HIGH] indexer/apibara.config.ts:7 - Summit contract address was switched, but indexer state namespace is unchanged (indexer/indexers/summit.indexer.ts:992 still uses indexerName: "summit" with persistState: true).
Impact: on a deployment that reuses the existing DB/checkpoint, the indexer resumes from old checkpoint state and can blend old-contract and new-contract data in shared tables (no contract discriminator in schema), causing non-deterministic/incorrect API reads.
Fix: bump indexerName for this contract migration (e.g. summit_v2) and run an explicit reindex/reset plan for affected tables, or add a contract discriminator column and scope all writes/reads.

[MEDIUM] indexer/apibara.config.ts:28 - startingBlock was advanced from 6866000 to 7077225 without any snapshot/backfill mechanism in the indexer.
Impact: on fresh sync, any Beast/Dojo/ERC20 Transfer events before 7077225 are permanently skipped; tables derived from transfer/event history (beast_owners, beasts, consumables, and owner joins used in logs/rewards) can become incomplete or wrong if relevant events exist in the skipped range.
Fix: either set startingBlock to the earliest required block across all filtered contracts, or keep 7077225 and add a deterministic bootstrap/backfill step (plus rollout docs) that seeds required pre-state before live indexing.

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

@Await-0x Await-0x merged commit 81b9d4a into main Feb 23, 2026
19 of 24 checks passed
@Await-0x Await-0x deleted the migrate-client-to-new-summit branch February 23, 2026 16:41
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