File tree Expand file tree Collapse file tree 4 files changed +45
-9
lines changed Expand file tree Collapse file tree 4 files changed +45
-9
lines changed Original file line number Diff line number Diff line change @@ -74,14 +74,20 @@ yarn add @monerium/sdk
74
74
75
75
### Environments - Networks
76
76
77
- | Environment | Chain | Network |
78
- | ----------- | -------- | ------- |
79
- | sandbox | ethereum | sepolia |
80
- | | polygon | mumbai |
81
- | | gnosis | chiado |
82
- | production | ethereum | mainnet |
83
- | | polygon | mainnet |
84
- | | gnosis | mainnet |
77
+ | Environment | Chain | Name |
78
+ | ----------- | -------- | -------- |
79
+ | sandbox | ethereum | sepolia |
80
+ | | polygon | mumbai |
81
+ | | gnosis | chiado |
82
+ | | linea | sepolia |
83
+ | | scroll | sepolia |
84
+ | | camino | columbus |
85
+ | production | ethereum | mainnet |
86
+ | | polygon | mainnet |
87
+ | | gnosis | mainnet |
88
+ | | linea | mainnet |
89
+ | | scroll | mainnet |
90
+ | | camino | mainnet |
85
91
86
92
## Usage Examples
87
93
Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ export type SandboxChain =
14
14
| 'amoy'
15
15
| 'arbitrumsepolia'
16
16
| 'lineasepolia'
17
+ | 'scrollsepolia'
18
+ | 'columbus'
17
19
| 'grand' ;
18
20
19
21
export type ProductionChain =
@@ -22,6 +24,8 @@ export type ProductionChain =
22
24
| 'polygon'
23
25
| 'arbitrum'
24
26
| 'linea'
27
+ | 'scroll'
28
+ | 'camino'
25
29
| 'noble' ;
26
30
27
31
export type Chain = string | ProductionChain | SandboxChain ;
@@ -32,12 +36,16 @@ export type EvmChainId =
32
36
| 11155111 // ethereum sepolia
33
37
| 100 // gnosis
34
38
| 10200 // gnosis chiado
39
+ | 500 // camino
40
+ | 501 // camino columbus
35
41
| 137 // polygon
36
42
| 80002 // polygon amoy
37
43
| 42161 // arbitrum
38
44
| 421614 // arbitrum sepolia
39
45
| 59141 // linea sepolia
40
- | 59144 ; // linea
46
+ | 59144 // linea
47
+ | 534352 // scroll
48
+ | 534351 ; // scroll sepolia
41
49
42
50
export type ChainId = EvmChainId | CosmosChainId ;
43
51
Original file line number Diff line number Diff line change @@ -72,6 +72,10 @@ const isValidEvmName = (chain: string) => {
72
72
case 'arbitrumsepolia' :
73
73
case 'linea' :
74
74
case 'lineasepolia' :
75
+ case 'scroll' :
76
+ case 'scrollsepolia' :
77
+ case 'camino' :
78
+ case 'columbus' :
75
79
return true ;
76
80
default :
77
81
return false ;
@@ -243,6 +247,14 @@ export const getChain = (chainId: number): Chain => {
243
247
return 'linea' ;
244
248
case 59141 :
245
249
return 'lineasepolia' ;
250
+ case 534352 :
251
+ return 'scroll' ;
252
+ case 534351 :
253
+ return 'scrollsepolia' ;
254
+ case 501 :
255
+ return 'columbus' ;
256
+ case 500 :
257
+ return 'camino' ;
246
258
default :
247
259
throw new Error ( `Chain not supported: ${ chainId } ` ) ;
248
260
}
@@ -287,6 +299,12 @@ const chainNameBackwardsCompatibility = (
287
299
return 'chiado' ;
288
300
case 'arbitrum' :
289
301
return 'arbitrumsepolia' ;
302
+ case 'linea' :
303
+ return 'lineasepolia' ;
304
+ case 'scroll' :
305
+ return 'scrollsepolia' ;
306
+ case 'camino' :
307
+ return 'columbus' ;
290
308
case 'noble' :
291
309
return 'grand' ;
292
310
default :
Original file line number Diff line number Diff line change @@ -249,6 +249,10 @@ describe('parseChain', () => {
249
249
it ( 'chainIds to should be parsed to monerium chain identifier' , ( ) => {
250
250
expect ( parseChain ( 1 ) ) . toBe ( 'ethereum' ) ;
251
251
expect ( parseChain ( 11155111 ) ) . toBe ( 'sepolia' ) ;
252
+ expect ( parseChain ( 59144 ) ) . toBe ( 'linea' ) ;
253
+ expect ( parseChain ( 534352 ) ) . toBe ( 'scroll' ) ;
254
+ expect ( parseChain ( 501 ) ) . toBe ( 'columbus' ) ;
255
+ expect ( parseChain ( 500 ) ) . toBe ( 'camino' ) ;
252
256
expect ( parseChain ( 137 ) ) . toBe ( 'polygon' ) ;
253
257
expect ( parseChain ( 80002 ) ) . toBe ( 'amoy' ) ;
254
258
expect ( parseChain ( 'ethereum' ) ) . toBe ( 'ethereum' ) ;
You can’t perform that action at this time.
0 commit comments