Skip to content

Commit

Permalink
Add max-priority-fee to network config
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeny-stakewise committed Mar 7, 2024
1 parent 0953a1d commit 141d349
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/config/networks.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class NetworkConfig:
SHAPELLA_EPOCH: int
MULTICALL_CONTRACT_ADDRESS: ChecksumAddress
SHARED_MEV_ESCROW_CONTRACT_ADDRESS: ChecksumAddress
MAX_PRIORITY_FEE_PER_GAS_GWEI: int

@property
def SHAPELLA_FORK(self) -> ConsensusFork:
Expand Down Expand Up @@ -96,6 +97,7 @@ def IS_SUPPORT_V2_MIGRATION(self) -> bool:
SHARED_MEV_ESCROW_CONTRACT_ADDRESS=Web3.to_checksum_address(
'0x48319f97E5Da1233c21c48b80097c0FB7a20Ff86'
),
MAX_PRIORITY_FEE_PER_GAS_GWEI=5,
),
HOLESKY: NetworkConfig(
SYMBOL='HolETH',
Expand Down Expand Up @@ -130,6 +132,7 @@ def IS_SUPPORT_V2_MIGRATION(self) -> bool:
SHARED_MEV_ESCROW_CONTRACT_ADDRESS=Web3.to_checksum_address(
'0xc98F25BcAA6B812a07460f18da77AF8385be7b56'
),
MAX_PRIORITY_FEE_PER_GAS_GWEI=1,
),
GNOSIS: NetworkConfig(
SYMBOL='xDAI',
Expand Down Expand Up @@ -163,5 +166,6 @@ def IS_SUPPORT_V2_MIGRATION(self) -> bool:
'0xcA11bde05977b3631167028862bE2a173976CA11'
),
SHARED_MEV_ESCROW_CONTRACT_ADDRESS=Web3.to_checksum_address(EMPTY_ADDR_HEX),
MAX_PRIORITY_FEE_PER_GAS_GWEI=1,
),
}
4 changes: 3 additions & 1 deletion src/config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ def set(
self.metrics_host = metrics_host
self.metrics_port = metrics_port
self.max_fee_per_gas_gwei = max_fee_per_gas_gwei
self.max_priority_fee_per_gas_gwei = max_priority_fee_per_gas_gwei
self.max_priority_fee_per_gas_gwei = (
max_priority_fee_per_gas_gwei or self.network_config.MAX_PRIORITY_FEE_PER_GAS_GWEI
)

self.deposit_data_file = (
Path(deposit_data_file) if deposit_data_file else vault_dir / 'deposit_data.json'
Expand Down

0 comments on commit 141d349

Please sign in to comment.