|
1 | | -# CEM SDK |
| 1 | +# CEM Script |
2 | 2 |
|
3 | 3 | ## Project pitch |
4 | 4 |
|
5 | | -Define and reuse Cardano DApp logic via annotated CEM-machines, resulting in free implementations for: |
| 5 | +CEM Script is a framework to define Cardano DApp logic via annotated CEM-machines, |
| 6 | +resulting in free implementations for: |
6 | 7 |
|
7 | 8 | * On-chain scripts |
8 | | -* Tx building/submission/resubmission on L1/emulated testnet |
9 | | -* Tx parsing/indexing |
| 9 | +* Transaction building/submission (off-chain) |
| 10 | +* Transaction parsing/indexing |
10 | 11 | * Automatically testing invariants |
11 | 12 | * Human-readable specs |
12 | 13 |
|
13 | | -## Building |
| 14 | +## Documentation |
| 15 | + |
| 16 | +* [Getting Started Guide](https://github.com/mlabs-haskell/cem-script/blob/master/docs/getting_started.md) |
| 17 | +* [Goals and Design](https://github.com/mlabs-haskell/cem-script/blob/master/docs/goals_and_design.md) |
| 18 | +* Article about [testing dApps on Cardano with CLB](https://www.mlabs.city/blog/testing-dapps-on-cardano-with-clb-emulator) is another introduction to testing CEM Script dApps. |
14 | 19 |
|
15 | | -Building is performed with cabal. |
16 | | -Building requires `libblst` and `libsodium` installed. |
| 20 | +## Building |
17 | 21 |
|
18 | | -Arch Linux has `libblst` in AUR, nix are exemplified by IOHK, |
19 | | -and manual installation is described here: |
20 | | -https://github.com/input-output-hk/cardano-node-wiki/blob/main/docs/getting-started/install.md#installing-blst |
| 22 | +Building is performed with `cabal`inside IOG's `github:input-output-hk/devx` shell. |
| 23 | +See `.envrc` for details. |
21 | 24 |
|
22 | 25 | Make sure to `cabal update` before building. |
23 | 26 |
|
24 | | -The project uses `github:input-output-hk/devx` to make the development shell. See `.envrc` for details. |
25 | | - |
26 | 27 | ## Running tests |
27 | 28 |
|
28 | | -Tests are runned in emulated environment by default. |
29 | | - |
30 | | -Just run: `cabal test`. |
31 | | - |
32 | | -For development and fast response once could consider `ghcid`. |
33 | | - |
34 | | -## Starting local devnet |
35 | | - |
36 | | -Tests depend on localdevnet, which is runned in Docker. |
37 | | -To start it do: |
38 | | - |
39 | | -```bash |
40 | | -./prepare-devnet.sh |
41 | | -docker-compose -f docker-compose.devnet.yaml up |
42 | | -sudo chown -R $USER:$USER ./devnet/ |
43 | | -``` |
44 | | - |
45 | | -## Devnet stalling bug |
46 | | - |
47 | | -Sometimes devnet stalls, due to some bug, in that case one should restart it, |
48 | | -and wipe directory `./devnet/db`. To look for stalling one could check: |
49 | | -`CARDANO_NODE_SOCKET_PATH=./devnet/node.socket cardano-cli query tip --testnet-magic 42`. For properly working devnet slots should change |
50 | | -and sync be marked as 100%. |
51 | | - |
52 | | -On this bug: |
53 | | -https://forum.cardano.org/t/restarting-custom-private-networks-cardano-node-forge35/116921 |
54 | | - |
55 | | -## Project status |
| 29 | +Tests are runned in emulated environment using |
| 30 | +[CLB](https://github.com/mlabs-haskell/clb). |
56 | 31 |
|
57 | | -Project is in early development stage and is funded by |
58 | | -[Catalyst proposal](https://projectcatalyst.io/funds/10/f10-development-and-infrastructure/mlabs-cemscript-sdk-get-your-dapp-implementation-from-annotated-on-chain-logic-state-machine). |
59 | | -Detailed milestones of proposal and their status [are available](https://milestones.projectcatalyst.io/projects/1000118) as well. |
| 32 | +Just run: `cabal run cem-script-test`. |
0 commit comments