Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Ticket offer
template TicketOffer
with
organizer : Party
buyer : Party
price : Decimal
where
signatory organizer
observer buyer
controller buyer can
Accept : ContractId TicketAgreement
with
cashId : ContractId Cash
do
cash <- fetch cashId
assert (cash.amount == price)
exercise cashId Transfer with
newOwner = organizer
create TicketAgreement with
organizer; owner = buyer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment