Questions tagged [daml]

Daml is an open source smart contract language which codifies multi-party agreements. This tag should be used for any questions relating to Daml programming and tools supplied with the Daml SDK.

DAML (the Digital Asset Modeling Language) is a contract modeling language which can run on the Digital Asset Ledger, and codifies multi-party agreements over a distributed ledger. More details on DAML and various use cases are given on the DAML Driven blog.

147 questions
0
votes
1 answer

Is it possible in DAML to have a generic parameter to a choice, without the template itself being generic?

In my model I'm trying to define a non-generic template that has a choice which takes a generic parameter. I can't figure out how to do that. Is it even possible? If not, why?
GeorgS
  • 741
  • 5
  • 12
0
votes
2 answers

Exercising a choice from another choice; self-reference

I keep on wanting to exercise a choice from another choice (for the same template). Is there a way to do this without knowing the contract id? i.e. I can't call exercise ??? MyChoice from the body of another choice, without knowing ???. Or am I…
Luciano
  • 2,388
  • 1
  • 22
  • 33
0
votes
1 answer

DAML Sand box error: Error: Registry key 'Software\JavaSoft\Java Runtime Environment'\CurrentVersion' has value '1.8', but '1.7' is required

Getting below error when I start sandbox. I think we need use jdk8 as per the DAML doc. daml sandbox --scenario Main:setup .daml/dist/quickstart-0.0.1.dar Error: Registry key 'Software\JavaSoft\Java Runtime Environment'\CurrentVersion' has value…
0
votes
1 answer

DAML LookupByKey and FetchByKey require different permission to run

I have a contract with multiple signatories. Is there an example on how to do LookupBykey the contract? I am having trouble working out how to get all parties' authorization for LookupBykey to work. Also is there anyone can explain to me that why…
Frankie
  • 113
  • 5
0
votes
1 answer

I want to write a code for reverse of the DVP settlement (it should happen automatically after certain amount of time) in DAML

I want to write a code for reverse of the DVP settlement (it should happen automatically after certain amount of time) in DAML. Is there any similar program available in daml document or can anyone help me with the code?
0
votes
1 answer

What's the `da` tool referenced all over the ex-models samples?

I have been following the daml documentation and managed to get the SDK 0.13.14 installed according to the documentation tutorials. However, when I check out the ex-models samples they all refer to a da tool, for example: da compile or da run damlc…
SkyWalker
  • 13,729
  • 18
  • 91
  • 187
0
votes
2 answers

daml repl like GHCI equivalent

haskell ghci repl is a fantastic way to quickly lookup types and kinds via :t and :k and provides fast feedback loop for hole driven development. Does DAML have this available via CLI (not VS code tooltip popup). If not, is it on the roadmap to…
reversebind
  • 1,216
  • 1
  • 14
  • 18
0
votes
2 answers

Acess variables in DAML template like in an object

Okay am new to DAML and have extensive Java programming experience. Now, I have a question. In Java, 'Class A' has 'Class B', and like this, A can use 'state' of 'Class B'. I want to do something like this in DAML too. If I think template as a…
Siva
  • 598
  • 3
  • 11
0
votes
1 answer

Ambiguous type variables from ==

My expectation is that the code sample below ought to compile testOptionalEq = None == None testEitherEq = Left 1 == Left 1 testOptionalShow = show None testEitherShow = show (Left 1) and yet each line results in a compilation error, either…
Neil Mitchell
  • 9,090
  • 1
  • 27
  • 85
0
votes
1 answer

DAML sdk 0.12.24 mvn compile fails after executing daml build

mvn compile can't find the autogenerated clases in the compiled dar file with version 0.12.24 I have created a smart contract with DAML where with version 0.12.20 if you executed mvn compile works and generate the clases correctly. When upgrading…
0
votes
1 answer

What does the 'signatory' keyword means in daml representation?

In a DAML contract, what does the signatory keyword do? For example, in the Iou contract, what does the line signatory issuer, owner actually mean? Does it mean both owner and issuer should be same?
0
votes
1 answer

In DAML, how to get ContractId in a choice

In DAML, can I save a contractId of B in contract A? I tried the followings but creating contract returns an update and I cannot save that update anywhere or even access to its data. template OneContract with someParty : Party someText :…
Frankie
  • 113
  • 5
0
votes
1 answer

How to run or execute DAML scenario's from command prompt / Linux terminal and is there is way to generate Transaction log created by DAML scenario?

I am able to see the execution result of DAML scenario test result over DAML SDK using visual studio code, but what I need to run the DAML scenario from Linux terminal - Do we have any CURL command, or DAML command to test DAML scenario? I have…
0
votes
1 answer

Storing and retrieving microseconds from DA.Time

I'm working with FIX Timestamp 20180605-03:10:33.0240756 that I need to parse to DA.Time to persist as part of Trade information. I also need to get the microseconds back as part of the response message (ACK/NACK). Ideally I would like to have a…
blu35ky
  • 7
  • 4
0
votes
1 answer

How to search in existing contracts? e.g. find the Account contract in existing Accounts by using accountid

What should I do to find an existing contracts? e.g. I have a template which create Account contract. Before creating the contract, I need to search the existing contracts to make sure the account id is not duplicated.
Frankie
  • 113
  • 5
1 2 3
9
10