Skip to content

Conversation

@Siddharth2207
Copy link
Contributor

@Siddharth2207 Siddharth2207 commented Jul 6, 2025

Motivation

Add base to networks json.

Checks

By submitting this for review, I'm confirming I've done the following:

  • made this PR as small as possible
  • unit-tested any new functionality
  • linked any relevant issues or PRs
  • included screenshots (if this involves a front-end change)

Summary by CodeRabbit

  • New Features
    • Added support for the "base" network, including configuration for "metaboard0" with its address and start block.
  • Bug Fixes
    • Updated the "metaboard0" address and start block for the "arbitrum-one" network to ensure accurate network configuration.

@coderabbitai
Copy link

coderabbitai bot commented Jul 6, 2025

Walkthrough

The Ethereum address and start block for the "metaboard0" entry under the "arbitrum-one" network were updated. Additionally, a new network configuration named "base" was added with a "metaboard0" object specifying an Ethereum address and a start block number. No other changes were made.

Changes

File(s) Change Summary
subgraph/networks.json Updated "arbitrum-one" → "metaboard0" address and startBlock; added new "base" network entry with "metaboard0" including address and startBlock

Sequence Diagram(s)

sequenceDiagram
    participant Config as networks.json
    participant User

    User->>Config: Update "arbitrum-one" metaboard0 address and startBlock
    Config-->>User: Store updated values

    User->>Config: Add new "base" network entry with metaboard0 address and startBlock
    Config-->>User: Store new network configuration
Loading

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@Siddharth2207 Siddharth2207 requested a review from hardyjosh July 6, 2025 10:48
@Siddharth2207 Siddharth2207 self-assigned this Jul 6, 2025
Copy link

@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: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a91333d and db8ee3c.

📒 Files selected for processing (1)
  • subgraph/networks.json (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (9)
  • GitHub Check: standard-tests (ubuntu-latest, rainix-rs-static)
  • GitHub Check: standard-tests (ubuntu-latest, rainix-sol-artifacts)
  • GitHub Check: standard-tests (macos-latest, rainix-rs-test)
  • GitHub Check: standard-tests (ubuntu-latest, rainix-sol-static)
  • GitHub Check: standard-tests (ubuntu-latest, rainix-sol-test)
  • GitHub Check: standard-tests (macos-latest, rainix-rs-artifacts)
  • GitHub Check: standard-tests (ubuntu-latest, rainix-rs-test)
  • GitHub Check: standard-tests (ubuntu-latest, rainix-rs-artifacts)
  • GitHub Check: test
🔇 Additional comments (1)
subgraph/networks.json (1)

10-12: Action Required: Correct the JSON parsing and confirm the true deployment block
The current jq '.[0] | {blockNumber}' filter is invalid for the Arbiscan response. Please:

  • Update your verification script to extract the first transaction’s blockNumber from the result array, e.g.:
    curl -s "https://api.arbiscan.io/api?module=account&action=txlist&address=$CONTRACT&startblock=0&endblock=999999999&sort=asc&apikey=YourApiKeyToken" \
      | jq -r '.result[0].blockNumber'
  • If you lack a working API key, manually look up the contract creation tx on Arbiscan (or Etherscan) and note its block number.
  • Compare that block to 256572417 and, if earlier, rewind startBlock in subgraph/networks.json to the actual first event block so no historical events are missed.

Comment on lines +14 to +17
"base": {
"metaboard0": {
"address": "0x59401C9302E79Eb8AC6aea659B8B3ae475715e86",
"startBlock": 18309350
Copy link

@coderabbitai coderabbitai bot Jul 6, 2025

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Ensure the new “base” entry uses checksummed addresses & valid genesis block.

  1. 0x59401C9302E79Eb8AC6aea659B8B3ae475715e86 is not EIP-55 checksummed (all-caps after the 0x).
  2. Confirm startBlock: 18309350 really matches the first event; Base blocks are much smaller (the chain launched with ~3 M blocks).

Diff to auto-checksum (if address is correct):

-      "address": "0x59401C9302E79Eb8AC6aea659B8B3ae475715e86",
+      "address": "0x59401C9302E79eB8ac6AEa659b8b3AE475715E86",

🏁 Script executed:

#!/bin/bash
# Validate checksum & block number across all networks.json addresses.
pip install --quiet eth_utils jq
python - <<'PY'
import json, sys
from eth_utils import is_checksum_address, to_checksum_address
data = json.load(open("subgraph/networks.json"))
bad = False
for net, d in data.items():
    addr = d["metaboard0"]["address"]
    if not is_checksum_address(addr):
        bad = True
        print(f"{net}: {addr} -> should be {to_checksum_address(addr.lower())}")
if bad:
    sys.exit(1)
PY

Length of output: 1998


🏁 Script executed:

#!/bin/bash
# Install dependencies for checksum verification
pip install --quiet eth_utils eth-hash[pycryptodome] jq

# Verify EIP-55 checksums and report Base startBlock
python - <<'PY'
import json, sys
from eth_utils import is_checksum_address, to_checksum_address

data = json.load(open("subgraph/networks.json"))
for net, content in data.items():
    mb = content.get("metaboard0", {})
    addr = mb.get("address")
    if addr and not is_checksum_address(addr):
        print(f"{net}: {addr} -> should be {to_checksum_address(addr.lower())}")
# Print Base network’s configured startBlock
base_sb = data.get("base", {}).get("metaboard0", {}).get("startBlock")
print(f"base startBlock: {base_sb}")
PY

Length of output: 96


Update Base network startBlock

The address for base → metaboard0 is already EIP-55 checksummed—no change needed there. However,
the configured startBlock: 18309350 far exceeds Base mainnet’s current height (~3 million). Please adjust it to the block where the metaboard0 contract was deployed (i.e., the first block that emitted one of its events).

• File: subgraph/networks.json (base → metaboard0, lines 14–17)
• Change startBlock: 18309350<actual_deployment_block>

🤖 Prompt for AI Agents
In subgraph/networks.json around lines 14 to 17, the startBlock for base →
metaboard0 is incorrectly set to 18309350, which is beyond the current Base
mainnet height. Update the startBlock value to the actual block number where the
metaboard0 contract was deployed, specifically the first block that emitted one
of its events, to ensure accurate indexing.

Copy link
Contributor

Choose a reason for hiding this comment

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

This is definitely correct @Siddharth2207 ?

Copy link
Contributor

Choose a reason for hiding this comment

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

This is definitely correct @Siddharth2207 ?

Copy link

Choose a reason for hiding this comment

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

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

Copy link

Choose a reason for hiding this comment

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

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes the contract 0x59401C9302E79Eb8AC6aea659B8B3ae475715e86 was deployed at block 18309350

@Siddharth2207 Siddharth2207 merged commit 7bc15b2 into main Jul 7, 2025
11 checks passed
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.

3 participants