Skip to content

Commit a62cf24

Browse files
authored
Add swellchain, ink, and worldchain to chains (#1131)
* Add swellchain, ink, and worldchain to chains
1 parent 2f6524c commit a62cf24

File tree

2 files changed

+92
-3
lines changed

2 files changed

+92
-3
lines changed

src/chains.ts

Lines changed: 82 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,46 @@ export const NETWORK_DATA: Record<Chain, Network> = {
141141
),
142142
layer: 2,
143143
},
144+
'swellchain': {
145+
id: 1923,
146+
name: 'Swellchain',
147+
provider: new ethers.providers.StaticJsonRpcProvider(
148+
'https://swell-mainnet.alt.technology'
149+
),
150+
layer: 2,
151+
},
152+
'ink': {
153+
id: 57073,
154+
name: 'Ink',
155+
provider: new ethers.providers.StaticJsonRpcProvider(
156+
'https://rpc-gel.inkonchain.com'
157+
),
158+
layer: 2,
159+
},
160+
'ink-sepolia': {
161+
id: 763373,
162+
name: 'Ink Sepolia',
163+
provider: new ethers.providers.StaticJsonRpcProvider(
164+
'https://rpc-gel-sepolia.inkonchain.com'
165+
),
166+
layer: 2,
167+
},
168+
'worldchain': {
169+
id: 480,
170+
name: 'Worldchain',
171+
provider: new ethers.providers.StaticJsonRpcProvider(
172+
'https://worldchain-mainnet.g.alchemy.com/public'
173+
),
174+
layer: 2,
175+
},
176+
'worldchain-sepolia': {
177+
id: 4801,
178+
name: 'Worldchain Sepolia',
179+
provider: new ethers.providers.StaticJsonRpcProvider(
180+
'https://worldchain-sepolia.g.alchemy.com/public'
181+
),
182+
layer: 2,
183+
},
144184
}
145185

146186
interface L2BridgeInformation {
@@ -201,6 +241,21 @@ export const L2_STANDARD_BRIDGE_INFORMATION: Record<
201241
'celo': {
202242
l2StandardBridgeAddress: '0x4200000000000000000000000000000000000010',
203243
},
244+
'swellchain': {
245+
l2StandardBridgeAddress: '0x4200000000000000000000000000000000000010',
246+
},
247+
'ink': {
248+
l2StandardBridgeAddress: '0x4200000000000000000000000000000000000010',
249+
},
250+
'ink-sepolia': {
251+
l2StandardBridgeAddress: '0x4200000000000000000000000000000000000010',
252+
},
253+
'worldchain': {
254+
l2StandardBridgeAddress: '0x4200000000000000000000000000000000000010',
255+
},
256+
'worldchain-sepolia': {
257+
l2StandardBridgeAddress: '0x4200000000000000000000000000000000000010',
258+
},
204259
}
205260

206261
export const L2_TO_L1_PAIR: Partial<Record<L2Chain, L1Chain>> = {
@@ -212,11 +267,16 @@ export const L2_TO_L1_PAIR: Partial<Record<L2Chain, L1Chain>> = {
212267
metall2: 'ethereum',
213268
soneium: 'ethereum',
214269
celo: 'ethereum',
270+
swellchain: 'ethereum',
271+
ink: 'ethereum',
272+
worldchain: 'ethereum',
215273
'optimism-sepolia': 'sepolia',
216274
'base-sepolia': 'sepolia',
217275
'lisk-sepolia': 'sepolia',
218276
'metall2-sepolia': 'sepolia',
219277
'soneium-minato': 'sepolia',
278+
'ink-sepolia': 'sepolia',
279+
'worldchain-sepolia': 'sepolia',
220280
}
221281

222282
export const L1_STANDARD_BRIDGE_INFORMATION: Record<
@@ -259,7 +319,19 @@ export const L1_STANDARD_BRIDGE_INFORMATION: Record<
259319
{
260320
l2Chain: 'celo',
261321
l1StandardBridgeAddress: '0x9C4955b92F34148dbcfDCD82e9c9eCe5CF2badfe',
262-
}
322+
},
323+
{
324+
l2Chain: 'swellchain',
325+
l1StandardBridgeAddress: '0x7aA4960908B13D104bf056B23E2C76B43c5AACc8',
326+
},
327+
{
328+
l2Chain: 'ink',
329+
l1StandardBridgeAddress: '0x88ff1e5b602916615391f55854588efcbb7663f0',
330+
},
331+
{
332+
l2Chain: 'worldchain',
333+
l1StandardBridgeAddress: '0x470458C91978D2d929704489Ad730DC3E3001113',
334+
},
263335
],
264336
sepolia: [
265337
{
@@ -285,6 +357,14 @@ export const L1_STANDARD_BRIDGE_INFORMATION: Record<
285357
{
286358
l2Chain: 'soneium-minato',
287359
l1StandardBridgeAddress: '0x5f5a404A5edabcDD80DB05E8e54A78c9EBF000C2',
288-
}
360+
},
361+
{
362+
l2Chain: 'ink-sepolia',
363+
l1StandardBridgeAddress: '0x33f60714bbd74d62b66d79213c348614de51901c',
364+
},
365+
{
366+
l2Chain: 'worldchain-sepolia',
367+
l1StandardBridgeAddress: '0xd7DF54b3989855eb66497301a4aAEc33Dbb3F8DE',
368+
},
289369
],
290370
}

src/types.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@ export type Chain =
3737
| 'soneium'
3838
| 'soneium-minato'
3939
| 'celo'
40-
40+
| 'swellchain'
41+
| 'ink'
42+
| 'ink-sepolia'
43+
| 'worldchain'
44+
| 'worldchain-sepolia'
4145
const l2Chains = [
4246
'optimism',
4347
'optimism-sepolia',
@@ -54,6 +58,11 @@ const l2Chains = [
5458
'soneium',
5559
'soneium-minato',
5660
'celo',
61+
'swellchain',
62+
'ink',
63+
'ink-sepolia',
64+
'worldchain',
65+
'worldchain-sepolia',
5766
] as const
5867
export type L2Chain = typeof l2Chains[number]
5968

0 commit comments

Comments
 (0)