Skip to content
This repository was archived by the owner on Oct 6, 2025. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update chain settings
1. Add Goerli, which is an alias of Prater
2. Remove Kintsugi
  • Loading branch information
hwwhww committed Jul 28, 2022
commit 160d69b52b4f20891ffee91c51a346937e8eb78c
16 changes: 8 additions & 8 deletions staking_deposit/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,30 @@ class BaseChainSetting(NamedTuple):


MAINNET = 'mainnet'
ROPSTEN = 'ropsten'
GOERLI = 'goerli'
PRATER = 'prater'
KINTSUGI = 'kintsugi'
KILN = 'kiln'
ROPSTEN = 'ropsten'


# Mainnet setting
MainnetSetting = BaseChainSetting(NETWORK_NAME=MAINNET, GENESIS_FORK_VERSION=bytes.fromhex('00000000'))
# Ropsten setting
RopstenSetting = BaseChainSetting(NETWORK_NAME=ROPSTEN, GENESIS_FORK_VERSION=bytes.fromhex('80000069'))
# Testnet (spec v1.0.1)
PraterSetting = BaseChainSetting(NETWORK_NAME=PRATER, GENESIS_FORK_VERSION=bytes.fromhex('00001020'))
# Merge Testnet (spec v1.1.4)
KintsugiSetting = BaseChainSetting(NETWORK_NAME=KINTSUGI, GENESIS_FORK_VERSION=bytes.fromhex('60000069'))
# GOERLI (PRATER is alias)
_GOERLI_GENESIS_FORK_VERSION = bytes.fromhex('00001020')
GoerliSetting = BaseChainSetting(NETWORK_NAME=GOERLI, GENESIS_FORK_VERSION=_GOERLI_GENESIS_FORK_VERSION)
PraterSetting = BaseChainSetting(NETWORK_NAME=PRATER, GENESIS_FORK_VERSION=_GOERLI_GENESIS_FORK_VERSION)
# Merge Testnet (spec v1.1.9)
KilnSetting = BaseChainSetting(NETWORK_NAME=KILN, GENESIS_FORK_VERSION=bytes.fromhex('70000069'))


ALL_CHAINS: Dict[str, BaseChainSetting] = {
MAINNET: MainnetSetting,
ROPSTEN: RopstenSetting,
GOERLI: GoerliSetting,
PRATER: PraterSetting,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of defining PraterSetting separately, why don't we only define a GoerliSetting and just define PRATER: GoerliSetting, in this map? This way we clean up the duplicate settings & variables in lines 23-26 and only have to manage one BaseChainSetting for both.

KINTSUGI: KintsugiSetting,
KILN: KilnSetting,
ROPSTEN: RopstenSetting,
}


Expand Down