Skip to content

Instantly share code, notes, and snippets.

@ra0x3
Last active March 22, 2021 22:48
Show Gist options
  • Save ra0x3/c8eb80596f1a950be3277f56bc6f35ce to your computer and use it in GitHub Desktop.
Save ra0x3/c8eb80596f1a950be3277f56bc6f35ce to your computer and use it in GitHub Desktop.
ADA MakerSpace Examples 1
When
[Case
(Deposit
(Role "escrow")
(Role "buyer")
(Token "" "")
(Constant 500)
)
(When
[Case
(Choice
(ChoiceId
"jobDone"
(Role "seller")
)
[Bound 0 1]
)
(If
(ValueEQ
(ChoiceValue
(ChoiceId
"jobDone"
(Role "seller")
))
(Constant 1)
)
(When
[Case
(Choice
(ChoiceId
"jobDone"
(Role "buyer")
)
[Bound 0 1]
)
(If
(ValueEQ
(ChoiceValue
(ChoiceId
"jobDone"
(Role "buyer")
))
(ChoiceValue
(ChoiceId
"jobDone"
(Role "seller")
))
)
(When
[Case
(Choice
(ChoiceId
"jobDone"
(Role "escrow")
)
[Bound 0 1]
)
(If
(ValueEQ
(ChoiceValue
(ChoiceId
"jobDone"
(Role "escrow")
))
(ChoiceValue
(ChoiceId
"jobDone"
(Role "seller")
))
)
(Pay
(Role "escrow")
(Account (Role "seller"))
(Token "" "")
(Constant 500)
Close
)
(Pay
(Role "escrow")
(Account (Role "seller"))
(Token "" "")
(Constant 500)
Close
)
)]
50
(Pay
(Role "escrow")
(Account (Role "buyer"))
(Token "" "")
(Constant 500)
Close
)
)
Close
)]
25
(Pay
(Role "escrow")
(Account (Role "seller"))
(Token "" "")
(Constant 500)
Close
)
)
(Pay
(Role "escrow")
(Account (Role "buyer"))
(Token "" "")
(Constant 500)
Close
)
)]
15
(Pay
(Role "escrow")
(Account (Role "buyer"))
(Token "" "")
(Constant 500)
Close
)
)]
5 Close
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment