Skip to main content

capsule

capsule is a small tool with a simple but noble goal; to make deployment of CosmWasm contracts easier.

Firstly we are targeting Terra as the Sponsor User chain as we build out the capsule tool. Eventually we aim to make capsule one of the tools of choice for deploying CosmWasm contracts on all chains!

Installation

Install from pypi

pip install -i https://test.pypi.org/simple/ capsule

We have published the package also under capsule_terra. This is temporary until a final package namespace is chosen.

pip install -i https://test.pypi.org/simple/ capsule_terra
pip install -i https://test.pypi.org/simple/ capsule_terra

Install locally

Git clone the project and change into its parent directory.

git clone
cd 

Install the project using setup tools.

python setup.py install

Access the tool using the command line.

capsule -h

Note: If you have an issue with the above an the command line tool, depending on your platform you will need to prepare a standard distribution and install that. To do so here is two commands together:

python setup.py sdist && pip install dist/capsule-0.0.0.tar.gz

Available Commands and Usage

Deploy - Deploy a given cosm wasm contract artifact to a chain of your choice

capsule deploy -h
usage: 
    $ capsule deploy -p ./my_contract.wasm -c columbus-5
    $ capsule deploy --path ./artifacts/my_contract.wasm --chain tequila-0004
    $ capsule deploy --path ./artifacts/my_contract.wasm --initmsg {'count':3}

Helper tool which enables you to programatically deploy a Wasm contract artifact to a chain as a code object and instantiate it

Configuration

The capsule tool offers the ability to store details you need in a configuration file using the toml format.

The config file by default is located in a capsule specific hidden directory at the home dir level: ~/.capsule It is possible also to specify the path to a custom config file using the CAPSULE_CONFIG_FILE environment variable.

Something to be explored is also enabling both the Mnemonic and the chain to deploy too as env vars also. If this was to happen the order of priority would then become Credentials in the environment -> Config file in the environment -> Default or specified config file. Following this pattern in theory should make this tool very easy to use in CI/CD as a given user can just specify the Mnemonic and chain ID for as secrets in the job for a quick start.

CI/CD

This project uses Github Actions to perform automatic testing on each push and PR as well as a deployment to both test and prod pypi.

Some notes: When deploying to pypi, a version number can only be deployed once! All subsequent deployments will get a 400 and the job will fail.

As a procedure we should update the version number when a new deployed build is needed. Or have its patch versions done automatically.

Lastly the production build which pushes to Pypi only works with a tagged commit.

Metadata

Release files for capsule-terra 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for capsule-terra 0.0.2
File Size Uploaded Provenance Actions
capsule_terra-0.0.2.tar.gz 9.5 kB Without provenance Details for capsule_terra-0.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for capsule-terra 0.0.2
File Interpreter ABI Platform Actions
capsule_terra-0.0.2-py3-none-any.whl Python 3 none any Details for capsule_terra-0.0.2-py3-none-any.whl

Total release size: 20.7 kB

Release files / capsule_terra-0.0.2.tar.gz

Download URL capsule_terra-0.0.2.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d2459758fad9b6b18979a8559914116c00984b4531f711dfa01025485262997d
BLAKE2b-256 checksum
How to use checksums
39bbb78a9bab5719fccb1172ab8e3b92c48fa6827f2fbdeb738987c0a4a7c73b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

Release files / capsule_terra-0.0.2-py3-none-any.whl

Download URL capsule_terra-0.0.2-py3-none-any.whl
Size 11.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e49fa6e6c7ab1ba5817d2a538c3875f50790a2fa610c9bede7457e3ab15db408
BLAKE2b-256 checksum
How to use checksums
28b9c4af8f4cd37b32ddfc1c9ec2d965d0155b33fd978f4579d923f497baf9eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

Security for capsule-terra 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page