Skip to main content

A swiss-army-knife for Tezos Smart Contract developers

Project description

Chinstrap

Chinstrap

License: MIT Baked by ant4g0nist docs PyPI

Chinstrap is supported by Tezos Foundation Grant

Useful links

Overview

Chinstrap is a development environment, testing framework, and asset pipeline focused solely on Tezos blockchain, aiming to become Swiss-Army-Knife for Tezos Smart Contract developers.

Chinstrap makes developers' lives easier by providing support for multiple contract compilations, tests, and origination on many public and private Tezos networks.

Features

Chinstrap offers:

  • End-to-end build cycle support for Creation, Compilation, Testing, and Origination of Smart Contracts
  • Local sandbox environment to develop and test contracts
  • Support for contracts in SmartPy, JsLIGO, CameLIGO, PascaLIGO, and ReasonLIGO.
  • Support for tests in Python(SmartPy/PyTest), JsLIGO, CameLIGO, PascaLIGO, and ReasonLIGO.
  • Scriptable deployment & originations framework
  • Originations Management for deploying to many public & private networks
  • Interactive debug console to debug and directly communicate with contracts

Why?

Here are some reasons why I built Chinstrap:

  • Development framework that solely focuses on Tezos Smart Contract development
  • Easy to use and everything in place already.
  • Designed focused solely to support writing contracts in SmartPy, JsLIGO, CameLIGO, PascaLIGO and ReasonLIGO.
  • Extendable
  • Tests can also be programmed in Ligo, Python(SmartPy/PyTest) and JsLIGO, CameLIGO, PascaLIGO and ReasonLIGO.
  • Easy maintenance

Getting started

Requirements

  • Python >= 3.7
  • Docker
  • Node.js
  • Homebrew needs to be installed.
$ brew tap cuber/homebrew-libsecp256k1
$ brew install libsodium libsecp256k1 gmp

Installation

git clone https://github.com/ant4g0nist/chinstrap
cd chinstrap
python3 setup.py install

Usage

╭─ant4g0nist@d3n ~/Desktop/Tezos/chinstrap
╰─➤  chinstrap

      _     _           _
  ___| |__ (_)_ __  ___| |_ _ __ __ _ _ __
 / __| '_ \| | '_ \/ __| __| '__/ _` | '_ \
| (__| | | | | | | \__ \ |_| | | (_| | |_) |
 \___|_| |_|_|_| |_|___/\__|_|  \__,_| .__/
                                     |_|

usage: chinstrap [-h] {init,config,networks,compile,install,create,templates,test,sandbox} ...

Chinstrap - a cute framework for developing Tezos Smart Contracts

positional arguments:
  {init,config,networks,compile,install,create,templates,test,sandbox}
    init                Initialize a new Chinstrap project
    config              Verify Chinstrap configuration
    networks            List currently available test networks
    compile             Compile contract source files
    install             Helper to install compilers
    create              Helper to create new contracts, originations and tests
    templates           Download templates provided by SmartPy
    test                Run pytest/smartpy/ligo tests
    sandbox             Start a Tezos local sandbox

optional arguments:
  -h, --help            show this help message and exit

Quickstart

To compile the smart contracts:

$ chinstrap compile

For Flextesa sandbox:

╭─ant4g0nist@d3n ~/Desktop/Tezos/chinstrap
╰─➤  chinstrap sandbox -h

      _     _           _
  ___| |__ (_)_ __  ___| |_ _ __ __ _ _ __
 / __| '_ \| | '_ \/ __| __| '__/ _` | '_ \
| (__| | | | | | | \__ \ |_| | | (_| | |_) |
 \___|_| |_|_|_| |_|___/\__|_|  \__,_| .__/
                                     |_|

usage: main.py [-h]
               {init,config,networks,compile,install,create,templates,test,sandbox,develop,originate,account}
               ...

positional arguments:
  {init,config,networks,compile,install,create,templates,test,sandbox,develop,originate,account}
    init                Initialize a new Chinstrap project
    config              Verify Chinstrap configuration
    networks            List currently available test networks
    compile             Compile contract source files
    install             Helper to install compilers
    create              Helper to create new contracts, originations and tests
    templates           Download templates provided by SmartPy and *LIGO
    test                Run pytest/smartpy/ligo tests
    sandbox             Start a Tezos local sandbox
    develop             Open a console with a local Flextesa development
                        environment
    originate           Run originations and deploy contracts
    account             Tezos account

optional arguments:
  -h, --help            show this help message and exit

To download template contracts provided Smartpy or LIGO Lang:

usage: main.py templates [-h] -l
                         {JsLIGO,PascaLIGO,CameLIGO,ReasonLIGO,SmartPy}

optional arguments:
  -h, --help            show this help message and exit
  -l {JsLIGO,PascaLIGO,CameLIGO,ReasonLIGO,SmartPy}, --language {JsLIGO,PascaLIGO,CameLIGO,ReasonLIGO,SmartPy}
                        The type of the item to create

To run tests:

╭─ant4g0nist@d3n ~/Desktop/Tezos/chinstrap
╰─➤  chinstrap test

To check configuration:

╰─➤  chinstrap config

      _     _           _
  ___| |__ (_)_ __  ___| |_ _ __ __ _ _ __
 / __| '_ \| | '_ \/ __| __| '__/ _` | '_ \
| (__| | | | | | | \__ \ |_| | | (_| | |_) |
 \___|_| |_|_|_| |_|___/\__|_|  \__,_| .__/
                                     |_|

Using development network
Loaded wallet tz1cagbr5u2YdyxtWA72z3KjEL1KJ2YEs71z. Balance: 0.000000

Milestones

Milestone 1

  • Support the latest protocol updates of the Tezos protocol on Chinstrap.
  • Support and facilitate the programming of smart contracts and respective tests in Ligo.

Milestone 2

  • Improve, update, and maintain comprehensive documentation of the platform for relevant stakeholders (e.g. developers and others).
  • Improve the sandbox and REPL (Real-Eval-Print Loop) experience of the platform.
  • Release version 1.0.0 of the platform.

Milestone 3

  • Provide a Visual Studio Code plugin for origination and tests.

TODO

  • Add JsLIGO, CameLIGO, PascaLIGO, and ReasonLIGO support for contracts and tests
  • Remove dependency on migration contract
  • Update Chinstrap to latest protocols
  • Add SmartPy templates
  • Add Ligo templates
  • Update documentation to support v1.0.0
  • Create chinstrap.io landing page
  • Add repl
  • Improve Sandbox integrations in repl
  • Release version 1.0.0 of the platform.
  • Add TypeScript generation for compiled contracts
  • Add support for Jest tests
  • Visual studio code plugin
  • Add unit tests for chinstrap
  • Add a homebrew formula
  • Add fig specifications

References

Credits

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chinstrap-1.1.6.tar.gz (40.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chinstrap-1.1.6-py3-none-any.whl (46.8 kB view details)

Uploaded Python 3

File details

Details for the file chinstrap-1.1.6.tar.gz.

File metadata

  • Download URL: chinstrap-1.1.6.tar.gz
  • Upload date:
  • Size: 40.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for chinstrap-1.1.6.tar.gz
Algorithm Hash digest
SHA256 a377643c540d6d5b941ca2092106b513dff1ce02b7196385b20ff69be56fb0ea
MD5 d0d6ed21f2283edd857a8591f3e5f438
BLAKE2b-256 79bfe3df0b2091587b4dc6bff5fcea3ed4877fd192af2aac21e7a6d0db657385

See more details on using hashes here.

File details

Details for the file chinstrap-1.1.6-py3-none-any.whl.

File metadata

  • Download URL: chinstrap-1.1.6-py3-none-any.whl
  • Upload date:
  • Size: 46.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for chinstrap-1.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 469216c9372d6ef4e8f93c9937dd48e5fc8c92590a926c62b820e4fcf484b41e
MD5 c779f907ed0ba2c6d66194753b36e6c5
BLAKE2b-256 aa79857819106232049f53b526921a8a8412a4e1095965711e1a28fc21549f0e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page