Installation
Requirements:
- Linux x86_64 machine
- Access the latest version at https://github.com/skalenetwork/validator-cli/releases
-
Download the executable
-
Apply executable permissions to the binary
CLI Usage
Initialize Validator CLI
Download SKALE Manager contracts info and set the supernode of the network--endpoint/-eis the RPC endpoint of the supernode in the network where SKALE Manager is deployed [http or https]--contracts-url/-cis the URL to SKALE Manager contracts ABI and addresses-w/--walletis the type of the wallet that will be used to sign transactions. Must be of type software, sgx, or hardware.
If you want to use the SGX wallet you need to initialize it first (see SGX commands).
SGX Commands
Init
This command creates an SGX Wallet.--force/-frewrites the current sgx wallet data--ssl-portspecifies the port that is used by the sgx server to establish a TLS connection
Info
This command prints information about the SGX Wallet.--rawprints info in plain JSON
Validator Commands
Register
Registers as a new SKALE validator.--name/-nis the validator name--description/-dis the validator description--commission-rate/-cis the commission rate in percentage form--min-delegationis the minimum delegation amount that the validator will accept
--pk-fileis a path to a file with private key (only supported for software wallet type)--gas-priceallows 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.--yesthe confirmation flag may be set in advance
Usage Example
List
Lists all available validators.--wei/-wcan be used to show the amount of tokens in wei
Delegations
Returns a list of delegations for a given validator id.VALIDATOR_IDis the id of the validator. This is a numeric value.
Accept Pending Delegations
This command will accept pending delegations by delegation Id.--delegation-idis the id of he delegation request to accept
--pk-fileis a path to a file with private key (only supported for software wallet type)--gas-priceallows 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.--yesthe confirmation flag may be set in advance
Accept All Pending Delegations
--pk-fileis a path to a file with private key (only supported for software wallet type)--gas-priceallows 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.ADDRESSis the Ethereum address of the validator
Link Address
Links a supernode address to the validator account.ADDRESSis the Ethereum address that will be linkedNODE_SIGNATUREis the signature of the supernode that you can get using theskale node signaturecommand from the SKALE Node CLI
--pk-fileis a path to a file with private key (only supported for software wallet type)--gas-priceallows 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.--yesthe confirmation flag may be set in advance
Unlink Address
Unlinks a supernode address from the validator account.ADDRESSis the Ethereum address that will be unlinked
--pk-fileis a path to a file with private key (only supported for software wallet type)--gas-priceallows 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.--yesthe confirmation flag may be set in advance
Validator Info
Shows info about a given validator.VALIDATOR_IDis the validator id to lookup
- 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.RECIPIENT_ADDRESSis the address to transfer the bounties too
--pk-fileis a path to a file with private key (only supported for software wallet type)--gas-priceallows 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.--yesthe confirmation flag may be set in advance
Set Minimum Delegation Amount (MDA)
Sets new minimum delegation amount for the validator.NEW_MDAis the new mda value
--pk-fileis a path to a file with private key (only supported for software wallet type)--gas-priceallows 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.--yesthe confirmation flag may be set in advance
Request Address Change
Requests a change of Ethereum Address for the validator.ADDRESSis the validator Ethereum address
--pk-fileis a path to a file with private key (only supported for software wallet type)--gas-priceallows 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.--yesthe confirmation flag may be set in advance
Confirm Address Change
Confirms a requested address change for the validator.VALIDATOR_IDis the ID of the associated validator
--pk-fileis a path to a file with private key (only supported for software wallet type)--gas-priceallows 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.--yesthe confirmation flag may be set in advance
Earned Fees
Retrieves the earned fee amount for the validator address.ADDRESSis the validator address to check
--weican be used to show the amount in wei
Holder Commands
Delegate
Delegate tokens to a validator--validator-idis the id of the validator to delegate to--amountis the amount of SKL tokens to delegate--delegation-periodis the delegation period in months [Set to 2]--infoto request info on the delegation
--pk-fileis a path to a file with private key (only supported for software wallet type)--gas-priceallows 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.ADDRESSis the Ethereum address of the SKL token holder
--wei/-wto show amounts in wei
Cancel Pending Delegation
Use to cancel a pending delegation request.DELEGATION_IDis the id of the delegation to cancel
--pk-fileis a path to a file with private key (only supported for software wallet type)--gas-priceallows 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.DELEGATION_IDis the id of the delegation to cancel
--pk-fileis a path to a file with private key (only supported for software wallet type)--gas-priceallows 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 addressVALIDATOR_IDis the id of the validatorRECIPIENT_ADDRESSis the Ethereum address to have the bounty sent too
--pk-fileis a path to a file with private key (only supported for software wallet type)--gas-priceallows 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.--yesconfirmation flag can be used to auto execute
Locked
Shows the amount of locked tokens for an address.ADDRESSis the Ethereum address of the SKL token holder
--wei/-wto show amounts in wei
Earned Bounties
Reads the amount of earned bounties by a token holder for a single validator.VALIDATOR_IDis the id of the validatorADDRESSis the Ethereum address of the SKL token holder
--wei/-wto show amounts in wei
Wallet Commands
Setup Ledger
This only works if you are using a Ledger Wallet.
--address-indexis the index of the wallet to use (starts at 0)--keys-typeis the type of Ledger keys whether live or legacy
Send ETH Tokens
Executes a transfer of ETH tokens to a specific address.ADDRESSis the Ethereum receiver address (e.g to)AMOUNTis the amount of ETH tokens to send
--pk-fileis a path to a file with private key (only supported for software wallet type)--yesconfirmation flag can be used to auto execute
Usage Example
Send SKL Tokens
Executes a transfer of SKL tokens to a specific address.ADDRESSis the Ethereum receiver address (e.g to)AMOUNTis the amount of ETH tokens to send
--pk-fileis a path to a file with private key (only supported for software wallet type)--yesconfirmation flag can be used to auto execute
Usage Example
Self-Recharging Wallet Commands
Balance
Shows the balance of the validator self-recharging wallet.VALIDATOR_IDis the ID of the validator
--wei/-wshows the amount in wei
Usage Example
Recharge Wallet
Recharges the validator SRW wallet (amount in ETH).AMOUNTis the amount of ETH tokens to send
--pk-fileis a path to a file with private key (only supported for software wallet type)--yesconfirmation flag can be used to auto execute
Usage Example
Withdraw
Withdraw ETH from validator SRW (amount in ETH).AMOUNTis the amount of ETH tokens to send
--pk-fileis a path to a file with private key (only supported for software wallet type)--yesconfirmation 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 |
