Skip to content

Instantly share code, notes, and snippets.

@7robbie5
Created June 4, 2021 21:28
Show Gist options
  • Save 7robbie5/5f54a23ddad7125f8fd5809886875647 to your computer and use it in GitHub Desktop.
Save 7robbie5/5f54a23ddad7125f8fd5809886875647 to your computer and use it in GitHub Desktop.
HBT to ADA
When
[Case
(Deposit
(Role "HBT provider")
(Role "HBT provider")
(Token "708238" "HBT")
(MulValue
(Constant 1000000)
(ConstantParam "Amount of HBT")
)
)
(When
[Case
(Deposit
(Role "ADA provider")
(Role "ADA provider")
(Token "" "")
(ConstantParam "Amount of ADA")
)
(Pay
(Role "HBT provider")
(Party (Role "ADA provider"))
(Token "708238" "HBT")
(MulValue
(Constant 1000000)
(ConstantParam "Amount of HBT")
)
(Pay
(Role "ADA provider")
(Party (Role "HBT provider"))
(Token "" "")
(ConstantParam "Amount of ADA")
Close
)
)]
(SlotParam "Timeout for ADA deposit")
Close
)]
(SlotParam "Timeout for HBT deposit")
Close
{"valueParameterDescriptions":[],"slotParameterDescriptions":[],"roleDescriptions":[],"contractType":"O","contractName":"","contractDescription":"","choiceDescriptions":[]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment