Skip to main content

Superset

toncli

License PyPI version Codacy Badge TON

The Open Network cross-platform smart contract command line interface.

Easy to deploy and interact with TON smart contracts.

🔧 Installation

Toncli support Windows / macOS (m1 / intel) / Linux / Docker, installation guide can be found: INSTALLATION.md

📚 Usage and docs

New to toncli?

Try: Quick start guide

All other documentation lists in docs/

Lessons

🇬🇧 Ton FunC lessons Eng

🇷🇺 Ton FunC lessons Rus

Contributor Guide

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

We are trying to process all tasks through issues. You can take own one 🥳

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 / ownnet ✅
Project interact after deploy: easily send messages, run getmethods, run fift parsers on getmethods output ✅
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 addrs ✅
Docs for contract creation for beginners ✅
Project tests with runvmcode ✅
Windows & Linux support ✅
Unit tests engine ✅
Add more project samples with advanced usage ✅

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 .

If you wish to update toncli locally you can use pip install -e path/to/toncli/rootfolder/ command anytime after you make changes to the toncli source code.

Version migration

0.24

Please, use toncli update_libs

0.22

The easy migration method - remove fift-libs, func-libs from ~/.config/toncli or delete whole directory ~/.config/toncli

Help and questions

Feel free to ask questions and help in official telegram chats: Russian / English

Metadata

Release files for toncli 0.0.43

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

Source distribution (sdist)

Source distribution for toncli 0.0.43
File Size Uploaded
toncli-0.0.43.tar.gz 40.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for toncli 0.0.43
File Interpreter ABI Platform
toncli-0.0.43-py3-none-any.whl Python 3 none any Details

Total release size: 324.1 kB

Release files / toncli-0.0.43.tar.gz

Download URL toncli-0.0.43.tar.gz
Size 40.6 kB
Tags Source
SHA-256 checksum
How to use checksums
060efb1ef3ded77c13324f6ff51b24e3869a5c8e30068c1a4a0163857c9a08c3
BLAKE2b-256 checksum
How to use checksums
dfd2bb013958a113c84385d9b75da6328753be5715019d711e53dd8e1ed9257f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.7

Release files / toncli-0.0.43-py3-none-any.whl

Download URL toncli-0.0.43-py3-none-any.whl
Size 283.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
46d33c8553a95c3705ff77ef505cda38ee0b30a71c5453c2c7704f004f62f36b
BLAKE2b-256 checksum
How to use checksums
d42491d41a7f2addbad4037ba73d241e9f2653d491eb545f8b430025db90bce8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.7

Release history Release notifications | RSS feed

This release

0.0.43 This release

2 release files

0.0.38

2 release files

0.0.37

2 release files

0.0.35

2 release files

0.0.34

2 release files

0.0.33

2 release files

0.0.32

2 release files

0.0.31

2 release files

0.0.29

2 release files

0.0.28

2 release files

0.0.27

2 release files

0.0.26

2 release files

0.0.25

2 release files

0.0.24

2 release files

0.0.23

2 release files

0.0.22

2 release files

0.0.21

2 release files

0.0.20

2 release files

0.0.19

2 release files

0.0.18

2 release files

0.0.5

2 release files

0.0.4

2 release files

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