Skip to content

Commit

Permalink
enforce custom in right place + fix
Browse files Browse the repository at this point in the history
  • Loading branch information
PatStiles committed Jan 10, 2025
1 parent de8237d commit 413aada
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions batcher/aligned-sdk/src/core/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ pub const BATCHER_PAYMENT_SERVICE_ADDRESS_HOLESKY_STAGE: &str =
pub const BATCHER_PAYMENT_SERVICE_ADDRESS_MAINNET: &str =
"0xb0567184A52cB40956df6333510d6eF35B89C8de";
/// AlignedServiceManager
pub const ALIGNED_SERVICE_MANAGER_DEVNET: &str = "0x1613beB3B2C4f22Ee086B2b38C1476A3cE7f78E8";
pub const ALIGNED_SERVICE_MANAGER_DEVNET: &str = "0x851356ae760d987E095750cCeb3bC6014560891C";
pub const ALIGNED_SERVICE_MANAGER_HOLESKY: &str = "0x58F280BeBE9B34c9939C3C39e0890C81f163B623";
pub const ALIGNED_SERVICE_MANAGER_HOLESKY_STAGE: &str =
"0x9C5231FC88059C086Ea95712d105A2026048c39B";
pub const ALIGNED_SERVICE_MANAGER_HOLESKY_MAINNET: &str =
pub const ALIGNED_SERVICE_MANAGER_MAINNET: &str =
"0xeF2A435e5EE44B2041100EF8cbC8ae035166606c";
6 changes: 3 additions & 3 deletions batcher/aligned-sdk/src/core/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use sha3::{Digest, Keccak256};

use super::constants::{
ALIGNED_SERVICE_MANAGER_DEVNET, ALIGNED_SERVICE_MANAGER_HOLESKY,
ALIGNED_SERVICE_MANAGER_HOLESKY_MAINNET, ALIGNED_SERVICE_MANAGER_HOLESKY_STAGE,
ALIGNED_SERVICE_MANAGER_MAINNET, ALIGNED_SERVICE_MANAGER_HOLESKY_STAGE,
BATCHER_PAYMENT_SERVICE_ADDRESS_DEVNET, BATCHER_PAYMENT_SERVICE_ADDRESS_HOLESKY,
BATCHER_PAYMENT_SERVICE_ADDRESS_HOLESKY_STAGE, BATCHER_PAYMENT_SERVICE_ADDRESS_MAINNET,
};
Expand Down Expand Up @@ -430,7 +430,7 @@ impl Network {
Self::Devnet => H160::from_str(ALIGNED_SERVICE_MANAGER_DEVNET).unwrap(),
Self::Holesky => H160::from_str(ALIGNED_SERVICE_MANAGER_HOLESKY).unwrap(),
Self::HoleskyStage => H160::from_str(ALIGNED_SERVICE_MANAGER_HOLESKY_STAGE).unwrap(),
Self::Mainnet => H160::from_str(ALIGNED_SERVICE_MANAGER_HOLESKY_MAINNET).unwrap(),
Self::Mainnet => H160::from_str(ALIGNED_SERVICE_MANAGER_MAINNET).unwrap(),
Self::Custom(_, s) => H160::from_str(s.as_str()).unwrap(),
}
}
Expand All @@ -454,7 +454,7 @@ impl FromStr for Network {
}
let parts: Vec<&str> = s.split_whitespace().collect();

if parts.len() == 3 {
if parts.len() == 3 && parts[0].contains("custom") {
Ok(Network::Custom(parts[1].to_string(), parts[2].to_string()))
} else {
Err(
Expand Down

0 comments on commit 413aada

Please sign in to comment.