/staking_manager

Easy-to-get-started framework for managing investments in many staking protocols

Primary LanguagePythonMIT LicenseMIT

StakingManager

Python based CLI tool for staking (nominating) in Polkadot
⚠️ Not production ready ⚠️

Instructions:

run python StakingManager.py dot -h
- NOTE: because only polkadot is supported, you must give dot as the first argument. In the future, when we support additional networks, there will be other options to dot

Features:

  • Pretty intuitive ArgParser (see examples.py) for:
    • Creating a mnemonic, keypair, getting acct info
    • Bonding, unbonding, rebonding, withdrawing
    • Nominating (Staking), setting staker requirements
  • Validations and error handling for staking:

Codebase Notes:

Coding Patterns (Ideals):

  • SOLID - https://gist.github.com/dmmeteo/f630fa04c7a79d3c132b9e9e5d037bfd
  • If a filename has a corresponding Utils file, one should not ever need to import the Utils file except in its pair.
    • For example, accountManager.py should import accountManagerUtils.py, but no other files should import accountManagerUtils.py. Instead, all other files should only ever have to import accountManager.py.
  • Pass "generic" arguements first in a function and more unique arguements subsequently
    • For example, in def __init__(self, logger, accountManager), self and logic are generic and therefore passed before accountManager

Immediate TODOs:

  • Add local network docker deployment for better testing
  • Adding new substrate based chains to stake on
  • check TODOs in substrateCallImplementationUtils
  • rename all cases of "bounder" to "bonder"
  • rename code_src > src