-
Notifications
You must be signed in to change notification settings - Fork 49
SOV-4648: tbos snapshot staking script #555
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: development
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls see inline comments
scripts/staking/output/staking_snapshot_RSK_block_8098932_2025-10-14T10-37-37-000Z.json
Show resolved
Hide resolved
scripts/staking/output/staking_snapshot_RSK_block_8098932_2025-10-14T10-37-37-000Z.json
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a comprehensive staking snapshot tool for TBOS to capture staking data from BOB and RSK networks. The tool queries on-chain staking contracts to extract amounts staked, voting power (voluntary vs. total), and vesting status for specified addresses at any given block.
Key changes include:
- Complete TypeScript implementation with command-line interface supporting block-specific and current block snapshots
- Network-agnostic configuration supporting BOB and RSK networks with distinct contract addresses and RPC endpoints
- Dual output format generation (JSON and CSV) with timestamps and block numbers in filenames
Reviewed Changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
scripts/staking/snapshot_staking.ts | Main snapshot tool implementation with CLI interface and blockchain querying logic |
scripts/staking/config/tbos_snapshot_staking.config.ts | Network configuration for BOB and RSK staking contracts and RPC endpoints |
scripts/staking/SNAPSHOT_STAKING.md | Comprehensive documentation with usage examples and configuration instructions |
scripts/staking/output/*.json | Sample JSON output files showing snapshot data structure |
scripts/staking/output/*.csv | Sample CSV output files in spreadsheet-compatible format |
package.json | Added dependencies for CSV generation and command-line argument parsing |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
No description provided.