Skip to content

Instantly share code, notes, and snippets.

@da-blog
Created August 1, 2023 16:24
Show Gist options
  • Save da-blog/1ebed6976ac4625db901f619ff2b8b2a to your computer and use it in GitHub Desktop.
Save da-blog/1ebed6976ac4625db901f619ff2b8b2a to your computer and use it in GitHub Desktop.
data Status = NotStarted | Started | Reviewed deriving (Eq, Show)
template Task
with
lead : Party
manager : Party
developer : Party
status : Status
where
signatory lead
observer manager,developer
controller developer can
Start_Task : ContractId Task
do
create this with status = Started
controller manager can
Mark_Reviewed : ContractId Task
do
create this with status = Reviewed
controller lead can
Mark_Completed : ()
do
pure () -- Archive/close the contract when completed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment