Skip to content

feat: find starting block number by binary search (SS2-88)#69

Merged
metalboyrick merged 4 commits into
mainfrom
feat/find-starting-block-number
Jan 28, 2026
Merged

feat: find starting block number by binary search (SS2-88)#69
metalboyrick merged 4 commits into
mainfrom
feat/find-starting-block-number

Conversation

@BaoHG1508
Copy link
Copy Markdown
Collaborator

@BaoHG1508 BaoHG1508 commented Jan 19, 2026

Description of change

  • Made startingBlockNumber optional in IndexerConfig
  • Added findContractDeploymentBlock() utility using binary search with starknet_getNonce
  • Updated indexer to resolve the starting block from contract addresses when startingBlockNumber is not provided
  • Finds the earliest deployment block across all configured contracts
  • Added logging and performance timing for deployment block resolution

Issue number

Closes #44

Type of change (delete irrelevant types)

  • New feature (non-breaking change which adds functionality)

Checklist:

  • I have tested locally and linked a screen recording with this PR
  • I have adhered to clean code conventions
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works

Comment thread src/utils/blockUtils.ts
Copy link
Copy Markdown
Collaborator

@metalboyrick metalboyrick left a comment

Choose a reason for hiding this comment

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

make CI pass

@metalboyrick metalboyrick changed the title feat: find starting block number by binary search feat: find starting block number by binary search (SS2-88) Jan 28, 2026
@metalboyrick metalboyrick merged commit e15721f into main Jan 28, 2026
5 checks passed
@metalboyrick metalboyrick deleted the feat/find-starting-block-number branch January 28, 2026 12:19
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.

Start Block Inference

2 participants