Constants

The Geodefi contants module contains commonly used values.

ZERO

# The bytes(0)
geode.globals.constants.ZERO_BYTES
>> b''

# The bytes32(0) value
geode.globals.constants.ZERO_BYTES32
>> b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'

# The address(0) value
geode.globals.constants.ZERO_ADDRESS
>> "0x0000000000000000000000000000000000000000"

Beacon Chain Execution specs

# Execution-spec constants taken from https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md
geode.globals.constants.DOMAIN_DEPOSIT
>> b'\x03\x00\x00\x00'

geode.globals.constants.BLS_WITHDRAWAL_PREFIX
>> b'\x00'

geode.globals.constants.ETH1_ADDRESS_WITHDRAWAL_PREFIX
>> b'\x01'

Network

# The maximum try before raise exception
geode.globals.constants.MAX_ATTEMPT
>> 10

# The seconds value of refresh rate of the internal cache (s)
geode.globals.constants.REFRESH_RATE
>> 60

# The interval between tries (s)
geode.globals.constants.ATTEMPT_RATE
>> 0.1