This repository contains lessons for testing Marlowe Oracles support through submitting IChoice
.
Here's a reference PR for Marlowe-Wolfram Oracle integration: input-output-hk/marlowe-cardano#608
-
Setup: two alternatives
- Use demeter.run extension for Marlowe Runtime: using demeter.run's Marlowe Runtime extension (video) (2:32)
- Select the "Marlowe Tutorial" starter kit.
- Be sure to turn on the "Cardano Nodes" and "Cardano Marlowe Runtime" extensions.
- Check that those match the network you are using for the starter kit.
- Deploy Marlowe Runtime locally with docker and launching Marlowe Runtime using Docker (video) (9:48).
- Use demeter.run extension for Marlowe Runtime: using demeter.run's Marlowe Runtime extension (video) (2:32)
You can ask questions about Marlowe in the #ask-marlowe channel on the IOG Discord or post problems with this lesson to the issues list for the Marlowe Starter Kit github repository.
This repository is meant to be used with demeter.run to execute Marlowe contracts using Marlowe Runtime, or with another similar cloud deployment of Marlowe Runtime.
- Using demeter.run's Marlowe Runtime extension (video) (2:42) to access Marlowe Runtime.
- Select the "Marlowe Tutorial" starter kit.
- Be sure to turn on the "Cardano Nodes" and "Cardano Marlowe Runtime" extensions.
- Check that those match the network you are using for the starter kit.
Alternatively, one can deploy Marlowe Runtime locally with docker.
- Launching Marlowe Runtime using Docker (video) (9:48) to set up Marlowe Runtime.
If you are unfamiliar with the Marlowe smart-contract language or with the Cardano blockchain, you may want to familiarize yourself with the following information:
Three alternative workflows are available for running Marlowe contracts:
- Marlowe CLI (
marlowe-cli
) for lightweight experiments with Marlowe transactions. - Marlowe Runtime CLI (
marlowe-runtime-cli
) for non-web applications that use the Marlowe Runtime backend services. - Marlowe Runtime Web (
marlowe-web-server
) for web applications that use Marlowe Runtime backend services.
Marlowe Runtime provides a variety of transaction-building, UTxO management, querying, and submission services for using Marlowe contracts: this makes it easy to run Marlowe contracts without attending to the details of the Cardano ledger and Plutus smart contracts. On the contrary, Marlowe CLI does not support querying and UTxO management, so it is best suited for experienced Cardano developers.
Marlowe Runtime consists of several backend services and work together with a web server. See the Marlowe documentation for more information on Marlowe Runtime.
If one plans to run a Marlowe contract on the Cardano mainnet
, then one should check its safety before creating it, so that there is no chance of losing funds.
Here are the steps for checking the safety of a Marlowe contract:
- Understand the Marlowe Language.
- Understand Cardano's Extended UTxO Model.
- Read and understand the Marlowe Best Practices Guide.
- Read and understand the Marlowe Security Guide.
- Use Marlowe Playground to flag warnings, perform static analysis, and simulate the contract.
- Use Marlowe CLI's
marlowe-cli run analyze
tool to study whether the contract can run on a Cardano network. - Run all execution paths of the contract on a Cardano testnet.
When using Marlowe tools within demeter.run, nothing needs to be installed.
If you are not using demeter.run and have the Nix package manager installed with Nix flakes support enabled, you can launch a Jupyter notebook server, open a development environment, or build the tools. Be sure to set yourself as a trusted user in the nix.conf
; otherwise, build times will be very long.