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
import qualified Data.List as L | |
import System.IO | |
------------ ------------ ------------ | |
-- Day 1 | |
------------ ------------ ------------ | |
input1_test = [199, 200, 208, 210, 200, 207, 240, 269, 260, 263] | |
measurements :: [Integer] -> Integer |
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
When | |
[Case | |
(Deposit | |
(Role "Seller") | |
(Role "Buyer") | |
(Token "" "") | |
(ConstantParam "Price") | |
) | |
Close ] | |
(SlotParam "Buyer's deposit timeout") |
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
Pay | |
(Role "Son") | |
(Party (Role "Dady")) | |
(Token "" "") | |
(Constant 15) | |
Close |
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
import Playground.Contract | |
import qualified Language.PlutusTx as PlutusTx | |
import qualified Language.PlutusTx.Prelude as P | |
import Ledger | |
import Ledger.Validation | |
import wallet | |
import Plutus.Contract |