├── .gitignore ├── code ├── src │ ├── lecture04 │ │ ├── homework04.hs │ │ ├── multi-pay.hs │ │ ├── double-pay-refactored.hs │ │ └── double-pay.hs │ ├── lecture03 │ │ ├── simple-payment-close.hs │ │ ├── simple-payment-pay.hs │ │ ├── choice-if.hs │ │ └── choice-if-let.hs │ └── lecture05 │ │ └── homework │ │ ├── chooser_option.hs │ │ └── cliquet_option.hs ├── hie.yaml ├── marlowe-pioneer-program.cabal ├── cabal.project └── LICENSE ├── README.md └── homework └── lecture07.md /.gitignore: -------------------------------------------------------------------------------- 1 | blank.kdenlive 2 | concat.sh 3 | concat.txt 4 | sting-begin.mp4 5 | sting-end.mp4 6 | code/dist-newstyle/ 7 | *.mp4 8 | -------------------------------------------------------------------------------- /code/src/lecture04/homework04.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE OverloadedStrings #-} 2 | 3 | import Language.Marlowe.Extended 4 | 5 | main :: IO () 6 | main = printJSON $ contract "Bank" "Client" 5 50 (TimeParam "Bank Deadline") (TimeParam "Deposits Deadline") 7 | 8 | contract :: Party -> Party -> Int -> Int -> Timeout -> Timeout -> Contract 9 | contract bank client count amount bankDeadline clientDeadline = Close 10 | -------------------------------------------------------------------------------- /code/src/lecture03/simple-payment-close.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE OverloadedStrings #-} 2 | 3 | import Language.Marlowe.Extended 4 | 5 | main :: IO () 6 | main = printJSON $ contract 7 | 8 | 9 | {- Define a contract, Close is the simplest contract which just ends the contract straight away 10 | -} 11 | 12 | contract :: Contract 13 | contract = 14 | When 15 | [Case 16 | (Deposit 17 | (Role "Receiver") 18 | (Role "Giver") 19 | (Token "" "") 20 | (Constant 100000000) 21 | ) 22 | Close ] 23 | (TimeParam "Deadline") 24 | Close 25 | -------------------------------------------------------------------------------- /code/hie.yaml: -------------------------------------------------------------------------------- 1 | cradle: 2 | cabal: 3 | - path: "./src/lecture03/choice-if.hs" 4 | component: "exe:choice-if" 5 | - path: "./src/lecture03/choice-if-let.hs" 6 | component: "exe:choice-if-let" 7 | - path: "./src/lecture03/double-pay.hs" 8 | component: "exe:double-pay" 9 | - path: "./src/lecture03/double-pay-refactored.hs" 10 | component: "exe:double-pay-refactored" 11 | - path: "./src/lecture03/multi-pay.hs" 12 | component: "exe:multi-pay" 13 | - path: "./src/lecture03/simple-payment-close.hs" 14 | component: "exe:simple-payment-close" 15 | - path: "./src/lecture03/simple-payment-pay.hs" 16 | component: "exe:simple-payment-pay" 17 | -------------------------------------------------------------------------------- /code/src/lecture03/simple-payment-pay.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE OverloadedStrings #-} 2 | 3 | import Language.Marlowe.Extended 4 | 5 | main :: IO () 6 | main = printJSON $ contract 7 | 8 | 9 | {- Define a contract, Close is the simplest contract which just ends the contract straight away 10 | -} 11 | 12 | contract :: Contract 13 | contract = 14 | When 15 | [Case 16 | (Deposit 17 | (Role "Giver") 18 | (Role "Giver") 19 | (Token "" "") 20 | (Constant 100000000) 21 | ) 22 | (Pay 23 | (Role "Giver") 24 | (Party (Role "Receiver")) 25 | (Token "" "") 26 | (AvailableMoney 27 | (Role "Giver") 28 | (Token "" "") 29 | ) 30 | Close 31 | )] 32 | (TimeParam "Deadline") 33 | Close 34 | -------------------------------------------------------------------------------- /code/src/lecture04/multi-pay.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE OverloadedStrings #-} 2 | 3 | import Language.Marlowe.Extended 4 | 5 | main :: IO () 6 | main = printJSON $ contract ["Giver1", "Giver2", "Giver3", "Giver4", "Giver5"] "Receiver" (ConstantParam "Deposit") (TimeParam "Deadline") 7 | 8 | contract :: [Party] -> Party -> Value -> Timeout -> Contract 9 | contract givers receiver amount deadline = go givers 10 | where 11 | go :: [Party] -> Contract 12 | go ps = case picks' of 13 | [] -> payments givers 14 | _ : _ -> When [Case (deposit q) $ go qs | (q, qs) <- picks'] deadline Close 15 | where 16 | picks' :: [(Party, [Party])] 17 | picks' = picks ps 18 | 19 | deposit :: Party -> Action 20 | deposit p = Deposit p p ada amount 21 | 22 | payments :: [Party] -> Contract 23 | payments [] = Close 24 | payments (q : qs) = Pay q (Party receiver) ada amount $ payments qs 25 | 26 | picks :: [a] -> [(a, [a])] 27 | picks [] = [] 28 | picks (x : xs) = (x, xs) : [(y, x : ys) | (y, ys) <- picks xs] 29 | -------------------------------------------------------------------------------- /code/src/lecture04/double-pay-refactored.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE OverloadedStrings #-} 2 | 3 | import Language.Marlowe.Extended 4 | 5 | main :: IO () 6 | main = printJSON $ contract "Giver1" "Giver2" "Receiver" (ConstantParam "Deposit") (TimeParam "Deadline") 7 | 8 | contract :: Party -> Party -> Party -> Value -> Timeout -> Contract 9 | contract giver1 giver2 receiver amount deadline = When 10 | [deposits giver1 giver2, deposits giver2 giver1] 11 | deadline 12 | Close 13 | where 14 | pay :: Contract 15 | pay = Pay 16 | giver1 17 | (Party receiver) 18 | ada 19 | amount 20 | (Pay 21 | giver2 22 | (Party receiver) 23 | ada 24 | amount 25 | Close 26 | ) 27 | 28 | deposit :: Party -> Action 29 | deposit p = Deposit p p ada amount 30 | 31 | deposits :: Party -> Party -> Case 32 | deposits p1 p2 = Case 33 | (deposit p1) 34 | (When 35 | [Case (deposit p2) pay] 36 | deadline 37 | Close 38 | ) 39 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Marlowe Pioneer Program 2 | 3 | ## Code examples 4 | 5 | - [`simple-payment-pay`](code/src/lecture03/simple-payment-pay.hs): Simple payment using `Pay`. 6 | - [`simple-payment-close`](code/src/lecture03/simple-payment-close.hs): Simple payment using `Close`. 7 | - [`choice-if`](code/src/lecture03/choice-if.hs): Using `Choice` and `If`. 8 | - [`choice-if-let`](code/src/lecture03/choice-if-let.hs): Using `Choice`, `If` and `Let`. 9 | - [`double-pay`](code/src/lecture04/double-pay.hs): Sample solution for homework from Lecture 3. 10 | - [`double-pay-refactored`](code/src/lecture04/double-pay-refactored.hs): Refactored sample solution for homework from Lecture 3. 11 | - [`multi-pay`](code/src/lecture04/multi-pay.hs): Payments by an arbitrary number of "givers". 12 | 13 | ## Building, running and working with the code examples 14 | 15 | - Change directory to the `code` folder: `cd code`. 16 | - To build all examples, do `cabal build`. This will take a while the first time you do it! 17 | - To run an individual example, use `cabal run`. For example: `cabal run simple-payment-pay`. 18 | - To interact with an individual example in the Repl, use `cabal repl`. For example: `cabal repl exe:simple-payment-pay`. 19 | 20 | ## Homework 21 | 22 | - [Lecture 4](code/src/lecture04/homework04.hs) 23 | - [Lecture 7](homework/lecture07.md) 24 | -------------------------------------------------------------------------------- /code/src/lecture05/homework/chooser_option.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE OverloadedStrings #-} 2 | 3 | import Language.Marlowe.Extended 4 | import Marlowe.Contracts.Options 5 | 6 | -- |Chooser option to buy or sell 1000 Ada for 500 DjedUSD with expiry 2022-06-30 17:30 7 | main :: IO () 8 | main = print $ pretty $ 9 | chooserOption 10 | (Role "Buyer") 11 | (Role "Seller") 12 | Nothing 13 | (Token "f4cf384ddd1b1377b08302b17990e9618b62924f5705458c17ee4f7d" "DjedUSD") 14 | ada 15 | (Constant 500) 16 | (Constant 1000) 17 | (POSIXTime 1656610200) -- 2022-06-30 17:30:00.000000 UTC 18 | (POSIXTime 1656612000) -- 2022-06-30 18:00:00.000000 UTC 19 | 20 | -- |A /Chooser Option/ allows the holder of the option to decide prior to the expiration 21 | -- if the option is a call or put. Strike and expiration date are the same in either case. 22 | chooserOption :: 23 | Party -- ^ Buyer 24 | -> Party -- ^ Seller 25 | -> Maybe ChoiceId -- ^ Price feed for the underlying 26 | -> Token -- ^ Currency 27 | -> Token -- ^ Underlying 28 | -> Value -- ^ Strike price (in currency) 29 | -> Value -- ^ Amount of underlying tokens per contract 30 | -> Timeout -- ^ Maturity 31 | -> Timeout -- ^ Settlement date 32 | -> Contract -- ^ Chooser Option Contract 33 | chooserOption buyer seller priceFeed currency underlying strike ratio maturity settlement = 34 | undefined -- TODO 35 | -------------------------------------------------------------------------------- /code/src/lecture05/homework/cliquet_option.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NumericUnderscores #-} 2 | {-# LANGUAGE OverloadedStrings #-} 3 | 4 | import Language.Marlowe.Extended 5 | import Marlowe.Contracts.Options 6 | 7 | -- |Cliquet option 8 | main :: IO () 9 | main = print $ pretty $ 10 | cliquetOption 11 | Call 12 | (Role "Buyer") 13 | (Role "Seller") 14 | Nothing 15 | (Token "f4cf384ddd1b1377b08302b17990e9618b62924f5705458c17ee4f7d" "DjedUSD") 16 | ada 17 | (Constant 1000) 18 | [ (POSIXTime 1656610200) -- 2022-06-30 17:30:00.000000 UTC 19 | , (POSIXTime 1659288600) -- 2022-07-31 17:30:00.000000 UTC 20 | , (POSIXTime 1661967000) -- 2022-08-31 17:30:00.000000 UTC 21 | ] 22 | (POSIXTime 600) -- 10 minutes 23 | 24 | -- |A /Cliquet Option/ consists of a series of consecutive options. The options are executed in sequence, the strike price 25 | -- of the next option is always the current price of the underlying. The option type can be either Call or Put. 26 | cliquetOption :: 27 | OptionType -- ^ Type of Option 28 | -> Party -- ^ Buyer 29 | -> Party -- ^ Seller 30 | -> Maybe ChoiceId -- ^ Price feed for the underlying 31 | -> Token -- ^ Currency 32 | -> Token -- ^ Underlying 33 | -> Value -- ^ Ratio 34 | -> [Timeout] -- ^ Maturities 35 | -> Timeout -- ^ Settlement delay 36 | -> Contract -- ^ Cliquet Option Contract 37 | cliquetOption optionType buyer seller priceFeed currency underlying ratio expiries delay = 38 | undefined 39 | -------------------------------------------------------------------------------- /code/src/lecture03/choice-if.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE OverloadedStrings #-} 2 | 3 | import Language.Marlowe.Extended 4 | 5 | main :: IO () 6 | main = printJSON $ contract 7 | 8 | 9 | {- Define a contract, Close is the simplest contract which just ends the contract straight away 10 | -} 11 | 12 | contract :: Contract 13 | contract = 14 | When 15 | [Case 16 | (Deposit 17 | (Role "Giver") 18 | (Role "Giver") 19 | (Token "" "") 20 | (ConstantParam "Amount") 21 | ) 22 | (When 23 | [Case 24 | (Choice 25 | (ChoiceId 26 | "Choice" 27 | (Role "Chooser") 28 | ) 29 | [Bound 1 2] 30 | ) 31 | (If 32 | (ValueEQ 33 | (ChoiceValue 34 | (ChoiceId 35 | "Choice" 36 | (Role "Chooser") 37 | )) 38 | (Constant 1) 39 | ) 40 | (Pay 41 | (Role "Giver") 42 | (Account (Role "Receiver1")) 43 | (Token "" "") 44 | (ConstantParam "Amount") 45 | Close 46 | ) 47 | (Pay 48 | (Role "Giver") 49 | (Account (Role "Receiver2")) 50 | (Token "" "") 51 | (ConstantParam "Amount") 52 | Close 53 | ) 54 | )] 55 | (TimeParam "ChoiceDeadline") 56 | Close 57 | )] 58 | (TimeParam "DepositDeadline") 59 | Close 60 | -------------------------------------------------------------------------------- /code/src/lecture03/choice-if-let.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE OverloadedStrings #-} 2 | 3 | import Language.Marlowe.Extended 4 | 5 | main :: IO () 6 | main = printJSON $ contract 7 | 8 | 9 | {- Define a contract, Close is the simplest contract which just ends the contract straight away 10 | -} 11 | 12 | contract :: Contract 13 | contract = 14 | Let 15 | "amount" 16 | (ConstantParam "Amount") 17 | (When 18 | [Case 19 | (Deposit 20 | (Role "Giver") 21 | (Role "Giver") 22 | (Token "" "") 23 | (UseValue "amount") 24 | ) 25 | (When 26 | [Case 27 | (Choice 28 | (ChoiceId 29 | "Choice" 30 | (Role "Chooser") 31 | ) 32 | [Bound 1 2] 33 | ) 34 | (If 35 | (ValueEQ 36 | (ChoiceValue 37 | (ChoiceId 38 | "Choice" 39 | (Role "Chooser") 40 | )) 41 | (Constant 1) 42 | ) 43 | (Pay 44 | (Role "Giver") 45 | (Account (Role "Receiver1")) 46 | (Token "" "") 47 | (UseValue "amount") 48 | Close 49 | ) 50 | (Pay 51 | (Role "Giver") 52 | (Account (Role "Receiver2")) 53 | (Token "" "") 54 | (UseValue "amount") 55 | Close 56 | ) 57 | )] 58 | (TimeParam "ChoiceDeadline") 59 | Close 60 | )] 61 | (TimeParam "DepositDeadline") 62 | Close 63 | ) 64 | -------------------------------------------------------------------------------- /code/src/lecture04/double-pay.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE OverloadedStrings #-} 2 | 3 | import Language.Marlowe.Extended 4 | 5 | main :: IO () 6 | main = printJSON $ contract 7 | 8 | 9 | {- Define a contract, Close is the simplest contract which just ends the contract straight away 10 | -} 11 | 12 | contract :: Contract 13 | contract = 14 | When 15 | [Case 16 | (Deposit 17 | (Role "Giver1") 18 | (Role "Giver1") 19 | (Token "" "") 20 | (ConstantParam "Deposit") 21 | ) 22 | (When 23 | [Case 24 | (Deposit 25 | (Role "Giver2") 26 | (Role "Giver2") 27 | (Token "" "") 28 | (ConstantParam "Deposit") 29 | ) 30 | (Pay 31 | (Role "Giver1") 32 | (Party (Role "Receiver")) 33 | (Token "" "") 34 | (ConstantParam "Deposit") 35 | (Pay 36 | (Role "Giver2") 37 | (Party (Role "Receiver")) 38 | (Token "" "") 39 | (ConstantParam "Deposit") 40 | Close 41 | ) 42 | )] 43 | (TimeParam "Deadline") 44 | Close 45 | ), Case 46 | (Deposit 47 | (Role "Giver2") 48 | (Role "Giver2") 49 | (Token "" "") 50 | (ConstantParam "Deposit") 51 | ) 52 | (When 53 | [Case 54 | (Deposit 55 | (Role "Giver1") 56 | (Role "Giver1") 57 | (Token "" "") 58 | (ConstantParam "Deposit") 59 | ) 60 | (Pay 61 | (Role "Giver1") 62 | (Party (Role "Receiver")) 63 | (Token "" "") 64 | (ConstantParam "Deposit") 65 | (Pay 66 | (Role "Giver2") 67 | (Party (Role "Receiver")) 68 | (Token "" "") 69 | (ConstantParam "Deposit") 70 | Close 71 | ) 72 | )] 73 | (TimeParam "Deadline") 74 | Close 75 | )] 76 | (TimeParam "Deadline") 77 | Close 78 | -------------------------------------------------------------------------------- /homework/lecture07.md: -------------------------------------------------------------------------------- 1 | # Optional Exercises for Marlowe CLI (Lecture 7) 2 | 3 | 4 | ## Running Marlowe Contracts without Blockchain Transactions 5 | 6 | 👉 [Transcript of lecture](https://github.com/input-output-hk/marlowe-cardano/blob/mpp-cli-lectures/marlowe-cli/lectures/03-marlowe-cli-abstract.ipynb) 7 | 8 | 1. Simulate the escrow contract in Marlowe Playground and compare its simulation output to that of `marlowe-cli`. 9 | 2. Alter the inputs (either the deposit, a choice, or the `--invalid-before`/`--invalid-hereafter` settings) in the above simulation of the escrow contract so that Marlowe rejects the input as being invalid. 10 | 3. Repeat the above simulation of the escrow contract, but have the seller choose to confirm the problem instead of disputing it. 11 | 4. Repeat the above simulation of the escrow contract, but have one of the steps time out because no input is provided before the deadline. 12 | 5. Run a similar simulation using a different contract from `marlowe-cli template --help`, Marlowe Playground, or . 13 | 14 | 15 | ## Running Marlowe Contracts on the Blockchain 16 | 17 | 👉 [Transcript of lecture](https://github.com/input-output-hk/marlowe-cardano/blob/mpp-cli-lectures/marlowe-cli/lectures/04-marlowe-cli-concrete.ipynb) 18 | 19 | 1. Alter the one or more of the command flags in `marlowe-cli run execute` in the above execution of the escrow contract so that the blockchain rejects the transaction because it fails validation by the Marlowe script. For example, omit including the required role token, sign with the wrong key, submit the transaction outside of the range between `--invalid-before` and `--invalid-hereafter`, or provide insufficient funds. 20 | 2. Repeat the above execution of the escrow contract, but have the seller choose to confirm the problem instead of disputing it. 21 | 3. Run a similar execution using a different contract from `marlowe-cli template --help`, Marlowe Playground, or . 22 | 4. Draw a eUTxO diagram for a contract you have run with `marlowe-cli`, Marlowe Run, or Marlowe Playground. 23 | 24 | 25 | ## Running Marlowe Contracts with the Marlowe Backend 26 | 27 | 👉 [Transcript of lecture](https://github.com/input-output-hk/marlowe-cardano/blob/mpp-cli-lectures/marlowe-cli/lectures/05-marlowe-cli-pab.ipynb) 28 | 29 | 1. Repeat the Marlowe backend tutorial . 30 | 2. Run the Marlowe backend tests . 31 | -------------------------------------------------------------------------------- /code/marlowe-pioneer-program.cabal: -------------------------------------------------------------------------------- 1 | Cabal-Version: 2.4 2 | Name: marlowe-pioneer-program 3 | Version: 0.1.0.0 4 | Author: Lars Bruenjes 5 | Maintainer: brunjlar@gmail.com 6 | Build-Type: Simple 7 | Copyright: © 2022 Lars Bruenjes 8 | License: Apache-2.0 9 | License-files: LICENSE 10 | 11 | executable choice-if 12 | default-language: Haskell2010 13 | hs-source-dirs: src/lecture03 14 | main-is: choice-if.hs 15 | ghc-options: -Wall 16 | 17 | build-depends: 18 | , base ^>=4.14.3.0 19 | , marlowe 20 | 21 | executable choice-if-let 22 | default-language: Haskell2010 23 | hs-source-dirs: src/lecture03 24 | main-is: choice-if-let.hs 25 | ghc-options: -Wall 26 | 27 | build-depends: 28 | , base ^>=4.14.3.0 29 | , marlowe 30 | 31 | executable double-pay 32 | default-language: Haskell2010 33 | hs-source-dirs: src/lecture04 34 | main-is: double-pay.hs 35 | ghc-options: -Wall 36 | 37 | build-depends: 38 | , base ^>=4.14.3.0 39 | , marlowe 40 | 41 | executable double-pay-refactored 42 | default-language: Haskell2010 43 | hs-source-dirs: src/lecture04 44 | main-is: double-pay-refactored.hs 45 | ghc-options: -Wall 46 | 47 | build-depends: 48 | , base ^>=4.14.3.0 49 | , marlowe 50 | 51 | executable homework04 52 | default-language: Haskell2010 53 | hs-source-dirs: src/lecture04 54 | main-is: homework04.hs 55 | ghc-options: -Wall 56 | 57 | build-depends: 58 | , base ^>=4.14.3.0 59 | , marlowe 60 | 61 | executable multi-pay 62 | default-language: Haskell2010 63 | hs-source-dirs: src/lecture04 64 | main-is: multi-pay.hs 65 | ghc-options: -Wall 66 | 67 | build-depends: 68 | , base ^>=4.14.3.0 69 | , marlowe 70 | 71 | executable simple-payment-pay 72 | default-language: Haskell2010 73 | hs-source-dirs: src/lecture03 74 | main-is: simple-payment-pay.hs 75 | ghc-options: -Wall 76 | 77 | build-depends: 78 | , base ^>=4.14.3.0 79 | , marlowe 80 | 81 | executable simple-payment-close 82 | default-language: Haskell2010 83 | hs-source-dirs: src/lecture03 84 | main-is: simple-payment-close.hs 85 | ghc-options: -Wall 86 | 87 | build-depends: 88 | , base ^>=4.14.3.0 89 | , marlowe 90 | 91 | executable chooser-option 92 | default-language: Haskell2010 93 | hs-source-dirs: src/lecture05/homework 94 | main-is: chooser_option.hs 95 | ghc-options: -Wall 96 | 97 | build-depends: 98 | , base ^>=4.14.3.0 99 | , marlowe 100 | , marlowe-contracts 101 | 102 | executable cliquet-option 103 | default-language: Haskell2010 104 | hs-source-dirs: src/lecture05/homework 105 | main-is: cliquet_option.hs 106 | ghc-options: -Wall 107 | 108 | build-depends: 109 | , base ^>=4.14.3.0 110 | , marlowe 111 | , marlowe-contracts 112 | -------------------------------------------------------------------------------- /code/cabal.project: -------------------------------------------------------------------------------- 1 | -- Bump this if you need newer packages 2 | index-state: 2022-02-22T20:47:03Z 3 | 4 | packages: marlowe-pioneer-program.cabal 5 | 6 | -- We never, ever, want this. 7 | write-ghc-environment-files: never 8 | 9 | -- Always build tests and benchmarks. 10 | tests: true 11 | benchmarks: true 12 | 13 | constraints: 14 | -- Because later versions of hedgehog introduce a change which break 'cardano-ledger': 15 | -- Test/Cardano/Chain/Delegation/Model.hs:91:41: error: 16 | -- * Could not deduce (TraversableB SignalSDELEG) 17 | -- TODO: Try to remove on next `cardano-node` version upgrade. 18 | hedgehog >= 1.0.2 && < 1.1 19 | 20 | 21 | -- The only sensible test display option. 22 | test-show-details: streaming 23 | 24 | allow-newer: 25 | size-based:template-haskell 26 | 27 | -- NEVER do that because it breaks inlining and all plutus 28 | -- scripts gona fail with cryptic errors: 29 | -- 30 | -- package marlowe 31 | -- optimization: False 32 | -- package marlowe-cli 33 | -- optimization: False 34 | 35 | package cardano-crypto-praos 36 | flags: -external-libsodium-vrf 37 | 38 | -- Copied from plutus-apps. 39 | package cardano-ledger-alonzo 40 | optimization: False 41 | package ouroboros-consensus-shelley 42 | optimization: False 43 | package ouroboros-consensus-cardano 44 | optimization: False 45 | package cardano-api 46 | optimization: False 47 | package cardano-wallet 48 | optimization: False 49 | package cardano-wallet-core 50 | optimization: False 51 | package cardano-wallet-cli 52 | optimization: False 53 | package cardano-wallet-launcher 54 | optimization: False 55 | package cardano-wallet-core-integration 56 | optimization: False 57 | 58 | source-repository-package 59 | type: git 60 | location: https://github.com/input-output-hk/marlowe-cardano 61 | tag: 8d1e3f6daacf9fbd3ad4c46ef9b6745954c6843a 62 | subdir: 63 | marlowe 64 | marlowe-contracts 65 | 66 | -- A lot of marlowe dependencies have to be syncronized with the dependencies of 67 | -- plutus-apps. If you update plutus-apps, please make sure that all dependencies 68 | -- of plutus-apps are also updated 69 | source-repository-package 70 | type: git 71 | location: https://github.com/input-output-hk/plutus-apps 72 | tag: 3c70df0616195285945992554469da4c74dc2aa2 73 | subdir: 74 | freer-extras 75 | playground-common 76 | plutus-chain-index 77 | plutus-chain-index-core 78 | plutus-contract 79 | plutus-contract-certification 80 | plutus-ledger 81 | plutus-ledger-constraints 82 | plutus-pab 83 | plutus-pab-executables 84 | plutus-playground-server 85 | plutus-use-cases 86 | quickcheck-dynamic 87 | web-ghc 88 | 89 | -- Copied from plutus-apps. 90 | -- Are you thinking of updating this tag to some other commit? 91 | -- Please ensure that the commit you are about to use is the latest one from 92 | -- the *develop* branch of this repo: 93 | -- * 94 | -- (not master!) 95 | -- 96 | -- In particular we rely on the code from this PR: 97 | -- * 98 | -- being merged. 99 | source-repository-package 100 | type: git 101 | location: https://github.com/input-output-hk/iohk-monitoring-framework 102 | tag: 46f994e216a1f8b36fe4669b47b2a7011b0e153c 103 | subdir: 104 | contra-tracer 105 | iohk-monitoring 106 | tracer-transformers 107 | plugins/backend-ekg 108 | plugins/backend-aggregation 109 | plugins/backend-monitoring 110 | plugins/backend-trace-forwarder 111 | plugins/backend-graylog 112 | plugins/backend-editor 113 | plugins/scribe-systemd 114 | plugins/backend-trace-acceptor 115 | 116 | -- | Copied from follow plutus-apps 117 | source-repository-package 118 | type: git 119 | location: https://github.com/input-output-hk/ekg-forward 120 | tag: 297cd9db5074339a2fb2e5ae7d0780debb670c63 121 | 122 | -- A lot of marlowe dependencies have to be syncronized with the dependencies of 123 | -- plutus. If you update plutus, please make sure that all dependencies of plutus 124 | -- are also updated. 125 | source-repository-package 126 | type: git 127 | location: https://github.com/input-output-hk/plutus 128 | tag: 4127e9cd6e889824d724c30eae55033cb50cbf3e 129 | subdir: 130 | plutus-core 131 | plutus-ledger-api 132 | plutus-tx 133 | plutus-tx-plugin 134 | prettyprinter-configurable 135 | stubs/plutus-ghc-stub 136 | word-array 137 | 138 | -- Copied from plutus-apps. 139 | source-repository-package 140 | type: git 141 | location: https://github.com/Quid2/flat 142 | tag: ee59880f47ab835dbd73bea0847dab7869fc20d8 143 | 144 | -- Upgrading this breaks purescript bridges. 145 | source-repository-package 146 | type: git 147 | location: https://github.com/input-output-hk/servant-purescript 148 | tag: 002e172173ad2f2f69f98a3b56b7312364f23afe 149 | 150 | -- Copied from plutus-apps. 151 | source-repository-package 152 | type: git 153 | location: https://github.com/input-output-hk/purescript-bridge 154 | tag: 47a1f11825a0f9445e0f98792f79172efef66c00 155 | 156 | -- Copied from plutus-apps. 157 | source-repository-package 158 | type: git 159 | location: https://github.com/input-output-hk/cardano-wallet 160 | tag: f6d4db733c4e47ee11683c343b440552f59beff7 161 | subdir: 162 | lib/cli 163 | lib/core 164 | lib/core-integration 165 | lib/dbvar 166 | lib/launcher 167 | lib/numeric 168 | lib/shelley 169 | lib/strict-non-empty-containers 170 | lib/test-utils 171 | lib/text-class 172 | 173 | -- A lot of marlowe dependencies have to be synchronized with the dependencies of 174 | -- cardano-node. If you update cardano-node, please make sure that all dependencies 175 | -- of cardano-node are also updated. 176 | source-repository-package 177 | type: git 178 | location: https://github.com/input-output-hk/cardano-node 179 | tag: 73f9a746362695dc2cb63ba757fbcabb81733d23 180 | subdir: 181 | cardano-api 182 | cardano-cli 183 | cardano-git-rev 184 | cardano-node 185 | cardano-submit-api 186 | cardano-testnet 187 | trace-dispatcher 188 | trace-forward 189 | trace-resources 190 | 191 | -- Copied from plutus-apps. 192 | source-repository-package 193 | type: git 194 | location: https://github.com/input-output-hk/cardano-config 195 | tag: e9de7a2cf70796f6ff26eac9f9540184ded0e4e6 196 | 197 | -- Copied from plutus-apps. 198 | source-repository-package 199 | type: git 200 | location: https://github.com/input-output-hk/optparse-applicative 201 | tag: 7497a29cb998721a9068d5725d49461f2bba0e7a 202 | 203 | -- Copied from plutus-apps. 204 | source-repository-package 205 | type: git 206 | location: https://github.com/input-output-hk/hedgehog-extras 207 | tag: edf6945007177a638fbeb8802397f3a6f4e47c14 208 | 209 | 210 | -- Copied from plutus-apps. 211 | source-repository-package 212 | type: git 213 | location: https://github.com/input-output-hk/cardano-ledger 214 | tag: 1a9ec4ae9e0b09d54e49b2a40c4ead37edadcce5 215 | subdir: 216 | eras/alonzo/impl 217 | eras/byron/chain/executable-spec 218 | eras/byron/crypto 219 | eras/byron/crypto/test 220 | eras/byron/ledger/executable-spec 221 | eras/byron/ledger/impl 222 | eras/byron/ledger/impl/test 223 | eras/shelley/impl 224 | eras/shelley/test-suite 225 | eras/shelley-ma/impl 226 | libs/cardano-data 227 | libs/cardano-ledger-core 228 | libs/cardano-ledger-pretty 229 | libs/cardano-protocol-tpraos 230 | libs/compact-map 231 | libs/non-integral 232 | libs/set-algebra 233 | libs/small-steps 234 | libs/small-steps-test 235 | 236 | -- Copied from plutus-apps. 237 | source-repository-package 238 | type: git 239 | location: https://github.com/input-output-hk/ouroboros-network 240 | tag: 4fac197b6f0d2ff60dc3486c593b68dc00969fbf 241 | subdir: 242 | io-classes 243 | io-sim 244 | monoidal-synchronisation 245 | network-mux 246 | ntp-client 247 | ouroboros-consensus 248 | ouroboros-consensus-byron 249 | ouroboros-consensus-cardano 250 | ouroboros-consensus-protocol 251 | ouroboros-consensus-shelley 252 | ouroboros-network 253 | ouroboros-network-framework 254 | ouroboros-network-testing 255 | strict-stm 256 | typed-protocols 257 | typed-protocols-cborg 258 | typed-protocols-examples 259 | 260 | -- Copied from plutus-apps. 261 | source-repository-package 262 | type: git 263 | location: https://github.com/input-output-hk/cardano-base 264 | tag: 41545ba3ac6b3095966316a99883d678b5ab8da8 265 | subdir: 266 | base-deriving-via 267 | binary 268 | binary/test 269 | cardano-crypto-class 270 | cardano-crypto-praos 271 | measures 272 | orphans-deriving-via 273 | slotting 274 | strict-containers 275 | 276 | -- Copied from plutus-core. 277 | source-repository-package 278 | type: git 279 | location: https://github.com/input-output-hk/cardano-prelude 280 | tag: bb4ed71ba8e587f672d06edf9d2e376f4b055555 281 | subdir: 282 | cardano-prelude 283 | cardano-prelude-test 284 | 285 | -- Copied from plutus-apps. 286 | source-repository-package 287 | type: git 288 | location: https://github.com/input-output-hk/cardano-crypto 289 | tag: f73079303f663e028288f9f4a9e08bcca39a923e 290 | 291 | -- Copied from plutus-apps. 292 | source-repository-package 293 | type: git 294 | location: https://github.com/input-output-hk/cardano-addresses 295 | tag: 71006f9eb956b0004022e80aadd4ad50d837b621 296 | subdir: 297 | command-line 298 | core 299 | 300 | -- Copied from plutus-apps 301 | source-repository-package 302 | type: git 303 | location: https://github.com/input-output-hk/goblins 304 | tag: cde90a2b27f79187ca8310b6549331e59595e7ba 305 | 306 | -- Copied from plutus-apps 307 | source-repository-package 308 | type: git 309 | location: https://github.com/input-output-hk/Win32-network 310 | tag: 3825d3abf75f83f406c1f7161883c438dac7277d 311 | -------------------------------------------------------------------------------- /code/LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | --------------------------------------------------------------------------------