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 PartcipantRole | |
with | |
provider : Party | |
cro : Party | |
coordinator: Party | |
participant : Party | |
trialBrochure : ClinicalTrialBrochure | |
where | |
signatory provider, participant | |
key(participant, provider) : (Party, 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
template ParticipantRecord | |
with | |
provider : Party | |
cro : Party | |
coordinator: Party | |
participant : Party | |
trialBrochure : ClinicalTrialBrochure | |
symptoms : [Symptoms] | |
doses : [Doses] | |
where |
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 ClinicalTrialNetwork | |
with | |
operator : Party | |
where | |
signatory operator | |
controller operator can | |
nonconsuming InviteRegulator : ContractId RegulatorInvitation | |
with | |
regulator : 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
import Ledger, { CreateEvent, Query, Stream, StreamCloseEvent, QueryResult } from '@daml/ledger'; | |
var ledger = new Ledger({token, ledgerUrl, reconnectThreshold: 60}); | |
var activeContractSet = ledger.query(); |
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
const {loading, contract} = useStreamFetchByKey(T, () => k, ...); | |
-- becomes | |
const {loading, contracts} = useStreamFetchByKeys(T, () => [k], ...)); | |
const contract = contracts[0]; |
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
useStreamQuery(T) --> useStreamQueries(T) | |
useStreamQuery(T, () => query, ...) --> useStreamQueries(T, () => [query], ...) |
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
\party acs time commandsInFlight state -> do | |
let subscribers = getContracts @Subscriber acs | |
expr | |
-- becomes | |
\party -> do | |
time <- getTime | |
commandsInFlight <- getCommandsInFlight | |
subscribers <- query @Subscriber |
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
\acs msg state -> let subscribers = getContracts @Subscriber acs | |
in expr | |
-- becomes | |
\msg -> do | |
subscribers <- query @Subscriber | |
modify $ \state -> expr |
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
\acs -> let subscribers = getContracts @Subscriber acs | |
in expr | |
-- becomes | |
do | |
subscribers <- query @Subscriber | |
return expr |
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
codegen: | |
js: | |
output-directory: ui/daml.js | |
npm-scope: daml.js |
NewerOlder