Skip to content

Token standard v2 daml preview#4562

Draft
meiersi-da wants to merge 17 commits intomeiersi/ts2/3.5/copy-and-rename-onlyfrom
token-standard-v2-daml-preview
Draft

Token standard v2 daml preview#4562
meiersi-da wants to merge 17 commits intomeiersi/ts2/3.5/copy-and-rename-onlyfrom
token-standard-v2-daml-preview

Conversation

@meiersi-da
Copy link
Contributor

This PR adds the first version of token standard v2 APIs together with support for them in Amulet. It is based on a PR that performs copies and renames only to provide a more clear diff of v2 to v1.

Pull Request Checklist

Cluster Testing

  • If a cluster test is required, comment /cluster_test on this PR to request it, and ping someone with access to the DA-internal system to approve it.
  • If a hard-migration test is required (from the latest release), comment /hdm_test on this PR to request it, and ping someone with access to the DA-internal system to approve it.
  • If a logical synchronizer upgrade test is required (from canton-3.5), comment /lsu_test on this PR to request it, and ping someone with access to the DA-internal system to approve it.

PR Guidelines

  • Include any change that might be observable by our partners or affect their deployment in the release notes.
  • Specify fixed issues with Fixes #n, and mention issues worked on using #n
  • Include a screenshot for frontend-related PRs - see README or use your favorite screenshot tool

Merge Guidelines

  • Make the git commit message look sensible when squash-merging on GitHub (most likely: just copy your PR description).

Make PoC compile after rebase

tests pass! *yay*

Reuse Lock and InstrumentId from V1

Add type-class based conversion

Communicate action graph in transfer instr

partial work towards v1 transfer

Base Amulet implementation changes on V1

Add conversion of instrumentId and lock

make tests pass and polish conversion utilities

Use V1 views as the base impl. for Amulet

Switch to multiple actors on transfer instructions

Split AmuletAllocation and AmuletAllocationV2

Remove accidentally committed file

external amulet rules with inline two-step tfer

Revert "external amulet rules with inline two-step tfer"

This reverts commit 0af6c68.

Switch to a list of parties for the executors

switch allocationfactory to actors

partial work towards V1/V2 alloc compatibility

partial implemenation of V2 on AmuletAllocation

Move settlement implementation into generic utils

write generic mixed version settlement algorithm

Allow V2 settlemnt of V1 allocations

partial testing of mixed settlement

Wrangle mixed version settlement into submissions

... but its not pretty :/

script allocation request acceptance

Introdue settlementVersion and settlementV1Authorizers

Move authorizer into allocation specification

Switch back to single executor; remove tryDowncast_allocation

Ensure V2 settlement of V1 allocation always calls V1 choices

Implement AmuletAllocationV1's V2 withdraw

Draft impl. of V1-based V2-alloc-cancel impl

Polish comments and types on allocation interface

PARTIAL work towards allocation factory polish

Move and polish SettlementFactory_SettleBatch

Remove HoldingMap, group settle result holdings by account

Split UtilsV2 into better scoped modules

Share public fetch implementations

Better structure and comments for defaultBatchSettleImpl

Use controllersOverride pattern for settleBatch

Add more actor checks and self-archivals

Better names for default allocation implementations

self-review

More self-review; polish AmuletAllocationV2 impl.

More allocation impl polish

Polish TradingAppV2 - step 1

Polish TradingApp: reuse AllocationRequestView

Polish test code

Generalize and simplify V1 compatibility code

Remove canWithdraw and default choice controllers infra

Adjust allocation commentary to polish

Self-review

Add missing tx metadata for history parsing

Remove expectedAdmin as it is redundant

Switch to multiple actors for publicFetch

Add CHANGELOG for preview branch

Reintroduce senderHoldingCids where more clear

Multiple executors -- pure rename

Switch to multiple executors

Rename 'Splice.Api.Token.UtilsV2' to 'Splice.TokenStandard.Utils'

Rename 'splice-api-token-utils-v2' to 'splice-token-standard-utils'

cleanup allocation request API -- missing impl.

Default implementations for AllocationRequest + TradingAppV2 cleanup

Undo changes to TradingAppV1

Improve authorization flow for TradingAppV2

Improve trade settlement test script

Make cancellation work with on-demand authorization

Save partial state

Build proper settlement testing infrastructure

add support for v1 allocation request acceptance

Make tests pass and update some comments

More tests and explicit authorizers for allocation requests

Improve auto receipt authorizer support in TradingAppV2

Share code for allocation validation

Cleanup organization of TokenStandard.Utils

and add extra validation for AllocationV2: no account meta

Mark internal modules of Utils as internal

Cleanup allocations util

Comments on internal utils modules

Cleanup requirement checking infra

Cleanup actors patter infra

before fixing all require occurrences

Re-export 'TokenStandard.Utils.require' in Splice.Utils

Drop superfluous old DvP v2 test

Replace FIXMEs by appropriate TODOs

Resolve all FIXMEs to resolve before preview

Adjust Changelog

Self-review of Changelog
Signed-off-by: Simon Meier <simon@digitalasset.com>
Signed-off-by: Simon Meier <simon@digitalasset.com>
Signed-off-by: Simon Meier <simon@digitalasset.com>
Signed-off-by: Simon Meier <simon@digitalasset.com>
Signed-off-by: Simon Meier <simon@digitalasset.com>
Signed-off-by: Simon Meier <simon@digitalasset.com>
[ci]

Signed-off-by: Simon Meier <simon@digitalasset.com>
@meiersi-da meiersi-da force-pushed the token-standard-v2-daml-preview branch from 63de04a to a0b3512 Compare March 23, 2026 08:05
Signed-off-by: Simon Meier <simon@digitalasset.com>
Signed-off-by: Simon Meier <simon@digitalasset.com>
This reverts commit 9dc96ea.

Signed-off-by: Simon Meier <simon@digitalasset.com>
Signed-off-by: Simon Meier <simon@digitalasset.com>
Signed-off-by: Simon Meier <simon@digitalasset.com>
Signed-off-by: Simon Meier <simon@digitalasset.com>
Signed-off-by: Simon Meier <simon@digitalasset.com>
Signed-off-by: Simon Meier <simon@digitalasset.com>
Signed-off-by: Simon Meier <simon@digitalasset.com>
@meiersi-da meiersi-da force-pushed the token-standard-v2-daml-preview branch from 1e4fb8e to c376488 Compare March 23, 2026 16:02
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