staking-deposit-cli/eth2deposit/utils/constants.py

33 lines
1.0 KiB
Python
Raw Normal View History

2020-02-28 21:02:11 +00:00
import os
ZERO_BYTES32 = b'\x00' * 32
# Eth2-spec constants taken from https://github.com/ethereum/eth2.0-specs/blob/dev/specs/phase0/beacon-chain.md
DOMAIN_DEPOSIT = bytes.fromhex('03000000')
BLS_WITHDRAWAL_PREFIX = bytes.fromhex('00')
ETH1_ADDRESS_WITHDRAWAL_PREFIX = bytes.fromhex('01')
ETH2GWEI = 10 ** 9
MIN_DEPOSIT_AMOUNT = 2 ** 0 * ETH2GWEI
MAX_DEPOSIT_AMOUNT = 2 ** 5 * ETH2GWEI
# File/folder constants
WORD_LISTS_PATH = os.path.join('eth2deposit', 'key_handling', 'key_derivation', 'word_lists')
DEFAULT_VALIDATOR_KEYS_FOLDER_NAME = 'validator_keys'
2020-06-26 14:10:19 +00:00
# Internationalisation constants
INTL_CONTENT_PATH = os.path.join('eth2deposit', 'intl')
INTL_LANG_OPTIONS = {
'cs': ('Český Jazyk', 'cs', 'Cesky Jazyk', 'Czech'),
'en': ('English', 'en'),
'es': ('Español', 'Espanol', 'es', 'Spanish'),
'it': ('Italiano', 'it', 'Italian'),
'ko': ('조선말', '한국어', 'ko', 'Korean'),
'zh': ('汉语', 'zh', 'Chinease'),
}
2020-06-26 14:10:19 +00:00
# Sundry constants
UNICODE_CONTROL_CHARS = list(range(0x00, 0x20)) + list(range(0x7F, 0xA0))