Skip to content

Instantly share code, notes, and snippets.

View marco-martins's full-sized avatar

Marco Martins marco-martins

View GitHub Profile
{"valueParameterInfo":[],"timeParameterDescriptions":[],"roleDescriptions":[],"contractType":"Other","contractShortDescription":"Unknown","contractName":"Unknown","contractLongDescription":"We couldn't find information about this contract","choiceInfo":[]}
@marco-martins
marco-martins / metadata.json
Last active June 24, 2022 21:36
Bank Loan Using Compound Interest Formula
{"valueParameterInfo":[],"timeParameterDescriptions":[["Bank Deposit Deadline","Bank deposit deadline"],["Client Deposit Deadline","Client deposit deadline"]],"roleDescriptions":[],"contractType":"Other","contractShortDescription":"Unknown","contractName":"Unknown","contractLongDescription":"We couldn't find information about this contract","choiceInfo":[]}
@marco-martins
marco-martins / Main.hs
Created June 24, 2022 10:26
Bank Loan Using Compound
{-# LANGUAGE OverloadedStrings #-}
module Example where
import Language.Marlowe.Extended
-- Simulates an auto loan for a used car with compound interest. Native token represents title for the car.
-- Input loan amount. We imagine the car costs 5000 ADA
loan_amount_in_ADA = 5000 :: Double
{-# LANGUAGE OverloadedStrings #-}
module Example where
import Language.Marlowe.Extended
-- Simulates an auto loan for a used car with compound interest. Native token represents title for the car.
-- Input loan amount. We imagine the car costs 5000 ADA
loan_amount_in_ADA = 5000 :: Double
@marco-martins
marco-martins / Main.hs
Created June 17, 2022 09:35 — forked from CardanoDVPR/Main.hs
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
@marco-martins
marco-martins / metadata.json
Last active June 24, 2022 10:12
homework04-refactoring.js
{"valueParameterInfo":[["Bank Deposit Amount",{"valueParameterFormat":{"contents":[6,"ADA"],"tag":"DecimalFormat"},"valueParameterDescription":"Bank deposit in ADA"}],["Client Deposit Amount",{"valueParameterFormat":{"contents":[6,"ADA"],"tag":"DecimalFormat"},"valueParameterDescription":"Client deposit in ADA"}]],"timeParameterDescriptions":[["Bank Deposit Deadline","Bank deposit deadline"],["Client Deposit Deadline","Client deposit deadline"]],"roleDescriptions":[],"contractType":"Other","contractShortDescription":"Unknown","contractName":"Unknown","contractLongDescription":"We couldn't find information about this contract","choiceInfo":[]}
@marco-martins
marco-martins / metadata.json
Last active June 15, 2022 10:47
homework04.js
{"valueParameterInfo":[["Bank Deposit Amount",{"valueParameterFormat":{"contents":[6,"ADA"],"tag":"DecimalFormat"},"valueParameterDescription":"Bank deposit in ADA"}],["Client Deposit Amount",{"valueParameterFormat":{"contents":[6,"ADA"],"tag":"DecimalFormat"},"valueParameterDescription":"Client deposit in ADA"}]],"timeParameterDescriptions":[["Bank Deposit Deadline","Bank deposit deadline"],["Client Deposit Deadline","Client deposit deadline"]],"roleDescriptions":[],"contractType":"Other","contractShortDescription":"Unknown","contractName":"Unknown","contractLongDescription":"We couldn't find information about this contract","choiceInfo":[]}
@marco-martins
marco-martins / metadata.json
Last active June 14, 2022 15:58
choice-if-let.js
{"valueParameterInfo":[],"timeParameterDescriptions":[],"roleDescriptions":[],"contractType":"Other","contractShortDescription":"Unknown","contractName":"choice-if-let.hs","contractLongDescription":"We couldn't find information about this contract","choiceInfo":[]}
@marco-martins
marco-martins / metadata.json
Last active June 14, 2022 15:53
simple-payment-close.js
{"valueParameterInfo":[["Deposit",{"valueParameterFormat":{"contents":[6,""],"tag":"DecimalFormat"},"valueParameterDescription":""}]],"timeParameterDescriptions":[],"roleDescriptions":[["Giver1",""]],"contractType":"Other","contractShortDescription":"","contractName":"Double Pay","contractLongDescription":"We couldn't find information about this contract","choiceInfo":[]}
@marco-martins
marco-martins / metadata.json
Last active June 14, 2022 15:53
simple-payment-pay.js
{"valueParameterInfo":[["Deposit",{"valueParameterFormat":{"contents":[6,""],"tag":"DecimalFormat"},"valueParameterDescription":""}]],"timeParameterDescriptions":[],"roleDescriptions":[["Giver1",""]],"contractType":"Other","contractShortDescription":"","contractName":"Double Pay","contractLongDescription":"We couldn't find information about this contract","choiceInfo":[]}