Skip to content

Commit 960e9e1

Browse files
authored
Merge pull request #510 from Raz0r/add-linea
Add Linea network
2 parents 7f64475 + c1a8bec commit 960e9e1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/evm/onchain/endpoints.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ pub enum Chain {
4848
ZKEVM,
4949
ZkevmTestnet,
5050
BLAST,
51+
LINEA,
5152
LOCAL,
5253
}
5354

@@ -79,6 +80,7 @@ impl FromStr for Chain {
7980
"zkevm" => Ok(Self::ZKEVM),
8081
"zkevm_testnet" => Ok(Self::ZkevmTestnet),
8182
"blast" => Ok(Self::BLAST),
83+
"linea" => Ok(Self::LINEA),
8284
"local" => Ok(Self::LOCAL),
8385
_ => Err(()),
8486
}
@@ -123,6 +125,7 @@ impl Chain {
123125
1101 => Self::ZKEVM,
124126
1442 => Self::ZkevmTestnet,
125127
81457 => Self::BLAST,
128+
59144 => Self::LINEA,
126129
31337 => Self::LOCAL,
127130
_ => return Err(anyhow!("Unknown chain id: {}", chain_id)),
128131
})
@@ -147,6 +150,7 @@ impl Chain {
147150
Chain::ZKEVM => 1101,
148151
Chain::ZkevmTestnet => 1442,
149152
Chain::BLAST => 81457,
153+
Chain::LINEA => 59144,
150154
Chain::LOCAL => 31337,
151155
}
152156
}
@@ -170,6 +174,7 @@ impl Chain {
170174
Chain::ZKEVM => "zkevm",
171175
Chain::ZkevmTestnet => "zkevm_testnet",
172176
Chain::BLAST => "blast",
177+
Chain::LINEA => "linea",
173178
Chain::LOCAL => "local",
174179
}
175180
.to_string()
@@ -197,6 +202,7 @@ impl Chain {
197202
Chain::ZKEVM => "https://rpc.ankr.com/polygon_zkevm",
198203
Chain::ZkevmTestnet => "https://rpc.ankr.com/polygon_zkevm_testnet",
199204
Chain::BLAST => "https://rpc.ankr.com/blast",
205+
Chain::LINEA => "https://rpc.ankr.com/linea",
200206
Chain::LOCAL => "http://localhost:8545",
201207
}
202208
.to_string()
@@ -221,6 +227,7 @@ impl Chain {
221227
Chain::ZKEVM => "https://api-zkevm.polygonscan.com/api",
222228
Chain::ZkevmTestnet => "https://api-testnet-zkevm.polygonscan.com/api",
223229
Chain::BLAST => "https://api.routescan.io/v2/network/mainnet/evm/81457/etherscan",
230+
Chain::LINEA => "https://api.lineascan.build/api",
224231
Chain::LOCAL => "http://localhost:8080/abi/",
225232
}
226233
.to_string()

0 commit comments

Comments
 (0)