This is a draft of the code for a CN token standard that addresses
- the needs of asset registries to manage assets so that they are available in all CN wallets,
- the needs of CN wallets to handle all CN assets, and
- the needs of apps to construct (multi-legged) DvP transactions across arbitrary CN assets.
This code together with appropriate documentation is ultimately meant to be submitted as a Canton Improvement Proposal (CIP) to the Global Synchronizer Foundation. The current state of the code is intended to support this slide deck presenting the design. It was shared with interested parties via the CIP discussion mailing list.
We recommend starting with reviewing that slide deck before reviewing the code itself.
Once done so we recommend reviewing the code and its tests in the directories of the form cnrc-*
jointly with the examples in examples/
. Examples of particular interest are:
-
examples/cn-token-test/daml/Splice/Scripts/TestCnTokenTransfer.daml
: an example that shows how to execute a "free-of-payment transfer" ofAmulet
tokens using the standard. -
examples/cn-token-test/daml/Splice/Scripts/TestCnTokenDvP.daml
: an example that shows how to execute a DvP using the standard.
-
Setup development tools using your package manager of choice. Required tools:
java >= 17
yq >= 4.x
-
Install the Daml SDK from scratch:
./script/install-daml-sdk.sh
Or in case you already have a recent (> 2.9) SDK you can skip downloading the bootstrappng SDK using:
./script/install-daml-sdk.sh --no-bootstrap
-
Build the Daml Models:
daml build --all
-
Run the tests:
./script/daml-test-all.sh