Skip to main content

Easy to use CLI for fift / func projects

Project description

Superset

toncli

License PyPI version Codacy Badge TON

TON smart contract command line interface

State

Working!

Usage and docs

New to toncli?

Try: Quick start guide

All other documentation lists in docs/

Contributor Guide

Interested in contributing? Feel free to create issues and pull requests.

There is two main tasks and many TODOs.

Main tasks are - not to use lite-client / fift / func. All can be done with python.

There is many TODOs in code - feel free to fix them and create PRs

Features and status

Feature Status
fift / func / lite-server usage
Easy bootstrap project samples wallet
Deploy-wallet for auto send TON to contracts and tests
Compile func to build/ from func/ with files.yaml
Auto send TON to init contract address
Deploy to mainnet / testnet
Project interact after deploy: easily send messages, run getmethods
Load from hard project structure (example: src/projects/wallet)
Run remote contracts locally (get cells from chain and run locally to get error / debug / etc.)
Get contract address by toncli address
Gas auto calculation for store & deploy
Add more project samples with advanced usage
Project tests with runvmcode
Project debug
Library support
Init Message support (with signature)
Docs for contract creation for beginners
Advanced user-friendly docs on fift, func

Commands

All commands could be fined in docs/advanced/commands.md

Configuration

Config folder will create on first deploy, all fift / func libs will copy to it, also deploy wallet contract will be created

Deploy process (how it's actually work)

  1. Check network (testnet, mainnet) configuration locally (in config user folder)
    1. If no config found - download from URL in config.ini
  2. Check deploy wallet locally (in config user folder)
    1. If it's first time - simple wallet will be created in config folder
    2. Message with wallet address and tips will be displayed (user need to send some TON coin on it)
    3. If there is no TON in deploy contract - script will exit and notify user to update deployer balance
  3. Will run tests on fift/data.fif / fift/message.fif (if exist) / fift/lib.fif (if exist) before creating deploy message
    1. This will check all files are correct
    2. Also, you can run custom logic - for example create keys in build/
  4. Will calculate address of contract and display it to user
  5. Will send money from deploy wallet
  6. Will deploy your contract
    1. External message will be created
    2. Boc will generated
    3. Will invoke sendfile in lite-client (TODO: use native python lib, not lite-client)

Development

git clone git@github.com:disintar/toncli.git
cd toncli && pip install -e .

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

toncli-0.0.19.tar.gz (123.4 kB view hashes)

Uploaded Source

Built Distribution

toncli-0.0.19-py3-none-any.whl (129.4 kB view hashes)

Uploaded Python 3

Supported by

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