An overview guide on Daml language.
Daml docs provide a great Getting Started guide. This project will be based on Daml Open Source.
Please take into account that projects generated by Daml toolkit may be provided under different licensing terms than this guide.
daml version
Displays versions of installed SKDs.
daml new <project_name>
Creates new project with a specified name and default template. To specify the template use:
daml new <project_name> --template <template_name>
daml new --list
Lists all the available project templates
They are the most important component of Daml ecosystem. They define data and behavior of Contracts on Daml Ledger. Which means they provide logic that answers these questions:
- Who can see what?
- Who can alter the ledger?
- How can they alter the ledger?
- Under what conditions?
Contracts are immutable in Daml - once created they cannot be changed
Template declaration must start with: with
section. Data fields are defined in the with
section.
The requirement the
with
section is to contain at least oneParty
.
template MyOffer
with
issuer: Party
owner: Party
price: Decimal
royaltyRate: Deciaml
(...)
In general
with
section a mix of Parties included in the contract as well as the contract's payload.