Tutorial

Supplemental Guide 4: Introduction to Ledger and Smart Contract Programming in Daml

7 steps

In this tutorial, we introduce the fundamental concepts of the Canton Ledger Model for building distributed applications in Daml, covering core components, party roles, contract identification, and how to query contracts and interpret transaction trees.

Helpful prior knowledge

Completion of "Supplemental Guide 3 - Learn Programming with Daml" is required. It is also highly recommended to have prior programming and blockchain knowledge for this tutorial as this is a highly involved topic


Learning Outcomes

You will be able to:

  • Understand the Canton Ledger Model's core components (Parties, Contracts, Choices, Templates) and the roles parties play (Signatories, Observers, Controllers).
  • Identify contracts using Contract IDs and Contract Keys, and proficiency in retrieving and querying contracts both on-ledger and off-ledger.
  • Explain Daml's privacy model by interpreting transaction trees to understand the immutable history of actions on the ledger.

Tutorial Steps

Total steps: 7

  • Step 1: The Canton Ledger Model
  • Step 2: Templates in Daml
  • Step 3: Writing Templates in Daml
  • Step 4: Identifying Contracts with Contract ID and Contract Key
  • Step 5: Reading Transaction Trees
  • Step 6: Retrieving and Querying Contracts
  • Step 7: Stacking It Up!

Help Center Support?

Find articles to support you through your journey or chat with our support team.

Help Center