Skip to content

Instantly share code, notes, and snippets.

@ayo-dan
Created June 6, 2023 00:01
Show Gist options
  • Save ayo-dan/b0f212385e1258d635943635a645d097 to your computer and use it in GitHub Desktop.
Save ayo-dan/b0f212385e1258d635943635a645d097 to your computer and use it in GitHub Desktop.
Purchase FT with ADA with Max ADA Amount
{"valueParameterInfo":[],"timeParameterDescriptions":[],"roleDescriptions":[],"contractType":"Other","contractShortDescription":"Unknown","contractName":"Unknown","contractLongDescription":"We couldn't find information about this contract","choiceInfo":[]}
When
[Case
(Deposit
(Role "Buyer")
(Role "Buyer")
(Token "" "")
(Cond
(ValueLE
(ConstantParam "ADA Deposit Amount")
(ConstantParam "Max ADA Deposit Amount")
)
(ConstantParam "ADA Deposit Amount")
(ConstantParam "Max ADA Deposit Amount")
)
)
(When
[Case
(Deposit
(Role "Buyer")
(Role "Seller")
(Token "8499f3958a114d03b6289185138a60378951a2b5491cb2a080ff7b6e" "PMX")
(MulValue
(ConstantParam "ADA Deposit Amount")
(ConstantParam "PMX's Value in ADA")
)
)
(Pay
(Role "Buyer")
(Account (Role "Seller"))
(Token "" "")
(ConstantParam "ADA Deposit Amount")
Close
)]
(TimeParam "PMX Deposit Timeout")
Close
)]
(TimeParam "ADA Deposit Timeout")
Close
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment