{"id":29021548,"url":"https://github.com/skalenetwork/validator-cli","last_synced_at":"2025-06-26T02:06:30.864Z","repository":{"id":39884517,"uuid":"235117176","full_name":"skalenetwork/validator-cli","owner":"skalenetwork","description":"A command line tool for validators and delegators. Written in Python.","archived":false,"fork":false,"pushed_at":"2024-03-07T15:49:20.000Z","size":930,"stargazers_count":10,"open_issues_count":11,"forks_count":4,"subscribers_count":7,"default_branch":"develop","last_synced_at":"2025-01-01T04:32:39.342Z","etag":null,"topics":["cli","click","python","skale-network","web3py"],"latest_commit_sha":null,"homepage":"https://skale.network","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/skalenetwork.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-01-20T14:14:10.000Z","updated_at":"2022-01-26T15:29:34.000Z","dependencies_parsed_at":"2024-03-12T20:31:28.485Z","dependency_job_id":null,"html_url":"https://github.com/skalenetwork/validator-cli","commit_stats":null,"previous_names":[],"tags_count":167,"template":false,"template_full_name":null,"purl":"pkg:github/skalenetwork/validator-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skalenetwork%2Fvalidator-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skalenetwork%2Fvalidator-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skalenetwork%2Fvalidator-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skalenetwork%2Fvalidator-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skalenetwork","download_url":"https://codeload.github.com/skalenetwork/validator-cli/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skalenetwork%2Fvalidator-cli/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261984647,"owners_count":23240304,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","click","python","skale-network","web3py"],"created_at":"2025-06-26T02:06:28.031Z","updated_at":"2025-06-26T02:06:30.848Z","avatar_url":"https://github.com/skalenetwork.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SKALE Validator CLI\n\n![Build and publish](https://github.com/skalenetwork/validator-cli/workflows/Build%20and%20publish/badge.svg)\n![Test](https://github.com/skalenetwork/validator-cli/workflows/Test/badge.svg)\n[![Discord](https://img.shields.io/discord/534485763354787851.svg)](https://discord.gg/vvUtWJB)\n\n## Table of Contents\n\n1.  [Installation](#installation)\n2.  [CLI usage](#cli-usage)  \n    2.1 [Init](#init)  \n    2.2 [Validator commands](#validator-commands)  \n    2.3 [Holder commands](#holder-commands)  \n    2.4 [Metrics commands](#metrics-commands)  \n    2.5 [Wallet commands](#wallet-commands)  \n    2.6 [Self-recharging wallet commands](#self-recharging-wallet-commands)\n3.  [Exit codes](#exit-codes)\n4.  [Development](#development)\n\n## Installation\n\n### Requirements\n\n-   Linux x86_64 machine\n\n-   Download executable\n\n```bash\nVERSION_NUM={put the version number here} \u0026\u0026 sudo -E bash -c \"curl -L https://github.com/skalenetwork/validator-cli/releases/download/$VERSION_NUM/sk-val-$VERSION_NUM-`uname -s`-`uname -m` \u003e  /usr/local/bin/sk-val\"\n```\n\n-   Apply executable permissions to the binary:\n\n```bash\nsudo chmod +x /usr/local/bin/sk-val\n```\n\n### Where to find out the latest version?\n\nAll validator-cli version numbers are available here: https://github.com/skalenetwork/validator-cli/releases\n\n## CLI Usage\n\n### Init\n\nDownload SKALE Manager contracts info and set the endpoint.\n\n```bash\nsk-val init\n```\n\nRequired arguments:\n\n-   `--endpoint/-e` - RPC endpoint of the node in the network where SKALE manager is deployed (`http` or `https`)\n-   `--contracts-url/-c` - - URL to SKALE Manager contracts ABI and addresses\n-   `-w/--wallet` - Type of the wallet that will be used for signing transactions (software, sgx or hardware)\n\nIf you want to use sgx wallet you need to initialize it first (see **SGX commands**)\n\nUsage example:\n\n```bash\nsk-val init -e ws://geth.test.com:8546 -c https://test.com/manager.json --wallet software\n```\n\n### SGX commands\n\n#### Init \n Initialize sgx wallet  \n ```bash\nsk-val sgx init [SGX_SERVER_URL]\n```\nOptional arguments:\n-   `--force/-f` - Rewrite current sgx wallet data\n-  `--ssl-port` - Port that is used by sgx server to establish tls connection\n\n#### Info\nPrint sgx wallet information\n```bash\nsk-val sgx info \n```\nOptional arguments:\n-   `--raw` - Print info in plain json\n\n### Validator commands\n\n#### Register\n\nRegister as a new SKALE validator\n\n```bash\nsk-val validator register\n```\n\nRequired arguments:\n\n-   `--name/-n` - Validator name\n-   `--description/-d` - Validator description\n-   `--commission-rate/-c` - Commission rate (percentage)\n-   `--min-delegation` - Validator minimum delegation amount\n\nOptional arguments:\n\n-   `--pk-file` - Path to file with private key (only for `software` wallet type)\n-   `--gas-price` - Gas price value in Gwei for transaction (if not specified doubled average network value will be used)\n-   `--yes` - Confirmation flag\n\nUsage example:\n\n```bash\nsk-val validator register -n test -d \"test description\" -c 20 --min-delegation 1000 --pk-file ./pk.txt\n```\n\n#### List\n\nList of available validators\n\n```bash\nsk-val validator ls\n```\n\nOptions:\n\n-   `--wei/-w` - Show tokens amount in wei\n\n#### Delegations\n\nList of delegations for validator ID\n\n```bash\nsk-val validator delegations [VALIDATOR_ID]\n```\n\nRequired params:\n\n1) VALIDATOR_ID - ID of the validator\n\n#### Accept pending delegation\n\nAccept pending delegation request by delegation ID\n\n```bash\nsk-val validator accept-delegation --pk-file ./pk.txt\n```\n\nRequired arguments:\n\n-   `--delegation-id` - ID of the delegation request to accept\n\nOptional arguments:\n\n-   `--pk-file` - Path to file with private key (only for `software` wallet type)\n-   `--gas-price` - Gas price value in Gwei for transaction (if not specified doubled average network value will be used)\n-   `--yes` - Confirmation flag\n\n#### Accept all pending delegations\n\nAccept ALL pending delegations request for the address.  \nList with all pending delegations to be accepted will be shown. After this user should confirm the operation.\n\n```bash\nsk-val validator accept-all-delegations --pk-file ./pk.txt\n```\n\nOptional arguments:\n\n-   `--pk-file` - Path to file with private key (only for `software` wallet type)\n-   `--gas-price` - Gas price value in Gwei for transaction (if not specified doubled average network value will be used)\n\n#### Validator linked addresses\n\nList of the linked addresses for validator address\n\n```bash\nsk-val validator linked-addresses [ADDRESS]\n```\n\nRequired params:\n\n1) Address - Ethereum address of the validator\n\n#### Link address\n\nLink node address to the validator account\n\n```bash\nsk-val validator link-address [ADDRESS] [NODE_SIGNATURE] --pk-file ./pk.txt\n```\n\nRequired params:\n\n1) Address - Ethereum address that will be linked\n2) Node signature - Signature of the node that you can get using `skale node signature`\n   command from skale-node-cli\n\nOptional arguments:\n\n-   `--pk-file` - Path to file with private key (only for `software` wallet type)\n-   `--gas-price` - Gas price value in Gwei for transaction (if not specified doubled average network value will be used)\n-   `--yes` - Confirmation flag\n\n#### Unlink address\n\nUnlink node address from the validator account\n\n```bash\nsk-val validator unlink-address [ADDRESS] --pk-file ./pk.txt\n```\n\nRequired params:\n\n1) Address - Ethereum address that will be unlinked\n\nOptional arguments:\n\n-   `--pk-file` - Path to file with private key (only for `software` wallet type)\n-   `--gas-price` - Gas price value in Gwei for transaction (if not specified doubled average network value will be used)\n-   `--yes` - Confirmation flag\n\n#### Validator info\n\nInfo about the validator\n\n```bash\nsk-val validator info [VALIDATOR_ID]\n```\n\nRequired params:\n\n1) Address - Ethereum address of the validator\n\nOutput info:\n\n1) Validator ID\n2) Name\n3) Address\n4) Fee rate (percent - %)\n5) Minimum delegation amount (SKL)\n6) Accepting new delegation requests\n\n#### Withdraw fee\n\nWithdraw earned fee to specified address\n\n```bash\nsk-val validator withdraw-fee [RECIPIENT_ADDRESS] --pk-file ./pk.txt\n```\n\nRequired params:\n\n1) RECIPIENT_ADDRESS - Address to transfer bounty\n\nOptional arguments:\n\n-   `--pk-file` - Path to file with private key (only for `software` wallet type)\n-   `--gas-price` - Gas price value in Gwei for transaction (if not specified doubled average network value will be used)\n-   `--yes` - Confirmation flag\n\n#### Set MDA\n\nSet a new minimum delegation amount for the validator\n\n```bash\nsk-val validator set-mda [NEW_MDA] --pk-file ./pk.txt\n```\n\nRequired params:\n\n1) NEW_MDA - New MDA value\n\nOptional arguments:\n\n-   `--pk-file` - Path to file with private key (only for `software` wallet type)\n-   `--gas-price` - Gas price value in Gwei for transaction (if not specified doubled average network value will be used)\n-   `--yes` - Confirmation flag\n\n#### Request address change\n\nRequest address change for the validator\n\n```bash\nsk-val validator change-address [ADDRESS] --pk-file ./pk.txt\n```\n\nRequired params:\n\n1) ADDRESS - New validator address\n\nOptional arguments:\n\n-   `--pk-file` - Path to file with private key (only for `software` wallet type)\n-   `--gas-price` - Gas price value in Gwei for transaction (if not specified doubled average network value will be used)\n-   `--yes` - Confirmation flag\n\n#### Confirm address change\n\nConfirm address change for the validator. Should be executed using new validator key.\n\n```bash\nsk-val validator confirm-address [VALIDATOR_ID] --pk-file ./pk.txt\n```\n\nRequired params:\n\n1) VALIDATOR_ID - ID of the validator\n\nOptional arguments:\n\n-   `--pk-file` - Path to file with private key (only for `software` wallet type)\n-   `--gas-price` - Gas price value in Gwei for transaction (if not specified doubled average network value will be used)\n-   `--yes` - Confirmation flag\n\n#### Earned fees\n\nGet earned fee amount for the validator address\n\n```bash\nsk-val validator earned-fees [ADDRESS]\n```\n\nRequired params:\n\n1) ADDRESS - Validator address\n\nOptional arguments:\n\n-   `--wei` - Show amount in wei\n\n### Holder commands\n\n#### Delegate\n\nDelegate tokens to validator\n\n```bash\nsk-val holder delegate\n```\n\nRequired arguments:\n\n-   `--validator-id` - ID of the validator to delegate\n-   `--amount` - Amount of SKALE tokens to delegate\n-   `--delegation-period` - Delegation period (in months - only `2` avaliable now)\n-   `--info` - Delegation request info\n\nOptional arguments:\n\n-   `--pk-file` - Path to file with private key (only for `software` wallet type)\n-   `--gas-price` - Gas price value in Gwei for transaction (if not specified doubled average network value will be used)\n\n#### Delegations\n\nList of delegations for address\n\n```bash\nsk-val holder delegations [ADDRESS]\n```\n\nRequired arguments:\n\n1) ADDRESS - Ethereum address of the token holder\n\nOptions:\n\n-   `--wei/-w` - Show tokens amount in wei\n\n#### Cancel pending delegation\n\nCancel pending delegation request\n\n```bash\nsk-val holder cancel-delegation [DELEGATION_ID]\n```\n\nRequired params:\n\n1) Delegation ID - ID of the delegation to cancel\n\nOptional arguments:\n\n-   `--pk-file` - Path to file with private key (only for `software` wallet type)\n-   `--gas-price` - Gas price value in Gwei for transaction (if not specified doubled average network value will be used)\n\n#### Request undelegation\n\nRequest undelegation in the end of delegation period\n\n```bash\nsk-val holder undelegate [DELEGATION_ID]\n```\n\nRequired params:\n\n1) Delegation ID - ID of the delegation\n\nOptional arguments:\n\n-   `--pk-file` - Path to file with private key (only for `software` wallet type)\n-   `--gas-price` - Gas price value in Gwei for transaction (if not specified doubled average network value will be used)\n\n#### Withdraw bounty\n\nWithdraw earned bounty to specified address\n\n```bash\nsk-val holder withdraw-bounty [VALIDATOR_ID] [RECIPIENT_ADDRESS] --pk-file ./pk.txt\n```\n\nRequired params:\n\n1) VALIDATOR_ID - ID of the validator\n2) RECIPIENT_ADDRESS - Address to transfer bounty\n\nOptional arguments:\n\n-   `--pk-file` - Path to file with private key (only for `software` wallet type)\n-   `--gas-price` - Gas price value in Gwei for transaction (if not specified doubled average network value will be used)\n-   `--yes` - Confirmation flag\n\n#### Locked\n\nShow amount of locked tokens for address\n\n```bash\nsk-val holder locked [ADDRESS]\n```\n\nRequired arguments:\n\n1) ADDRESS - Ethereum address of the token holder\n\nOptions:\n\n-   `--wei/-w` - Show tokens amount in wei\n\n#### Earned bounties\n\nGet earned bounties amount by token holder for the validator ID\n\n```bash\nsk-val holder earned-bounties [VALIDATOR_ID] [ADDRESS]\n```\n\nRequired params:\n\n1) VALIDATOR_ID - ID of the validator\n1) ADDRESS - Token holder address\n\nOptional arguments:\n\n-   `--wei` - Show amount in wei\n\n\n### Wallet commands\n\n#### Setup Ledger\n\nThis command works only if you're using the Ledger wallet\n\n```bash\nsk-val wallet setup-ledger\n```\n\nRequired params:\n\n-   `--address-index` - Index of the address to use (starting from `0`)\n-   `--keys-type` - Type of the Ledger keys (live or legacy)\n\n#### Send ETH tokens\n\nSend ETH tokens to specific address\n\n```bash\nsk-val wallet send-eth [ADDRESS] [AMOUNT]\n```\n\nRequired arguments:\n\n1) ADDRESS - Ethereum receiver address\n2) AMOUNT - Amount of ETH tokens to send\n\nOptional arguments:\n\n-   `--pk-file` - Path to file with private key (only for `software` wallet type)\n-   `--yes` - Confirmation flag\n\nUsage example:\n\n```bash\nsk-val wallet send-eth 0x01C19c5d3Ad1C3014145fC82263Fbae09e23924A 0.01 --pk-file ./pk.txt --yes\n```\n\n#### Send SKL tokens\n\nSend SKL tokens to specific address\n\n```bash\nsk-val wallet send-skl [ADDRESS] [AMOUNT]\n```\n\nRequired arguments:\n\n1) ADDRESS - Ethereum receiver address\n2) AMOUNT - Amount of SKL tokens to send\n\nOptional arguments:\n\n-   `--pk-file` - Path to file with private key (only for `software` wallet type)\n-   `--yes` - Confirmation flag\n\nUsage example:\n\n```bash\nsk-val wallet send-skl 0x01C19c5d3Ad1C3014145fC82263Fbae09e23924A 0.01 --pk-file ./pk.txt --yes\n```\n\n### Self-recharging wallet commands\n\n#### Balance\n\nShow balance of the validator self-recharging wallet\n\n```bash\nsk-val srw balance [VALIDATOR_ID]\n```\n\nRequired arguments:\n\n1) VALIDATOR_ID - ID if the validator\n\nOptional arguments:\n\n-   `--wei/-w` - Show amount in wei\n\nUsage example:\n\n```bash\nsk-val srw balance 1 --wei\n```\n\n#### Recharge\n\nRecharge validator SRW wallet (amount in ETH)\n\n```bash\nsk-val srw recharge [AMOUNT]\n```\n\nRequired arguments:\n\n1) AMOUNT - Amount of ETH to recharge\n\nOptional arguments:\n\n-   `--pk-file` - Path to file with private key (only for `software` wallet type)\n-   `--gas-price` - Gas price value in Gwei for transaction (if not specified doubled average network value will be used)\n\nUsage example:\n\n```bash\nsk-val srw recharge 0.1 --pk-file ./tests/test-pk.txt\n```\n\n#### Withdraw\n\nWithdraw ETH from validator SRW wallet (amount in ETH)\n\n```bash\nsk-val srw withdraw [AMOUNT]\n```\n\nRequired arguments:\n\n1) AMOUNT - Amount of ETH to withdraw\n\nOptional arguments:\n\n-   `--pk-file` - Path to file with private key (only for `software` wallet type)\n-   `--gas-price` - Gas price value in Gwei for transaction (if not specified doubled average network value will be used)\n\nUsage example:\n\n```bash\nsk-val srw withdraw 0.1 --pk-file ./tests/test-pk.txt\n```\n\n## Exit codes\n\nExit codes conventions for SKALE CLI tools\n\n- `0` - Everything is OK\n- `1` - General error exit code\n- `3` - Bad API response\n- `4` - Script execution error\n- `5` - Transaction error\n- `6` - Revert error\n\n## Development\n\n### Setup repo\n\n#### Install development dependencies\n\n```bash\npip install -e .[dev]\n```\n\n##### Add flake8 git hook\n\nIn file `.git/hooks/pre-commit` add:\n\n```bash\n#!/bin/sh\nflake8 .\n```\n\n### Debugging\n\nRun commands in dev mode:\n\n```bash\npython main.py YOUR_COMMAND\n```\n\n### Setting up Travis\n\nRequired environment variables:\n\n-   `ACCESS_KEY_ID` - DO Spaces/AWS S3 API Key ID\n-   `SECRET_ACCESS_KEY` - DO Spaces/AWS S3 Secret access key\n-   `GITHUB_EMAIL` - Email of GitHub user\n-   `GITHUB_OAUTH_TOKEN` - GitHub auth token\n-   `ETH_PRIVATE_KEY` - Ethereum private key for tests (without `0x` prefix)\n-   `MANAGER_BRANCH` - Branch of the `skale-manager` to pull from DockerHub (`$MANAGER_BRANCH-latest` tag will be used)\n\n### License\n\n![GitHub](https://img.shields.io/github/license/skalenetwork/validator-cli.svg)\n\nAll contributions are made under the [GNU Affero General Public License v3](https://www.gnu.org/licenses/agpl-3.0.en.html). See [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskalenetwork%2Fvalidator-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskalenetwork%2Fvalidator-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskalenetwork%2Fvalidator-cli/lists"}