Code Monkey home page Code Monkey logo

marlowe's Introduction

Marlowe

This repository contains Marlowe, a domain-specific language (DSL) for describing financial smart contracts that can be enforced by scripts deployed on a blockchain, as well as some tools for analysing and simulating the execution of contracts written in the DSL.

Version 1.3, stable branch, and master branch

The last stable version of Marlowe can be found in the branch stable. This branch currenty contains very small improvements with respect to version 1.3 and is the one in which the current version of Meadow is based (see Meadow section below). For the pure version 1.3 you can check the v1.3 tag. A full description of the 1.3 version was presented at ISoLA 2018, and the paper is available here.

The master branch contains the latest developments of Marlowe. Because of this, the Haskell semantics, the Coq formalisation, and the Meadow implementation, may be out of sync with each other in this branch, but they contain the latest functionality.

Main files

The following are some of the main files included in this repository:

  • src/Semantics.hs — contains the small-step semantics of DSL (stepBlock function), together with a simple driver (driver function).
  • src/ContractFormatter.hs — contains the implementation of a formatter for scdsl code.
  • src/SmartInputs.hs — contains code that calculates possible inputs for a given input, state, contract, and observables value.
  • src/DepositIncentive.hs — contains an example contract for incentivising saving.
  • src/CrowdFunding.hs — contains an example contract for crowd-funding limited to 4 participants.
  • src/Escrow.hs — contains an example contract for an escrow payment.

Meadow

Meadow is a browser-based demo prototype that supports graphical editing of smart-contracts (thanks to the Blockly library) and block by block simulation of their execution (translated from the semantics thanks to the Haste compiler).

Meadow is available at: https://input-output-hk.github.io/marlowe/ and a video showing Meadow in Action is here: https://youtu.be/_loz70XkHM8

The sources for Meadow are available in the meadow folder.

Build on MacOS

Requirements: Homebrew, Haskell Stack 1.6 or later.

Install Haskell Stack if you haven't already

$ brew install haskell-stack

$ brew install glpk
$ stack setup
$ stack build

marlowe's People

Contributors

nathankaiser avatar nau avatar nbundi avatar palas avatar simonjohnthompson avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.