diff --git a/src/common/credentials.py b/src/common/credentials.py index 7ffdbaa5..adb2d14b 100644 --- a/src/common/credentials.py +++ b/src/common/credentials.py @@ -17,7 +17,7 @@ ) from staking_deposit.key_handling.keystore import Keystore, ScryptKeystore from staking_deposit.settings import DEPOSIT_CLI_VERSION -from sw_utils import get_eth1_withdrawal_credentials +from sw_utils import convert_to_gno, get_eth1_withdrawal_credentials from sw_utils.signing import ( DepositData, DepositMessage, @@ -30,7 +30,7 @@ from src.common.utils import chunkify from src.config.networks import NETWORKS -from src.config.settings import DEPOSIT_AMOUNT_GWEI +from src.config.settings import DEPOSIT_AMOUNT_GWEI, GNOSIS_NETWORKS # Set path as EIP-2334 format # https://eips.ethereum.org/EIPS/eip-2334 @@ -55,7 +55,10 @@ def private_key_bytes(self) -> bytes: @cached_property def amount(self) -> int: - return DEPOSIT_AMOUNT_GWEI + amount = DEPOSIT_AMOUNT_GWEI + if self.network in GNOSIS_NETWORKS: + amount = convert_to_gno(amount) + return amount @cached_property def withdrawal_credentials(self) -> Bytes32: diff --git a/src/config/settings.py b/src/config/settings.py index a3225be1..069b3554 100644 --- a/src/config/settings.py +++ b/src/config/settings.py @@ -239,6 +239,7 @@ def is_genesis_vault(self) -> bool: AVAILABLE_NETWORKS = [MAINNET, HOLESKY, GNOSIS, CHIADO] DEFAULT_NETWORK = MAINNET +GNOSIS_NETWORKS = [GNOSIS, CHIADO] # oracles UPDATE_SIGNATURES_URL_PATH = '/signatures'