This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings #-} | |
module Escrow where | |
import Language.Marlowe | |
main :: IO () | |
main = print . pretty $ contract | |
{- What does the vanilla contract look like? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings #-} | |
module Example where | |
import Language.Marlowe | |
main :: IO () | |
main = print . pretty $ contract | |
{- Define a contract, Close is the simplest contract which just ends the contract straight away |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings #-} | |
module Example where | |
import Language.Marlowe | |
main :: IO () | |
main = print . pretty $ contract | |
{- Define a contract, Close is the simplest contract which just ends the contract straight away |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings #-} | |
module Escrow where | |
import Language.Marlowe.Extended | |
main :: IO () | |
main = print . pretty $ contract | |
-- We can set explicitRefunds True to run Close refund analysis | |
-- but we get a shorter contract if we set it to False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE NumericUnderscores #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
module ZeroCouponBond where | |
import Language.Marlowe.Extended | |
main :: IO () | |
main = print . pretty $ contract | |
discountedPrice, notional :: Value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings #-} | |
module Escrow where | |
import Language.Marlowe.Extended | |
main :: IO () | |
main = print . pretty $ contract | |
-- We can set explicitRefunds True to run Close refund analysis | |
-- but we get a shorter contract if we set it to False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings #-} | |
module Escrow where | |
import Language.Marlowe.Extended | |
main :: IO () | |
main = print . pretty $ contract | |
-- We can set explicitRefunds True to run Close refund analysis | |
-- but we get a shorter contract if we set it to False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"valueParameterDescriptions":[["Price","Amount to be paid by the \"Buyer\" for the item."]],"slotParameterDescriptions":[["Buyer's deposit timeout","Deadline by which the \"Buyer\" must deposit the selling \"Price\" in the contract."],["Buyer's dispute timeout","Deadline by which, if the \"Buyer\" has not opened a dispute, the \"Seller\" will be paid."],["Seller's response timeout","Deadline by which, if the \"Seller\" has not responded to the dispute, the \"Buyer\" will be refunded."],["Timeout for arbitrage","Deadline by which, if the \"Arbiter\" has not resolved the dispute, the \"Buyer\" will be refunded."]],"roleDescriptions":[["Arbiter","The party that will choose who gets the money in the event of a disagreement between the \"Buyer\" and the \"Seller\" about the outcome."],["Buyer","The party that wants to buy the item. Payment is made to the seller if they acknowledge receiving the item. "],["Seller","The party that wants to sell the item. They receive the payment if the exchange is uneventful."]]," |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"valueParameterDescriptions":[["Collateral amount","The amount to be deposited by both parties at the start of the contract to serve as an incentive for collaboration."],["Price","The amount to be paid by the \"Buyer\" as part of the exchange."]],"slotParameterDescriptions":[["Collateral deposit by seller timeout","The deadline by which the \"Seller\" must deposit the \"Collateral amount\" in the contract."],["Deposit of collateral by buyer timeout","The deadline by which the \"Buyer\" must deposit the \"Collateral amount\" in the contract."],["Deposit of price by buyer timeout","The deadline by which the \"Buyer\" must deposit the \"Price\" in the contract."],["Dispute by buyer timeout","The deadline by which, if the \"Buyer\" has not opened a dispute, the \"Seller\" will be paid."],["Seller's response timeout","The deadline by which, if the \"Seller\" has not responded to the dispute, the \"Buyer\" will be refunded."]],"roleDescriptions":[["Buyer","The party that pays for the item on sale."],["Seller","The |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"valueParameterDescriptions":[["Discounted price","The price of the Zero Coupon Bond at the start date."],["Notional","The full price of the Zero Coupon Bond."]],"slotParameterDescriptions":[["Initial exchange deadline","The \"Investor\" must deposit the discounted price of the bond before this deadline or the offer will expire."],["Maturity exchange deadline","The \"Issuer\" must deposit the full price of the bond before this deadline or it will default."]],"roleDescriptions":[["Investor","The party that buys the bond at a discounted price, i.e. makes the loan."],["Issuer","The party that issues the bond, i.e. receives the loan."]],"contractType":"ZC","contractName":"Zero Coupon Bond","contractDescription":"A simple loan. The investor pays the issuer the discounted price at the start, and is repaid the full (notional) price at the end.","choiceDescriptions":[]} |
OlderNewer