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

add berachain #138

Merged
merged 1 commit into from
Feb 7, 2025
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
40 changes: 26 additions & 14 deletions assets/chains.json

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

27 changes: 17 additions & 10 deletions src/named.rs
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,8 @@ pub enum NamedChain {
)]
BerachainArtio = 80085,

Berachain = 80094,

#[strum(to_string = "superposition-testnet")]
#[cfg_attr(feature = "serde", serde(alias = "superposition-testnet"))]
SuperpositionTestnet = 98985,
Expand Down Expand Up @@ -728,7 +730,7 @@ impl NamedChain {

UnichainSepolia => 1_000,

BerachainBartio | BerachainArtio => 2_000,
BerachainBartio | BerachainArtio | Berachain => 2_000,

Morden | Ropsten | Rinkeby | Goerli | Kovan | Sepolia | Holesky | MantleTestnet
| Moonbase | MoonbeamDev | OptimismKovan | Poa | Sokol | Rsk | EmeraldTestnet
Expand Down Expand Up @@ -869,6 +871,7 @@ impl NamedChain {
| ApeChain
| BerachainBartio
| BerachainArtio
| Berachain
| Curtis
| SuperpositionTestnet
| Superposition => false,
Expand Down Expand Up @@ -1062,7 +1065,7 @@ impl NamedChain {
| Mode | Viction | Elastos | Degen | OpBNBMainnet | Ronin | Taiko | Flare | Acala
| Karura | Darwinia | Cfx | Crab | Pulsechain | Etherlink | Immutable | World
| Iotex | Core | Merlin | Bitlayer | ApeChain | Vana | Zeta | Kaia | Treasure | Bob
| Soneium | Sonic | Superposition => false,
| Soneium | Sonic | Superposition | Berachain => false,
}
}

Expand Down Expand Up @@ -1122,7 +1125,7 @@ impl NamedChain {

Treasure | TreasureTopaz => "MAGIC",

BerachainBartio | BerachainArtio => "BERA",
BerachainBartio | BerachainArtio | Berachain => "BERA",

Sonic => "S",

Expand Down Expand Up @@ -1467,14 +1470,14 @@ impl NamedChain {
("https://api-sepolia.worldscan.org/api", "https://sepolia.worldscan.org")
}
UnichainSepolia => {
("https://sepolia.uniscan.xyz", "https://api-sepolia.uniscan.xyz/api")
("https://api-sepolia.uniscan.xyz/api", "https://sepolia.uniscan.xyz")
}
Core => ("https://scan.coredao.org", "https://openapi.coredao.org/api"),
Merlin => ("https://scan.merlinchain.io", "https://scan.merlinchain.io/api"),
Bitlayer => ("https://www.btrscan.com", "https://api.btrscan.com/scan/api"),
Vana => ("https://vanascan.io", "https://instance_base_url/api"),
Zeta => ("https://zetachain.blockscout.com", "https://zetachain.blockscout.com/api"),
Kaia => ("https://kaiascan.io", "https://mainnet-oapi.kaiascan.io/api"),
Core => ("https://openapi.coredao.org/api", "https://scan.coredao.org"),
Merlin => ("https://scan.merlinchain.io/api", "https://scan.merlinchain.io"),
Bitlayer => ("https://api.btrscan.com/scan/api", "https://www.btrscan.com"),
Vana => ("https://api.vanascan.io/api", "https://vanascan.io"),
Zeta => ("https://zetachain.blockscout.com/api", "https://zetachain.blockscout.com"),
Kaia => ("https://mainnet-oapi.kaiascan.io/api", "https://kaiascan.io"),

ApeChain => ("https://api.apescan.io/api", "https://apescan.io"),
Curtis => ("https://curtis.explorer.caldera.xyz/api/v2", "https://curtis.apescan.io"),
Expand All @@ -1490,6 +1493,7 @@ impl NamedChain {
),
BerachainBartio => ("https://bartio.beratrail.io/api", "https://bartio.beratrail.io"),
BerachainArtio => ("https://artio.beratrail.io/api", "https://artio.beratrail.io"),
Berachain => ("https://api.berascan.com/api", "https://berascan.com"),
SuperpositionTestnet => (
"https://testnet-explorer.superposition.so/api",
"https://testnet-explorer.superposition.so",
Expand Down Expand Up @@ -1590,6 +1594,7 @@ impl NamedChain {
Zeta => "ZETASCAN_API_KEY",
Kaia => "KAIASCAN_API_KEY",
Sonic => "SONICSCAN_API_KEY",
Berachain => "BERASCAN_API_KEY",
// Explicitly exhaustive. See NB above.
Metis
| Chiado
Expand Down Expand Up @@ -1721,6 +1726,8 @@ impl NamedChain {
Kaia => address!("19aac5f612f524b754ca7e7c41cbfa2e981a4432"),
Treasure => address!("263d8f36bb8d0d9526255e205868c26690b04b88"),
Superposition => address!("1fB719f10b56d7a85DCD32f27f897375fB21cfdd"),
Sonic => address!("039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38"),
Berachain => address!("6969696969696969696969696969696969696969"),
_ => return None,
};

Expand Down