Skip to content
CCPEDIAby Unity Nodes
VideosWhat are Contract keys in Daml?

What are Contract keys in Daml?

Nothing is loaded from YouTube until you press play, and then without tracking cookies.

About this video

📖 Get started with Daml: bit.ly/tryDaml 📚 Learn more about Daml Smart Contracts: bit.ly/learn_daml 📮Check out our blogs: bit.ly/daml-blog-engineering 📋 Become a Daml certified expert: bit.ly/daml-certification

#Contract #keys are unique and stable references to a contract that won’t change even if the contract id of that contract changes due to an update.

Contract keys are optional.

Contract keys have an associated set of key maintainer parties. These parties guarantee the uniquess of their maintained keys.

Contract keys are specified on a contract template with the key and maintainer keywords. If you specify a key you also have to specify its maintainers.

DAML is an open-source smart contract language designed to build composable applications on an abstract ledger model.

DAML is a high level language that focuses on data privacy and authorization of distributed applications. These concepts are represented first class in the language.

By abstracting data privacy and authorization, DAML takes the burden off the programmer to think about concrete cryptographic primitives and lets her focus on workflow logic.

DAML is a statically typed functional language.

Applications specified in DAML can be deployed on a growing number of platforms including Amazon Aurora , VMWare Concord , R3 Corda , Hyperledger Fabric , Hyperledger Sawtooth , Project DABL and PostgreSQL .

We will show how to: key maintainer

#smartcontracts

Transcript

321 words

Captions as YouTube publishes them, usually machine-generated, so names such as Daml and Canton can be misheard.

  1. 0:00

    all right so welcome to our next video this one's on contract keys previously we were talking about choices and how to exercise them on a template uh or actually how to exercise them on a contract but today we're going to talk about contract keys which is basically once you have a contract out there how do you make sure that you're talking to the right contract and you don't lose track of it uh so

  2. 0:24

    it's actually fairly simple there's two expressions that you would add to your template in order to identify contracts by keys these would be unique stable references as the document over here says uh that won't change even if the contract itself you know gets consumed and changes due to different types of updates which we'll talk about in another video but essentially contract keys are optional but if you need them you can use them much the same way that you would use primary keys if you're looking

  3. 0:54

    up data on a sql database so you have two keywords that you would use to specify key which is a the actual field that specifies the contract key so it can be any expression of the contract arguments that doesn't contain the contract id and it also has to include a maintainer and maintainers are essentially parties on the ledger that basically guarantee that and help enforce that these uh keys remain

  4. 1:26

    unique so maintainers essentially are going to be ensuring that the contract itself stays unique and that's essentially what contract keys are they're essentially just you know primary keys uh except they're used on the demo ledger instead of on a sql database and yeah so that's a brief explanation of contract keys if you want to know more about them or understand them more in depth you can

  5. 1:51

    always go to thank you and look forward to the next next video