Build
tog-cli reference#
tog-cli talks to the Hub through its own light client, so it does not trust any single server. It signs transactions locally with the key you give it.
Common options#
Option
What
-c, --config FILE
A togd-format file. Only [hub] and [p2p] are read: see client.toml
--data-dir DIR
tog-cli's own network key and saved peers. Default ~/.tog-cli
--key FILE
The account key that signs: a 32-byte seed, raw or as 64 hex digits
--wait SECS
How long to wait for the transaction to be in a block (default 120)
Amounts are in test-TOG with decimals allowed (--amount 1.5), except where noted. Addresses are 40 hex digits.
Accounts#
Command
Does
tog-cli address KEY
Print the address of a key: an account, or a worker's id
tog-cli account ADDRESS
Print an account's free balance and next nonce
tog-cli transfer --to ADDRESS --amount N --key KEY
Send test-TOG
tog-cli send BODY --key KEY
Sign an unsigned transaction file (such as register.borsh) and send it until it is in a block
tog-cli account 3f1c…9a07 -c client.toml
# free 10020 TOG
# nonce 0
Jobs#
Command
Does
tog-cli pack-image LAYOUT --out DIR [--platform P] [--locator URL]…
Pack an OCI image layout as a job image
tog-cli submit-job --image FILE --run CMD … --key KEY
Submit a CPU job; prints its id
tog-cli job JOB_ID
Print a job's status
tog-cli get-output JOB_ID --out DIR --key KEY
Fetch, check and unpack a settled job's output
tog-cli open-output JOB_ID --archive FILE --out DIR
Open an output archive you already have
See Run a job for a walk-through and the submit-job options. Commands that upload or fetch data also take --listen ADDR and --external ADDR: where tog-cli listens, and the address storage workers reach it at.
Compute workers#
Command
Does
tog-cli worker WORKER
Print a worker's record: owner, status, bond, measured bandwidth, opt-ins
tog-cli bond-worker WORKER --amount N --key OWNER_KEY
Add to an Active or Jailed worker's bond from the owner's free balance
tog-cli set-opt-ins WORKER [--chain ID]… --key OWNER_KEY
Replace the AppChains whose jobs the worker takes, from the next block on. No --chain opts out of all
tog-cli unbond-worker WORKER --key OWNER_KEY
Start unbonding the worker; the bond returns after 14 days
tog-cli storage-worker WORKER
Print a storage worker's record
The registration itself is built on the worker by tog-worker register-worker and sent with tog-cli send; see Run a compute worker .
AppChains#
Command
Does
tog-cli try-upgrade CODE --rpc URL [--max-blocks N] [--json]
Try a runtime upgrade against a collator node's current state without keeping it; exits non-zero if it would not go through
Faucet#
Command
Does
tog-cli faucet FAUCET.toml
Serve a test-TOG faucet over HTTP. Used to run the public faucet; you do not need it to get test-TOG
Previous Run a jobNext Build an AppChain