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 |
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.Text (sha256) | |
import Daml.Script | |
import DA.Optional (isSome) | |
template SystemRoleContract | |
with | |
system : Party | |
where | |
signatory system |
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 | |
template RelationshipOffer | |
with | |
alice : Party | |
bob : Party | |
where | |
signatory alice |
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.Date | |
import DA.Time | |
data Currency = USD | EUR | CHF | HUF | |
deriving (Eq, Show) | |
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 | |
data VehicleListingStatus = FOR_SALE | SOLD | |
deriving (Eq, Show) | |
template Member | |
with | |
participant : 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
-- Copyright (c) 2021 Rethink Ledgers LLC. All rights reserved. | |
-- SPDX-License-Identifier: Apache-2.0 | |
module EF_BGY where | |
import Daml.Script as S | |
import Daml.Trigger as T | |
import DA.Date |
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
repeatAssetName : Asset -> Asset | |
repeatAssetName Asset with .. = Asset with name = name <> name, .. | |
setup : Script AssetId | |
setup = script do | |
alice <- allocatePartyWithHint "Alice" (PartyIdHint "Alice") | |
bob <- allocatePartyWithHint "Bob" (PartyIdHint "Bob") | |
let | |
issuer = alice |
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
template Asset | |
with | |
issuer : Party | |
owner : Party | |
name : Text | |
where | |
ensure name /= "" | |
signatory issuer | |
controller owner can | |
Give : AssetId |
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
setup : Script AssetId | |
setup = script do | |
alice <- allocatePartyWithHint "Alice" (PartyIdHint "Alice") | |
bob <- allocatePartyWithHint "Bob" (PartyIdHint "Bob") | |
let | |
issuer = alice | |
owner = alice | |
name = "TV" |