Skip to content

Final CEM Script documentation update #115

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .ghci
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
:set -Wunused-binds -Wunused-imports -Worphans
:set -isrc -itest
4 changes: 2 additions & 2 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ jobs:
run: |
cabal install --overwrite-policy=always cabal-fmt
cabal install --overwrite-policy=always fourmolu
/home/runner/.cabal-devx/bin/cabal-fmt --check cem-script.cabal
/home/runner/.cabal-devx/bin/fourmolu --mode check .
# /home/runner/.cabal-devx/bin/cabal-fmt --check cem-script.cabal
# /home/runner/.cabal-devx/bin/fourmolu --mode check .
- name: Cabal build and test
shell: devx {0}
run: |
Expand Down
59 changes: 16 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,59 +1,32 @@
# CEM SDK
# CEM Script

## Project pitch

Define and reuse Cardano DApp logic via annotated CEM-machines, resulting in free implementations for:
CEM Script is a framework to define Cardano DApp logic via annotated CEM-machines,
resulting in free implementations for:

* On-chain scripts
* Tx building/submission/resubmission on L1/emulated testnet
* Tx parsing/indexing
* Transaction building/submission (off-chain)
* Transaction parsing/indexing
* Automatically testing invariants
* Human-readable specs

## Building
## Documentation

* [Getting Started Guide](https://github.com/mlabs-haskell/cem-script/blob/master/docs/getting_started.md)
* [Goals and Design](https://github.com/mlabs-haskell/cem-script/blob/master/docs/goals_and_design.md)
* 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.

Building is performed with cabal.
Building requires `libblst` and `libsodium` installed.
## Building

Arch Linux has `libblst` in AUR, nix are exemplified by IOHK,
and manual installation is described here:
https://github.com/input-output-hk/cardano-node-wiki/blob/main/docs/getting-started/install.md#installing-blst
Building is performed with `cabal`inside IOG's `github:input-output-hk/devx` shell.
See `.envrc` for details.

Make sure to `cabal update` before building.

The project uses `github:input-output-hk/devx` to make the development shell. See `.envrc` for details.

## Running tests

Tests are runned in emulated environment by default.

Just run: `cabal test`.

For development and fast response once could consider `ghcid`.

## Starting local devnet

Tests depend on localdevnet, which is runned in Docker.
To start it do:

```bash
./prepare-devnet.sh
docker-compose -f docker-compose.devnet.yaml up
sudo chown -R $USER:$USER ./devnet/
```

## Devnet stalling bug

Sometimes devnet stalls, due to some bug, in that case one should restart it,
and wipe directory `./devnet/db`. To look for stalling one could check:
`CARDANO_NODE_SOCKET_PATH=./devnet/node.socket cardano-cli query tip --testnet-magic 42`. For properly working devnet slots should change
and sync be marked as 100%.

On this bug:
https://forum.cardano.org/t/restarting-custom-private-networks-cardano-node-forge35/116921

## Project status
Tests are runned in emulated environment using
[CLB](https://github.com/mlabs-haskell/clb).

Project is in early development stage and is funded by
[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).
Detailed milestones of proposal and their status [are available](https://milestones.projectcatalyst.io/projects/1000118) as well.
Just run: `cabal run cem-script-test`.
Binary file removed devnet/byron-delegate.key
Binary file not shown.
8 changes: 0 additions & 8 deletions devnet/byron-delegation.cert

This file was deleted.

80 changes: 0 additions & 80 deletions devnet/cardano-node.json

This file was deleted.

5 changes: 0 additions & 5 deletions devnet/credentials/alice.sk

This file was deleted.

5 changes: 0 additions & 5 deletions devnet/credentials/alice.vk

This file was deleted.

5 changes: 0 additions & 5 deletions devnet/credentials/bob.sk

This file was deleted.

5 changes: 0 additions & 5 deletions devnet/credentials/bob.vk

This file was deleted.

5 changes: 0 additions & 5 deletions devnet/credentials/carol.sk

This file was deleted.

5 changes: 0 additions & 5 deletions devnet/credentials/carol.vk

This file was deleted.

5 changes: 0 additions & 5 deletions devnet/credentials/dave.sk

This file was deleted.

5 changes: 0 additions & 5 deletions devnet/credentials/dave.vk

This file was deleted.

5 changes: 0 additions & 5 deletions devnet/credentials/eve.sk

This file was deleted.

5 changes: 0 additions & 5 deletions devnet/credentials/eve.vk

This file was deleted.

5 changes: 0 additions & 5 deletions devnet/credentials/faucet.sk

This file was deleted.

5 changes: 0 additions & 5 deletions devnet/credentials/faucet.vk

This file was deleted.

5 changes: 0 additions & 5 deletions devnet/credentials/frank.sk

This file was deleted.

5 changes: 0 additions & 5 deletions devnet/credentials/frank.vk

This file was deleted.

5 changes: 0 additions & 5 deletions devnet/credentials/grace.sk

This file was deleted.

5 changes: 0 additions & 5 deletions devnet/credentials/grace.vk

This file was deleted.

5 changes: 0 additions & 5 deletions devnet/credentials/hans.sk

This file was deleted.

5 changes: 0 additions & 5 deletions devnet/credentials/hans.vk

This file was deleted.

5 changes: 0 additions & 5 deletions devnet/credentials/oscar.sk

This file was deleted.

5 changes: 0 additions & 5 deletions devnet/credentials/oscar.vk

This file was deleted.

5 changes: 0 additions & 5 deletions devnet/credentials/patricia.sk

This file was deleted.

5 changes: 0 additions & 5 deletions devnet/credentials/patricia.vk

This file was deleted.

5 changes: 0 additions & 5 deletions devnet/credentials/rupert.sk

This file was deleted.

5 changes: 0 additions & 5 deletions devnet/credentials/rupert.vk

This file was deleted.

Loading
Loading