Skip to content

Add hashed split dust conservation tests#1062

Open
brentthomas248 wants to merge 1 commit into
Remitwise-Org:mainfrom
brentthomas248:codex/remitwise-1012-dust
Open

Add hashed split dust conservation tests#1062
brentthomas248 wants to merge 1 commit into
Remitwise-Org:mainfrom
brentthomas248:codex/remitwise-1012-dust

Conversation

@brentthomas248

Copy link
Copy Markdown

Closes #1012

Summary:

  • Add a deterministic property-style sweep for distribute_usdc_hashed across generated valid basis-point split configurations.
  • Assert the actual recipient token balances and DistributionCompletedEvent payload conserve the full total, including dust-heavy amounts.
  • Add invalid percentage rejection coverage for over-100%, under-100%, and over-allocated split configs.

Tests:

  • PATH="$HOME/.cargo/bin:$PATH" rustfmt --check remittance_split/src/test.rs
  • PATH="$HOME/.cargo/bin:$PATH" cargo test -p remittance_split test_distribute_usdc_hashed -- --nocapture
  • git diff --check

Note:

  • cargo test -p remittance_split currently has unrelated baseline failures in existing tests that still initialize splits with percentage values like 50/30/15/5 while the contract validates basis points summing to 10000; the new test_distribute_usdc_hashed coverage passes in the full run.

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.

Add property-based dust-conservation tests for distribute_usdc_hashed across all percentage splits

1 participant