tonos-cli is a command line interface utility designed to work with TON blockchain.
Just a free contribution into Free TON ecosystem.
The image is built as command line tool (tonos-cli as entrypoint) to be able to use as alias on host system.
/data - default work (current) directory for tonos-cli. Used for share configs, keys, etc...docker run --interactive --tty --rm theanurin/tonos-cli
First, you have to create a directory on a host for configs, keys, etc... (using .tonos-cli-data inside home directory in example bellow)
mkdir "${HOME}/.tonos-cli-data"
It is pretty cool to make alias like:
alias tonos-cli='docker run --interactive --tty --rm --mount "type=bind,source=${HOME}/.tonos-cli-data,target=/data" theanurin/tonos-cli'
alias tonos-cli='docker run --interactive --tty --rm --mount "type=bind,source=${PWD}/.tonos.local,target=/data" theanurin/tonos-cli:alpine'
tonos-cli --help
tonos-cli [subcommand args]
mkdir "${HOME}/.tonos-cli-data-simpletest"
cd "${HOME}/.tonos-cli-data-simpletest"
alias tonos-cli='docker run --interactive --tty --rm --mount "type=bind,source=${HOME}/.tonos-cli-data-simpletest,target=/data" theanurin/tonos-cli'
# Generate configuration file tonos-cli.conf.json
tonos-cli config
# Download contract
wget https://raw.githubusercontent.com/tonlabs/ton-labs-contracts/776bc3d614ded58330577167313a9b4f80767f41/solidity/safemultisig/SafeMultisigWallet.abi.json
wget https://raw.githubusercontent.com/tonlabs/ton-labs-contracts/776bc3d614ded58330577167313a9b4f80767f41/solidity/safemultisig/SafeMultisigWallet.tvc
# Self check
cat ./tonos-cli.conf.json
cat ./SafeMultisigWallet.abi.json
sha1sum ./SafeMultisigWallet.abi.json # Expected: 1c33f77ca18d2cedee23f3e78596fab0ce9f1b33
sha1sum ./SafeMultisigWallet.tvc # Expected: 7c5605a0d12637309cd5f57330af76e971c76a3b
tonos-cli genphrase
tonos-cli getkeypair ./keyfile.json '<Seed phrase of previous command>'
# Self check
cat ./keyfile.json
SafeMultisigWallet contract
# Obtain account (address)
tonos-cli genaddr --setkey keyfile.json ./SafeMultisigWallet.tvc ./SafeMultisigWallet.abi.json
# Double check that account is Uninit
tonos-cli account 0:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# THERE YOU HAVE TO MAKE LITTLE DEPOSIT TO THE ACCOUNT (because deployment requires fee)
# Deploy contract (with single owner). Where yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy is "public" field from your ./keyfile.json
tonos-cli deploy --sign keyfile.json --abi ./SafeMultisigWallet.abi.json ./SafeMultisigWallet.tvc \
'{"owners":["0xyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy"],"reqConfirms":1}'
Content type
Image
Digest
sha256:843b90bc2…
Size
35.7 MB
Last updated
almost 2 years ago
docker pull theanurin/tonos-cli