Sub-commands and Arguments¶
Common arguments to all sub-commands:
-qor--quietSet verbosity level to 0--switch STRINGSet switch-vor--verboseIncrease verbosity level
Overview of sub-commands:
account copy from
Copy accounts from another switch to the current one
account create
Create new accounts in the wallet
account history
Get account info (local or from blockchain).
account info
Get account info (local or from blockchain).
account list
List all known accounts in the current switch
account remove
Delete accounts from the wallet
account rename
This command renames accounts in the wallet
account set
Modify the information associated with accounts in the wallet
account state
Get account info (local or from blockchain).
account whois
Find accounts matching a string
call
Call contracts
client
Call tonos-cli, use -- to separate arguments. Use 'ft exec -- CMD ARGS' for other commands.
config
Modify configuration
contract abi
Print contract ABI
contract abi impl
Generate an implementation source file from a contract ABI
contract abi intf
Generate an interface source file from a contract ABI
contract build
Build a contract
contract deploy
Deploy contracts
contract import
Import a contract
contract list
List known contracts
contract new
Generate a new contract source file
contract new interface
Generate a new contract interface source file
crawler
Crawl all transactions to an address and fill a psql database
debot fetch
Call tonos-cli fetch DEBOT
debot new
Create a debot
doc
Display useful documentation files (stored in ~/.ft/doc/)
doc list
List useful documentation files stored in ~/.ft/doc/
exec
Call command with substitution on arguments, use -- before the command.
init
Initialize with TON Labs binary tools, compiled from sources.
inspect
Inspect information stored on the blockchain: display information on accounts, blocks, messages and transactions.
multisig confirm transaction
Confirm transactions on a multisig-wallet
multisig confirm update
Confirm updates on a multisig-wallet
multisig create
Manage a multisig-wallet (create, confirm, send)
multisig debot
Executes the multisig debot
multisig execute update
Update a multisig wallet with setcode
multisig info
Display info on a multisig wallet
multisig list custodians
List owners/custodians of a multisig wallet
multisig list transactions
Display waiting transactions in a multisig wallet
multisig list updates
Display waiting transactions in a multisig wallet
multisig new
Create an independant multisig-wallet, similarly to 'multisig create', but not owner and perform crediting
multisig transfer
Transfer TONs from a multisig wallet to another account
multisig update
Update a multisig wallet with setcode
node give
Give TONs to accounts on sandbox networks
node live
Open Node Live block explorer webpage
node start
Start the node of a local sandbox switch
node stop
Stop the local node of a sandbox switch
node update
Update Docker image of TONOS SE for new features. You must recreate sandbox switches to benefit from the new image.
node web
Open Node GraphQL webpage
output
Perform substitutions on the output
print error
Display error codes
switch config
Modify configuration
switch create
Create a new switch for an existing network, or create a sandbox local network
switch list
List the current switches/networks
switch remove
Remove a network configurations/switches
switch to
Switch to another network/switch
test
For testing only
token list
Display token wallet info
token swap
Swap tokens in DEX
token transfer
Transfer tokens between two token wallets
token wton
Display token wallet info
token wton credit
Display token wallet info
token wton withdraw
Display token wallet info
utils
Some useful tools
watch
Monitor a given account for new transactions.
ft account copy from¶
Copy accounts from another switch to the current one
DESCRIPTION
This command copies accounts from another switch to the current one
Examples:
ft account copy mainnet my-account
ft --switch testnet account copy my-account
USAGE
ft account copy from SWITCH ACCOUNTS [OPTIONS]
Where options are:
SWITCH ACCOUNTSSwitch name and accounts--prefix PREFIXPrefix created accounts by PREFIX--rename ACCOUNTNew name of account
ft account create¶
Create new accounts in the wallet
DESCRIPTION
This command creates new accounts in the wallet
Examples:
ft account create account1 account2 account3
ft account create new-account --passphrase "some known passphrase" --contract SetcodeMultisigWallet2
ft account create new-address --address 0:1234... --surf
The accounts are created in the wallet, not in the blockchain. To create accounts on the blockchain, you need to transfer funds to the account address and deploy a contract (for example, with ‘ft multisig create’)
USAGE
ft account create ARGUMENTS [OPTIONS]
Where options are:
ARGUMENTSName of account--address ADDRESSAddress for account--contract CONTRACTContract for account--forceor-fOverride existing contracts with –create--keyfile KEYFILEKey file for account--multisigContract should be multisig--passphrase PASSPHRASEBIP39 Passphrase for account--pubkey 0xPUBKEYPublic Key for account--static-vars JSONSet static vars for account--surfContract should be TON Surf contract--wc WORKCHAINThe workchain (default is 0)
ft account history¶
Get account info (local or from blockchain).
DESCRIPTION
This command displays the history of the given account
USAGE
ft account history ARGUMENT [OPTIONS]
Where options are:
ARGUMENTAddress of account--limit NUMLimit the number of results to NUM
ft account info¶
Get account info (local or from blockchain).
DESCRIPTION
This command displays information on given accounts, either locally or from the blockchain
Examples:
ft account info MY-ACCOUNT
USAGE
ft account info ARGUMENTS [OPTIONS]
Where options are:
ARGUMENTSName of account-Sor--secretsPrint passphrase and secret key (default with –json)--jsonPrint in json format
ft account list¶
List all known accounts in the current switch
DESCRIPTION
This command lists all known accounts in the wallet.
Examples:
ft account list
pass: passphrase known
secr: secret key known
pk: public key
ad: address known
USAGE
ft account list [OPTIONS]
Where options are:
ft account remove¶
Delete accounts from the wallet
DESCRIPTION
This command deletes known accounts from the wallet.
Examples:
ft account remove account1 account2
USAGE
ft account remove ARGUMENTS [OPTIONS]
Where options are:
ARGUMENTSName of account
ft account rename¶
This command renames accounts in the wallet
DESCRIPTION
This command renames accounts in the wallet
Examples:
ft account rename old-name new-name
ft account rename test1 test2 test3 --prefix old-
USAGE
ft account rename ACCOUNTS [OPTIONS]
Where options are:
ACCOUNTSSource and Destination accounts--prefix PREFIXPrefix provided accounts by PREFIX
ft account set¶
Modify the information associated with accounts in the wallet
DESCRIPTION
This command adds information to existing accounts in the wallet
Examples:
ft account set old-account --contract SafeMultisigWallet
USAGE
ft account set ARGUMENT [OPTIONS]
Where options are:
ARGUMENTName of account--address ADDRESSAddress for account--contract CONTRACTContract for account--keyfile KEYFILEKey file for account--multisigContract should be multisig--passphrase PASSPHRASEBIP39 Passphrase for account--static-vars JSONSet static vars for account--surfContract should be TON Surf contract--wc WORKCHAINThe workchain (default is 0)
ft account state¶
Get account info (local or from blockchain).
DESCRIPTION
This command displays the current states of the given accounts from the blockchain
Examples:
ft account state MY-ACCOUNT
ft account state MY-ACCOUNT -v
USAGE
ft account state ARGUMENTS [OPTIONS]
Where options are:
ARGUMENTSName of account--liveOpen block explorer on address
ft account whois¶
Find accounts matching a string
DESCRIPTION
This command searches existing accounts for a field matching the string
Examples:
ft account whois 1234
ft account whois 0:1234
ft account whois setcode
USAGE
ft account whois ARGUMENTS [OPTIONS]
Where options are:
ARGUMENTSName of account
ft call¶
Call contracts
DESCRIPTION
Call a method of a deployed contract. Use –local or –run to run the contract locally (only for get methods). If the params are not specified, {} is used instead. The message is signed if the –sign SIGNER argument is provided, or if the secret key of the account is known.
Examples:
$ ft call giver sendGrams
'{ "dest":"%{account:address:user1}", "amount":"1000000000000"}'
$ ft --switch mainnet call msig confirmUpdate
'{ "updateId": "0x6092b3ee656aaa81" }' --sign mywallet
USAGE
ft call ACCOUNT METH [JSON_PARAMS] [OPTIONS]
Where options are:
ACCOUNT METH [JSON_PARAMS]arguments-o FILEor--output FILESave result to FILE (use - for stdout)--runor--localRun locally--sign ACCOUNTSign message with account--subst FILERead FILE and substitute results in the content--waitWait for all transactions to finish
ft client¶
Call tonos-cli, use – to separate arguments. Use ‘ft exec – CMD ARGS’ for other commands.
DESCRIPTION
This command calls the tonos-cli executable while performing substitutions on arguments, and using the node of the current network switch. It is useful for commands that ‘ft’ cannot perform directly (calling debots for example).
‘ft’ uses the executable stored in $HOME/.ft/bin/tonos-cli. To create this executable, use:
$ ft init
or:
$ ft init --client
The available substitutions on the arguments can be listed using:
$ ft output --list-subst
For example, to substitute the address of the account ‘multisig-debot’:
$ ft client -- debot fetch %{account:address:multisig-debot}
Note that it is also possible to ask ‘ft’ to call ‘tonos-cli’ instead of performing calls through TON-SDK Rust binding for other commands, using the FT_USE_TONOS=1 env. variable.
USAGE
ft client -- ARGUMENTS [OPTIONS]
Where options are:
-- ARGUMENTSArguments to tonos-cli--exec(deprecated, use ‘ft exec – COMMAND’ instead)--stdout FILESave command stdout to file
ft config¶
Modify configuration
DESCRIPTION
Change the global configuration or the network configuration.
USAGE
ft config [OPTIONS]
Where options are:
--add-multisig CONTRACTAdd a new multisig contract name--client-repo GIT_URLThe URL of the GIT repo of tonos-cli for ft init--deployer ACCOUNTDEPRECATED. Use ft switch config –deployer instead.--linker-repo GIT_URLThe URL of the GIT repo of TVM-linker for ft init--solc-repo GIT_URLThe URL of the GIT repo of TON-Solidity-Compiler for ft init
ft contract abi¶
Print contract ABI
DESCRIPTION
This command shows a human readable version of contract ABI
USAGE
ft contract abi CONTRACT [OPTIONS]
Where options are:
CONTRACTName of contract to build
ft contract abi impl¶
Generate an implementation source file from a contract ABI
DESCRIPTION
This command generates an implementation source file xfrom a contract ABI
USAGE
ft contract abi impl CONTRACT [OPTIONS]
Where options are:
CONTRACTName of contract to build
ft contract abi intf¶
Generate an interface source file from a contract ABI
DESCRIPTION
This command generates an interface source file from a contract ABI
USAGE
ft contract abi intf CONTRACT [OPTIONS]
Where options are:
CONTRACTName of contract to build
ft contract build¶
Build a contract
DESCRIPTION
This command builds a Solidity contract and store it in the contract database
Example:
ft contract build Foobar.sol
After this command, the contract will be known as ‘Foobar’ in the contract database
USAGE
ft contract build FILENAME [OPTIONS]
Where options are:
FILENAMEBuild this contract and remember it--contract CONTRACTName of contract to build--forceor-fOverride existing contracts--solidity-version VERSIONVersion of Solidity (e.g. 47)
ft contract deploy¶
Deploy contracts
DESCRIPTION
This command deploys a known contract to the blockchain
Examples:
ft contract deploy Foobar
Create an account ‘Foobar’, deploy a contract ‘Foobar’ to it.
ft contract deploy Foobar --create foo
Create an account ‘foo’, deploy a contract ‘Foobar’ to it.
ft contract deploy Foobar --replace foo
Delete account ‘foo’, recreate it and deploy a contract ‘Foobar’ to it.
ft contract deploy Foobar --create foo --sign admin
Create an empty account ‘foo’, deploy a contract ‘Foobar’ to it, using the keypair from ‘admin’.
ft contract deploy Foobar --dst foo
Deploy a contract ‘Foobar’ an existing account ‘foo’ using its keypair.
With –create and –replace, 1 TON is transferred to the initial account using a ‘deployer’ multisig account. The deployer account can either be set switch wide (ft config –deployer ‘account’) or in the deploy command (using the –deployer ‘account’ argument)
USAGE
ft contract deploy CONTRACT PARAMS [OPTIONS]
Where options are:
CONTRACTDeploy contract CONTRACTPARAMSConstructor/call Arguments ({} by default)--create ACCOUNTCreate ACCOUNT by deploying contract (with –deploy)--credit TONSInitial credit of the account by the deployer--deployer ACCOUNTDeployer is this account (pays creation fees)--dst ACCOUNTDeploy to this account, using the existing keypair--forceor-fOverride existing contracts--params PARAMSConstructor/call Arguments ({} by default)--pubkey PUBKEYSet initial pubkey of tvm image (hexa without 0x)--replace ACCOUNTReplace ACCOUNT when deploying contract (with –deploy)--sign ACCOUNTDeploy using this keypair--static-vars JSONSet static vars for account
ft contract import¶
Import a contract
DESCRIPTION
This command imports a contract into the contract database
Example:
ft contract import src/Foo.tvm
Import the given contract into the contract database. Two files are mandatory: the ABI file and the TVM file. They should be stored in the same directory. The ABI file must use either a ‘.abi’ or ‘.abi.json’ extension, whereas the TVM file must use either ‘.tvc’ or ‘.tvm. If a source file (.sol, .cpp, .hpp) is also present, it is copied in the database.
USAGE
ft contract import FILENAME [OPTIONS]
Where options are:
FILENAMEImport contract from FILENAME--contract CONTRACTName of contract to build--forceor-fOverride existing contracts--makeBuild contract if needed (only for .spp)--prefix STRINGPrefix all contracts with this prefix--solidity-version VERSIONVersion of Solidity to use
ft contract new¶
Generate a new contract source file
USAGE
ft contract new CONTRACT [OPTIONS]
Where options are:
CONTRACTCreate contract file for CONTRACT
ft contract new interface¶
Generate a new contract interface source file
USAGE
ft contract new interface CONTRACT [OPTIONS]
Where options are:
CONTRACTCreate interface file for contract
ft crawler¶
Crawl all transactions to an address and fill a psql database
DESCRIPTION
This command will crawl the blockchain and fill a PostgresQL database with all events related to the contract given in argument. The created database has the same name as the account.
This command can run as a service, using the –start command to launch a manager program (that will not detach itself, however), –status to check the current status (running or not) and –stop to stop the process and its manager.
A simple session looks like:
sh> ft crawler myapp --start &> daemon.log &
sh> psql myapp
SELECT * FROM freeton_events;
serial| msg_id | event_name | event_args | time | tr_lt
1 | ec026489c0eb2071b606db0c7e05e5a76c91f4b02c2b66af851d56d5051be8bd | OrderStateChanged | {"order_id":"31","state_count":"1","state":"1"} | 1620744626 | 96
SELECT * FROM freeton_transactions;
^D
sh> ft crawler myapp --stop
ERRORS
The crawler may fail connecting to the database. You can use PGHOST to set the hostname of the database, or the directory of unix sockets (default is /var/run/postgresql). You can use PGPORT for the port (default is 5432).
The crawler may also fail for authorizations (something like FATAL: 28000: role USER does not exist ). In such a case, you need to configure postgresql to allow your role (<user> is your username):
sh> sudo -i -u postgres
root> psql
CREATE USER <user>;
ALTER ROLE <user> CREATEDB;
USAGE
ft crawler ACCOUNT [OPTIONS]
Where options are:
ACCOUNTAccount to crawl--dropdbDrop the previous database--startStart with a manager process to restart automatically--statusCheck if a manager process and crawler are running--stopStop the manager process and the crawler
ft debot fetch¶
Call tonos-cli fetch DEBOT
DESCRIPTION
USAGE
ft debot fetch DEBOT [OPTIONS]
Where options are:
DEBOTAddress of debot--boc-from NETWORKDownload debot from NETWORK (patched tonos-cli)--cachedUse cached version of boc (patched tonos-cli)
ft debot new¶
Create a debot
DESCRIPTION
USAGE
ft debot new NAME [OPTIONS]
Where options are:
NAMECreate template files for debot NAME
ft doc¶
Display useful documentation files (stored in ~/.ft/doc/)
USAGE
ft doc DOCFILE [OPTIONS]
Where options are:
DOCFILEFile to display
ft doc list¶
List useful documentation files stored in ~/.ft/doc/
USAGE
ft doc list [OPTIONS]
Where options are:
ft exec¶
Call command with substitution on arguments, use – before the command.
DESCRIPTION
This command can be used to call external commands while performing substitutions on arguments.
The available substitutions on the arguments can be listed using:
$ ft output --list-subst
For example:
$ ft exec – echo %{account:address:giver}
USAGE
ft exec -- COMMAND ARGUMENTS [OPTIONS]
Where options are:
-- COMMAND ARGUMENTSCommand and arguments--stdout FILENAMESave command stdout to file FILENAME
ft init¶
Initialize with TON Labs binary tools, compiled from sources.
DESCRIPTION
Initialize with TON Labs binary tools, downloading them from their GIT repositories and compiling them (a recent Rust compiler must be installed).
Tools are installed in $HOME/.ft/bin/.
The following tools can be installed:
- 1. The ‘tonos-cli’ client
- 2. The ‘solc’ client from the TON-Solidity-Compiler repository
- 3. The ‘tvm_linker’ encoder from the TVM-linker repository
If no specific option is specified, all tools are generated. If a tool has already been generated, calling it again will try to upgrade to a more recent version.
USAGE
ft init [OPTIONS]
Where options are:
--clientBuild and install ‘tonos-cli’ from sources--code-hashesCreate a database of code hashes from predefined contracts--distcleanClean completely before building--linkerBuild and install ‘tvm_linker’ from sources--solcBuild and install ‘solc’ from sources--solidity-version VERSIONVersion of solc to use--toolchain TOOLCHAINToolchain to initialize
ft inspect¶
Inspect information stored on the blockchain: display information on accounts, blocks, messages and transactions.
DESCRIPTION
Inspect information stored on the blockchain: display information on accounts, blocks, messages and transactions.
Examples:
Display all transactions that happened on the user1 account:
$ ft inspect --past user1 --with deployed:Contract
The –with argument is used to name the first unknown address, with the name ‘deployed’ and type ‘Contract’. Messages sent to known accounts with known contract types are automatically decoded.
Some operations (–block-num and –head) require to know the shard on which they apply. Arguments –shard SHARD, –shard-block BLOCK_ID and –shard-account ACCOUNT can be used to specify the shard.
Use the FT_DEBUG_GRAPHQL=1 variable to show Graphql queries
USAGE
ft inspect [OPTIONS]
Where options are:
-2Verbosity level 2-3Verbosity level 3-4Verbosity level 4-a ACCOUNTor--account ACCOUNTInspect state of account ACCOUNT (or ‘all’) on blockchain--abis ABIShared ABIs. Useful for example if you expect to receive messages that your contract does not implement (IParticipant for SafeMultisigWallet, for example)-b BLOCKor--block BLOCKBLOCK Inspect block TR_ID on blockchain--bn BLOCK_NUMor--block-num BLOCK_NUMInspect block at level BLOCK_NUM on blockchain-hor--headInspect head--limit NUMLimit the number of results to NUM-m MSG_IDor--message MSG_IDInspect message with identifier MSG_ID on blockchain-o FILEor--output FILESave result to FILE (use - for stdout)--past ACCOUNTInspect past transactions on ACCOUNT on blockchain--shard SHARDBlock info level/head for this shard--shard-account ACCOUNTBlock info level/head for this shard--shard-block BLOCK_IDBlock info level/head for this shard--subst FILERead FILE and substitute results in the content-t TR_IDor--transaction TR_IDInspect transaction with identifier TR_ID on blockchain--with ACCOUNT:CONTRACTDefine partner account automatically defined
ft multisig confirm transaction¶
Confirm transactions on a multisig-wallet
DESCRIPTION
This command is used to confirm transactions on a multisig wallet.
LIST WAITING TRANSACTIONS
Display transactions waiting for confirmations:
# ft multisig list transactions MY-ACCOUNT
CONFIRM TRANSACTION
Get the transaction ID from above, and use:
# ft multisig confirm MY-ACCOUNT TX_ID
USAGE
ft multisig confirm transaction ACCOUNT TX_ID [OPTIONS]
Where options are:
ACCOUNT TX_IDThe multisig account and the TX_ID--allSign all pending transactions--src ACCOUNTThe signing custodian
ft multisig confirm update¶
Confirm updates on a multisig-wallet
DESCRIPTION
This command is used to confirm updates on a multisig wallet.
LIST WAITING UPDATES
Display updates waiting for confirmations:
# ft multisig list updates MY-ACCOUNT
CONFIRM UPDATE
Get the update ID from above, and use:
# ft multisig confirm MY-ACCOUNT TX_ID
USAGE
ft multisig confirm update ACCOUNT TX_ID [OPTIONS]
Where options are:
ACCOUNT TX_IDThe multisig account and the TX_ID--allSign all pending updates--src ACCOUNTThe signing custodian
ft multisig create¶
Manage a multisig-wallet (create, confirm, send)
DESCRIPTION
This command deploys a multisig contract on a credited account.
Create an account and get its address:
# ft account create MY-ACCOUNT
Backup the account info off-computer.
The second command will give you an address in 0:XXX format. Send some tokens on the address to be able to deploy the multisig.
Check its balance with:
# ft account info MY-ACCOUNT
Then, to create a single-owner multisig:
# ft multisig create MY-ACCOUNT
To create a multi-owners multisig:
# ft multisig create MY-ACCOUNT owner2 owner3 owner4
To create a multi-owners multisig with 2 signs required:
# ft multisig create MY-ACCOUNT owner2 owner3 --req 2
To create a multi-owners multisig not self-owning:
# ft multisig create MY-ACCOUNT owner1 owner2 owner3 --not-owner
Verify that it worked:
# ft account info MY-ACCOUNT -v
USAGE
ft multisig create ACCOUNT [OPTIONS]
Where options are:
ACCOUNTAccount name, and other custodians--contract CONTRACTUse this contract--not-ownerInitial account should not be an owner--req REQNumber of confirmations required--surfUse Surf contract--wc WORKCHAINThe workchain (default is 0)
ft multisig debot¶
Executes the multisig debot
DESCRIPTION
This command executes the multisig debot, whose address is in the ‘debot-multisig’ account.
USAGE
ft multisig debot ACCOUNT [OPTIONS]
Where options are:
ACCOUNTThe debot account
ft multisig execute update¶
Update a multisig wallet with setcode
DESCRIPTION
This command can be used to display the pubkeys of the owners/custodians of a multisig wallet
To get the list of signers:
# ft multisig update MY-ACCOUNT --nreqs 3"
USAGE
ft multisig execute update ACCOUNT UPDATE_ID CODE [OPTIONS]
Where options are:
ACCOUNT UPDATE_ID CODEThe multisig account--code CODE-BASE64New code from base64--src ACCOUNTThe signing custodian--tvm TVM-FILENAMENew code from file
ft multisig info¶
Display info on a multisig wallet
DESCRIPTION
This command can be used to display the pubkeys of the owners/custodians of a multisig wallet
To get the list of signers:
# ft multisig info MY-ACCOUNT"
USAGE
ft multisig info ACCOUNT [OPTIONS]
Where options are:
ACCOUNTThe multisig account
ft multisig list custodians¶
List owners/custodians of a multisig wallet
DESCRIPTION
This command can be used to display the pubkeys of the owners/custodians of a multisig wallet
To get the list of signers:
# ft multisig list custodians MY-ACCOUNT"
USAGE
ft multisig list custodians ACCOUNT [OPTIONS]
Where options are:
ACCOUNTThe multisig account
ft multisig list transactions¶
Display waiting transactions in a multisig wallet
DESCRIPTION
This command can be used to display the currently waiting transactions in a multisig wallet
LIST WAITING TRANSACTIONS
Display transactions waiting for confirmations:
# ft multisig list transactions MY-ACCOUNT
USAGE
ft multisig list transactions ACCOUNT [OPTIONS]
Where options are:
ACCOUNTThe multisig account
ft multisig list updates¶
Display waiting transactions in a multisig wallet
DESCRIPTION
This command can be used to display the currently waiting transactions in a multisig wallet
LIST WAITING TRANSACTIONS
Display transactions waiting for confirmations:
# ft multisig list transactions MY-ACCOUNT
USAGE
ft multisig list updates ACCOUNT [OPTIONS]
Where options are:
ACCOUNTThe multisig account
ft multisig new¶
Create an independant multisig-wallet, similarly to ‘multisig create’, but not owner and perform crediting
DESCRIPTION
This command deploys a multisig contract on a new account.
USAGE
ft multisig new ACCOUNT [OPTIONS]
Where options are:
ACCOUNTAccount name, and other custodians--contract CONTRACTUse this contract--credit TONSInitial credit for multisig (1 TON by default)--creditor ACCOUNTSend credit from this account (default is to use the first custodian)--req REQNumber of confirmations required (majority by default)--surfUse Surf contract (default)--wc WORKCHAINThe workchain (default is 0)
ft multisig transfer¶
Transfer TONs from a multisig wallet to another account
DESCRIPTION
This command is used to send tokens from a multisig wallet to another account (or to submit a transaction if multiple confirmations are required).
SIMPLE TRANSFER
Should be like that:
# ft multisig transfer 100.000 -from MY-ACCOUNT --to OTHER-ACCOUNT
If the target is not an active account:
# ft multisig transfer 100.000 --from MY-ACCOUNT --to OTHER-ACCOUNT --sponsor
To send all the balance:
# ft multisig transfer all --from MY-ACCOUNT --to OTHER-ACCOUNT
CALL WITH PARAMS
Should be like that:
# ft multisig transfer 100 --from MY-ACCOUNT --to CONTRACT set '{ "x": "100" }
USAGE
ft multisig transfer ARGUMENTS [OPTIONS]
Where options are:
ARGUMENTSGeneric arguments--bounce BOOLBOOL Transfer to inactive account--from ACCOUNTThe source of the transfer-o FILEor--output FILESave result to FILE (use - for stdout)--parrainor--sponsorTransfer to inactive account--sendForce sendTransaction() instead of submitTransaction()--src ACCOUNTThe custodian signing the multisig transfer--subst FILERead FILE and substitute results in the content--to ACCOUNTTarget of a transfer--waitWait for all transactions to finish
ft multisig update¶
Update a multisig wallet with setcode
DESCRIPTION
This command can be used to display the pubkeys of the owners/custodians of a multisig wallet
To get the list of signers:
# ft multisig update MY-ACCOUNT --nreqs 3"
USAGE
ft multisig update ACCOUNT CUSTODIANS [OPTIONS]
Where options are:
ACCOUNT CUSTODIANSThe multisig account and the custodians--code-hash CODEHASHNew code hash for contract--contract CONTRACTNew code from contract--keep-custodiansKeep existing custodians, either adding new ones (with add: C1 C2…) or deleting old ones (with del: C1 C2…) or any combination of those commands-o FILEor--output FILESave result to FILE (use - for stdout)--req REQNew number of required confirmations for transactions--reset-custodiansReset all custodians--src ACCOUNTThe custodian signing the multisig transfer--subst FILERead FILE and substitute results in the content--tvm TVM-FILENAMENew code from file
ft node give¶
Give TONs to accounts on sandbox networks
DESCRIPTION
This command can be used to create initial accounts with tokens on sandbox networks running TONOS SE (created using ‘ft switch create sandboxNN’).
USAGE
ft node give ACCOUNT [OPTIONS]
Where options are:
ACCOUNTGive TONs from giver to ACCOUNT (all if none specified). By default, transfer 1000 TONS to the account if its balance is smaller, and deploy a contract if it is a multisig smart contract.--amount AMOUNTNumber of TONs to give
ft node live¶
Open Node Live block explorer webpage
DESCRIPTION
Open the block explorer available on the sandbox switch running TONOS SE
USAGE
ft node live [OPTIONS]
Where options are:
ft node start¶
Start the node of a local sandbox switch
DESCRIPTION
This command can be used to start the node of a local sandbox network running TONOS SE and created using ‘ft switch create sandboxNN’.
USAGE
ft node start [OPTIONS]
Where options are:
ft node stop¶
Stop the local node of a sandbox switch
DESCRIPTION
This command can be used to stop the local node of a sandbox network running TONOS SE
USAGE
ft node stop [OPTIONS]
Where options are:
ft node update¶
Update Docker image of TONOS SE for new features. You must recreate sandbox switches to benefit from the new image.
DESCRIPTION
This command can be used to update the docker image that will be used to create new sandbox networks (tonlabs/local-node, or the one provide with –image)
USAGE
ft node update [OPTIONS]
Where options are:
--image DOCKERDocker image to use for sandboxes
ft node web¶
Open Node GraphQL webpage
DESCRIPTION
This command can be used to open the GraphQL webpage associated with the current local network
USAGE
ft node web [OPTIONS]
Where options are:
ft output¶
Perform substitutions on the output
DESCRIPTION
This command performs substitutions on its input. By default, the output goes to stdout, unless the ‘-o’ option is used.
Examples:
Load a file INPUT, substitute its content, and save to OUTPUT:
$ ft output --file INPUT --o OUTPUT
List available substitutions:
$ ft output --list-subst
Output address of account ACCOUNT:
$ ft output --addr ACCOUNT
or:
$ ft output --string %{account:address:ACCOUNT}
Output keyfile of account ACCOUNT to file KEYFILE:
ft output --keyfile ACCOUNT -o KEYFILE
USAGE
ft output STRING [OPTIONS]
Where options are:
STRINGOutput string after substitution--addr ACCOUNTOutput address of account--file FILEOutput content of file after substitution--keyfile ACCOUNTOutput key file of account--list-substList all substitutions-o FILESave command stdout to file--string STRINGOutput string after substitution
ft print error¶
Display error codes
USAGE
ft print error ERROR CODe [OPTIONS]
Where options are:
ERROR CODeError code to explain
ft switch config¶
Modify configuration
DESCRIPTION
Change the global configuration or the network configuration.
USAGE
ft switch config [OPTIONS]
Where options are:
--deployer ACCOUNTSet deployer to account ACCOUNT. The deployer is the account used to credit the initial balance of an address before deploying a contract on it.--toolchain TOOLCHAINName of toolchain to use in this switch--url URLNode Url of this network (without /graphql)
ft switch create¶
Create a new switch for an existing network, or create a sandbox local network
DESCRIPTION
This command is used to create new switches, either for existing remote networks (mainnet, testnet, etc.) by providing their URL with –url, or to create new local networks running TONOS SE (such switches must be called ‘sandboxNN’ where NN is a number). Each switch includes its own set of accounts and nodes.
When a new switch is created, it immediately becomes the current switch.
EXAMPLES
Display current network and other existing networks:
$ ft switch list
Change current network to an existing network NETWORK:
$ ft switch to NETWORK
Create a new network with name NETWORK and url URL, and switch to that network:
$ ft switch create NETWORK --url URL
Removing a created network:
$ ft switch remove NETWORK
SANDBOXING
As a specific feature, ft can create networks based on TONOS SE to run on the local computer. Such networks are automatically created by naming the network ‘sandboxN` where N is a number. The corresponding node will run on port 7080+N.
Example of session (create network, start node, give user1 1000 TONs):
$ ft switch create sandbox1
$ ft node start
$ ft node give user1 --amount 1000
When a local network is created, it is initialized with:
- 1. An account ‘giver’ corresponding to the Giver contract holding 5 billion TONS
- 2. A set of 10 accounts ‘user0’ to ‘user9’. These accounts always have the same secret keys, so it is possible to define test scripts that will work on different instances of local networks.
The 10 accounts are not deployed, but it is possible to use ‘ft node give ACCOUNT’ to automatically deploy the account.
USAGE
ft switch create NETWORK [OPTIONS]
Where options are:
NETWORKName of network switch to create--forceForce switch creation, killing docker container if needed--image DOCKERDocker image to use for sandboxes--toolchain TOOLCHAINToolchain to use--url URLURL of the default node in this network
ft switch list¶
List the current switches/networks
DESCRIPTION
This command is used to list the known networks (switches) and the current configuration.
USAGE
ft switch list [OPTIONS]
Where options are:
ft switch remove¶
Remove a network configurations/switches
DESCRIPTION
Remove network configurations
EXAMPLES
Removing a created network:
$ ft switch remove NETWORK
USAGE
ft switch remove NETWORK [OPTIONS]
Where options are:
NETWORKName of network switch to remove-for--forceRemove network even in case of failure
ft switch to¶
Switch to another network/switch
DESCRIPTION
This command is used to switch the current network configuration to the provided switch. To only switch to a new network for a particular command, it is possible to use the –switch argument instead.
EXAMPLE
Display current network and other existing networks:
$ ft switch list
Change current network to an existing network NETWORK:
$ ft switch to NETWORK
Call a command for another switch:
$ ft --switch NETWORK call contract get '{}'
USAGE
ft switch to NETWORK [OPTIONS]
Where options are:
NETWORKName of network switch
ft test¶
For testing only
USAGE
ft test ARGUMENTS [OPTIONS]
Where options are:
ARGUMENTSargs--test INTNUM Run test NUM
ft token list¶
Display token wallet info
USAGE
ft token list ACCOUNT [OPTIONS]
Where options are:
ACCOUNTThe associated multisig wallet
ft token swap¶
Swap tokens in DEX
USAGE
ft token swap AMOUNT TOKEN [OPTIONS]
Where options are:
AMOUNT TOKENAmount and token symbol----for OWNERToken account owner----to TOKENDestination token
ft token transfer¶
Transfer tokens between two token wallets
USAGE
ft token transfer AMOUNT TOKEN [OPTIONS]
Where options are:
AMOUNT TOKENAmount and token symbol----from OWNERSource account owner----to OWNERDestination account owner
ft token wton¶
Display token wallet info
USAGE
ft token wton ACCOUNT [OPTIONS]
Where options are:
ACCOUNTThe associated multisig wallet
ft token wton credit¶
Display token wallet info
USAGE
ft token wton credit ACCOUNT AMOUNT [OPTIONS]
Where options are:
ACCOUNT AMOUNTThe associated multisig wallet
ft token wton withdraw¶
Display token wallet info
USAGE
ft token wton withdraw ACCOUNT AMOUNT [OPTIONS]
Where options are:
ACCOUNT AMOUNTThe associated multisig wallet
ft utils¶
Some useful tools
DESCRIPTION
Misc commands. For example, to translate bytes from base64 or message boc.
USAGE
ft utils [OPTIONS]
Where options are:
--of-base64 STRINGTranslates from base64--of-boc STRINGParse message boc in base64 format
ft watch¶
Monitor a given account for new transactions.
DESCRIPTION
Wait for transactions happening on the given ACCOUNT. Transactions are immediately displayed on stdout. If the argument –on-event CMD is provided, a command is called for every event emitted by the contract.
USAGE
ft watch ACCOUNT [OPTIONS]
Where options are:
ACCOUNTWatch account ACCOUNT-0Verbosity level none-3Verbosity level 3--account ACCOUNTWatch account ACCOUNT--from BLOCKIDStart with block identifier BLOCKID-o FILEor--output FILEOutput to FILE--on-event CMDCall CMD on event emitted. Called once on startup as CMD <block_id> start and after every emitted event as CMD <block_id> <tr_id> <event_name> <args>--timeout TIMEOUTTimeout in seconds (default is 25 days)