Skip to content

Instantly share code, notes, and snippets.

@hunzai
Last active September 15, 2021 09:10
Show Gist options
  • Save hunzai/f2e459d23acb1e69849c5f09ea8ea57e to your computer and use it in GitHub Desktop.
Save hunzai/f2e459d23acb1e69849c5f09ea8ea57e to your computer and use it in GitHub Desktop.
transferValue
When
[Case
(Deposit
(Role "seller")
(Role "buyer")
(Token "" "")
(ConstantParam "tokenPrice")
)
(Pay
(Role "seller")
(Account (Role "goldenShoe"))
(Token "" "")
(ConstantParam "commission")
(When
[Case
(Deposit
(Role "buyer")
(Role "seller")
(Token "" "nft")
(Constant 1)
)
Close ]
20 Close
)
)]
10 Close
{"valueParameterDescriptions":[["commission","2% of token price"],["tokenPrice","ADA"]],"slotParameterDescriptions":[],"roleDescriptions":[["buyer","the one pays in ADA"],["goldenShoe","the one gets commission "],["seller","the one sells token"]],"contractType":"ES","contractName":"exchange","contractDescription":"","choiceDescriptions":[]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment