Skip to content

Commit

Permalink
change localnet domain
Browse files Browse the repository at this point in the history
  • Loading branch information
byeongsu-hong committed Nov 26, 2023
1 parent 1cebc39 commit 1f95de3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
8 changes: 4 additions & 4 deletions rust/hyperlane-core/src/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ pub enum KnownHyperlaneDomain {
ScrollSepolia = 534351,

/// Cosmos local chains
CosmosTest26657 = 26657,
CosmosTest26658 = 26658,
CosmosTest99990 = 99990,
CosmosTest99991 = 99991,
}

#[derive(Clone)]
Expand Down Expand Up @@ -200,7 +200,7 @@ impl KnownHyperlaneDomain {
Goerli, Mumbai, Fuji, ArbitrumGoerli, OptimismGoerli, BinanceSmartChainTestnet,
Alfajores, MoonbaseAlpha, Sepolia, PolygonZkEvmTestnet, LineaGoerli, BaseGoerli, ScrollSepolia, Chiado
],
LocalTestChain: [Test1, Test2, Test3, FuelTest1, SealevelTest1, SealevelTest2, CosmosTest26657, CosmosTest26658],
LocalTestChain: [Test1, Test2, Test3, FuelTest1, SealevelTest1, SealevelTest2, CosmosTest99990, CosmosTest99991],
})
}

Expand All @@ -215,7 +215,7 @@ impl KnownHyperlaneDomain {
],
HyperlaneDomainProtocol::Fuel: [FuelTest1],
HyperlaneDomainProtocol::Sealevel: [SealevelTest1, SealevelTest2],
HyperlaneDomainProtocol::Cosmos: [CosmosTest26657, CosmosTest26658],
HyperlaneDomainProtocol::Cosmos: [CosmosTest99990, CosmosTest99991],
})
}
}
Expand Down
6 changes: 3 additions & 3 deletions rust/utils/run-locally/src/cosmos/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ fn link_network(
) {
let validator_addr = validator.addr(hrp);

let dest_domain = if network.domain == 26657 {
26658
let dest_domain = if network.domain == 99990 {
99991
} else {
26657
99990
};

// hook routing
Expand Down
7 changes: 4 additions & 3 deletions rust/utils/run-locally/src/cosmos/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -347,18 +347,19 @@ fn run_locally() {
};

let port_start = 26600u32;
let domain_start = 26657u32;
let domain_start = 99990u32;
let node_count = 2;


let nodes = (0..node_count)
.map(|i| {
(
launch_cosmos_node(CosmosConfig {
node_port_base: port_start + (i * 10),
chain_id: format!("cosmos-test-{}", i + 26657),
chain_id: format!("cosmos-test-{}", i + domain_start),
..default_config.clone()
}),
format!("cosmos-test-{}", i + 26657),
format!("cosmos-test-{}", i + domain_start),
domain_start + i,
)
})
Expand Down

0 comments on commit 1f95de3

Please sign in to comment.