Skip to content

Commit daebea4

Browse files
committed
feat: Add MetalL2 and MetalL2 testnet
1 parent f744116 commit daebea4

File tree

4 files changed

+43
-1
lines changed

4 files changed

+43
-1
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ We currently accept tokens on the following chains:
119119
- `lisk`
120120
- `lisk-sepolia`
121121
- `redstone`
122+
- 'metall2'
123+
- 'metall2-sepolia'
122124

123125
#### Non-bridgable tokens
124126

src/chains.ts

+32
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,14 @@ export const NETWORK_DATA: Record<Chain, Network> = {
5959
),
6060
layer: 2
6161
},
62+
'metall2': {
63+
id: 1750,
64+
name: 'Metal L2',
65+
provider: new ethers.providers.StaticJsonRpcProvider(
66+
'https://rpc.metall2.com'
67+
),
68+
layer: 2
69+
},
6270
sepolia: {
6371
id: 11155111,
6472
name: 'Sepolia',
@@ -101,6 +109,14 @@ export const NETWORK_DATA: Record<Chain, Network> = {
101109
),
102110
layer: 2,
103111
},
112+
'metall2-sepolia': {
113+
id: 1740,
114+
name: 'Metal L2 Sepolia',
115+
provider: new ethers.providers.StaticJsonRpcProvider(
116+
'https://testnet.rpc.metall2.com'
117+
),
118+
layer: 2,
119+
},
104120
}
105121

106122
interface L2BridgeInformation {
@@ -134,6 +150,9 @@ export const L2_STANDARD_BRIDGE_INFORMATION: Record<
134150
'redstone': {
135151
l2StandardBridgeAddress: '0x4200000000000000000000000000000000000010'
136152
},
153+
'metall2': {
154+
l2StandardBridgeAddress: '0x4200000000000000000000000000000000000010',
155+
},
137156
'optimism-sepolia': {
138157
l2StandardBridgeAddress: '0x4200000000000000000000000000000000000010',
139158
},
@@ -146,6 +165,9 @@ export const L2_STANDARD_BRIDGE_INFORMATION: Record<
146165
'lisk-sepolia': {
147166
l2StandardBridgeAddress: '0x4200000000000000000000000000000000000010',
148167
},
168+
'metall2-sepolia': {
169+
l2StandardBridgeAddress: '0x4200000000000000000000000000000000000010',
170+
},
149171
}
150172

151173
export const L2_TO_L1_PAIR: Partial<Record<L2Chain, L1Chain>> = {
@@ -155,10 +177,12 @@ export const L2_TO_L1_PAIR: Partial<Record<L2Chain, L1Chain>> = {
155177
mode: 'ethereum',
156178
lisk: 'ethereum',
157179
redstone: 'ethereum',
180+
metall2: 'ethereum',
158181
'optimism-sepolia': 'sepolia',
159182
'base-sepolia': 'sepolia',
160183
'pgn-sepolia': 'sepolia',
161184
'lisk-sepolia': 'sepolia',
185+
'metall2-sepolia': 'ethereum',
162186
}
163187

164188
export const L1_STANDARD_BRIDGE_INFORMATION: Record<
@@ -190,6 +214,10 @@ export const L1_STANDARD_BRIDGE_INFORMATION: Record<
190214
l2Chain: 'redstone',
191215
l1StandardBridgeAddress: '0xc473ca7E02af24c129c2eEf51F2aDf0411c1Df69',
192216
},
217+
{
218+
l2Chain: 'metall2',
219+
l1StandardBridgeAddress: '0xAEb9E3dD0074A8dd19065f55235591c3Ac0c413E',
220+
},
193221
],
194222
sepolia: [
195223
{
@@ -208,5 +236,9 @@ export const L1_STANDARD_BRIDGE_INFORMATION: Record<
208236
l2Chain: 'lisk-sepolia',
209237
l1StandardBridgeAddress: '0x1Fb30e446eA791cd1f011675E5F3f5311b70faF5',
210238
},
239+
{
240+
l2Chain: 'metall2-sepolia',
241+
l1StandardBridgeAddress: '0xFA0EBa40F30338B50A08613Af2216f914Ae8a7B4',
242+
},
211243
],
212244
}

src/schemas.ts

+4
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,12 @@ export const TOKEN_DATA_SCHEMA = {
6666
mode: TOKEN_SCHEMA,
6767
pgn: TOKEN_SCHEMA,
6868
redstone: TOKEN_SCHEMA,
69+
metall2: TOKEN_SCHEMA,
6970
sepolia: TOKEN_SCHEMA,
7071
'base-sepolia': TOKEN_SCHEMA,
7172
'optimism-sepolia': TOKEN_SCHEMA,
7273
'lisk-sepolia': TOKEN_SCHEMA,
74+
'metall2-sepolia': TOKEN_SCHEMA,
7375
},
7476
additionalProperties: false,
7577
anyOf: [
@@ -80,10 +82,12 @@ export const TOKEN_DATA_SCHEMA = {
8082
{ required: ['pgn'] },
8183
{ required: ['lisk'] },
8284
{ required: ['redstone'] },
85+
{ required: ['metall2'] },
8386
{ required: ['sepolia'] },
8487
{ required: ['base-sepolia'] },
8588
{ required: ['optimism-sepolia'] },
8689
{ required: ['lisk-sepolia'] },
90+
{ required: ['metall2-sepolia'] },
8791
],
8892
},
8993
},

src/types.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ export type Chain =
3232
| 'lisk'
3333
| 'lisk-sepolia'
3434
| 'redstone'
35+
| 'metall2'
36+
| 'metall2-sepolia'
3537

3638
const l2Chains = [
3739
'optimism',
@@ -43,7 +45,9 @@ const l2Chains = [
4345
'mode',
4446
'lisk',
4547
'lisk-sepolia',
46-
'redstone'
48+
'redstone',
49+
'metall2',
50+
'metall2-sepolia'
4751
] as const
4852
export type L2Chain = typeof l2Chains[number]
4953

0 commit comments

Comments
 (0)