Skip to content

Add PR417 changes to release v1.4#456

Merged
ericnordelo merged 4 commits into
release-v1.4from
feat/merge-417-into-release-1.4
Jul 8, 2026
Merged

Add PR417 changes to release v1.4#456
ericnordelo merged 4 commits into
release-v1.4from
feat/merge-417-into-release-1.4

Conversation

@ericnordelo

Copy link
Copy Markdown
Member

No description provided.

ericnordelo and others added 2 commits July 7, 2026 13:00
* 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)
Copilot AI review requested due to automatic review settings July 7, 2026 11:39
@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4404f86e-e87d-40ec-8b48-726bb3a65ca5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/merge-417-into-release-1.4

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.93939% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.36%. Comparing base (a1ebe69) to head (d4eb94a).

Files with missing lines Patch % Lines
contracts/finance/sources/vesting_wallet.move 93.54% 2 Missing ⚠️
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              
Flag Coverage Δ
contracts/access 65.46% <ø> (ø)
contracts/finance 26.86% <93.93%> (+0.38%) ⬆️
contracts/utils 44.09% <ø> (ø)
math/fixed_point 56.51% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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>), release without TxContext, destroy_empty(wallet, &AccumulatorRoot), plus new sweep_settled and Received/Swept events.
  • Update unit tests and examples to use Balance funding 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.

Comment thread contracts/finance/examples/vesting_wallet/splitter.move
Comment thread contracts/finance/examples/vesting_wallet/splitter.move
Comment thread contracts/finance/examples/vesting_wallet/splitter.move
@bidzyyys

bidzyyys commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Review — finance (vesting_wallet)

  • vesting_wallet.move:424sweep_settled doc summary says "Sweep amount from…", but there is no amount parameter; it sweeps the entire settled balance → reword to "Sweep all settled funds from the wallet's own object address balance…".

Otherwise clean: build + sui move test pass under --lint --warnings-are-errors (100 tests), no capability leakage, send_funds/withdraw_funds_from_object target the intended principals, teardown's settled-funds gate is sound. The uncovered sweep_settled/destroy_empty settled path is blocked by missing Sui AccumulatorRoot test tooling (documented in-code, already flagged by codecov).

Comment thread contracts/finance/sources/vesting_wallet.move
Co-authored-by: Nenad <nenad.misic@openzeppelin.com>
Copilot AI review requested due to automatic review settings July 8, 2026 09:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 12 changed files in this pull request and generated 4 comments.

Comment thread contracts/finance/examples/vesting_wallet/splitter.move
Comment thread contracts/finance/examples/vesting_wallet/splitter.move
Comment thread contracts/finance/examples/vesting_wallet/splitter.move
Comment thread contracts/finance/sources/vesting_wallet.move
@bidzyyys

bidzyyys commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Review — finance (vesting_wallet)

  • vesting_wallet_linear.move:342release<C> can abort EInsufficientBalance (under-funded wallet, via the inner vesting_wallet::release) but its doc has no #### Aborts section, which STYLEGUIDE requires for any abortable function (sibling destroy and core release document theirs) → add #### Aborts listing EInsufficientBalance (the only reachable cause; EWalletMismatch/EVestedBelowReleased are unreachable via the internal mint). Pre-existing, but the fn is touched by this PR.

@bidzyyys bidzyyys left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ericnordelo ericnordelo merged commit dec4e32 into release-v1.4 Jul 8, 2026
20 of 21 checks passed
@ericnordelo ericnordelo deleted the feat/merge-417-into-release-1.4 branch July 8, 2026 10:18
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.

4 participants