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

feat: add xai and xai-sepolia #85

Merged
merged 1 commit into from
Aug 27, 2024
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
24 changes: 24 additions & 0 deletions assets/chains.json

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

24 changes: 24 additions & 0 deletions src/named.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,13 @@ pub enum NamedChain {
#[cfg_attr(feature = "serde", serde(alias = "mantle-sepolia"))]
MantleSepolia = 5003,

#[strum(to_string = "xai")]
#[cfg_attr(feature = "serde", serde(alias = "xai"))]
Xai = 660279,
#[strum(to_string = "xai-sepolia")]
#[cfg_attr(feature = "serde", serde(alias = "xai-sepolia"))]
XaiSepolia = 37714555429,

Viction = 88,

Zora = 7777777,
Expand Down Expand Up @@ -454,6 +461,8 @@ impl NamedChain {
| C::ArbitrumTestnet
| C::ArbitrumGoerli
| C::ArbitrumSepolia
| C::Xai
| C::XaiSepolia
| C::Syndr
| C::SyndrSepolia
| C::ArbitrumNova => 260,
Expand Down Expand Up @@ -638,6 +647,8 @@ impl NamedChain {
| C::ArbitrumGoerli
| C::ArbitrumSepolia
| C::ArbitrumNova
| C::Xai
| C::XaiSepolia
| C::Syndr
| C::SyndrSepolia
| C::FilecoinMainnet
Expand Down Expand Up @@ -734,6 +745,8 @@ impl NamedChain {
| C::Arbitrum
| C::ArbitrumNova
| C::ArbitrumSepolia
| C::Xai
| C::XaiSepolia
| C::Syndr
| C::SyndrSepolia
| C::Etherlink
Expand Down Expand Up @@ -834,6 +847,7 @@ impl NamedChain {
| C::KaruraTestnet
| C::CfxTestnet
| C::PulsechainTestnet
| C::XaiSepolia
| C::Koi => true,

// Dev chains.
Expand Down Expand Up @@ -875,6 +889,7 @@ impl NamedChain {
| C::Linea
| C::ZkSync
| C::Mantle
| C::Xai
| C::Zora
| C::Pgn
| C::Mode
Expand Down Expand Up @@ -915,6 +930,8 @@ impl NamedChain {

C::Mantle | C::MantleSepolia => "MNT",

C::Xai | C::XaiSepolia => "XAI",

C::BinanceSmartChain
| C::BinanceSmartChainTestnet
| C::OpBNBMainnet
Expand Down Expand Up @@ -1042,6 +1059,9 @@ impl NamedChain {
}
C::ArbitrumNova => ("https://api-nova.arbiscan.io/api", "https://nova.arbiscan.io"),

C::XaiSepolia => ("https://sepolia.xaiscan.io/api", "https://sepolia.xaiscan.io"),
C::Xai => ("https://xaiscan.io/api", "https://xaiscan.io"),

C::Syndr => ("https://explorer.syndr.com/api", "https://explorer.syndr.com"),
C::SyndrSepolia => {
("https://sepolia-explorer.syndr.com/api", "https://sepolia-explorer.syndr.com")
Expand Down Expand Up @@ -1307,6 +1327,8 @@ impl NamedChain {
| C::Mantle
| C::MantleTestnet
| C::MantleSepolia
| C::Xai
| C::XaiSepolia
| C::BaseGoerli
| C::BaseSepolia
| C::Fraxtal
Expand Down Expand Up @@ -1494,6 +1516,8 @@ mod tests {
(Mantle, &["mantle"]),
(MantleTestnet, &["mantle-testnet"]),
(MantleSepolia, &["mantle-sepolia"]),
(Xai, &["xai"]),
(XaiSepolia, &["xai-sepolia"]),
(Base, &["base"]),
(BaseGoerli, &["base-goerli"]),
(BaseSepolia, &["base-sepolia"]),
Expand Down
Loading