Skip to content

Instantly share code, notes, and snippets.

@ariady-putra
Created July 13, 2022 19:40
Show Gist options
  • Save ariady-putra/912d3412a08bc2b53ddf47840d63b89c to your computer and use it in GitHub Desktop.
Save ariady-putra/912d3412a08bc2b53ddf47840d63b89c to your computer and use it in GitHub Desktop.
IfThenElse Project
{"valueParameterInfo":[],"slotParameterDescriptions":[],"roleDescriptions":[],"contractType":"Other","contractShortDescription":"","contractName":"","contractLongDescription":"","choiceInfo":[]}
Let
"price"
(ConstantParam "inputPrice")
(Let
"offer"
(ConstantParam "inputOffer")
(If
(ValueGE
(ConstantParam "inputOffer")
(ConstantParam "inputPrice")
)
(When
[Case
(Deposit
(Role "escrow")
(Role "buyer")
(Token "" "")
(ConstantParam "inputOffer")
)
(Pay
(Role "escrow")
(Account (Role "seller"))
(Token "" "")
(ConstantParam "inputOffer")
Close
)]
50 Close
)
Close
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment