diff --git a/src/pool/constants.rs b/src/pool/constants.rs new file mode 100644 index 000000000..752ce8384 --- /dev/null +++ b/src/pool/constants.rs @@ -0,0 +1 @@ +pub(super) static ONE_TENTH_ETH: u64 = 10u64.pow(17); diff --git a/src/pool/mempool.rs b/src/pool/mempool.rs index 3974fc2f8..fb4a643cb 100644 --- a/src/pool/mempool.rs +++ b/src/pool/mempool.rs @@ -4,6 +4,7 @@ use super::validate::KakarotTransactionValidator; use crate::{ client::EthClient, into_via_try_wrapper, + pool::constants::ONE_TENTH_ETH, providers::eth_provider::{ constant::RPC_CONFIG, database::state::EthDatabase, starknet::relayer::LockedRelayer, BlockProvider, }, @@ -154,7 +155,7 @@ impl AccountM .unwrap_or_default(); // If the balance is lower than the threshold, continue - if balance < U256::from(u128::pow(10, 18)) { + if balance < U256::from(ONE_TENTH_ETH) { accounts.remove(account_address); continue; } diff --git a/src/pool/mod.rs b/src/pool/mod.rs index 6353b6168..252056409 100644 --- a/src/pool/mod.rs +++ b/src/pool/mod.rs @@ -1,2 +1,3 @@ +mod constants; pub mod mempool; pub mod validate;