Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
699 lines (393 sloc) 17.9 KB

Command line reference

Here is the command line reference for sto command.

Options and config files

Settings can be either given in a config file, specified by --config-file switch or directly to the main command.

E.g. these are equivalent.

Command line:

sto --ethereum-node-url="https://mainnet.infura.io/v3/453d2049c15d4a8da5501a0464fa44f8" token-scan ...

As with INI file mainnet.ini:

# Infura mainnet net node url
ethereum-node-url = https://mainnet.infura.io/v3/453d2049c15d4a8da5501a0464fa44f8
sto --config-file=mainnet.ini token-scan ...

Subcommands take their own options that cannot be specified in the settings file.

Main command and options

When running sto --help you get list of settings and subcommands:

Usage: sto [OPTIONS] COMMAND [ARGS]...

  TokenMarket security token management tool.

  Manage tokenised equity for things like issuing out new, distributing and revoking shares.

  For full documentation see https://docs.tokenmarket.net/

Options:
  --config, --config-file PATH  INI file where to read options from
  --database-file PATH          SQLite file that persists transaction broadcast status
  --network TEXT                Network name. Either 'ethereum' or 'kovan' are supported for now.
  --ethereum-node-url TEXT      Parity or Geth JSON-RPC to connect for Ethereum network access
  --ethereum-abi-file TEXT      Solidity compiler output JSON to override default smart contracts
  --ethereum-gas-price TEXT     How many GWei we pay for gas
  --ethereum-gas-limit INTEGER  What is the transaction gas limit for broadcasts
  --ethereum-private-key TEXT   Private key for the broadcasting account
  --etherscan-api-key TEXT      EtherScan API key used for the contract source code verification
  --log-level TEXT              Python logging level to tune the verbosity of the command
  --auto-restart-nonce BOOLEAN  Automatically restart nonce for the deployment account if starting with a fresh database
  --help                        Show this message and exit.

Commands:
  cap-table                Print out token holder cap table.
  deploy-crowdsale-token   Command to be used only for testing
  diagnose                 Check your node and account status.
  distribute-multiple      Distribute shares to multiple shareholders whose address info is read from a file.
  distribute-single        Send out tokens to one individual shareholder.
  ethereum-create-account  Creates a new Ethereum account.
  issue                    Issue out a new security token.
  issue-logs               Print out transactions of for tokens issued in the past.
  kyc-deploy               Deploys Kyc contract to desired ethereum network.
  kyc-manage               Whitelist a address in KYC smart contract.
  payout-approve           approve tokens to the payout contract
  payout-deploy            Deploys Voting contract to desired ethereum network network, ethereum-abi-file, ethereum-private-key, ethereum-node-url are required args
  payout-deposit           the private key here needs to belong to the customer who wants to fetch tokens
  payout-dividends
  reference                Print out the command line reference for the documentation.
  token-scan               Update token holder balances from a blockchain to a local database.
  token-status             Print token contract status.
  tx-broadcast             Broadcast waiting transactions.
  tx-last                  Print latest transactions from database.
  tx-next-nonce            Print next nonce to be consumed.
  tx-restart-nonce         Resets the broadcasting account nonce.
  tx-update                Update transaction status.
  tx-verify                Verify source code of contract deployment transactions on EtherScan.
  version                  Print version number and exit.
  voting-deploy            Deploys Voting contract to desired ethereum network network, ethereum-abi-file, ethereum-private-key, ethereum-node-url are required args

cap-table

Print out token holder cap table.

The token holder data must have been scanned earlier using token-scan command.

You can supply optional CSV file that contains Ethereum address mappings to individual token holder names.

Usage: sto cap-table [OPTIONS]

  Print out token holder cap table.

  The token holder data must have been scanned earlier using token-scan
  command.

  You can supply optional CSV file that contains Ethereum address mappings
  to individual token holder names.

Options:
  --identity-file PATH            CSV file containing address real world
                                  identities
  --token-address TEXT            Token contract address  [required]
  --order-by [balance|name|updated|address]
                                  How cap table is sorted
  --order-direction [asc|desc]    Sort direction
  --include-empty BOOLEAN         Sort direction
  --max-entries INTEGER           Print only first N entries
  --accuracy INTEGER              How many decimals include in balance output
  --help                          Show this message and exit.

deploy-crowdsale-token

Command to be used only for testing

Usage: sto deploy-crowdsale-token [OPTIONS]

  Command to be used only for testing

Options:
  --help  Show this message and exit.

diagnose

Check your node and account status.

This command will print out if you are properly connected to Ethereum network and your management account has enough Ether balance.

Usage: sto diagnose [OPTIONS]

  Check your node and account status.

  This command will print out if you are properly connected to Ethereum
  network and your management account has enough Ether balance.

Options:
  --help  Show this message and exit.

distribute-multiple

Distribute shares to multiple shareholders whose address info is read from a file.

Usage: sto distribute-multiple [OPTIONS]

  Distribute shares to multiple shareholders whose address info is read from
  a file.

Options:
  --csv-input TEXT  CSV file for entities receiving tokens  [required]
  --address TEXT    Token contract address  [required]
  --help            Show this message and exit.

distribute-single

Send out tokens to one individual shareholder.

Usage: sto distribute-single [OPTIONS]

  Send out tokens to one individual shareholder.

Options:
  --token-address TEXT  Token contract address  [required]
  --to-address TEXT     Receiver  [required]
  --external-id TEXT    External id string for this transaction - no
                        duplicates allowed  [required]
  --email TEXT          Receiver email (for audit log only)  [required]
  --name TEXT           Receiver name (for audit log only)  [required]
  --amount TEXT         Amount of tokens as a decimal number  [required]
  --help                Show this message and exit.

ethereum-create-account

Creates a new Ethereum account.

Usage: sto ethereum-create-account [OPTIONS]

  Creates a new Ethereum account.

Options:
  --help  Show this message and exit.

issue

Issue out a new security token.

  • Creates a new share series
  • Allocates all new shares to the management account
  • Sets the share transfer restriction mode
Usage: sto issue [OPTIONS]

  Issue out a new security token.

  * Creates a new share series

  * Allocates all new shares to the management account

  * Sets the share transfer restriction mode

Options:
  --symbol TEXT                [required]
  --name TEXT                  [required]
  --url TEXT                   [required]
  --amount INTEGER             [required]
  --transfer-restriction TEXT
  --help                       Show this message and exit.

issue-logs

Print out transactions of for tokens issued in the past.

Usage: sto issue-logs [OPTIONS]

  Print out transactions of for tokens issued in the past.

Options:
  --help  Show this message and exit.

kyc-deploy

Deploys Kyc contract to desired ethereum network. required args network, ethereum-abi-file, ethereum-private-key, ethereum-node-url

Usage: sto kyc-deploy [OPTIONS]

  Deploys Kyc contract to desired ethereum network. required args network,
  ethereum-abi-file, ethereum-private-key, ethereum-node-url

Options:
  --help  Show this message and exit.

kyc-manage

Whitelist a address in KYC smart contract. network, ethereum-abi-file, ethereum-private-key, ethereum-node-url are required args

Usage: sto kyc-manage [OPTIONS]

  Whitelist a address in KYC smart contract. network, ethereum-abi-file,
  ethereum-private-key, ethereum-node-url are required args

Options:
  --whitelist-address TEXT  address to whitelist  [required]
  --help                    Show this message and exit.

payout-approve

approve tokens to the payout contract

Usage: sto payout-approve [OPTIONS]

  approve tokens to the payout contract

Options:
  --payout-token-address TEXT  address of payout token contract
  --payout-token-name TEXT     name of the payout token smart contract
                               [required]
  --help                       Show this message and exit.

payout-deploy

Deploys Voting contract to desired ethereum network network, ethereum-abi-file, ethereum-private-key, ethereum-node-url are required args

Usage: sto payout-deploy [OPTIONS]

  Deploys Voting contract to desired ethereum network network, ethereum-abi-
  file, ethereum-private-key, ethereum-node-url are required args

Options:
  --token-address TEXT         address of security token contract
  --payout-token-address TEXT  address of payout token contract
  --payout-token-name TEXT     name of the payout smart contract
  --kyc-address TEXT           address of kyc contract
  --payout-name TEXT           name of the payout,  [required]
  --uri TEXT                   announcement uri  [required]
  --type INTEGER               announcement type  [required]
  --options LIST               additional payout contract options
  --help                       Show this message and exit.

payout-deposit

the private key here needs to belong to the customer who wants to fetch tokens

Usage: sto payout-deposit [OPTIONS]

  the private key here needs to belong to the customer who wants to fetch
  tokens

Options:
  --help  Show this message and exit.

payout-dividends

None

Usage: sto payout-dividends [OPTIONS]

Options:
  --transfer-amount INTEGER  amount of sto tokens to trade for payout token
                             [required]
  --help                     Show this message and exit.

reference

Print out the command line reference for the documentation.

Usage: sto reference [OPTIONS]

  Print out the command line reference for the documentation.

Options:
  --help  Show this message and exit.

token-scan

Update token holder balances from a blockchain to a local database.

Reads the Ethereum blockchain for a certain token and builds a local database of token holders and transfers.

If start block and end block information are omitted, continue the scan where we were left last time. Scan operations may take a while.

Usage: sto token-scan [OPTIONS]

  Update token holder balances from a blockchain to a local database.

  Reads the Ethereum blockchain for a certain token and builds a local
  database of token holders and transfers.

  If start block and end block information are omitted, continue the scan
  where we were left last time. Scan operations may take a while.

Options:
  --start-block INTEGER  The first block where we start (re)scan
  --end-block INTEGER    Until which block we scan, also can be 'latest'
  --token-address TEXT   Token contract address  [required]
  --help                 Show this message and exit.

token-status

Print token contract status.

Usage: sto token-status [OPTIONS]

  Print token contract status.

Options:
  --address TEXT  Token contract address  [required]
  --help          Show this message and exit.

tx-broadcast

Broadcast waiting transactions.

Send all management account transactions to Ethereum network. After a while, transactions are picked up by miners and included in the blockchain.

Usage: sto tx-broadcast [OPTIONS]

  Broadcast waiting transactions.

  Send all management account transactions to Ethereum network. After a
  while, transactions are picked up by miners and included in the
  blockchain.

Options:
  --help  Show this message and exit.

tx-last

Print latest transactions from database.

Usage: sto tx-last [OPTIONS]

  Print latest transactions from database.

Options:
  --limit INTEGER  How many transactions to print
  --help           Show this message and exit.

tx-next-nonce

Print next nonce to be consumed.

Usage: sto tx-next-nonce [OPTIONS]

  Print next nonce to be consumed.

Options:
  --help  Show this message and exit.

tx-restart-nonce

Resets the broadcasting account nonce.

Usage: sto tx-restart-nonce [OPTIONS]

  Resets the broadcasting account nonce.

Options:
  --help  Show this message and exit.

tx-update

Update transaction status.

Connects to Ethereum network, queries the status of our broadcasted transactions. Then print outs the still currently pending transactions or freshly mined transactions.

Usage: sto tx-update [OPTIONS]

  Update transaction status.

  Connects to Ethereum network, queries the status of our broadcasted
  transactions. Then print outs the still currently pending transactions or
  freshly mined transactions.

Options:
  --help  Show this message and exit.

tx-verify

Verify source code of contract deployment transactions on EtherScan.

Users EtherScan API to verify all deployed contracts from the management account.

Verify all past contract deployments:

sto verify

Verify certain deployed contracts:

sto verify --contract-addresses=0x1D88fd4fC47711Fc28d105aE2D96A4A9E5c2ae9C,0x57aa933E93Ea627a746DD335c23A90c8D8da825B
Usage: sto tx-verify [OPTIONS]

  Verify source code of contract deployment transactions on EtherScan.

  Users EtherScan API to verify all deployed contracts from the management
  account.

  Verify all past contract deployments:

      sto verify

  Verify certain deployed contracts:

      sto verify --contract-addresses=0x1D88fd4fC47711Fc28d105aE2D96A4A9E5c2
      ae9C,0x57aa933E93Ea627a746DD335c23A90c8D8da825B

Options:
  --contract-addresses TEXT  Comma separated list of contract addresses to
                             verify
  --help                     Show this message and exit.

version

Print version number and exit.

Usage: sto version [OPTIONS]

  Print version number and exit.

Options:
  --help  Show this message and exit.

voting-deploy

Deploys Voting contract to desired ethereum network network, ethereum-abi-file, ethereum-private-key, ethereum-node-url are required args

Usage: sto voting-deploy [OPTIONS]

  Deploys Voting contract to desired ethereum network network, ethereum-abi-
  file, ethereum-private-key, ethereum-node-url are required args

Options:
  --token-address TEXT  address of security token contract  [required]
  --kyc-address TEXT    address of kyc contract
  --voting-name TEXT    name of the voting,  [required]
  --uri TEXT            announcement uri  [required]
  --type INTEGER        announcement type  [required]
  --options LIST        additional voting contract options
  --help                Show this message and exit.
You can’t perform that action at this time.