mirror of
https://gitlab.com/pulsechaincom/staking-deposit-cli.git
synced 2025-01-10 13:01:22 +00:00
30 lines
609 B
Python
30 lines
609 B
Python
import sys
|
|
import click
|
|
|
|
from eth2deposit.cli.existing_mnemonic import existing_mnemonic
|
|
from eth2deposit.cli.new_mnemonic import new_mnemonic
|
|
from eth2deposit.utils.intl import load_text
|
|
|
|
|
|
def check_python_version() -> None:
|
|
'''
|
|
Checks that the python version running is sufficient and exits if not.
|
|
'''
|
|
if sys.version_info < (3, 7):
|
|
click.pause(load_text('en', ['err_python_version']))
|
|
sys.exit()
|
|
|
|
|
|
@click.group()
|
|
def cli() -> None:
|
|
pass
|
|
|
|
|
|
cli.add_command(existing_mnemonic)
|
|
cli.add_command(new_mnemonic)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
check_python_version()
|
|
cli()
|