Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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 @@ -685,6 +685,12 @@ impl Chain {
Self::from_named(NamedChain::Tempo)
}

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

/// Returns the kind of this chain.
#[inline]
pub const fn kind(&self) -> &ChainKind {
Expand Down
17 changes: 14 additions & 3 deletions src/named.rs
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,8 @@ pub enum NamedChain {
Tempo = 4217,
TempoModerato = 42431,
TempoTestnet = 42429,

ArcTestnet = 5042002,
}

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

PolkadotTestnet | Kusama | Polkadot => 2_000,

ArcTestnet => 500,

Morden | Ropsten | Rinkeby | Goerli | Kovan | Sepolia | Holesky | Hoodi
| MoonbeamDev | OptimismKovan | Poa | Sokol | EmeraldTestnet | Boba | Metis | Linea
| LineaGoerli | LineaSepolia | Treasure | TreasureTopaz | Corn | CornTestnet
Expand Down Expand Up @@ -1141,7 +1145,8 @@ impl NamedChain {
| XdcTestnet
| Tempo
| TempoTestnet
| TempoModerato => false,
| TempoModerato
| ArcTestnet => false,
}
}

Expand Down Expand Up @@ -1264,6 +1269,7 @@ impl NamedChain {
| PolkadotTestnet
| Kusama
| Polkadot
| ArcTestnet
)
}

Expand Down Expand Up @@ -1357,7 +1363,8 @@ impl NamedChain {
| XdcTestnet
| TempoTestnet
| TempoModerato
| PlasmaTestnet => true,
| PlasmaTestnet
| ArcTestnet => true,

// Dev chains.
Dev | AnvilHardhat | Cannon => true,
Expand Down Expand Up @@ -1484,6 +1491,8 @@ impl NamedChain {
Kusama => "KSM",
Polkadot => "DOT",

ArcTestnet => "USDC",

_ => return None,
})
}
Expand Down Expand Up @@ -1865,6 +1874,7 @@ impl NamedChain {
"https://blockscout-kusama.polkadot.io",
),
Polkadot => ("https://blockscout.polkadot.io/api", "https://blockscout.polkadot.io"),
ArcTestnet => ("https://testnet.arcscan.app/api", "https://testnet.arcscan.app"),

AcalaTestnet | AnvilHardhat | ArbitrumGoerli | ArbitrumTestnet
| AutonomysNovaTestnet | BaseGoerli | Canto | CantoTestnet | CronosTestnet | Dev
Expand Down Expand Up @@ -2015,7 +2025,8 @@ impl NamedChain {
| SkaleBaseSepoliaTestnet
| PolkadotTestnet
| Kusama
| Polkadot => "BLOCKSCOUT_API_KEY",
| Polkadot
| ArcTestnet => "BLOCKSCOUT_API_KEY",

Boba => "BOBASCAN_API_KEY",

Expand Down