Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Commit

Permalink
feat(chain): add degen chain mainnet (#2778)
Browse files Browse the repository at this point in the history
* chore(chain): add degen chain mainnet

* fix: remove trailing character
  • Loading branch information
guidota authored Apr 15, 2024
1 parent 5394d89 commit 51fe937
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions ethers-core/src/types/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@ pub enum Chain {
ModeSepolia = 919,

Elastos = 20,

Degen = 666666666,
}

// === impl Chain ===
Expand Down Expand Up @@ -333,6 +335,7 @@ impl Chain {
Viction => 2_000,
Mode | ModeSepolia => 2_000,
Elastos => 5_000,
Degen => 622,
// Explicitly exhaustive. See NB above.
Morden | Ropsten | Rinkeby | Goerli | Kovan | Sepolia | Holesky | Moonbase |
MoonbeamDev | OptimismKovan | Poa | Sokol | Rsk | EmeraldTestnet | Boba | Base |
Expand Down Expand Up @@ -417,7 +420,8 @@ impl Chain {
ModeSepolia |
Zora |
ZoraGoerli |
ZoraSepolia => false,
ZoraSepolia |
Degen => false,

// Unknown / not applicable, default to false for backwards compatibility
Dev | AnvilHardhat | Morden | Ropsten | Rinkeby | Cronos | CronosTestnet | Kovan |
Expand Down Expand Up @@ -647,6 +651,7 @@ impl Chain {
"https://sepolia.explorer.mode.network",
),
Elastos => ("https://api.elastos.io/eth", "https://esc.elastos.io/"),
Degen => ("https://explorer.degen.tips/api", "https://explorer.degen.tips"),
};

Some(urls)
Expand Down Expand Up @@ -740,7 +745,8 @@ impl Chain {
LineaTestnet |
Viction |
FilecoinCalibrationTestnet |
Elastos => return None,
Elastos |
Degen => return None,
};

Some(api_key_name)
Expand Down

0 comments on commit 51fe937

Please sign in to comment.