Support for EOS deposits / withdrawals + encrypted private key storage
Pre-release
Pre-release
EOS Support - Deposits and Withdrawals
- Created EOS coin handler (enabled by default)
- EOSMixin - contains shared code between loader/manager such as the
Cleos
instance,
default contracts etc. - EOSLoader - Loads
actions
for a given EOS account, cleans them into Deposit format,
support for EOS tokens - EOSManager - For sending EOS, username validation and checking account balances
(uses new private key store functionality)
- EOSMixin - contains shared code between loader/manager such as the
- Added requirement for
libeospy
by EOS NYC, used for interacting with EOS nodes - EOS node settings can be configured from database using a Coin with the symbol
EOS
- Tokens can be added by setting the coin type to "EOS Token" from admin
- Tokens without a default in
EOSMixin
MUST have a settings JSON containing the EOS
contract account, e.g.{"contract": "eosio.token"}
- If no node is configured, uses https://eos.greymass.com:443 by default
Encrypted private key storage in the database
- CryptoKeyPair model for storing public/private keys in the database, for coins without a decent wallet API
- Private keys are encrypted with AES-128 using Fernet when a CryptoKeyPair is saved
- Admin page for adding new key pair's, private keys are only shown in encrypted form from the panel
- Management command for generating a new encryption key
General Cleanup and improvements
- Copied a lot of the BitcoinMixin code into SettingsMixin and generic-ified it for use in all
coin handlers.- SettingsMixin allows for both coin loaders and managers to easily access their Coin's
settings, as well as automatically merging in any settings from settings.COIND_RPC
(can be disabled by overridinguse_coind_settings
from child class) - TODO: BitcoinMixin should now extend SettingsMixin and only override the methods/attributes
it needs to.
- SettingsMixin allows for both coin loaders and managers to easily access their Coin's
- The
load_txs
command now has a--coins
option, so you can scan only specified coins,
e.g../manage.py load_txs --coins LTC,EOS
- Added new exception
MissingTokenMetadata
for coin handlers that require metadata such as an account
to send/receive from, or custom settings like a contract - Refactored coin handler exceptions so they all extend
CoinHandlerException
for blanket catching all
coin handler specific exceptions - The shared
Steem
instance now has call retries capped at 5 attempts, and a lower timeout of
20s (instead of default 60s). This will help prevent any permanent hanging caused by bad nodes. - Various other small cleanups and fixes