Here are four methods for running Marlowe on the blockchain, in increasing order of difficulty:
- If you want to run your contract at the command line using
marlowe-cli
, install marlowe-cli
and follow the instructions in the tutorial for running contracts with marlowe-cli
. Here is a video lecture that provides an overview of marlowe-cli
.
- 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 the marlowe-cli/
folder, open the notebook marlowe-cli/lectures/04-marlowe-cli-concrete.ipynb, and follow the instructions. Here is a video lecture of 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. Here is a video demonstration.
- 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. Here is video of a command-line example and here is a video of a web app example.
Is there a way to convert Marlowe into plutus script? If not, how can I interact with smart contract created from Marlowe in the testnet/mainnet?
Marlowe contracts are run as datum
in the Marlowe validator, which is a Plutus script that can run any Marlowe contract. There is no need (or possibility) of converting a Marlowe contract directly to Plutus.
Also, mainnet
is disabled in the Marlowe tools, but you can alter the source code here and/or here to enable mainnet
if you want to run there. Note that Marlowe's audit is not complete, so it is not advisable to run on mainnet
.