Skip to content

Commit

Permalink
feat: add kakarot sepolia (#43)
Browse files Browse the repository at this point in the history
This Pr adds support for[ Kakarot zkEVM's](https://kakarot.org/)
upcoming sepolia testnet, the PRs for the same have already been merged
in
[viem](https://github.com/wevm/viem/blob/main/src/chains/definitions/kakarotSepolia.ts)
and
[ethereum-lists/chains](https://github.com/ethereum-lists/chains/blob/a723229a31400c6ed60538a582acebbe0cd6361c/_data/chains/eip155-107107114116.json#L2).

---------

Co-authored-by: Matthias Seitz <[email protected]>
  • Loading branch information
bajpai244 and mattsse authored Feb 14, 2024
1 parent dd9b524 commit b53e41d
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 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.

18 changes: 14 additions & 4 deletions src/named.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,9 @@ pub enum NamedChain {
Mode = 34443,
#[cfg_attr(feature = "serde", serde(alias = "mode-sepolia"))]
ModeSepolia = 919,

#[cfg_attr(feature = "serde", serde(alias = "kakarot-sepolia"))]
KakarotSepolia = 107107114116,
}

// This must be implemented manually so we avoid a conflict with `TryFromPrimitive` where it treats
Expand Down Expand Up @@ -427,7 +430,8 @@ impl NamedChain {
| C::Linea
| C::LineaGoerli
| C::Mantle
| C::MantleTestnet => return None,
| C::MantleTestnet
| C::KakarotSepolia => return None,
}))
}

Expand Down Expand Up @@ -505,7 +509,8 @@ impl NamedChain {
| C::Mode
| C::ModeSepolia
| C::Pgn
| C::PgnSepolia => false,
| C::PgnSepolia
| C::KakarotSepolia => false,

// Unknown / not applicable, default to false for backwards compatibility.
C::Dev
Expand Down Expand Up @@ -615,7 +620,8 @@ impl NamedChain {
| C::ZoraGoerli
| C::ZoraSepolia
| C::ModeSepolia
| C::PgnSepolia => true,
| C::PgnSepolia
| C::KakarotSepolia => true,

// Dev chains.
C::Dev | C::AnvilHardhat => true,
Expand Down Expand Up @@ -910,6 +916,9 @@ impl NamedChain {
C::AnvilHardhat | C::Dev | C::Morden | C::MoonbeamDev | C::FilecoinMainnet => {
return None;
}
C::KakarotSepolia => {
("https://sepolia.kakarotscan.org/api", "https://sepolia.kakarotscan.org")
}
})
}

Expand Down Expand Up @@ -984,7 +993,8 @@ impl NamedChain {
| C::Mode
| C::ModeSepolia
| C::Pgn
| C::PgnSepolia => "BLOCKSCOUT_API_KEY",
| C::PgnSepolia
| C::KakarotSepolia => "BLOCKSCOUT_API_KEY",

C::Boba => "BOBASCAN_API_KEY",

Expand Down

0 comments on commit b53e41d

Please sign in to comment.