Skip to content

Commit

Permalink
chore: add monad testnet (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse authored Feb 21, 2025
1 parent 16d881d commit ef5f7cd
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
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.

13 changes: 12 additions & 1 deletion src/named.rs
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,10 @@ pub enum NamedChain {
#[strum(to_string = "superposition")]
#[cfg_attr(feature = "serde", serde(alias = "superposition"))]
Superposition = 55244,

#[strum(serialize = "monad-testnet")]
#[cfg_attr(feature = "serde", serde(alias = "monad-testnet"))]
MonadTestnet = 10143,
}

// This must be implemented manually so we avoid a conflict with `TryFromPrimitive` where it treats
Expand Down Expand Up @@ -748,6 +752,8 @@ impl NamedChain {

BerachainBartio | BerachainArtio | Berachain => 2_000,

MonadTestnet => 500,

Morden | Ropsten | Rinkeby | Goerli | Kovan | Sepolia | Holesky | MantleTestnet
| Moonbase | MoonbeamDev | OptimismKovan | Poa | Sokol | Rsk | EmeraldTestnet
| Boba | ZkSync | ZkSyncTestnet | PolygonZkEvm | PolygonZkEvmTestnet | Metis
Expand Down Expand Up @@ -893,7 +899,8 @@ impl NamedChain {
| Berachain
| Curtis
| SuperpositionTestnet
| Superposition => false,
| Superposition
| MonadTestnet => false,

// Unknown / not applicable, default to false for backwards compatibility.
Dev | AnvilHardhat | Morden | Ropsten | Rinkeby | Cronos | CronosTestnet | Kovan
Expand Down Expand Up @@ -988,6 +995,7 @@ impl NamedChain {
| Curtis
| SuperpositionTestnet
| Superposition
| MonadTestnet
)
}

Expand Down Expand Up @@ -1072,6 +1080,7 @@ impl NamedChain {
| BerachainBartio
| BerachainArtio
| SuperpositionTestnet
| MonadTestnet
| TelosEvmTestnet => true,

// Dev chains.
Expand Down Expand Up @@ -1527,6 +1536,7 @@ impl NamedChain {
Superposition => {
("https://explorer.superposition.so/api", "https://explorer.superposition.so")
}
MonadTestnet => ("https://sourcify.dev/server", "https://testnet.monadexplorer.com"),
TelosEvm => ("https://api.teloscan.io/api", "https://teloscan.io"),
TelosEvmTestnet => {
("https://api.testnet.teloscan.io/api", "https://testnet.teloscan.io")
Expand Down Expand Up @@ -1597,6 +1607,7 @@ impl NamedChain {
| TaikoHekla
| Unichain
| UnichainSepolia
| MonadTestnet
| ApeChain => "ETHERSCAN_API_KEY",

Avalanche | AvalancheFuji => "SNOWTRACE_API_KEY",
Expand Down

0 comments on commit ef5f7cd

Please sign in to comment.