Skip to main content

A swiss-army-knife for Tezos Smart Contract developers

Project description

Chinstrap

Chinstrap

Baked by ant4g0nist docs PyPI

Overview

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

Chinstrap makes Tezos developers' life easy by providing support for multiple contract compilations, tests, and originations 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 writing tests in Python and testing with pytest
  • 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.
  • Easy maintenance
  • Extendable
  • Designed focused solely to support writing contracts in Python, SmartPy
  • Tests can also be programmed in Python

Getting started

Requirements

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

Installation

$ pip3 install chinstrap

or

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

Upgrade

if you installed chinstrap with pip3

pip3 install -U chinstrap

Usage

$ chinstrap          

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


usage: main.py [-h] [--init] [--compile] [--create] [--debug] [--templates] [--develop] [--originate] [--reset] [--network NETWORK] [--test TEST] [--sandbox] [--sandbox-stop] [--sandbox-detach]
               [--sandbox-port SANDBOX_PORT] [--sandbox-protocol SANDBOX_PROTOCOL] [--accounts ACCOUNTS] [--account-balance ACCOUNT_BALANCE] [--version]

Chinstrap - a cute framework for developing Tezos Smart Contracts

optional arguments:
  -h, --help            show this help message and exit
  --init                Initialize new and empty Tezos SmartPy project
  --compile             Compile contract source files
  --create              Helper to create new contracts, origination and tests
  --debug               Interactively debug contracts.
  --templates           Download from templates provided SmartPy
  --develop             Open a console with a local development blockchain
  --originate           Run originations to deploy contracts
  --reset               Run originations to deploy contracts
  --network NETWORK     Show addresses for deployed contracts on each network
  --test TEST           Run [smartpy] or [pytest] tests.
  --sandbox             Start a Tezos local sandbox
  --sandbox-stop        Tezos local sandbox's RPC Port
  --sandbox-detach      Start a Tezos local sandbox and detach
  --sandbox-port SANDBOX_PORT
                        Tezos local sandbox's RPC Port
  --sandbox-protocol SANDBOX_PROTOCOL
                        Tezos local sandbox's RPC Port
  --accounts ACCOUNTS   Number of accounts to bootstrap on Tezos local sandbox
  --account-balance ACCOUNT_BALANCE
                        Amount of Tezos to deposit while bootstraping on Tezos local sandbox
  --version             Show version number and exit

Quickstart

To compile the smart contracts:

$ chinstrap --compile

To originate (deploy) the smart contracts:

$ chinstrap --originate --network florencenet

To re-originate (reset and deploy again) the smart contracts:

$ chinstrap --originate --network florencenet --reset

To start the local Flextesa sandbox:

$ chinstrap --sandbox

To start the chinstrap repl (debug):

$ chinstrap --debug --network florencenet

To download template contracts provided Smartpy:

$ chinstrap --templates

Is Chinstrap finished?

  • Not at all. I will provide as much support as needed and we can work together and add important changes and improvements on a regular basis.
  • Pull requests are welcome

TODO

  • Improve documentation
  • Improve Sandbox support
  • Improve repl experience
  • Add tests
  • Add more test projects
  • Add a homebrew formula

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-0.0.11.tar.gz (8.2 MB view details)

Uploaded Source

Built Distribution

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

chinstrap-0.0.11-py3-none-any.whl (10.7 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: chinstrap-0.0.11.tar.gz
  • Upload date:
  • Size: 8.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.6

File hashes

Hashes for chinstrap-0.0.11.tar.gz
Algorithm Hash digest
SHA256 d0425c4bd5222df4fcb237c7ad8853d18d6f2ca00b72bd33a3769a7b43cf2fbb
MD5 a677603d59e672ed3b7aeb12505df4ba
BLAKE2b-256 2d7dfa1451e61b9ebb0577db2a17428715d951a64a35456628f42177f5396511

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chinstrap-0.0.11-py3-none-any.whl
  • Upload date:
  • Size: 10.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.6

File hashes

Hashes for chinstrap-0.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 14b74d6438dc75dbe716b78729ce715ed391008deca7222a2d0f16d1dd0ceaca
MD5 cdb1b230e345ed0dbe1f0343bf660538
BLAKE2b-256 2179cbdd0f2e70a5952aec85c5aaf9ccead08c77eae84dffd62b8fef58e397a4

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