11import KnownInternalNames from "./knownIds" ;
22
3- export enum DepositType {
4- Manual = 'manual' ,
5- Wallet = 'wallet'
6- }
7-
83export enum GasCalculation {
94 Classic = 'classic' ,
105 OptimismType = 'optimismType'
116}
127
13- const destinationOrder = [
14- KnownInternalNames . Networks . StarkNetMainnet ,
15- KnownInternalNames . Networks . ZksyncEraMainnet ,
16- KnownInternalNames . Networks . ZksyncMainnet ,
17- KnownInternalNames . Networks . ArbitrumNova ,
18- KnownInternalNames . Networks . ArbitrumMainnet ,
19- KnownInternalNames . Networks . OptimismMainnet ,
20- KnownInternalNames . Networks . PolygonZkMainnet ,
21- KnownInternalNames . Networks . EthereumMainnet ,
22- KnownInternalNames . Networks . PolygonMainnet ,
23- KnownInternalNames . Networks . AvalancheMainnet ,
24- KnownInternalNames . Networks . LoopringMainnet ,
25- KnownInternalNames . Networks . BNBChainMainnet ,
26- KnownInternalNames . Networks . MantleMainnet ,
27- KnownInternalNames . Networks . PGNMainnet ,
28- KnownInternalNames . Networks . BaseMainnet ,
29- KnownInternalNames . Networks . OsmosisMainnet ,
30- KnownInternalNames . Networks . ZkspaceMainnet ,
31- KnownInternalNames . Networks . RhinoFiMainnet ,
32- ] ;
33-
34- const sourceOrder = [
35- KnownInternalNames . Networks . LineaMainnet ,
36- KnownInternalNames . Networks . ArbitrumMainnet ,
37- KnownInternalNames . Networks . EthereumMainnet ,
38- KnownInternalNames . Networks . StarkNetMainnet ,
39- KnownInternalNames . Networks . BNBChainMainnet ,
40- KnownInternalNames . Networks . OptimismMainnet ,
41- KnownInternalNames . Networks . SolanaMainnet ,
42- KnownInternalNames . Networks . SolanaDevnet ,
43- KnownInternalNames . Networks . ZksyncEraMainnet ,
44- KnownInternalNames . Networks . PolygonMainnet ,
45- KnownInternalNames . Networks . AvalancheMainnet ,
46- KnownInternalNames . Networks . ZksyncMainnet ,
47- KnownInternalNames . Networks . ArbitrumNova ,
48- KnownInternalNames . Networks . PolygonZkMainnet ,
49- KnownInternalNames . Networks . KCCMainnet ,
50- KnownInternalNames . Networks . LoopringMainnet ,
51- KnownInternalNames . Networks . BaseMainnet ,
52- ] ;
53-
548export default class NetworkSettings {
559 ChainId ?: number | string ;
5610 DefaultPriorityFee ?: number ;
5711 BaseFeeMultiplier ?: number ;
58- AddressPlaceholder ?: string ;
59- OrderInDestination ?: number ;
60- OrderInSource ?: number ;
6112 AccountExplorerTemplate ?: string ;
6213 TransactionExplorerTemplate ?: string ;
6314 GasCalculationType ?: GasCalculation
6415 isFeatured ?: boolean
65- ChainOrder ?: number
6616
6717 public static KnownSettings : { [ network : string ] : NetworkSettings } = { } ;
6818
@@ -83,15 +33,13 @@ export default class NetworkSettings {
8333 BaseFeeMultiplier : 1.7
8434 } ;
8535 NetworkSettings . KnownSettings [ KnownInternalNames . Networks . EthereumMainnet ] = {
86- ChainId : 1 ,
8736 isFeatured : true ,
8837 AccountExplorerTemplate : 'https://etherscan.io/address/{0}' ,
8938 TransactionExplorerTemplate : 'https://etherscan.io/tx/{0}"' ,
9039 DefaultPriorityFee : 0.3 ,
9140 BaseFeeMultiplier : 1.7
9241 } ;
9342 NetworkSettings . KnownSettings [ KnownInternalNames . Networks . EthereumSepolia ] = {
94- ChainOrder : 1 ,
9543 TransactionExplorerTemplate : 'https://sepolia.etherscan.io/tx/{0}' ,
9644 AccountExplorerTemplate : 'https://sepolia.etherscan.io/address/{0}'
9745 } ;
@@ -128,17 +76,6 @@ export default class NetworkSettings {
12876 AccountExplorerTemplate : 'https://sepolia.voyager.online/contract/{0}' ,
12977 } ;
13078
131-
132- for ( var k in NetworkSettings . KnownSettings ) {
133- let networkSetting = NetworkSettings . KnownSettings [ k ] ;
134- if ( networkSetting ) {
135- let destOrder = destinationOrder . indexOf ( k ) ;
136- let srcOrder = sourceOrder . indexOf ( k ) ;
137-
138- networkSetting . OrderInDestination = destOrder < 0 ? destinationOrder . length : destOrder ;
139- networkSetting . OrderInSource = srcOrder < 0 ? destinationOrder . length : srcOrder ;
140- }
141- }
14279 }
14380}
14481
0 commit comments