chore: update soroban-sdk from 22.0.8 to 22.0.10#492
Merged
truthixify merged 2 commits intoDistinctCodes:mainfrom Feb 22, 2026
Merged
chore: update soroban-sdk from 22.0.8 to 22.0.10#492truthixify merged 2 commits intoDistinctCodes:mainfrom
truthixify merged 2 commits intoDistinctCodes:mainfrom
Conversation
Resolves compilation errors in testutils that prevented the test suite from running. All 39 tests now pass cleanly.
|
@KevinMB0220 is attempting to deploy a commit to the naijabuz's projects Team on Vercel. A member of the Team first needs to authorize it. |
Adds comprehensive tests covering all dividend module functions: - distribute_dividends: zero/negative amount, untokenized asset, equal split, multi-round accumulation, disabled after re-disable - claim_dividends: no double-claim, partial holder claim, claim/reset accumulate cycle - get_unclaimed_dividends: unknown holder returns 0, untokenized fails - enable/disable_revenue_sharing: success and error paths, toggle cycle - proportional distribution: sole holder, 3-way split, 4 equal holders
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #470 — Dividend Distribution and Claiming Module
This PR delivers the complete dividend distribution and claiming module for the AssetUp tokenization contract, implementing all functions specified in the issue along with a full test suite and a dependency fix that unblocked the test runner.
Changes
contracts/assetsup/src/dividends.rs
Full implementation of the dividend module:
distribute_dividends(env, asset_id, total_amount)Validates
total_amount > 0, checksrevenue_sharing_enabled, iterates all token holders, computes each share as(holder_balance / total_supply) * total_amount, accumulates intounclaimed_dividends, and emits a("dividend", "distributed")event.claim_dividends(env, asset_id, holder)Requires holder authentication (
holder.require_auth()enforced inlib.rs), returns and zeroes the holder’s unclaimed balance, and emits a("dividend", "claimed")event.get_unclaimed_dividends(env, asset_id, holder)Read-only query returning the current unclaimed balance (returns
0for unknown holders).enable_revenue_sharing(env, asset_id)/disable_revenue_sharing(env, asset_id)Toggles the
revenue_sharing_enabledflag on theTokenizedAsset.contracts/assetsup/src/tests/dividends_new.rs
Five tests covering all acceptance criteria:
test_distribute_dividends_no_revenue_sharingtest_distribute_dividendstest_proportional_dividend_distributiontest_claim_dividendstest_claim_dividends_insufficientcontracts/Cargo.lock
Updated
soroban-sdkfrom 22.0.8 → 22.0.10.The previous version had internal compilation errors in
testutilsthat prevented the entire test suite from running.Acceptance Criteria
Test Results
Notes
i128arithmetic — any dust from rounding stays undistributed (not lost, just not allocated).distribute_dividendsdoes not require auth at the contract level, allowing any caller (e.g., a backend service) to trigger distributions. If stricter access control is desired,tokenizer.require_auth()can be added.