Skip to content

An in-development "robocoin" system for the Tezos blockchain

Notifications You must be signed in to change notification settings

Cryptinterested/checker

 
 

Repository files navigation

Build Status Docs

Checker

Checker is an in-development "robocoin" system for the Tezos blockchain, and is a project supported by Nomadic Labs, Tweag, and TZ Connect.

The code here is currently unverified and unaudited, and is made publicly available only for exploration and discussion purposes. You should not use it for anything serious.

  • Original technical (currently out-of-date) document can be found here.
  • The source code lives in the src folder.
  • The tests live in the tests folder.

Documentation

Various ad-hoc documentation can be found in the docs folder.

The full docs are taking shape under docs/spec: use make spec to build them if you're in a Nix shell or have sphinx installed). These docs are published at checker.readthedocs.io.

Development

Currently the team uses Nix to provide all dependencies, including OCaml packages and appropriate (perhaps even patched) versions of Ligo and other necessary tools, so this is the recommended method. For the curious, the dependencies are listed in shell.nix.

For development, you'll also need the ctez submodule. To fetch all submodules, run:

$ git submodule update --init

Within a nix-shell (the first time this might take a while, since it must fetch all dependencies), type

  • make build-ocaml to build and compile the ocaml code (in ./src).
  • make generate-ligo to generate the ligo code (in ./generated/ligo).
  • make build-ligo to generate the michelson code (in ./generated/michelson).
  • make build to do all of the above.
  • make test to run all the (OCaml) tests (./src/tests.ml). Note that this takes several minutes.
  • make fast-test to run the fast (OCaml) tests
  • make to do all the above.

For test coverage report using bisect_ppx, type

  • make test-coverage (report in ./_coverage/index.html), or
  • make test-coverage.json (report of per-file summary in ./test-coverage.json).

For extracting (haddock-style) documentation from the code using dune, type

  • make docs (docs entrypoint: ./_build/default/_doc/_html/index.html)

For running the end-to-end tests, type:

$ CHECKER_DIR=$(nix-build -A michelson --arg e2eTestsHack true --no-out-link) python e2e/main.py

Local Deployment

The contract can be deployed to a local, Docker sandbox run using the provided client library. Note that this workflow has only been tested on Linux.

First, enter a nix shell:

$ nix-shell

Generate the LIGO and Michelson code:

$ make build-ligo

Ensure that the submodules (ctez in particular) are up-to-date:

$ git pull --recurse-submodules

Use the client to start the sandbox and deploy the required ctez and mock oracle contracts:

$ checker sandbox start
$ checker deploy mock-oracle
$ checker deploy ctez

Note: If no port is specified, the client will attempt to select a default one. To view the port number for use with tezos-client, etc. you can use: checker show-config.

And finally, deploy checker itself:

$ checker deploy checker

About

An in-development "robocoin" system for the Tezos blockchain

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • OCaml 82.8%
  • Python 9.5%
  • Standard ML 5.0%
  • Nix 1.2%
  • Ruby 0.9%
  • Shell 0.4%
  • Makefile 0.2%