Skip to content

Instantly share code, notes, and snippets.

@CardanoDVPR
CardanoDVPR / Main.hs
Last active June 23, 2022 15:55
Bank or Client Pay in Haskell
{-# LANGUAGE OverloadedStrings #-}
module Example where
import Language.Marlowe.Extended
main :: IO ()
main = printJSON $ contract "Bank" "Client" 5 50 (TimeParam "BankDeadline") (TimeParam "ClientDeadlines")
{- Define a contract where the Bank makes an initial deposit and the Client makes a series of deposits of
@CardanoDVPR
CardanoDVPR / metadata.json
Last active June 15, 2022 01:09
Bank or Client Pay
{"valueParameterInfo":[],"timeParameterDescriptions":[],"roleDescriptions":[],"contractType":"Other","contractShortDescription":"Unknown","contractName":"Unknown","contractLongDescription":"We couldn't find information about this contract","choiceInfo":[]}
@CardanoDVPR
CardanoDVPR / metadata.json
Last active June 12, 2022 19:17
MPP - Homework Session 3 (2 Givers to 1 Receiver)
{"valueParameterInfo":[["Amount1",{"valueParameterFormat":{"contents":[6,"ADA"],"tag":"DecimalFormat"},"valueParameterDescription":"Deposit Amount for Giver 1"}],["Amount2",{"valueParameterFormat":{"contents":[6,"ADA"],"tag":"DecimalFormat"},"valueParameterDescription":"Deposit Amount for Giver 2"}]],"timeParameterDescriptions":[["DepositDeadline","First Deposit Deadline"],["Deposit2Deadline","Second Depost Deadline"]],"roleDescriptions":[["Giver1","Payee \"Giver 1\""],["Giver2","Payee \"Giver 2\""],["Receiver","Receiver of funds from \"Giver 1\""],["Reciever","Reveiver of funds from \"Giver 2\""]],"contractType":"Other","contractShortDescription":"Unknown","contractName":"Unknown","contractLongDescription":"We couldn't find information about this contract","choiceInfo":[]}
@CardanoDVPR
CardanoDVPR / metadata.json
Created June 7, 2022 01:17
MPP - second contract (Choose receiver to pay)
{"valueParameterInfo":[],"timeParameterDescriptions":[["Deposit_Deadline","Deadline for the Deposit"],["Choice_Deadline","Deadline for the Choice"]],"roleDescriptions":[],"contractType":"Other","contractShortDescription":"Unknown","contractName":"Unknown","contractLongDescription":"We couldn't find information about this contract","choiceInfo":[]}
@CardanoDVPR
CardanoDVPR / metadata.json
Created June 7, 2022 00:33
MPP - first contract (simple pay)
{"valueParameterInfo":[],"timeParameterDescriptions":[],"roleDescriptions":[],"contractType":"Other","contractShortDescription":"Unknown","contractName":"Unknown","contractLongDescription":"We couldn't find information about this contract","choiceInfo":[]}