DAML Smart Contracts

Interacting with the Topl blockchain using DAML smart contracts

Smart Contracts on the Topl Blockchain

Topl has integrated the Digital Asset modeling Language (DAML) as its first smart contract platform for creating and using native assets on the blockchain. As a public and permissionless blockchain, we are utilized the open-source implementation of DAML to bring a secure way to create and deploy off-chain smart contracts that still maintain the same level of cryptographic proofs and asset management that you would find in on-chain smart contracts like Solidity and Rust.

First Steps

Setting up DAML

Install the DAML SDK and VSCode editor integration.

After successfully installing the DAML SDK, the Participant Node built for facilitating transactions needs to be installed to interact with the Topl Blockchain nodes.

Setting up a Participant Node

  The Daml Bifrost Module installs a Bifrost Participant Node and example deployable smart contract.

After installation, the participant node and example smart contract need to be compiled in order to run an instance of the off-chain contract.

Deploying a smart contract

Deploy by compiling and starting the participant node.

Compiling and starting the DAML sandbox will deploy the smart contract to the participant node and allow users to interact with the smart contract. Using the DAML Navigator tool provides an easy-to-use interface for interacting with deployed contracts.

Demo

Here is a demo of deploying and running an example contract to create native assets on Topl's Valhalla testnet: