Validator CLI - v1.2.0
Installation
-
Download the executable
-
Apply executable permissions to the binary
CLI Usage
Initialize Validator CLI
Download SKALE Manager contracts info and set the node of the network
Required Arguments
--endpoint/-e
is the RPC endpoint of the node in the network where SKALE Manager is deployed [http or https]--contracts-url/-c
is the URL to SKALE Manager contracts ABI and addresses-w/--wallet
is the type of the wallet that will be used to sign transactions. Must be of type software, sgx, or hardware.
Usage Example
SGX Commands
Init
This command creates an SGX Wallet.
Optional Arguments
--force/-f
rewrites the current sgx wallet data--ssl-port
specifies the port that is used by the sgx server to establish a TLS connection
Info
This command prints information about the SGX Wallet.
Optional Arguments
--raw
prints info in plain JSON
Validator Commands
Register
Registers as a new SKALE validator.
Required Arguments
--name/-n
is the validator name--description/-d
is the validator description--commission-rate/-c
is the commission rate in percentage form--min-delegation
is the minimum delegation amount that the validator will accept
Optional Arguments
--pk-file
is a path to a file with private key (only supported for software wallet type)--gas-price
allows the executor to specify the gas price value in gwei for a transaction. If not specified, the average gas price of the network will be double and set.--yes
the confirmation flag may be set in advance
Usage Example
List
Lists all available validators.
Optional Arguments
--wei/-w
can be used to show the amount of tokens in wei
Delegations
Returns a list of delegations for a given validator id.
Required Parameters
VALIDATOR_ID
is the id of the validator. This is a numeric value.
Accept Pending Delegations
This command will accept pending delegations by delegation Id.
Requirement Arguments
--delegation-id
is the id of he delegation request to accept
Optional Arguments
--pk-file
is a path to a file with private key (only supported for software wallet type)--gas-price
allows the executor to specify the gas price value in gwei for a transaction. If not specified, the average gas price of the network will be double and set.--yes
the confirmation flag may be set in advance
Accept All Pending Delegations
Optional Arguments
--pk-file
is a path to a file with private key (only supported for software wallet type)--gas-price
allows the executor to specify the gas price value in gwei for a transaction. If not specified, the average gas price of the network will be double and set.
Validator Linked Addresses
Lists the linked addresses for the validator address.
Required Parameters
ADDRESS
is the Ethereum address of the validator
Link Address
Links a node address to the validator account.
Required Parameters
ADDRESS
is the Ethereum address that will be linkedNODE_SIGNATURE
is the signature of the node that you can get using theskale node signature
command from the SKALE Node CLI
Optional Arguments
--pk-file
is a path to a file with private key (only supported for software wallet type)--gas-price
allows the executor to specify the gas price value in gwei for a transaction. If not specified, the average gas price of the network will be double and set.--yes
the confirmation flag may be set in advance
Unlink Address
Unlinks a node address from the validator account.
Required Parameters
ADDRESS
is the Ethereum address that will be unlinked
Optional Arguments
--pk-file
is a path to a file with private key (only supported for software wallet type)--gas-price
allows the executor to specify the gas price value in gwei for a transaction. If not specified, the average gas price of the network will be double and set.--yes
the confirmation flag may be set in advance
Validator Info
Shows info about a given validator.
Required Parameters
VALIDATOR_ID
is the validator id to lookup
Output Includes:
- Validator Id
- Validator Name
- Validator Address
- Validator Fee Rate (in percentage form)
- Minimum Delegation Amount (SKL)
- If the validator is accepting new delegation requests
Withdraw Fee
Withdraws earned fees to a specified address.
Required Parameters
RECIPIENT_ADDRESS
is the address to transfer the bounties too
Optional Arguments
--pk-file
is a path to a file with private key (only supported for software wallet type)--gas-price
allows the executor to specify the gas price value in gwei for a transaction. If not specified, the average gas price of the network will be double and set.--yes
the confirmation flag may be set in advance
Set Minimum Delegation Amount (MDA)
Sets new minimum delegation amount for the validator.
Required Parameters
NEW_MDA
is the new mda value
Optional Arguments
--pk-file
is a path to a file with private key (only supported for software wallet type)--gas-price
allows the executor to specify the gas price value in gwei for a transaction. If not specified, the average gas price of the network will be double and set.--yes
the confirmation flag may be set in advance
Request Address Change
Requests a change of Ethereum Address for the validator.
Required Parameters
ADDRESS
is the validator Ethereum address
Optional Arguments
--pk-file
is a path to a file with private key (only supported for software wallet type)--gas-price
allows the executor to specify the gas price value in gwei for a transaction. If not specified, the average gas price of the network will be double and set.--yes
the confirmation flag may be set in advance
Confirm Address Change
Confirms a requested address change for the validator.
Required Parameters
VALIDATOR_ID
is the ID of the associated validator
Optional Arguments
--pk-file
is a path to a file with private key (only supported for software wallet type)--gas-price
allows the executor to specify the gas price value in gwei for a transaction. If not specified, the average gas price of the network will be double and set.--yes
the confirmation flag may be set in advance
Earned Fees
Retrieves the earned fee amount for the validator address.
*Required Parameters
ADDRESS
is the validator address to check
Optional Arguments
--wei
can be used to show the amount in wei
Holder Commands
Delegate
Delegate tokens to a validator
Required Arguments
--validator-id
is the id of the validator to delegate to--amount
is the amount of SKL tokens to delegate--delegation-period
is the delegation period in months [Set to 2]--info
to request info on the delegation
Optional Arguments
--pk-file
is a path to a file with private key (only supported for software wallet type)--gas-price
allows the executor to specify the gas price value in gwei for a transaction. If not specified, the average gas price of the network will be double and set.
Delegations
Use to list out all delegations for an address.
Required Parameters
ADDRESS
is the Ethereum address of the SKL token holder
Optional Arguments
--wei/-w
to show amounts in wei
Cancel Pending Delegation
Use to cancel a pending delegation request.
Required Parameters
DELEGATION_ID
is the id of the delegation to cancel
Optional Arguments
--pk-file
is a path to a file with private key (only supported for software wallet type)--gas-price
allows the executor to specify the gas price value in gwei for a transaction. If not specified, the average gas price of the network will be double and set.
Request Undelegation
Request undelegation which goes into affect at the end of the undelegation period.
Required Parameters
DELEGATION_ID
is the id of the delegation to cancel
Optional Arguments
--pk-file
is a path to a file with private key (only supported for software wallet type)--gas-price
allows the executor to specify the gas price value in gwei for a transaction. If not specified, the average gas price of the network will be double and set.
Withdraw Bounty
Withdraws a bounty to the specified address
Required Parameters
VALIDATOR_ID
is the id of the validatorRECIPIENT_ADDRESS
is the Ethereum address to have the bounty sent too
Optional Arguments
--pk-file
is a path to a file with private key (only supported for software wallet type)--gas-price
allows the executor to specify the gas price value in gwei for a transaction. If not specified, the average gas price of the network will be double and set.--yes
confirmation flag can be used to auto execute
Locked
Shows the amount of locked tokens for an address.
Required Parameters
ADDRESS
is the Ethereum address of the SKL token holder
Optional Arguments
--wei/-w
to show amounts in wei
Earned Bounties
Reads the amount of earned bounties by a token holder for a single validator.
Required Parameters
VALIDATOR_ID
is the id of the validatorADDRESS
is the Ethereum address of the SKL token holder
Optional Arguments
--wei/-w
to show amounts in wei
Wallet Commands
Setup Ledger
Required Arguments
--address-index
is the index of the wallet to use (starts at 0)--keys-type
is the type of Ledger keys whether live or legacy
Send ETH Tokens
Executes a transfer of ETH tokens to a specific address.
Required Parameters
ADDRESS
is the Ethereum receiver address (e.g to)AMOUNT
is the amount of ETH tokens to send
Optional Arguments
--pk-file
is a path to a file with private key (only supported for software wallet type)--yes
confirmation flag can be used to auto execute
Usage Example
Send SKL Tokens
Executes a transfer of SKL tokens to a specific address.
Required Parameters
ADDRESS
is the Ethereum receiver address (e.g to)AMOUNT
is the amount of ETH tokens to send
Optional Arguments
--pk-file
is a path to a file with private key (only supported for software wallet type)--yes
confirmation flag can be used to auto execute
Usage Example
Self-Recharging Wallet Commands
Balance
Shows the balance of the validator self-recharging wallet.
Required Parameters
VALIDATOR_ID
is the ID of the validator
Optional Arguments
--wei/-w
shows the amount in wei
Usage Example
Recharge Wallet
Recharges the validator SRW wallet (amount in ETH).
Required Parameters
AMOUNT
is the amount of ETH tokens to send
Optional Arguments
--pk-file
is a path to a file with private key (only supported for software wallet type)--yes
confirmation flag can be used to auto execute
Usage Example
Withdraw
Withdraw ETH from validator SRW (amount in ETH).
Required Parameters
AMOUNT
is the amount of ETH tokens to send
Optional Arguments
--pk-file
is a path to a file with private key (only supported for software wallet type)--yes
confirmation flag can be used to auto execute
Usage Example
Exit Codes
Code | Explanation |
---|---|
0 | Everything is OK |
1 | General error exit code |
3 | Bad API response |
4 | Script execution error |
5 | Transaction error |
6 | Revert error |