This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Transactions: | |
TX 0 1970-01-01T00:00:00Z (Main:60:14) | |
#0:0 | |
│ consumed by: #2:2 | |
│ referenced by #2:1, #2:2 | |
│ disclosed to (since): 'Alice' (0), 'ScroogeBank' (0) | |
│ divulged to (since): 'TicketWizard' (2) | |
└─> create Main:Cash | |
with | |
issuer = 'ScroogeBank'; owner = 'Alice'; amount = 10.0000000000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alice=Alice::1220903eba6363a0f4cea27fbfdad7e13810273f90aff60257046717ed2581b9d087 | |
bob=Bob::1220903eba6363a0f4cea27fbfdad7e13810273f90aff60257046717ed2581b9d087 | |
grpcurl --plaintext \ | |
-d "{\"ledgerId\":\"sandbox\", \"filter\":{\"filtersByParty\":[{\"key\": \"${alice}\"},{\"key\": \"${bob}\"}]}}" \ | |
"localhost:6865" com.daml.ledger.api.v1.ActiveContractsService/GetActiveContracts > contracts.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main where | |
import Daml.Script | |
type AssetId = ContractId Asset | |
template Asset | |
with | |
issuer : Party | |
owner : Party | |
name : Text | |
where | |
ensure name /= "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main where | |
import Daml.Script | |
import DA.List (sortOn, head) | |
import DA.Time | |
import DA.Assert ((===)) | |
template Proposal | |
with | |
proposer : Party |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module TicketOffer where | |
template TicketOffer | |
with | |
organizer : Party | |
buyer : Party | |
price : Decimal | |
where | |
signatory organizer | |
observer buyer | |
controller buyer can |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main where | |
import DA.Assert ((===)) | |
import Daml.Script | |
template TicketOffer | |
with | |
organizer : Party | |
buyer : Party | |
price : Decimal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Token1 where | |
import Daml.Script | |
template Token | |
with | |
issuer : Party | |
owner : Party | |
amount : Int | |
createdAt : Time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE ApplicativeDo #-} | |
module Token where | |
import Daml.Script | |
template Token | |
with | |
issuer : Party | |
owner : Party | |
amount : Int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Token where | |
template Token | |
with | |
issuer : Party | |
owner : Party | |
amount : Int | |
createdAt : Time | |
where | |
signatory issuer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main where | |
import Types | |
import Utils | |
import DA.Text | |
import DA.Optional | |
import DA.Date as D | |
import DA.Time | |
import Daml.Script |
NewerOlder