Marlowe
Get started with Marlowe
Marlowe is a domain-specific language (DSL) that enables users to create blockchain applications that are specifically designed for financial contracts.
If you want to learn Marlowe from the ground up, start with Marlowe Tutorial, or jump right into the Marlowe Playground:
On the Cardano Forum, you can dicuss Marlowe or if you prefer Telegram, there is a special Marlowe Telegram Group.
The Marlowe platform
When compared to a Turing-complete language, the Marlowe DSL provides significantly greater security, certainty, guarantees of termination, and behavior correctness.
The design guarantees the following:
- Contracts are finite. No recursion or loops.
- Contracts will terminate. Timeout on all actions.
- Contracts have a defined lifetime.
- No assets retained on close.
- Conservation of value.
Marlowe Playground
The Marlowe Playground is a plug-and-play smart contract builder and simulator that is simple to use, visual, and modular. Build, simulate, and analyze Marlowe contracts in this 4-minute tour of the Marlowe Playground.
Resources for Developing and Deploying Marlowe Contracts
How do I run my Marlowe contract on the Cardano blockchain?
- Design your contract using Marlowe Playground.
- Press the
Send to Simulator
button and then pressDownload as JSON
to download your contract in JSON format. - If you want to run your contract at the command line using
marlowe-cli
, installmarlowe-cli
and follow the instructions Running Contracts with Marlowe CLI. A video lecture playlist Marlowe CLI provides an overview of themarlowe-cli
tool. - If you want to run your contract in a Jupyter notebook, then use git to clone github.com/input-output-hk/marlowe-cardano, run
nix develop --command jupyter-lab
from themarlowe-cli/
folder, open the notebook Marlowe CLI Lecture 4, and follow the instructions. A video lecture Running a Marlowe Contract with Marlowe CLI demonstrates running a contract from within a Jupyter notebook. - If you want to run your contract from the command-line using the Marlowe Runtime backend, then follow the tutorial for Marlowe Runtime. A video Marlowe Runtime Tutorial demonstrates its use.
- If you want to run your contract using Marlowe Lambda, follow the example for using Marlowe Lambda from the command line or study the example web application for Marlowe Lambda. Videos Marlowe Lambda at the Command Line and Marlowe Lambda in the Browser demonstrate the use of Marlowe Lambda.
Why can't I run my Marlowe contract on mainnet
?
- Marlowe's audit is not complete, so it is not advisable to run Marlowe contracts on
mainnet
. - However, a pull request enable Marlowe on
mainnet
modifies Marlowe tools for running onmainnet
.
GitHub repositories
- Marlowe language and semantics
- Marlowe Improvement Proposals (MIPs)
- Marlowe on Cardano
- Marlowe Playground
- PureScript implementation of Marlowe
- ACTUS in Marlowe
- AWS Lambda service for Marlowe Runtime
Developer Discussions
- Marlowe on Cardano Forum
- #marlowe on Cardano StackExchange
- #ask-marlowe on Discord
- IOG_Marlowe on Telegram
- Discussion of improvements to Marlowe
- Discussion of changes to Marlowe's implementation on Cardano
Specifications
Testing and debugging
Tools
- Marlowe CLI: a command-line interface for running Marlowe contracts on the Cardano blockchain.
- Marlowe Runtime: an application back-end for running Marlowe contracts on the Cardano blockchain.
- Marlowe Lambda: an AWS Lambda client for Marlowe Runtime.
Examples
- Index of example Marlowe contracts and their on-chain execution
- Marlowe Cookbook
- Marlowe Runtime Tutorial
- Marlowe Runtime examples
- Haskell examples of Marlowe contracts
- ACTUS contracts in Marlowe
Videos
- Marlowe Pioneers 1st Cohort
- Using the Marlowe Runtime backend to execute a Marlowe contract on Cardano's preview network
- Marlowe Lambda at the Command Line
- Marlowe Lambda in the Browser
- A Geo-Located Smart Contract Using Cardano Beam and Marlowe
Presentations
- Blockchain Essentials
- Domain-specific languages
- Financial contracts
- Onto blockchain
- Escrow onto blockchain
- Marlowe in full
Further Tutorials
- A first contract
- Elaborating the contract
- Choices and observations
- Writing Marlowe contracts in JavaScript
- Using Haskell in the playground
- Using JavaScript in the playground
- Building Marlowe directly in the playground
- Building contracts in Blockly
- Simulation in the playground
- Oracles in the playground
- Analysis in the playground
- ACTUS labs