Skip to main content

Interact through Symbiotic CLI

Symbiotic CLI is a command line tool that enables Networks, Operators, and Vault Curators to interact with Symbiotic contracts. It allows users to fetch on-chain data and perform actions such as registering as a network, opting into a vault, and managing delegations.

Installation

  1. Make sure to have an installed Git (Download Git)

  2. Make sure to have an installed Python (Download Python)

  3. Open a terminal (e.g., Command Prompt on Windows, Git Bash, or terminal on macOS/Linux)

  4. Clone the repository by running the following command:

    git clone https://github.com/symbioticfi/cli.git
  5. Navigate into the cloned repository folder:

    cd cli
  6. Install the required Python packages by running the following command:

    pip3 install -r requirements.txt
  7. Run the CLI by executing:

    python3 symb.py <command> <args> <options>
    • <command> - a name of method to call (e.g., isnet checks if the inputted address is a network)
    • <args> - values to provide to the command as an input (e.g., address is an address to check)
    • <options> - additional options to execute the command with (e.g., --ledger allows to use a Ledger device for "write" functionality)

For Ledger users

  1. Make sure you have an installed Ledger Live (Download Ledger Live)

  2. Make sure you have a Blind Signing enabled on your Ledger device for the Ethereum app (How to enable Blind Signing)

  3. Before each transaction, make sure to be logged into the Ethereum app and to have a Ledger device unlocked

isnet

python3 symb.py isnet ADDRESS

Check if address is network.

  • ADDRESS - an address to check

middleware

symb.py middleware NETWORK_ADDRESS

Get network middleware address.

  • NETWORK_ADDRESS - an address of the network to get a middleware for

nets

symb.py nets

List all networks.


netops

symb.py netops NETWORK_ADDRESS

List all operators opted in network.

  • NETWORK_ADDRESS - an address of the network to get operators for

netstakes

symb.py netstakes NETWORK_ADDRESS

Show stakes of all operators in network.

  • NETWORK_ADDRESS - an address of the network to get a whole stake data for

pending-resolver

symb.py pending-resolver VAULT_ADDRESS NETWORK_ADDRESS

Get a pending resolver for a subnetwork in a vault.

  • VAULT_ADDRESS - an address of the vault to get a pending resolver for
  • NETWORK_ADDRESS - an address of the network to get a pending resolver for

resolver

symb.py resolver VAULT_ADDRESS NETWORK_ADDRESS

Get a current resolver for a subnetwork in a vault.

  • VAULT_ADDRESS - an address of the vault to get a resolver for
  • NETWORK_ADDRESS - an address of the network to get a resolver for

isop

python3 symb.py isop ADDRESS

Check if address is operator.

  • ADDRESS - an address to check

ops

symb.py ops

List all operators.


opnets

symb.py opnets OPERATOR_ADDRESS

List all networks where operator is opted in.

  • OPERATOR_ADDRESS - an address of the operator to get networks for

op-vault-net-stake

symb.py op-vault-net-stake OPERATOR_ADDRESS VAULT_ADDRESS NETWORK_ADDRESS

Get operator stake in vault for network.

Includes data about the operator's shares if NetworkRestakeDelegator

  • OPERATOR_ADDRESS - an address of the operator to get a stake of
  • VAULT_ADDRESS - an address of the vault to get a stake at
  • NETWORK_ADDRESS - an address of the network to get a stake for

opstakes

symb.py opstakes OPERATOR_ADDRESS

Show operator stakes in all networks.

  • OPERATOR_ADDRESS - an address of the operator to get a whole stake data for

check-opt-in-network

symb.py check-opt-in-network OPERATOR_ADDRESS NETWORK_ADDRESS

Check if operator is opted in to a network.

  • OPERATOR_ADDRESS - an address of the operator to check an opt-in status of
  • NETWORK_ADDRESS - an address of the network to check an opt-in status for

check-opt-in-vault

symb.py check-opt-in-vault OPERATOR_ADDRESS VAULT_ADDRESS

Check if operator is opted in to a vault.

  • OPERATOR_ADDRESS - an address of the operator to check an opt-in status of
  • VAULT_ADDRESS - an address of the vault to check an opt-in status for

isvault

python3 symb.py isvault ADDRESS

Check if address is vault.

  • ADDRESS - an address to check

vaults

symb.py vaults

List all vaults.


vaultnets

symb.py vaultnets VAULT_ADDRESS

List all networks associated with the given vault.

  • VAULT_ADDRESS - an address of the vault to get all networks for

vaultops

symb.py vaultops VAULT_ADDRESS

List all operators opted into the given vault.

  • VAULT_ADDRESS - an address of the vault to get all operators for

vaultnetsops

symb.py vaultnetsops VAULT_ADDRESS

List all operators and their associated networks for the given vault.

  • VAULT_ADDRESS - an address of the vault to adjust the delegations for

Write Commands - For Networks

Currently, there are 2 ways to sign transactions using the CLI:

  1. Using your private key:

    • Add --private-key <YOUR_PRIVATE_KEY> after each command and its arguments

    Example:

    python3 symb.py register-network --private-key 0000000000000000000000000000000000000000000000000000000000000000
  2. Using your ledger device:

    • Add --ledger after each command and its arguments
    • (Optional) You may add --ledger-address <YOUR_ADDRESS> to choose an account from your Ledger to use for the signing

    Examples:

    python3 symb.py register-network --ledger
    python3 symb.py register-network --ledger --ledger-address 0x0000000000000000000000000000000000000000

register-network

symb.py register-network

Register the signer as a network.


set-max-network-limit

symb.py set-max-network-limit VAULT_ADDRESS MAX_LIMIT

Set a maximum network limit at the vault's delegator.

  • VAULT_ADDRESS - an address of the vault to set a maximum limit for
  • MAX_LIMIT - a maximum amount of stake a network is ready to get from the vault

set-resolver

symb.py set-resolver VAULT_ADDRESS RESOLVER

Set a resolver for a subnetwork at VetoSlasher.

  • VAULT_ADDRESS - an address of the vault to set a resolver for
  • RESOLVER - an address of the resolver to set

Write Commands - For Operators

Currently, there are 2 ways to sign transactions using the CLI:

  1. Using your private key:

    • Add --private-key <YOUR_PRIVATE_KEY> after each command and its arguments

    Example:

    python3 symb.py register-operator --private-key 0000000000000000000000000000000000000000000000000000000000000000
  2. Using your ledger device:

    • Add --ledger after each command and its arguments
    • (Optional) You may add --ledger-address <YOUR_ADDRESS> to choose an account from your Ledger to use for the signing

    Examples:

    python3 symb.py register-operator --ledger
    python3 symb.py register-operator --ledger --ledger-address 0x0000000000000000000000000000000000000000

register-operator

symb.py register-operator

Register the signer as an operator.


opt-in-network

symb.py opt-in-network NETWORK_ADDRESS

Opt-in to a network.

  • NETWORK_ADDRESS - an address of the network to opt into

opt-in-vault

symb.py opt-in-vault VAULT_ADDRESS

Opt-in to a vault.

  • VAULT_ADDRESS - an address of the vault to opt into

opt-out-network

symb.py opt-out-network NETWORK_ADDRESS

Opt-out from a network.

  • NETWORK_ADDRESS - an address of the network to opt out from

opt-out-vault

symb.py opt-out-vault VAULT_ADDRESS

Opt-out from a vault.

  • VAULT_ADDRESS - an address of the vault to opt out from

Write Commands - For Vault Curators

Currently, there are 2 ways to sign transactions using the CLI:

  1. Using your private key:

    • Add --private-key <YOUR_PRIVATE_KEY> after each command and its arguments

    Example:

    python3 symb.py set-network-limit 0x0000000000000000000000000000000000000000 0x0000000000000000000000000000000000000000 --private-key 0000000000000000000000000000000000000000000000000000000000000000
  2. Using your ledger device:

    • Add --ledger after each command and its arguments
    • (Optional) You may add --ledger-address <YOUR_ADDRESS> to choose an account from your Ledger to use for the signing

    Examples:

    python3 symb.py set-network-limit 0x0000000000000000000000000000000000000000 0x0000000000000000000000000000000000000000 --ledger
    python3 symb.py set-network-limit 0x0000000000000000000000000000000000000000 0x0000000000000000000000000000000000000000 --ledger --ledger-address 0x0000000000000000000000000000000000000000

set-network-limit

symb.py set-network-limit VAULT_ADDRESS NETWORK_ADDRESS LIMIT

Set a network limit at the vault's delegator.

  • VAULT_ADDRESS - an address of the vault to adjust the delegations for
  • NETWORK_ADDRESS - an address of the network to set a limit for
  • LIMIT - a maximum amount of stake the network can get

set-operator-network-limit

symb.py set-operator-network-limit VAULT_ADDRESS NETWORK_ADDRESS OPERATOR_ADDRESS LIMIT

Set an operator-network limit at the vault's delegator.

  • VAULT_ADDRESS - an address of the vault to adjust the delegations for
  • NETWORK_ADDRESS - an address of the network
  • OPERATOR_ADDRESS - an address of the operator to set a limit in the network for
  • LIMIT - a maximum amount of stake the operator can get in the network

set-operator-network-shares

symb.py set-operator-network-shares VAULT_ADDRESS NETWORK_ADDRESS OPERATOR_ADDRESS SHARES

Set operator-network shares at the vault's delegator.

  • VAULT_ADDRESS - an address of the vault to adjust the delegations for
  • NETWORK_ADDRESS - an address of the network
  • OPERATOR_ADDRESS - an address of the operator to set shares in the network for
  • SHARES - an amount of shares (determines a percent = operator shares / total shares of the network stake the operator can get) to set for the operator