Chinstrap
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
Milestone 2
Milestone 3
TODO
References
Credits