Skip to content

Instantly share code, notes, and snippets.

@ajuggler
Created June 10, 2022 21:18
Show Gist options
  • Save ajuggler/bb41477a963aced9c9ea0faad746fff9 to your computer and use it in GitHub Desktop.
Save ajuggler/bb41477a963aced9c9ea0faad746fff9 to your computer and use it in GitHub Desktop.
double pay (blockly)
{"valueParameterInfo":[["Deposit",{"valueParameterFormat":{"contents":[6,"ada"],"tag":"DecimalFormat"},"valueParameterDescription":"Deposit by each giver"}]],"timeParameterDescriptions":[],"roleDescriptions":[],"contractType":"Other","contractShortDescription":"Two givers pay to one recipient","contractName":"Double Pay (Blockly)","contractLongDescription":"Two givers pay to one recipient","choiceInfo":[]}
When
[Case
(Deposit
(Role "Giver1")
(Role "Giver1")
(Token "" "")
(ConstantParam "Deposit")
)
(When
[Case
(Deposit
(Role "Giver2")
(Role "Giver2")
(Token "" "")
(ConstantParam "Deposit")
)
(Pay
(Role "Giver1")
(Party (Role "Receiver"))
(Token "" "")
(AvailableMoney
(Role "Giver1")
(Token "" "")
)
(Pay
(Role "Giver2")
(Party (Role "Receiver"))
(Token "" "")
(AvailableMoney
(Role "Giver2")
(Token "" "")
)
Close
)
)]
(TimeParam "Deadline")
Close
), Case
(Deposit
(Role "Giver2")
(Role "Giver2")
(Token "" "")
(ConstantParam "Deposit")
)
(When
[Case
(Deposit
(Role "Giver1")
(Role "Giver1")
(Token "" "")
(ConstantParam "Deposit")
)
(Pay
(Role "Giver1")
(Party (Role "Receiver"))
(Token "" "")
(AvailableMoney
(Role "Giver1")
(Token "" "")
)
(Pay
(Role "Giver2")
(Party (Role "Receiver"))
(Token "" "")
(AvailableMoney
(Role "Giver2")
(Token "" "")
)
Close
)
)]
(TimeParam "Deadline")
Close
)]
(TimeParam "Deadline")
Close
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment