Add PR417 changes to release v1.4#456
Conversation
* feat: use balance instead of coin * test: fix tests * test: fix * ref: use releasable inside release * feat: update destroy_empty to check address balance too * docs: add missing sections and field docs * docs: fix minor leftovers * docs: sync pausable_grant header with current API * docs: add missing doc sections to splitter * docs: update stale docs that refd Coin as focus on VW * docs: update splitter docs * docs: add TODO for splitter::disperse * feat: merge + add Swept event * test: add test stubs for sweep * docs: Extended the destroy_empty caveat to cover both stranding paths * ref: apply code-quality to vesting_wallet.move * ref: apply code-quality to vesting_wallet_linear.move * ref: apply code-quality to tests * ref: apply code-quality to examples --------- Co-authored-by: immrsd <103599616+immrsd@users.noreply.github.com> (cherry picked from commit 85448ce)
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release-v1.4 #456 +/- ##
================================================
- Coverage 80.43% 80.36% -0.08%
================================================
Files 25 25
Lines 1963 1971 +8
Branches 675 679 +4
================================================
+ Hits 1579 1584 +5
- Misses 347 350 +3
Partials 37 37
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR updates the finance vesting wallet APIs to align with Sui address-balance flows: funding is primarily Balance<C>-based, releases pay via balance::send_funds (no payout Coin<C> minted), teardown now guards against unswept settled funds, and tests/examples/docs are updated accordingly for the v1.4 release.
Changes:
- Refactor vesting wallet funding/release/teardown:
deposit(Balance<C>),releasewithoutTxContext,destroy_empty(wallet, &AccumulatorRoot), plus newsweep_settledandReceived/Sweptevents. - Update unit tests and examples to use
Balancefunding and event-based assertions (instead of taking payout coins from inventories). - Refresh finance README and lockfile pinning for the release.
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| contracts/finance/sources/vesting_wallet.move | Core API shift to Balance deposits, address-balance payouts, new sweep/received semantics, teardown gate on settled funds, and new errors/events. |
| contracts/finance/sources/vesting_wallet_linear.move | Update linear wrapper release to match new release signature (no TxContext). |
| contracts/finance/tests/vesting_wallet_tests.move | Adapt tests to Balance deposits, new Received event behavior, and destroy_empty_for_testing until AccumulatorRoot test constructors exist. |
| contracts/finance/tests/vesting_wallet_linear_tests.move | Adapt linear tests to Balance funding and updated release signature. |
| contracts/finance/examples/vesting_wallet/splitter.move | Update splitter to fan out address-balance payouts and emit a Dispersed event; adds accumulator-root based disperse + test-only bypass. |
| contracts/finance/examples/vesting_wallet/tests/splitter_tests.move | Update splitter tests to validate fan-out via Dispersed events and new disperse helpers. |
| contracts/finance/examples/vesting_wallet/vesting_quadratic.move | Documentation tweaks for updated teardown/settled-funds model. |
| contracts/finance/examples/vesting_wallet/tests/vesting_quadratic_tests.move | Update example tests for Balance deposits, new release signature, and event-based payout assertions. |
| contracts/finance/examples/vesting_wallet/tests/pausable_grant_tests.move | Update grant tests for Balance deposits, new release signature, and event-based assertions. |
| contracts/finance/examples/vesting_wallet/pausable_grant.move | Update wrapper docs and release forwarding to match new vesting wallet API. |
| contracts/finance/README.md | Document new funding paths (Balance, receive_and_deposit, sweep_settled), address-balance payouts, and new teardown requirements. |
| contracts/finance/Move.lock | Add mainnet pinned sections consistent with the release. |
Review — finance (vesting_wallet)
Otherwise clean: build + |
Co-authored-by: Nenad <nenad.misic@openzeppelin.com>
Review — finance (vesting_wallet)
|
No description provided.