@0xtorch/evm 0.0.149 → 0.0.151

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/_cjs/chain/definitions/abstract.js +63 -0
  2. package/_cjs/chain/definitions/abstract.js.map +1 -0
  3. package/_cjs/chain/definitions/apeChain.js +61 -0
  4. package/_cjs/chain/definitions/apeChain.js.map +1 -0
  5. package/_cjs/chain/definitions/arbitrumNova.js +83 -0
  6. package/_cjs/chain/definitions/arbitrumNova.js.map +1 -0
  7. package/_cjs/chain/definitions/bitTorrent.js +68 -0
  8. package/_cjs/chain/definitions/bitTorrent.js.map +1 -0
  9. package/_cjs/chain/definitions/celo.js +81 -0
  10. package/_cjs/chain/definitions/celo.js.map +1 -0
  11. package/_cjs/chain/definitions/fraxtal.js +71 -0
  12. package/_cjs/chain/definitions/fraxtal.js.map +1 -0
  13. package/_cjs/chain/definitions/immutableZkEvm.js +66 -0
  14. package/_cjs/chain/definitions/immutableZkEvm.js.map +1 -0
  15. package/_cjs/chain/definitions/katana.js +51 -0
  16. package/_cjs/chain/definitions/katana.js.map +1 -0
  17. package/_cjs/chain/definitions/memeCore.js +56 -0
  18. package/_cjs/chain/definitions/memeCore.js.map +1 -0
  19. package/_cjs/chain/definitions/sophon.js +61 -0
  20. package/_cjs/chain/definitions/sophon.js.map +1 -0
  21. package/_cjs/chain/definitions/swell.js +53 -0
  22. package/_cjs/chain/definitions/swell.js.map +1 -0
  23. package/_cjs/chain/definitions/xdcNetwork.js +102 -0
  24. package/_cjs/chain/definitions/xdcNetwork.js.map +1 -0
  25. package/_cjs/chain/index.js +65 -4
  26. package/_cjs/chain/index.js.map +1 -1
  27. package/_cjs/client/create.js +1 -0
  28. package/_cjs/client/create.js.map +1 -1
  29. package/_cjs/index.js +54 -5
  30. package/_cjs/index.js.map +1 -1
  31. package/_esm/chain/definitions/abstract.js +58 -0
  32. package/_esm/chain/definitions/abstract.js.map +1 -0
  33. package/_esm/chain/definitions/apeChain.js +56 -0
  34. package/_esm/chain/definitions/apeChain.js.map +1 -0
  35. package/_esm/chain/definitions/arbitrumNova.js +78 -0
  36. package/_esm/chain/definitions/arbitrumNova.js.map +1 -0
  37. package/_esm/chain/definitions/bitTorrent.js +63 -0
  38. package/_esm/chain/definitions/bitTorrent.js.map +1 -0
  39. package/_esm/chain/definitions/celo.js +76 -0
  40. package/_esm/chain/definitions/celo.js.map +1 -0
  41. package/_esm/chain/definitions/fraxtal.js +66 -0
  42. package/_esm/chain/definitions/fraxtal.js.map +1 -0
  43. package/_esm/chain/definitions/immutableZkEvm.js +61 -0
  44. package/_esm/chain/definitions/immutableZkEvm.js.map +1 -0
  45. package/_esm/chain/definitions/katana.js +46 -0
  46. package/_esm/chain/definitions/katana.js.map +1 -0
  47. package/_esm/chain/definitions/memeCore.js +51 -0
  48. package/_esm/chain/definitions/memeCore.js.map +1 -0
  49. package/_esm/chain/definitions/sophon.js +56 -0
  50. package/_esm/chain/definitions/sophon.js.map +1 -0
  51. package/_esm/chain/definitions/swell.js +48 -0
  52. package/_esm/chain/definitions/swell.js.map +1 -0
  53. package/_esm/chain/definitions/xdcNetwork.js +97 -0
  54. package/_esm/chain/definitions/xdcNetwork.js.map +1 -0
  55. package/_esm/chain/index.js +12 -0
  56. package/_esm/chain/index.js.map +1 -1
  57. package/_esm/client/create.js +1 -0
  58. package/_esm/client/create.js.map +1 -1
  59. package/_esm/index.js +1 -1
  60. package/_esm/index.js.map +1 -1
  61. package/_types/chain/definitions/abstract.d.ts +18 -0
  62. package/_types/chain/definitions/abstract.d.ts.map +1 -0
  63. package/_types/chain/definitions/apeChain.d.ts +18 -0
  64. package/_types/chain/definitions/apeChain.d.ts.map +1 -0
  65. package/_types/chain/definitions/arbitrumNova.d.ts +18 -0
  66. package/_types/chain/definitions/arbitrumNova.d.ts.map +1 -0
  67. package/_types/chain/definitions/bitTorrent.d.ts +18 -0
  68. package/_types/chain/definitions/bitTorrent.d.ts.map +1 -0
  69. package/_types/chain/definitions/celo.d.ts +18 -0
  70. package/_types/chain/definitions/celo.d.ts.map +1 -0
  71. package/_types/chain/definitions/fraxtal.d.ts +18 -0
  72. package/_types/chain/definitions/fraxtal.d.ts.map +1 -0
  73. package/_types/chain/definitions/immutableZkEvm.d.ts +18 -0
  74. package/_types/chain/definitions/immutableZkEvm.d.ts.map +1 -0
  75. package/_types/chain/definitions/katana.d.ts +18 -0
  76. package/_types/chain/definitions/katana.d.ts.map +1 -0
  77. package/_types/chain/definitions/memeCore.d.ts +18 -0
  78. package/_types/chain/definitions/memeCore.d.ts.map +1 -0
  79. package/_types/chain/definitions/sophon.d.ts +18 -0
  80. package/_types/chain/definitions/sophon.d.ts.map +1 -0
  81. package/_types/chain/definitions/swell.d.ts +18 -0
  82. package/_types/chain/definitions/swell.d.ts.map +1 -0
  83. package/_types/chain/definitions/xdcNetwork.d.ts +18 -0
  84. package/_types/chain/definitions/xdcNetwork.d.ts.map +1 -0
  85. package/_types/chain/index.d.ts +12 -0
  86. package/_types/chain/index.d.ts.map +1 -1
  87. package/_types/index.d.ts +1 -1
  88. package/_types/index.d.ts.map +1 -1
  89. package/chain/definitions/abstract.ts +82 -0
  90. package/chain/definitions/apeChain.ts +80 -0
  91. package/chain/definitions/arbitrumNova.ts +102 -0
  92. package/chain/definitions/bitTorrent.ts +87 -0
  93. package/chain/definitions/celo.ts +100 -0
  94. package/chain/definitions/fraxtal.ts +90 -0
  95. package/chain/definitions/immutableZkEvm.ts +83 -0
  96. package/chain/definitions/katana.ts +70 -0
  97. package/chain/definitions/memeCore.ts +75 -0
  98. package/chain/definitions/sophon.ts +80 -0
  99. package/chain/definitions/swell.ts +72 -0
  100. package/chain/definitions/xdcNetwork.ts +121 -0
  101. package/chain/index.ts +72 -0
  102. package/client/create.ts +1 -0
  103. package/index.ts +48 -0
  104. package/package.json +1 -1
@@ -0,0 +1,102 @@
1
+ import { ethereum } from '@0xtorch/core'
2
+ import { arbitrumNova } from 'viem/chains'
3
+ import type { Client } from '../../client'
4
+ import { createClient } from '../../client'
5
+ import type { Explorer } from '../../explorer'
6
+ import { createEtherscanV2 } from '../../explorer'
7
+ import type { Chain } from '../types/chain'
8
+ import type { HttpRpc } from '../types/rpc'
9
+
10
+ export const createArbitrumNovaChain = ({
11
+ explorerApiKey: apiKey,
12
+ explorerProxyUrl: proxyUrl,
13
+ explorerPageSize: pageSize,
14
+ }: {
15
+ explorerApiKey?: string
16
+ explorerProxyUrl?: string
17
+ explorerPageSize?: number
18
+ }): Chain =>
19
+ createArbitrumNovaChainCustom({
20
+ client: createClient({
21
+ chain: arbitrumNova,
22
+ httpRpcs: arbitrumNovaHttpRpcs,
23
+ }),
24
+ explorer: createEtherscanV2({
25
+ name: 'Arbitrum Nova Explorer',
26
+ baseUrl: 'https://nova.arbiscan.io',
27
+ chainId: 42_170,
28
+ apiKey,
29
+ proxyUrl,
30
+ pageSize,
31
+ }),
32
+ })
33
+
34
+ type CreateArbitrumNovaChainCustomParameters = {
35
+ client: Client
36
+ explorer: Explorer
37
+ }
38
+
39
+ export const createArbitrumNovaChainCustom = ({
40
+ client,
41
+ explorer,
42
+ }: CreateArbitrumNovaChainCustomParameters): Chain => ({
43
+ id: 42_170,
44
+ network: 'arbitrum-nova',
45
+ name: 'Arbitrum Nova',
46
+ nativeToken: {
47
+ name: 'Ethereum',
48
+ symbol: 'ETH',
49
+ decimals: 18,
50
+ currency: ethereum,
51
+ },
52
+ wrappedTokenAddresses: new Set([
53
+ '0x722e8bdd2ce80a4422e880164f2079488e115365',
54
+ ]),
55
+ explorer,
56
+ client,
57
+ blockTime: undefined,
58
+ coingeckoId: 'arbitrum-nova',
59
+ defillamaId: undefined,
60
+ })
61
+
62
+ export const arbitrumNovaHttpRpcs: HttpRpc[] = [
63
+ {
64
+ url: 'https://nova.arbitrum.io/rpc',
65
+ getLogsIsUsable: true,
66
+ getLogsMaxBlockRange: 10_000n,
67
+ },
68
+ {
69
+ url: 'https://arbitrum-nova.public.blastapi.io',
70
+ getLogsIsUsable: false,
71
+ getLogsMaxBlockRange: 0n,
72
+ },
73
+ {
74
+ url: 'https://arbitrum-nova-rpc.publicnode.com',
75
+ getLogsIsUsable: true,
76
+ getLogsMaxBlockRange: 10_000n,
77
+ },
78
+ {
79
+ url: 'https://arbitrum-nova.drpc.org',
80
+ getLogsIsUsable: true,
81
+ getLogsMaxBlockRange: 10_000n,
82
+ },
83
+ {
84
+ url: 'https://arb-nova-mainnet.gateway.tatum.io',
85
+ getLogsIsUsable: true,
86
+ getLogsMaxBlockRange: 10_000n,
87
+ },
88
+ {
89
+ url: 'https://arbitrum-nova.gateway.tenderly.co',
90
+ getLogsIsUsable: true,
91
+ getLogsMaxBlockRange: 10_000n,
92
+ },
93
+ {
94
+ url: 'https://docs-demo.nova-mainnet.quiknode.pro',
95
+ getLogsIsUsable: true,
96
+ getLogsMaxBlockRange: 10_000n,
97
+ },
98
+ ]
99
+
100
+ export const arbitrumNovaWebsocketRpcUrls: string[] = [
101
+ 'wss://arbitrum-nova-rpc.publicnode.com',
102
+ ]
@@ -0,0 +1,87 @@
1
+ import { bitTorrent } from 'viem/chains'
2
+ import type { Client } from '../../client'
3
+ import { createClient } from '../../client'
4
+ import type { Explorer } from '../../explorer'
5
+ import { createEtherscanV2 } from '../../explorer'
6
+ import type { Chain } from '../types/chain'
7
+ import type { HttpRpc } from '../types/rpc'
8
+
9
+ export const createBitTorrentChain = ({
10
+ explorerApiKey: apiKey,
11
+ explorerProxyUrl: proxyUrl,
12
+ explorerPageSize: pageSize,
13
+ }: {
14
+ explorerApiKey?: string
15
+ explorerProxyUrl?: string
16
+ explorerPageSize?: number
17
+ }): Chain =>
18
+ createBitTorrentChainCustom({
19
+ client: createClient({
20
+ chain: bitTorrent,
21
+ httpRpcs: bitTorrentHttpRpcs,
22
+ }),
23
+ explorer: createEtherscanV2({
24
+ name: 'BTTCScan',
25
+ baseUrl: 'https://bttcscan.com',
26
+ chainId: 199,
27
+ apiKey,
28
+ proxyUrl,
29
+ pageSize,
30
+ }),
31
+ })
32
+
33
+ type CreateBitTorrentChainCustomParameters = {
34
+ client: Client
35
+ explorer: Explorer
36
+ }
37
+
38
+ export const createBitTorrentChainCustom = ({
39
+ client,
40
+ explorer,
41
+ }: CreateBitTorrentChainCustomParameters): Chain => ({
42
+ id: 199,
43
+ network: 'bit-torrent',
44
+ name: 'BitTorrent Chain',
45
+ nativeToken: {
46
+ name: 'BitTorrent',
47
+ symbol: 'BTT',
48
+ decimals: 18,
49
+ currency: {
50
+ symbol: 'BTT',
51
+ type: 'CryptoCurrency',
52
+ id: 'bittorrent',
53
+ name: 'BitTorrent',
54
+ updatedAt: 0,
55
+ },
56
+ },
57
+ wrappedTokenAddresses: new Set([
58
+ '0x23181f21dea5936e24163ffaba4ea3b316b57f3c',
59
+ ]),
60
+ explorer,
61
+ client,
62
+ blockTime: 2000,
63
+ coingeckoId: 'bittorrent',
64
+ defillamaId: undefined,
65
+ })
66
+
67
+ export const bitTorrentHttpRpcs: HttpRpc[] = [
68
+ {
69
+ url: 'https://rpc.bittorrentchain.io',
70
+ getLogsIsUsable: true,
71
+ getLogsMaxBlockRange: 10_000n,
72
+ },
73
+ {
74
+ url: 'https://rpc.bt.io',
75
+ getLogsIsUsable: true,
76
+ getLogsMaxBlockRange: 10_000n,
77
+ },
78
+ {
79
+ url: 'https://bittorrent.drpc.org',
80
+ getLogsIsUsable: true,
81
+ getLogsMaxBlockRange: 10_000n,
82
+ },
83
+ ]
84
+
85
+ export const bitTorrentWebsocketRpcUrls: string[] = [
86
+ 'wss://bittorrent.drpc.org',
87
+ ]
@@ -0,0 +1,100 @@
1
+ import { celo } from 'viem/chains'
2
+ import type { Client } from '../../client'
3
+ import { createClient } from '../../client'
4
+ import type { Explorer } from '../../explorer'
5
+ import { createEtherscanV2 } from '../../explorer'
6
+ import type { Chain } from '../types/chain'
7
+ import type { HttpRpc } from '../types/rpc'
8
+
9
+ export const createCeloChain = ({
10
+ explorerApiKey: apiKey,
11
+ explorerProxyUrl: proxyUrl,
12
+ explorerPageSize: pageSize,
13
+ }: {
14
+ explorerApiKey?: string
15
+ explorerProxyUrl?: string
16
+ explorerPageSize?: number
17
+ }): Chain =>
18
+ createCeloChainCustom({
19
+ client: createClient({
20
+ chain: celo,
21
+ httpRpcs: celoHttpRpcs,
22
+ }),
23
+ explorer: createEtherscanV2({
24
+ name: 'CeloScan',
25
+ baseUrl: 'https://celoscan.io',
26
+ chainId: 42_220,
27
+ apiKey,
28
+ proxyUrl,
29
+ pageSize,
30
+ }),
31
+ })
32
+
33
+ type CreateCeloChainCustomParameters = {
34
+ client: Client
35
+ explorer: Explorer
36
+ }
37
+
38
+ export const createCeloChainCustom = ({
39
+ client,
40
+ explorer,
41
+ }: CreateCeloChainCustomParameters): Chain => ({
42
+ id: 42_220,
43
+ network: 'celo',
44
+ name: 'Celo',
45
+ nativeToken: {
46
+ name: 'Celo',
47
+ symbol: 'CELO',
48
+ decimals: 18,
49
+ currency: {
50
+ symbol: 'CELO',
51
+ type: 'CryptoCurrency',
52
+ id: 'celo',
53
+ name: 'Celo',
54
+ updatedAt: 0,
55
+ },
56
+ },
57
+ wrappedTokenAddresses: new Set([
58
+ '0x471ece3750da237f93b8e339c536989b8978a438',
59
+ ]),
60
+ explorer,
61
+ client,
62
+ blockTime: undefined,
63
+ coingeckoId: 'celo',
64
+ defillamaId: undefined,
65
+ })
66
+
67
+ export const celoHttpRpcs: HttpRpc[] = [
68
+ {
69
+ url: 'https://forno.celo.org',
70
+ getLogsIsUsable: true,
71
+ getLogsMaxBlockRange: 10_000n,
72
+ },
73
+ {
74
+ url: 'https://rpc.ankr.com/celo',
75
+ getLogsIsUsable: true,
76
+ getLogsMaxBlockRange: 1000n,
77
+ },
78
+ {
79
+ url: 'https://celo-mainnet.gateway.tatum.io',
80
+ getLogsIsUsable: true,
81
+ getLogsMaxBlockRange: 10_000n,
82
+ },
83
+ {
84
+ url: 'https://celo.drpc.org',
85
+ getLogsIsUsable: true,
86
+ getLogsMaxBlockRange: 1000n,
87
+ },
88
+ {
89
+ url: 'https://celo-json-rpc.stakely.io',
90
+ getLogsIsUsable: true,
91
+ getLogsMaxBlockRange: 10_000n,
92
+ },
93
+ {
94
+ url: 'https://celo.api.onfinality.io/public',
95
+ getLogsIsUsable: false,
96
+ getLogsMaxBlockRange: 0n,
97
+ },
98
+ ]
99
+
100
+ export const celoWebsocketRpcUrls: string[] = ['wss://celo.drpc.org']
@@ -0,0 +1,90 @@
1
+ import { fraxtal } from 'viem/chains'
2
+ import type { Client } from '../../client'
3
+ import { createClient } from '../../client'
4
+ import type { Explorer } from '../../explorer'
5
+ import { createEtherscanV2 } from '../../explorer'
6
+ import type { Chain } from '../types/chain'
7
+ import type { HttpRpc } from '../types/rpc'
8
+
9
+ export const createFraxtalChain = ({
10
+ explorerApiKey: apiKey,
11
+ explorerProxyUrl: proxyUrl,
12
+ explorerPageSize: pageSize,
13
+ }: {
14
+ explorerApiKey?: string
15
+ explorerProxyUrl?: string
16
+ explorerPageSize?: number
17
+ }): Chain =>
18
+ createFraxtalChainCustom({
19
+ client: createClient({
20
+ chain: fraxtal,
21
+ httpRpcs: fraxtalHttpRpcs,
22
+ }),
23
+ explorer: createEtherscanV2({
24
+ name: 'Fraxscan',
25
+ baseUrl: 'https://fraxscan.com',
26
+ chainId: 252,
27
+ apiKey,
28
+ proxyUrl,
29
+ pageSize,
30
+ }),
31
+ })
32
+
33
+ type CreateFraxtalChainCustomParameters = {
34
+ client: Client
35
+ explorer: Explorer
36
+ }
37
+
38
+ export const createFraxtalChainCustom = ({
39
+ client,
40
+ explorer,
41
+ }: CreateFraxtalChainCustomParameters): Chain => ({
42
+ id: 252,
43
+ network: 'fraxtal',
44
+ name: 'Fraxtal',
45
+ nativeToken: {
46
+ name: 'Frax',
47
+ symbol: 'FRAX',
48
+ decimals: 18,
49
+ currency: {
50
+ symbol: 'FRAX',
51
+ type: 'CryptoCurrency',
52
+ id: 'frax-share',
53
+ name: 'Frax',
54
+ updatedAt: 0,
55
+ },
56
+ },
57
+ wrappedTokenAddresses: new Set([
58
+ '0xfc00000000000000000000000000000000000002',
59
+ ]),
60
+ explorer,
61
+ client,
62
+ blockTime: 2000,
63
+ coingeckoId: 'fraxtal',
64
+ defillamaId: undefined,
65
+ })
66
+
67
+ export const fraxtalHttpRpcs: HttpRpc[] = [
68
+ {
69
+ url: 'https://rpc.frax.com',
70
+ getLogsIsUsable: true,
71
+ getLogsMaxBlockRange: 10_000n,
72
+ },
73
+ {
74
+ url: 'https://fraxtal.drpc.org',
75
+ getLogsIsUsable: true,
76
+ getLogsMaxBlockRange: 10_000n,
77
+ },
78
+ {
79
+ url: 'https://fraxtal.gateway.tenderly.co',
80
+ getLogsIsUsable: true,
81
+ getLogsMaxBlockRange: 10_000n,
82
+ },
83
+ {
84
+ url: 'https://fraxtal.rpc.grove.city/v1/01fdb492',
85
+ getLogsIsUsable: true,
86
+ getLogsMaxBlockRange: 10_000n,
87
+ },
88
+ ]
89
+
90
+ export const fraxtalWebsocketRpcUrls: string[] = ['wss://fraxtal.drpc.org']
@@ -0,0 +1,83 @@
1
+ import { immutableZkEvm } from 'viem/chains'
2
+ import type { Client } from '../../client'
3
+ import { createClient } from '../../client'
4
+ import type { Explorer } from '../../explorer'
5
+ import { createBlockscout } from '../../explorer'
6
+ import type { Chain } from '../types/chain'
7
+ import type { HttpRpc } from '../types/rpc'
8
+
9
+ export const createImmutableZkEvmChain = ({
10
+ explorerProxyUrl: proxyUrl,
11
+ }: {
12
+ explorerApiKey?: string
13
+ explorerProxyUrl?: string
14
+ explorerPageSize?: number
15
+ }): Chain =>
16
+ createImmutableZkEvmChainCustom({
17
+ client: createClient({
18
+ chain: immutableZkEvm,
19
+ httpRpcs: immutableZkEvmHttpRpcs,
20
+ }),
21
+ explorer: createBlockscout({
22
+ name: 'Immutable explorer',
23
+ baseUrl: 'https://explorer.immutable.com',
24
+ apiBaseUrl: 'https://explorer.immutable.com/api',
25
+ proxyUrl,
26
+ }),
27
+ })
28
+
29
+ type CreateImmutableZkEvmChainCustomParameters = {
30
+ client: Client
31
+ explorer: Explorer
32
+ }
33
+
34
+ export const createImmutableZkEvmChainCustom = ({
35
+ client,
36
+ explorer,
37
+ }: CreateImmutableZkEvmChainCustomParameters): Chain => ({
38
+ id: 13_371,
39
+ network: 'immutable-zk-evm',
40
+ name: 'Immutable zkEVM',
41
+ nativeToken: {
42
+ name: 'Immutable',
43
+ symbol: 'IMX',
44
+ decimals: 18,
45
+ currency: {
46
+ symbol: 'IMX',
47
+ type: 'CryptoCurrency',
48
+ id: 'immutable-x',
49
+ name: 'Immutable',
50
+ updatedAt: 0,
51
+ },
52
+ },
53
+ wrappedTokenAddresses: new Set([
54
+ '0x3a0c2ba54d6cbd3121f01b96dfd20e99d1696c9d',
55
+ ]),
56
+ explorer,
57
+ client,
58
+ blockTime: 2000,
59
+ coingeckoId: 'immutable',
60
+ defillamaId: undefined,
61
+ })
62
+
63
+ export const immutableZkEvmHttpRpcs: HttpRpc[] = [
64
+ {
65
+ url: 'https://rpc.immutable.com',
66
+ getLogsIsUsable: true,
67
+ getLogsMaxBlockRange: 5000n,
68
+ },
69
+ {
70
+ url: 'https://immutable-zkevm.drpc.org',
71
+ getLogsIsUsable: true,
72
+ getLogsMaxBlockRange: 10_000n,
73
+ },
74
+ {
75
+ url: 'https://immutable.gateway.tenderly.co',
76
+ getLogsIsUsable: true,
77
+ getLogsMaxBlockRange: 10_000n,
78
+ },
79
+ ]
80
+
81
+ export const immutableZkEvmWebsocketRpcUrls: string[] = [
82
+ 'wss://immutable-zkevm.drpc.org',
83
+ ]
@@ -0,0 +1,70 @@
1
+ import { ethereum } from '@0xtorch/core'
2
+ import { katana } from 'viem/chains'
3
+ import type { Client } from '../../client'
4
+ import { createClient } from '../../client'
5
+ import type { Explorer } from '../../explorer'
6
+ import { createEtherscanV2 } from '../../explorer'
7
+ import type { Chain } from '../types/chain'
8
+ import type { HttpRpc } from '../types/rpc'
9
+
10
+ export const createKatanaChain = ({
11
+ explorerApiKey: apiKey,
12
+ explorerProxyUrl: proxyUrl,
13
+ explorerPageSize: pageSize,
14
+ }: {
15
+ explorerApiKey?: string
16
+ explorerProxyUrl?: string
17
+ explorerPageSize?: number
18
+ }): Chain =>
19
+ createKatanaChainCustom({
20
+ client: createClient({
21
+ chain: katana,
22
+ httpRpcs: katanaHttpRpcs,
23
+ }),
24
+ explorer: createEtherscanV2({
25
+ name: 'KatanaScan',
26
+ baseUrl: 'https://katanascan.com',
27
+ chainId: 747_474,
28
+ apiKey,
29
+ proxyUrl,
30
+ pageSize,
31
+ }),
32
+ })
33
+
34
+ type CreateKatanaChainCustomParameters = {
35
+ client: Client
36
+ explorer: Explorer
37
+ }
38
+
39
+ export const createKatanaChainCustom = ({
40
+ client,
41
+ explorer,
42
+ }: CreateKatanaChainCustomParameters): Chain => ({
43
+ id: 747_474,
44
+ network: 'katana',
45
+ name: 'Katana',
46
+ nativeToken: {
47
+ name: 'Ethereum',
48
+ symbol: 'ETH',
49
+ decimals: 18,
50
+ currency: ethereum,
51
+ },
52
+ wrappedTokenAddresses: new Set([
53
+ '0xee7d8bcfb72bc1880d0cf19822eb0a2e6577ab62',
54
+ ]),
55
+ explorer,
56
+ client,
57
+ blockTime: 1000,
58
+ coingeckoId: 'katana',
59
+ defillamaId: undefined,
60
+ })
61
+
62
+ export const katanaHttpRpcs: HttpRpc[] = [
63
+ {
64
+ url: 'https://rpc.katana.network',
65
+ getLogsIsUsable: true,
66
+ getLogsMaxBlockRange: 10_000n,
67
+ },
68
+ ]
69
+
70
+ export const katanaWebsocketRpcUrls: string[] = []
@@ -0,0 +1,75 @@
1
+ import { memecore } from 'viem/chains'
2
+ import type { Client } from '../../client'
3
+ import { createClient } from '../../client'
4
+ import type { Explorer } from '../../explorer'
5
+ import { createEtherscanV2 } from '../../explorer'
6
+ import type { Chain } from '../types/chain'
7
+ import type { HttpRpc } from '../types/rpc'
8
+
9
+ export const createMemeCoreChain = ({
10
+ explorerApiKey: apiKey,
11
+ explorerProxyUrl: proxyUrl,
12
+ explorerPageSize: pageSize,
13
+ }: {
14
+ explorerApiKey?: string
15
+ explorerProxyUrl?: string
16
+ explorerPageSize?: number
17
+ }): Chain =>
18
+ createMemeCoreChainCustom({
19
+ client: createClient({
20
+ chain: memecore,
21
+ httpRpcs: memeCoreHttpRpcs,
22
+ }),
23
+ explorer: createEtherscanV2({
24
+ name: 'MemeCoreScan',
25
+ baseUrl: 'https://memecorescan.io',
26
+ chainId: 4352,
27
+ apiKey,
28
+ proxyUrl,
29
+ pageSize,
30
+ }),
31
+ })
32
+
33
+ type CreateMemeCoreChainCustomParameters = {
34
+ client: Client
35
+ explorer: Explorer
36
+ }
37
+
38
+ export const createMemeCoreChainCustom = ({
39
+ client,
40
+ explorer,
41
+ }: CreateMemeCoreChainCustomParameters): Chain => ({
42
+ id: 4352,
43
+ network: 'meme-core',
44
+ name: 'MemeCore',
45
+ nativeToken: {
46
+ name: 'MemeCore',
47
+ symbol: 'M',
48
+ decimals: 18,
49
+ currency: {
50
+ symbol: 'M',
51
+ type: 'CryptoCurrency',
52
+ id: 'memecore',
53
+ name: 'MemeCore',
54
+ updatedAt: 0,
55
+ },
56
+ },
57
+ wrappedTokenAddresses: new Set([
58
+ '0x653e645e3d81a72e71328bc01a04002945e3ef7a',
59
+ ]),
60
+ explorer,
61
+ client,
62
+ blockTime: 7000,
63
+ coingeckoId: 'memecore',
64
+ defillamaId: undefined,
65
+ })
66
+
67
+ export const memeCoreHttpRpcs: HttpRpc[] = [
68
+ {
69
+ url: 'https://rpc.memecore.net',
70
+ getLogsIsUsable: true,
71
+ getLogsMaxBlockRange: 10_000n,
72
+ },
73
+ ]
74
+
75
+ export const memeCoreWebsocketRpcUrls: string[] = ['wss://ws.memecore.net']
@@ -0,0 +1,80 @@
1
+ import { sophon } from 'viem/chains'
2
+ import type { Client } from '../../client'
3
+ import { createClient } from '../../client'
4
+ import type { Explorer } from '../../explorer'
5
+ import { createEtherscanV2 } from '../../explorer'
6
+ import type { Chain } from '../types/chain'
7
+ import type { HttpRpc } from '../types/rpc'
8
+
9
+ export const createSophonChain = ({
10
+ explorerApiKey: apiKey,
11
+ explorerProxyUrl: proxyUrl,
12
+ explorerPageSize: pageSize,
13
+ }: {
14
+ explorerApiKey?: string
15
+ explorerProxyUrl?: string
16
+ explorerPageSize?: number
17
+ }): Chain =>
18
+ createSophonChainCustom({
19
+ client: createClient({
20
+ chain: sophon,
21
+ httpRpcs: sophonHttpRpcs,
22
+ }),
23
+ explorer: createEtherscanV2({
24
+ name: 'Sophscan',
25
+ baseUrl: 'https://sophscan.xyz',
26
+ chainId: 50_104,
27
+ apiKey,
28
+ proxyUrl,
29
+ pageSize,
30
+ }),
31
+ })
32
+
33
+ type CreateSophonChainCustomParameters = {
34
+ client: Client
35
+ explorer: Explorer
36
+ }
37
+
38
+ export const createSophonChainCustom = ({
39
+ client,
40
+ explorer,
41
+ }: CreateSophonChainCustomParameters): Chain => ({
42
+ id: 50_104,
43
+ network: 'sophon',
44
+ name: 'Sophon',
45
+ nativeToken: {
46
+ name: 'Sophon',
47
+ symbol: 'SOPH',
48
+ decimals: 18,
49
+ currency: {
50
+ symbol: 'SOPH',
51
+ type: 'CryptoCurrency',
52
+ id: 'sophon',
53
+ name: 'Sophon',
54
+ updatedAt: 0,
55
+ },
56
+ },
57
+ wrappedTokenAddresses: new Set([
58
+ '0x2b1a859de6a55c553520d7780bc5805712b128f9',
59
+ ]),
60
+ explorer,
61
+ client,
62
+ blockTime: undefined,
63
+ coingeckoId: 'sophon',
64
+ defillamaId: undefined,
65
+ })
66
+
67
+ export const sophonHttpRpcs: HttpRpc[] = [
68
+ {
69
+ url: 'https://rpc.sophon.xyz',
70
+ getLogsIsUsable: true,
71
+ getLogsMaxBlockRange: 10_000n,
72
+ },
73
+ {
74
+ url: 'https://rpc-quicknode.sophon.xyz',
75
+ getLogsIsUsable: true,
76
+ getLogsMaxBlockRange: 10_000n,
77
+ },
78
+ ]
79
+
80
+ export const sophonWebsocketRpcUrls: string[] = []