Morley Framework

The Morley framework is a collection of projects that build upon and complement each other. Most notably:

  1. Morley

  2. Lorentz

  3. Indigo

  4. Cleveland

Morley

Morley is a Haskell-based framework for meta-programming Michelson smart contracts.

It consists of:

  • The Morley language: a superset of the Michelson language, with a simpler syntax and some simple features.

    Contracts are written in .mtz files.

  • A library with the core Tezos and Michelson data types, as well as tools for typechecking,

    interpreting, parsing and printing Michelson and Morley contracts.

  • An executable with commands for compiling and working with Morley and Michelson contracts,

    along with a REPL for interactively running instructions.

It's the founding library of Lorentz, Indigo, Cleveland as well as related tools and utilities.

Morley Resources

Lorentz

Lorentz is a stack-based embedded Domain Specific Language (eDSL) in Haskell that compiles to Michelson.

Some of its noteworthy features are:

  • An expressive type system, including product/sum types and parametric polymorphism.

  • Powerful type inference.

  • Type-safe mechanisms for writing smart contracts with an upgradeable storage and contract migrations.

  • The ability to easily share and reuse components of a contract as Haskell packages.

  • The ability to automatically generate documentation for your smart contract in Markdown format,

    and to keep it up-to-date with the contract's code as it evolves.

Lorentz Resources

Indigo

Indigo eDSL is a high-level language for developing Michelson contracts.

Like Lorentz, it makes full use of Haskell's type system to ensure safety, expressiveness and reusability.

It is meant first and foremost to free you from the burden of manual stack management required by languages like Michelson and Lorentz, and supports common features of imperative languages, such as mutable variables and while loops.

Indigo Resources

Cleveland

Cleveland is a Haskell library for testing Michelson contracts.

Cleveland makes it trivial to load a contract from disk, originate it, transfer XTZ, check its storage/balance, call its entrypoints, check whether it failed with a given error, etc.

Cleveland tests can be run:

  • on an actual blockchain;

  • or via Morley's in-memory interpreter for a faster feedback loop.

It supports example-based testing (via the tasty testing framework) and property-based testing (via hedgehog).

Cleveland Resources