Skip to content

test: RgbSettlementModule existence + exact-amount checks#80

Merged
sh3ifu merged 2 commits into
rgb-opid-amount-bindingfrom
test/rgb-opid-amount-binding
Jun 30, 2026
Merged

test: RgbSettlementModule existence + exact-amount checks#80
sh3ifu merged 2 commits into
rgb-opid-amount-bindingfrom
test/rgb-opid-amount-binding

Conversation

@sh3ifu

@sh3ifu sh3ifu commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Test branch for the RgbSettlementModule beforeFundsOut rework (fix PR:
rgb-opid-amount-binding). beforeFundsOut is now a view proof-of-mint check
that decodes (uint256[] operationIds, uint256[] amounts) and asserts every
id exists in fundsInRecords with an exactly matching amount — no
consumption, no tie to fundsOut.amount. Solvency/replay remain owned by
Bridge.lockedLiquidity + consumedBurnIds.

Changes

  • RgbSettlementModule.t.sol fully rewritten: existence + exact-amount happy
    paths (records left intact), reverts for AmountMismatch (over/under),
    SettlementDataLengthMismatch, mid-array mismatch; empty-array, duplicate-id
    (harmless), repeated-call view stability; exact-match-only fuzz.
  • Bridge / Integration / MultisigProxy: switched settlementData to the
    two-array encoding, replaced FundsOutAmountExceedsFundsIn assertions with
    AmountMismatch, and replaced all "record consumed/residual" assertions with
    "record unchanged" (permanent proof-of-mint ledger).
  • Bridge settlement builders are pure (encode AMOUNT, or explicit amounts for
    seeded/fuzz/mismatch records) so they don't consume vm.prank/vm.expectRevert
    when passed inline.

sh3ifu and others added 2 commits June 26, 2026 12:26
* refactor(R-C-01): make OutflowRateLimiter unit-testable in isolation

* test(R-C-01): unit tests for RateLimiter lib
@sh3ifu sh3ifu merged commit 375f2ce into rgb-opid-amount-binding Jun 30, 2026
2 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.

1 participant