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 blast #47

Merged
merged 1 commit into from
Feb 28, 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
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 @@ -310,6 +310,12 @@ impl Chain {
Self::from_named(NamedChain::FraxtalTestnet)
}

/// Returns the blast chain.
#[inline]
pub const fn blast() -> Self {
Self::from_named(NamedChain::Blast)
}

/// Returns the blast sepolia chain.
#[inline]
pub const fn blast_sepolia() -> Self {
Expand Down
9 changes: 9 additions & 0 deletions src/named.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ pub enum NamedChain {
#[cfg_attr(feature = "serde", serde(alias = "fraxtal-testnet"))]
FraxtalTestnet = 2522,

Blast = 81457,
#[cfg_attr(feature = "serde", serde(alias = "blast-sepolia"))]
BlastSepolia = 168587773,

Expand Down Expand Up @@ -373,6 +374,7 @@ impl NamedChain {
| C::Base
| C::BaseGoerli
| C::BaseSepolia
| C::Blast
| C::BlastSepolia
| C::Fraxtal
| C::FraxtalTestnet
Expand Down Expand Up @@ -492,6 +494,7 @@ impl NamedChain {
| C::Base
| C::BaseGoerli
| C::BaseSepolia
| C::Blast
| C::BlastSepolia
| C::Fraxtal
| C::FraxtalTestnet
Expand Down Expand Up @@ -565,6 +568,7 @@ impl NamedChain {
| C::Base
| C::BaseGoerli
| C::BaseSepolia
| C::Blast
| C::BlastSepolia
| C::Fraxtal
| C::FraxtalTestnet
Expand Down Expand Up @@ -645,6 +649,7 @@ impl NamedChain {
| C::Optimism
| C::Arbitrum
| C::ArbitrumNova
| C::Blast
| C::Cronos
| C::Rsk
| C::BinanceSmartChain
Expand Down Expand Up @@ -886,6 +891,9 @@ impl NamedChain {
("https://api-holesky.fraxscan.com/api", "https://holesky.fraxscan.com")
}

C::Blast => {
("https://api.routescan.io/v2/network/evm/81457/etherscan", "https://blastscan.io")
}
C::BlastSepolia => (
"https://api.routescan.io/v2/network/testnet/evm/168587773/etherscan",
"https://testnet.blastscan.io",
Expand Down Expand Up @@ -990,6 +998,7 @@ impl NamedChain {
| C::BaseSepolia
| C::Fraxtal
| C::FraxtalTestnet
| C::Blast
| C::BlastSepolia
| C::Gnosis
| C::Scroll
Expand Down
Loading