GithubHelp home page GithubHelp logo

mlabs-haskell / plutus-simple-model Goto Github PK

View Code? Open in Web Editor NEW
31.0 32.0 16.0 1.9 MB

Unit testing with resource estimation for Plutus

License: BSD 3-Clause "New" or "Revised" License

Makefile 2.10% Nix 0.73% Haskell 97.17%

plutus-simple-model's Introduction

Plutus simple model

Unit test library for Plutus with estimation of resource usage.

Library defines simple mock model of Blockchain to unit test plutus contracts and estimate usage of resources. What are the benefits for this framework comparing to other test frameworks for Plutus? It's:

  • easy to use
  • easy to think about
  • it has minimal dependency set. It depends only on plutus and cardano-ledger. Ain't no plutus-apps or cardano-node or ouroboros
  • works for both Plutus V1 and Plutus V2
  • support for Alonzo and Babbage eras
  • blazing fast
  • can estimate usage of resources with real functions used on Cardano node.
  • pure
  • good for unit testing of on-chain code
  • being fast and pure it's also suitable for property based testing

Quick start guide

See user guide to get started

How to compile the library

Library is compiled with nix, flakes and cabal. Enter developer nix shell with:

nix develop

Inside the nix shell we can run build and tests over make:

make build
make test

It calls cabal under the hood.

How to update docs

Docs are written in mdbook and reside in the docs directory. They are auto-deployed with Git actions on push to main. To run docs locally use mdbook:

cd docs
mdbook serve

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.