Repository navigation
L-10: Add merge and split choices on holdings - #131
Open
haseebrabbani wants to merge 1 commit into
Open
haseebrabbani wants to merge 1 commit into
haseebrabbani wants to merge 1 commit into
Conversation
haseebrabbani
requested review from
0xNeshi,
ericnordelo,
igingu and
pepebndc
as code owners
November 19, 2026 07:58
0xNeshi
force-pushed
the
audit-m1-02-l05
branch
from
November 19, 2026 10:37
20f5b0c to
56d7cac
Compare
0xNeshi
force-pushed
the
audit-m1-02-l10
branch
from
November 19, 2026 10:45
1c2020b to
2c4333b
Compare
Add holdingMergeImpl and holdingSplitImpl to the utils and expose them as TokenHolding_Merge and TokenHolding_Split, controlled by the account parties. Both conserve value and emit a holdings-change event with no transfer legs. A merge consumes its inputs through fundHolding, so they must share the exercised holding's admin, account and instrument, and an expired lock is accepted while a live one is refused. Both refuse an exercised holding with any lock, since its lock holders would see the whole rebalance. The custom example adds MyHolding_Merge and MyHolding_Split with a freeze check on the exercised holding, and a merge refuses inputs that carry other roles. The READMEs and the integration guide describe rebalancing through the choices and through a self-transfer, and note that merges and splits bypass the registry's transfer policy. Closes #94
0xNeshi
force-pushed
the
audit-m1-02-l10
branch
from
November 19, 2026 13:30
2c4333b to
cc1d1e7
Compare
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.
Closes #94. Stacked on #116 (base
audit-m1-02-l05).Changes
token-cip112-utils:holdingMergeImplandholdingSplitImpl, bodies of consuming merge and split choices controlled by the account parties. Value is conserved and each emits one holdings-change event with no transfer legs.fundHoldingand must match the exercised holding's admin, account and instrument; expired locks are accepted, live ones refused.token-cip112-v1:TokenHolding_MergeandTokenHolding_Split.MyHolding_MergeandMyHolding_Splitrefuse a frozen holding; merge inputs runMyHolding_Spendand must carry the exercised holding'sAppRoles.Notes
frozenchecks in the newMyHoldingchoices), L-11: Bind the admin in the custom example with a co-signing pauser #125 (Custom.daml), [M1: Audit 2: L-04]: Pass consumed holdings to createHolding so consumer fields survive re-creation #89 (newcreateHoldingsignature must receive merged and split inputs), and the tokenSCRIPTSlist inscripts/check-sandbox.sh(L-16: Remove the observers argument from the batched admin expiry choices #119, CIP112: Forward each authorizer's own context to its Allocation_Settle #127).