Skip to content

Instantly share code, notes, and snippets.

@rudolph9
Last active October 28, 2019 19:23
Show Gist options
  • Save rudolph9/f0215453705845101342b2d9fa80b6b5 to your computer and use it in GitHub Desktop.
Save rudolph9/f0215453705845101342b2d9fa80b6b5 to your computer and use it in GitHub Desktop.
Marlowe Smart Contract
{-# LANGUAGE OverloadedStrings #-}
module Swap where
import Language.Marlowe
main :: IO ()
main = print . pretty $ contract
{- Simply swap two payments between parties -}
contract :: Contract
contract =
When aliceChoice
(When bobChoice
(If (aliceChosen `ValueEQ` bobChosen)
agreement
arbitrate))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment