Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shimmer network support #70

Merged
merged 4 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -703,6 +708,7 @@ impl NamedChain {
| C::PolygonAmoy
| C::PolygonZkEvmTestnet
| C::ScrollSepolia
| C::Shimmer
| C::ZkSyncTestnet
| C::ZoraGoerli
| C::ZoraSepolia
Expand Down Expand Up @@ -794,6 +800,8 @@ impl NamedChain {

C::Ronin => "RON",

C::Shimmer => "SMR",

_ => return None,
})
}
Expand Down Expand Up @@ -918,6 +926,11 @@ 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
Loading