Skip to content

added snapshot-based checkpointing for historical balance and supply proofs#665

Open
EmeditWeb wants to merge 1 commit into
Junirezz:mainfrom
EmeditWeb:snapshot-based-checkpoint
Open

added snapshot-based checkpointing for historical balance and supply proofs#665
EmeditWeb wants to merge 1 commit into
Junirezz:mainfrom
EmeditWeb:snapshot-based-checkpoint

Conversation

@EmeditWeb
Copy link
Copy Markdown

Close #565

PR Summary

  • Introduces snapshot-based checkpointing to record historical total assets, total shares, and per-user share balances for proof queries.

Changes

  • Updated lib.rs: added checkpoint storage keys and functions:
    • create_checkpoint, total_shares_at, total_assets_at, snapshot_user_balance, balance_at
  • Updated test.rs: added unit test test_checkpoint validating checkpoint creation and user snapshot.

Tests

  • Added unit test test_checkpoint in the vault tests suite.
  • Run full contract tests with cargo test (requires Rust/cargo in environment).

How to test locally

# if Rust/cargo not installed
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source $HOME/.cargo/env

# run the vault tests
cd contracts/vault
cargo test

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 30, 2026

@EmeditWeb Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

Contracts: Add snapshot-based checkpointing for historical balance proofs

1 participant