What is a smart contract?
What are examples of smart contracts?
The most well known example of a smart contract these days is one concerning transferrable fungible assets.The smart contract defines the shared rules of who can create or destroy the asset, how ownership changes, and how positions of the asset can be split or merged. However, there are rich examples for a wide range of industries and use – cases. Some examples available in DAML:
- Games like chess or tic tac toe
- Airline seat assignment
- Distributed chats
- Kanban boards
Our marketplace (https://daml.com/marketplace/) and repos (https://github.com/digital-asset, https://github.com/digital-asset/danban, https://github.com/digital-asset/ex-models, https://github.com/digital-asset/) contain many varied examples for you to explore.
Are smart contracts reversible?
In general, smart contracts are designed to be deterministic and only reversible to the extent their predefined rules allow.This can be problematic if unforeseen corrections or reversals are required.
Fortunately, DAML contracts always foresee this possibility by design. Every DAML contract has a clearly defined set of signatories, which can mutually agree to make changes to the smart contract, including reversal.
How do you deploy a smart contract?
In DAML, smart contracts are not deployed as one – offs. Instead, application developers deploy contract templates to the shared infrastructure.These templates are similar to classes in object oriented programming in the sense that they must be instantiated to get concrete contracts.Part of the rules the template specifies is the set of signatories, those parties which need to agree to the creation of the instance.Once the signatories’ agreement has been obtained, creating a contract instance is just a normal transaction.
What is the DAML smart contract language?
The DAML smart contract language is a core component of the DAML ecosystem for distributed applications.It is a language purpose – made to capture the core concerns of distributed applications, whilst at the same time abstracting away any infrastructure concerns so that developers can focus on just those things that are differentiating for their apps.