We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 49dfed6 commit 140164eCopy full SHA for 140164e
crates/sdk/src/common/types.rs
@@ -569,9 +569,17 @@ impl Network {
569
}
570
571
572
- // TODO: complete this
573
pub fn chain_id(&self) -> u64 {
574
- todo!()
+ match self {
+ Self::Devnet => 31_337,
575
+ Self::Holesky | Self::HoleskyStage => 17_000,
576
+ Self::Hoodi => 560_048,
577
+ Self::Mainnet | Self::MainnetStage => 1,
578
+ Self::Sepolia => 11_155_111,
579
+ Self::Custom(_, _, _) => {
580
+ panic!("Custom networks must supply their chain id separately")
581
+ }
582
583
584
585
0 commit comments