Skip to content

Commit

Permalink
Shimmer network support (#70)
Browse files Browse the repository at this point in the history
Adds support for shimmer network https://shimmer.network/
Marked as a legacy because of this issue:
iotaledger/wasp#3392
  • Loading branch information
SozinM authored Jun 25, 2024
1 parent c9a6c1b commit 6040f2d
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
12 changes: 12 additions & 0 deletions assets/chains.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions src/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,12 @@ impl Chain {
Self::from_named(NamedChain::TaikoHekla)
}

/// Returns the shimmer testnet chain.
#[inline]
pub const fn shimmer() -> Self {
Self::from_named(NamedChain::Shimmer)
}

/// Returns the kind of this chain.
#[inline]
pub const fn kind(&self) -> &ChainKind {
Expand Down
14 changes: 14 additions & 0 deletions src/named.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ pub enum NamedChain {
#[cfg_attr(feature = "serde", serde(alias = "syndr-sepolia"))]
SyndrSepolia = 444444,

Shimmer = 148,

#[strum(to_string = "fraxtal")]
#[cfg_attr(feature = "serde", serde(alias = "fraxtal"))]
Fraxtal = 252,
Expand Down Expand Up @@ -453,6 +455,8 @@ impl NamedChain {

C::Scroll | C::ScrollSepolia => 3_000,

C::Shimmer => 5_000,

C::Gnosis | C::Chiado => 5_000,

C::Elastos => 5_000,
Expand Down Expand Up @@ -530,6 +534,7 @@ impl NamedChain {
| C::PolygonZkEvmTestnet
| C::Scroll
| C::ScrollSepolia
| C::Shimmer
| C::Metis
| C::Viction
| C::Elastos
Expand Down Expand Up @@ -643,6 +648,7 @@ impl NamedChain {
| C::EtherlinkTestnet
| C::Scroll
| C::ScrollSepolia
| C::Shimmer
| C::OpBNBMainnet
| C::OpBNBTestnet
| C::KakarotSepolia
Expand Down Expand Up @@ -703,6 +709,7 @@ impl NamedChain {
| C::PolygonAmoy
| C::PolygonZkEvmTestnet
| C::ScrollSepolia
| C::Shimmer
| C::ZkSyncTestnet
| C::ZoraGoerli
| C::ZoraSepolia
Expand Down Expand Up @@ -794,6 +801,8 @@ impl NamedChain {

C::Ronin => "RON",

C::Shimmer => "SMR",

_ => return None,
})
}
Expand Down Expand Up @@ -918,6 +927,10 @@ impl NamedChain {
("https://api-sepolia.scrollscan.com/api", "https://sepolia.scrollscan.com")
}

C::Shimmer => {
("https://explorer.evm.shimmer.network/api", "https://explorer.evm.shimmer.network")
}

C::Metis => {
("https://andromeda-explorer.metis.io/api", "https://andromeda-explorer.metis.io")
}
Expand Down Expand Up @@ -1148,6 +1161,7 @@ impl NamedChain {
C::Metis
| C::Chiado
| C::Sepolia
| C::Shimmer
| C::Rsk
| C::Sokol
| C::Poa
Expand Down

0 comments on commit 6040f2d

Please sign in to comment.