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
-
Make sure to have an installed
Git
(Download Git) -
Make sure to have an installed
Python
(Download Python) -
Open a terminal (e.g., Command Prompt on Windows, Git Bash, or terminal on macOS/Linux)
-
Clone the repository by running the following command:
git clone https://github.com/symbioticfi/cli.git
-
Navigate into the cloned repository folder:
cd cli
-
Install the required
Python
packages by running the following command:pip3 install -r requirements.txt
-
Run the CLI by executing:
python3 symb.py <general-options> <command> <args> <options>
<general-options>
- general options to execute the command with (e.g.,--chain
allows to select a chain to interact with)--chain <CHAIN_ID>
- choose a chain to interact with<CHAIN_ID>
-holesky
|sepolia
--provider <HTTPS_PROVIDER>
- use a custom RPC link to interact with a blockchain<HTTPS_PROVIDER>
- e.g.,https://ethereum-holesky-rpc.publicnode.com
<command>
- a name of the 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
-
Make sure you have an installed
Ledger Live
(Download Ledger Live) -
Make sure you have a
Blind Signing
enabled on your Ledger device for the Ethereum app (How to enable Blind Signing) -
Before each transaction, make sure to be logged into the Ethereum app and to have a Ledger device unlocked
Read Commands - Related to Networks
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 forNETWORK_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 forNETWORK_ADDRESS
- an address of the network to get a resolver for
Read Commands - Related to Operators
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 ofVAULT_ADDRESS
- an address of the vault to get a stake atNETWORK_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 ofNETWORK_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 ofVAULT_ADDRESS
- an address of the vault to check an opt-in status for
Read Commands - Related to Vaults
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
Read Commands - Related to Stakers
active-balance-of
python3 symb.py active-balance-of VAULT_ADDRESS ADDRESS
Get an active balance of a given account at a particular vault.
VAULT_ADDRESS
- an address of the vaultADDRESS
- an address to get an active balance for
withdrawals-of
python3 symb.py withdrawals-of VAULT_ADDRESS EPOCH ADDRESS
Get some epoch’s withdrawals of a given account at a particular vault.
VAULT_ADDRESS
- an address of the vaultEPOCH
- an epoch to get withdrawals forADDRESS
- an address to get withdrawals for
withdrawals-claimed
python3 symb.py withdrawals-of VAULT_ADDRESS EPOCH ADDRESS
Check if some epoch’s withdrawals of a given account at a particular vault are claimed.
VAULT_ADDRESS
- an address of the vaultEPOCH
- an epoch to check forADDRESS
- an address to get if the withdrawals are claimed for
Write Commands - For Networks
Currently, there are 2 ways to sign transactions using the CLI:
-
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
- Add
-
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
- Add
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 forMAX_LIMIT
- a maximum amount of stake a network is ready to get from the vault (in wei)
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 forRESOLVER
- an address of the resolver to set
Write Commands - For Operators
Currently, there are 2 ways to sign transactions using the CLI:
-
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
- Add
-
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
- Add
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-network-signature
symb.py opt-in-network-signature NETWORK_ADDRESS DURATION
Get a signature for opt-in to a network.
NETWORK_ADDRESS
- an address of the network to opt intoDURATION
- a period of time (in seconds) after which the signature will expire (default is 7 days)
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-in-vault-signature
symb.py opt-in-vault-signature VAULT_ADDRESS DURATION
Get a signature for opt-in to a vault.
VAULT_ADDRESS
- an address of the vault to opt intoDURATION
- a period of time (in seconds) after which the signature will expire (default is 7 days)
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-network-signature
symb.py opt-out-network-signature NETWORK_ADDRESS DURATION
Get a signature for opt-out from a network.
NETWORK_ADDRESS
- an address of the network to opt out fromDURATION
- a period of time (in seconds) after which the signature will expire (default is 7 days)
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
opt-out-vault-signature
symb.py opt-out-vault-signature VAULT_ADDRESS DURATION
Get a signature for opt-out from a vault.
VAULT_ADDRESS
- an address of the vault to opt out fromDURATION
- a period of time (in seconds) after which the signature will expire (default is 7 days)
Write Commands - For Vault Curators
Currently, there are 2 ways to sign transactions using the CLI:
-
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
- Add
-
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
- Add
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 forNETWORK_ADDRESS
- an address of the network to set a limit forLIMIT
- a maximum amount of stake the network can get (in wei)
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 forNETWORK_ADDRESS
- an address of the networkOPERATOR_ADDRESS
- an address of the operator to set a limit in the network forLIMIT
- a maximum amount of stake the operator can get in the network (in wei)
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 forNETWORK_ADDRESS
- an address of the networkOPERATOR_ADDRESS
- an address of the operator to set shares in the network forSHARES
- an amount of shares (determines a percent = operator shares / total shares of the network stake the operator can get) to set for the operator
Write Commands - For Stakers
Currently, there are 2 ways to sign transactions using the CLI:
-
Using your private key:
- Add
--private-key <YOUR_PRIVATE_KEY>
after each command and its arguments
Example:
python3 symb.py deposit 0x0000000000000000000000000000000000000000 0 --private-key 0000000000000000000000000000000000000000000000000000000000000000
- Add
-
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 deposit 0x0000000000000000000000000000000000000000 0 --ledger
python3 symb.py deposit 0x0000000000000000000000000000000000000000 0 --ledger --ledger-address 0x0000000000000000000000000000000000000000
- Add
deposit
symb.py deposit VAULT_ADDRESS AMOUNT ON_BEHALF_OF
Deposit to the vault.
VAULT_ADDRESS
- an address of the vault to deposit toAMOUNT
- an amount of tokens to deposit (in the token value, e.g., 1000 for 1000 ETH)ON_BEHALF_OF
- an address to make a deposit on behalf of (default: address of the signer)
withdraw
symb.py withdraw VAULT_ADDRESS AMOUNT CLAIMER
Withdraw from the vault.
VAULT_ADDRESS
- an address of the vault to withdraw fromAMOUNT
- an amount of tokens to withdraw (in the token value, e.g., 1000 for 1000 ETH)CLAIMER
- an address that needs to claim the withdrawal (default: address of the signer)
claim
symb.py claim VAULT_ADDRESS EPOCH RECIPIENT
Claim a withdrawal for some epoch at the vault.
VAULT_ADDRESS
- an address of the vault to claim fromEPOCH
- an epoch number to claim a withdrawal forRECIPIENT
- an address that will receive the tokens (default: address of the signer)