anychain_ethereum/network/
mainnet.rs

1use super::EthereumNetwork;
2
3#[derive(Copy, Clone, Debug)]
4pub struct Ethereum;
5
6#[derive(Copy, Clone, Debug)]
7pub struct EthereumClassic;
8
9#[derive(Copy, Clone, Debug)]
10pub struct Polygon;
11
12#[derive(Copy, Clone, Debug)]
13pub struct Arbitrum;
14
15#[derive(Copy, Clone, Debug)]
16pub struct Avalanche;
17
18#[derive(Copy, Clone, Debug)]
19pub struct Base;
20
21#[derive(Copy, Clone, Debug)]
22pub struct BinanceSmartChain;
23
24#[derive(Copy, Clone, Debug)]
25pub struct HuobiEco;
26
27#[derive(Copy, Clone, Debug)]
28pub struct Okex;
29
30#[derive(Copy, Clone, Debug)]
31pub struct OpBnb;
32
33#[derive(Copy, Clone, Debug)]
34pub struct Optimism;
35
36#[derive(Copy, Clone, Debug)]
37pub struct Linea;
38
39#[derive(Copy, Clone, Debug)]
40pub struct Xlayer;
41
42impl EthereumNetwork for Ethereum {
43    const CHAIN_ID: u32 = 1;
44    const NETWORK_ID: u32 = 1;
45}
46
47impl EthereumNetwork for EthereumClassic {
48    const CHAIN_ID: u32 = 61;
49    const NETWORK_ID: u32 = 61;
50}
51
52impl EthereumNetwork for Polygon {
53    const CHAIN_ID: u32 = 137;
54    const NETWORK_ID: u32 = 137;
55}
56
57impl EthereumNetwork for Arbitrum {
58    const CHAIN_ID: u32 = 42161;
59    const NETWORK_ID: u32 = 42161;
60}
61
62impl EthereumNetwork for Avalanche {
63    const CHAIN_ID: u32 = 43114;
64    const NETWORK_ID: u32 = 43114;
65}
66
67impl EthereumNetwork for Base {
68    const CHAIN_ID: u32 = 8453;
69    const NETWORK_ID: u32 = 8453;
70}
71
72impl EthereumNetwork for BinanceSmartChain {
73    const CHAIN_ID: u32 = 56;
74    const NETWORK_ID: u32 = 56;
75}
76
77impl EthereumNetwork for HuobiEco {
78    const CHAIN_ID: u32 = 128;
79    const NETWORK_ID: u32 = 128;
80}
81
82impl EthereumNetwork for Okex {
83    const CHAIN_ID: u32 = 66;
84    const NETWORK_ID: u32 = 66;
85}
86
87impl EthereumNetwork for OpBnb {
88    const CHAIN_ID: u32 = 204;
89    const NETWORK_ID: u32 = 204;
90}
91
92impl EthereumNetwork for Optimism {
93    const CHAIN_ID: u32 = 10;
94    const NETWORK_ID: u32 = 10;
95}
96
97impl EthereumNetwork for Linea {
98    const CHAIN_ID: u32 = 59144;
99    const NETWORK_ID: u32 = 59144;
100}
101
102impl EthereumNetwork for Xlayer {
103    const CHAIN_ID: u32 = 196;
104    const NETWORK_ID: u32 = 196;
105}