@0xtorch/evm 0.0.147 → 0.0.149

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 (96) hide show
  1. package/_cjs/chain/definitions/gnosis.js +87 -0
  2. package/_cjs/chain/definitions/gnosis.js.map +1 -0
  3. package/_cjs/chain/definitions/hyperEvm.js +73 -0
  4. package/_cjs/chain/definitions/hyperEvm.js.map +1 -0
  5. package/_cjs/chain/definitions/sei.js +63 -0
  6. package/_cjs/chain/definitions/sei.js.map +1 -0
  7. package/_cjs/chain/definitions/soneium.js +2 -2
  8. package/_cjs/chain/definitions/soneium.js.map +1 -1
  9. package/_cjs/chain/definitions/sonic.js +2 -2
  10. package/_cjs/chain/definitions/sonic.js.map +1 -1
  11. package/_cjs/chain/definitions/worldChain.js +71 -0
  12. package/_cjs/chain/definitions/worldChain.js.map +1 -0
  13. package/_cjs/chain/index.js +23 -3
  14. package/_cjs/chain/index.js.map +1 -1
  15. package/_cjs/chain/viemChains/hyperEvm.js +31 -0
  16. package/_cjs/chain/viemChains/hyperEvm.js.map +1 -0
  17. package/_cjs/explorer/blockscout/getTokenTransferEventsByAddress.js +2 -2
  18. package/_cjs/explorer/blockscout/getTokenTransferEventsByAddress.js.map +1 -1
  19. package/_cjs/index.js +20 -4
  20. package/_cjs/index.js.map +1 -1
  21. package/_esm/chain/definitions/gnosis.js +124 -0
  22. package/_esm/chain/definitions/gnosis.js.map +1 -0
  23. package/_esm/chain/definitions/hyperEvm.js +68 -0
  24. package/_esm/chain/definitions/hyperEvm.js.map +1 -0
  25. package/_esm/chain/definitions/sei.js +88 -0
  26. package/_esm/chain/definitions/sei.js.map +1 -0
  27. package/_esm/chain/definitions/soneium.js +1 -1
  28. package/_esm/chain/definitions/soneium.js.map +1 -1
  29. package/_esm/chain/definitions/sonic.js +1 -1
  30. package/_esm/chain/definitions/sonic.js.map +1 -1
  31. package/_esm/chain/definitions/worldChain.js +66 -0
  32. package/_esm/chain/definitions/worldChain.js.map +1 -0
  33. package/_esm/chain/index.js +4 -0
  34. package/_esm/chain/index.js.map +1 -1
  35. package/_esm/chain/viemChains/hyperEvm.js +28 -0
  36. package/_esm/chain/viemChains/hyperEvm.js.map +1 -0
  37. package/_esm/explorer/blockscout/getTokenTransferEventsByAddress.js +2 -2
  38. package/_esm/explorer/blockscout/getTokenTransferEventsByAddress.js.map +1 -1
  39. package/_esm/index.js +1 -1
  40. package/_esm/index.js.map +1 -1
  41. package/_types/chain/definitions/gnosis.d.ts +18 -0
  42. package/_types/chain/definitions/gnosis.d.ts.map +1 -0
  43. package/_types/chain/definitions/hyperEvm.d.ts +18 -0
  44. package/_types/chain/definitions/hyperEvm.d.ts.map +1 -0
  45. package/_types/chain/definitions/sei.d.ts +18 -0
  46. package/_types/chain/definitions/sei.d.ts.map +1 -0
  47. package/_types/chain/definitions/soneium.d.ts.map +1 -1
  48. package/_types/chain/definitions/sonic.d.ts.map +1 -1
  49. package/_types/chain/definitions/worldChain.d.ts +18 -0
  50. package/_types/chain/definitions/worldChain.d.ts.map +1 -0
  51. package/_types/chain/index.d.ts +4 -0
  52. package/_types/chain/index.d.ts.map +1 -1
  53. package/_types/chain/viemChains/chainVerse.d.ts +1 -0
  54. package/_types/chain/viemChains/chainVerse.d.ts.map +1 -1
  55. package/_types/chain/viemChains/defiVerse.d.ts +1 -0
  56. package/_types/chain/viemChains/defiVerse.d.ts.map +1 -1
  57. package/_types/chain/viemChains/geekVerse.d.ts +1 -0
  58. package/_types/chain/viemChains/geekVerse.d.ts.map +1 -1
  59. package/_types/chain/viemChains/gesoVerse.d.ts +1 -0
  60. package/_types/chain/viemChains/gesoVerse.d.ts.map +1 -1
  61. package/_types/chain/viemChains/homeVerse.d.ts +1 -0
  62. package/_types/chain/viemChains/homeVerse.d.ts.map +1 -1
  63. package/_types/chain/viemChains/{soneium.d.ts → hyperEvm.d.ts} +16 -37
  64. package/_types/chain/viemChains/hyperEvm.d.ts.map +1 -0
  65. package/_types/chain/viemChains/mchVerse.d.ts +1 -0
  66. package/_types/chain/viemChains/mchVerse.d.ts.map +1 -1
  67. package/_types/chain/viemChains/saakuru.d.ts +1 -0
  68. package/_types/chain/viemChains/saakuru.d.ts.map +1 -1
  69. package/_types/chain/viemChains/tcgVerse.d.ts +1 -0
  70. package/_types/chain/viemChains/tcgVerse.d.ts.map +1 -1
  71. package/_types/index.d.ts +1 -1
  72. package/_types/index.d.ts.map +1 -1
  73. package/chain/definitions/gnosis.ts +148 -0
  74. package/chain/definitions/hyperEvm.ts +92 -0
  75. package/chain/definitions/sei.ts +112 -0
  76. package/chain/definitions/soneium.ts +1 -1
  77. package/chain/definitions/sonic.ts +1 -1
  78. package/chain/definitions/worldChain.ts +90 -0
  79. package/chain/index.ts +24 -0
  80. package/chain/viemChains/hyperEvm.ts +28 -0
  81. package/explorer/blockscout/getTokenTransferEventsByAddress.ts +2 -2
  82. package/index.ts +16 -0
  83. package/package.json +3 -3
  84. package/_cjs/chain/viemChains/soneium.js +0 -55
  85. package/_cjs/chain/viemChains/soneium.js.map +0 -1
  86. package/_cjs/chain/viemChains/sonic.js +0 -30
  87. package/_cjs/chain/viemChains/sonic.js.map +0 -1
  88. package/_esm/chain/viemChains/soneium.js +0 -52
  89. package/_esm/chain/viemChains/soneium.js.map +0 -1
  90. package/_esm/chain/viemChains/sonic.js +0 -27
  91. package/_esm/chain/viemChains/sonic.js.map +0 -1
  92. package/_types/chain/viemChains/soneium.d.ts.map +0 -1
  93. package/_types/chain/viemChains/sonic.d.ts +0 -35
  94. package/_types/chain/viemChains/sonic.d.ts.map +0 -1
  95. package/chain/viemChains/soneium.ts +0 -53
  96. package/chain/viemChains/sonic.ts +0 -27
@@ -0,0 +1,148 @@
1
+ import { gnosis } 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 createGnosisChain = ({
10
+ explorerApiKey: apiKey,
11
+ explorerProxyUrl: proxyUrl,
12
+ explorerPageSize: pageSize,
13
+ }: {
14
+ explorerApiKey?: string
15
+ explorerProxyUrl?: string
16
+ explorerPageSize?: number
17
+ }): Chain =>
18
+ createGnosisChainCustom({
19
+ client: createClient({ chain: gnosis, httpRpcs: gnosisHttpRpcs }),
20
+ explorer: createEtherscanV2({
21
+ name: 'GnosisScan',
22
+ baseUrl: 'https://gnosisscan.io',
23
+ chainId: 100,
24
+ apiKey,
25
+ proxyUrl,
26
+ pageSize,
27
+ }),
28
+ })
29
+
30
+ type CreateGnosisChainCustomParameters = {
31
+ client: Client
32
+ explorer: Explorer
33
+ }
34
+
35
+ export const createGnosisChainCustom = ({
36
+ client,
37
+ explorer,
38
+ }: CreateGnosisChainCustomParameters): Chain => ({
39
+ id: 100,
40
+ network: 'gnosis',
41
+ name: 'Gnosis',
42
+ nativeToken: {
43
+ name: 'Dai',
44
+ symbol: 'DAI',
45
+ decimals: 18,
46
+ currency: {
47
+ symbol: 'DAI',
48
+ type: 'CryptoCurrency',
49
+ id: 'dai',
50
+ name: 'Dai',
51
+ updatedAt: 0,
52
+ },
53
+ },
54
+ wrappedTokenAddresses: new Set([
55
+ '0xe91d153e0b41518a2ce8dd3d7944fa863463a97d',
56
+ ]),
57
+ explorer,
58
+ client,
59
+ blockTime: 5000,
60
+ coingeckoId: 'xdai',
61
+ defillamaId: undefined,
62
+ })
63
+
64
+ export const gnosisHttpRpcs: HttpRpc[] = [
65
+ {
66
+ url: 'https://rpc.gnosischain.com',
67
+ getLogsIsUsable: true,
68
+ getLogsMaxBlockRange: 10_000n,
69
+ },
70
+ // Not archive node
71
+ // {
72
+ // url: 'https://gnosis-public.nodies.app',
73
+ // getLogsIsUsable: true,
74
+ // getLogsMaxBlockRange: 10_000n,
75
+ // },
76
+ {
77
+ url: 'https://rpc.gnosis.gateway.fm',
78
+ getLogsIsUsable: true,
79
+ getLogsMaxBlockRange: 10_000n,
80
+ },
81
+ {
82
+ url: 'https://gnosis-mainnet.public.blastapi.io',
83
+ getLogsIsUsable: false,
84
+ getLogsMaxBlockRange: 0n,
85
+ },
86
+ // Not archive node
87
+ // {
88
+ // url: 'https://rpc.ap-southeast-1.gateway.fm/v4/gnosis/non-archival/mainnet',
89
+ // getLogsIsUsable: true,
90
+ // getLogsMaxBlockRange: 10_000n,
91
+ // },
92
+ {
93
+ url: 'https://gnosis.api.onfinality.io/public',
94
+ getLogsIsUsable: false,
95
+ getLogsMaxBlockRange: 0n,
96
+ },
97
+ // Not archive node
98
+ // {
99
+ // url: 'https://gnosis.drpc.org',
100
+ // getLogsIsUsable: true,
101
+ // getLogsMaxBlockRange: 10_000n,
102
+ // },
103
+ // Not archive node
104
+ // {
105
+ // url: 'https://endpoints.omniatech.io/v1/gnosis/mainnet/public',
106
+ // getLogsIsUsable: true,
107
+ // getLogsMaxBlockRange: 10_000n,
108
+ // },
109
+ // Not archive node
110
+ // {
111
+ // url: 'https://gnosis-rpc.publicnode.com',
112
+ // getLogsIsUsable: true,
113
+ // getLogsMaxBlockRange: 10_000n,
114
+ // },
115
+ {
116
+ url: 'https://1rpc.io/gnosis',
117
+ getLogsIsUsable: true,
118
+ getLogsMaxBlockRange: 10_000n,
119
+ },
120
+ {
121
+ url: 'https://gno-mainnet.gateway.tatum.io',
122
+ getLogsIsUsable: true,
123
+ getLogsMaxBlockRange: 10_000n,
124
+ },
125
+ // Not archive node
126
+ // {
127
+ // url: 'https://0xrpc.io/gno',
128
+ // getLogsIsUsable: true,
129
+ // getLogsMaxBlockRange: 10_000n,
130
+ // },
131
+ // Not archive node
132
+ // {
133
+ // url: 'https://gnosis.therpc.io',
134
+ // getLogsIsUsable: true,
135
+ // getLogsMaxBlockRange: 10_000n,
136
+ // },
137
+ {
138
+ url: 'https://gnosis.rpc.grove.city/v1/01fdb492',
139
+ getLogsIsUsable: true,
140
+ getLogsMaxBlockRange: 10_000n,
141
+ },
142
+ ]
143
+
144
+ export const gnosisWebsocketRpcUrls: string[] = [
145
+ 'wss://gnosis.drpc.org',
146
+ 'wss://gnosis-rpc.publicnode.com',
147
+ 'wss://0xrpc.io/gno',
148
+ ]
@@ -0,0 +1,92 @@
1
+ import type { Client } from '../../client'
2
+ import { createClient } from '../../client'
3
+ import type { Explorer } from '../../explorer'
4
+ import { createEtherscanV2 } from '../../explorer'
5
+ import type { Chain } from '../types/chain'
6
+ import type { HttpRpc } from '../types/rpc'
7
+ import { hyperEvm } from '../viemChains/hyperEvm'
8
+
9
+ export const createHyperEvmChain = ({
10
+ explorerApiKey: apiKey,
11
+ explorerProxyUrl: proxyUrl,
12
+ explorerPageSize: pageSize,
13
+ }: {
14
+ explorerApiKey?: string
15
+ explorerProxyUrl?: string
16
+ explorerPageSize?: number
17
+ }): Chain =>
18
+ createHyperEvmChainCustom({
19
+ client: createClient({ chain: hyperEvm, httpRpcs: hyperEvmHttpRpcs }),
20
+ explorer: createEtherscanV2({
21
+ name: 'HyperEVMScan',
22
+ baseUrl: 'https://hyperevmscan.io',
23
+ chainId: 999,
24
+ apiKey,
25
+ proxyUrl,
26
+ pageSize,
27
+ }),
28
+ })
29
+
30
+ type CreateHyperEvmChainCustomParameters = {
31
+ client: Client
32
+ explorer: Explorer
33
+ }
34
+
35
+ export const createHyperEvmChainCustom = ({
36
+ client,
37
+ explorer,
38
+ }: CreateHyperEvmChainCustomParameters): Chain => ({
39
+ id: 999,
40
+ network: 'hyper-evm',
41
+ name: 'HyperEVM',
42
+ nativeToken: {
43
+ name: 'Hyperliquid',
44
+ symbol: 'HYPE',
45
+ decimals: 18,
46
+ currency: {
47
+ symbol: 'HYPE',
48
+ type: 'CryptoCurrency',
49
+ id: 'hyperliquid',
50
+ name: 'Hyperliquid',
51
+ updatedAt: 0,
52
+ },
53
+ },
54
+ wrappedTokenAddresses: new Set([
55
+ '0x5555555555555555555555555555555555555555',
56
+ ]),
57
+ explorer,
58
+ client,
59
+ blockTime: 1000,
60
+ coingeckoId: 'hyperevm',
61
+ defillamaId: undefined,
62
+ })
63
+
64
+ export const hyperEvmHttpRpcs: HttpRpc[] = [
65
+ {
66
+ url: 'https://rpc.hyperliquid.xyz/evm',
67
+ getLogsIsUsable: true,
68
+ getLogsMaxBlockRange: 1000n,
69
+ },
70
+ {
71
+ url: 'https://rpc.hypurrscan.io',
72
+ getLogsIsUsable: true,
73
+ getLogsMaxBlockRange: 1000n,
74
+ },
75
+ {
76
+ url: 'https://hyperliquid-json-rpc.stakely.io',
77
+ getLogsIsUsable: true,
78
+ getLogsMaxBlockRange: 1000n,
79
+ },
80
+ {
81
+ url: 'https://hyperliquid.drpc.org',
82
+ getLogsIsUsable: true,
83
+ getLogsMaxBlockRange: 10_000n,
84
+ },
85
+ {
86
+ url: 'https://rpc.hyperlend.finance',
87
+ getLogsIsUsable: true,
88
+ getLogsMaxBlockRange: 10_000n,
89
+ },
90
+ ]
91
+
92
+ export const hyperEvmWebsocketRpcUrls: string[] = ['wss://hyperliquid.drpc.org']
@@ -0,0 +1,112 @@
1
+ import { sei } 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 createSeiChain = ({
10
+ explorerApiKey: apiKey,
11
+ explorerProxyUrl: proxyUrl,
12
+ explorerPageSize: pageSize,
13
+ }: {
14
+ explorerApiKey?: string
15
+ explorerProxyUrl?: string
16
+ explorerPageSize?: number
17
+ }): Chain =>
18
+ createSeiChainCustom({
19
+ client: createClient({ chain: sei, httpRpcs: seiHttpRpcs }),
20
+ explorer: createEtherscanV2({
21
+ name: 'SeiScan',
22
+ baseUrl: 'https://seiscan.io',
23
+ chainId: 1329,
24
+ apiKey,
25
+ proxyUrl,
26
+ pageSize,
27
+ }),
28
+ })
29
+
30
+ type CreateSeiChainCustomParameters = {
31
+ client: Client
32
+ explorer: Explorer
33
+ }
34
+
35
+ export const createSeiChainCustom = ({
36
+ client,
37
+ explorer,
38
+ }: CreateSeiChainCustomParameters): Chain => ({
39
+ id: 1329,
40
+ network: 'sei',
41
+ name: 'Sei',
42
+ nativeToken: {
43
+ name: 'Sei',
44
+ symbol: 'SEI',
45
+ decimals: 18,
46
+ currency: {
47
+ symbol: 'SEI',
48
+ type: 'CryptoCurrency',
49
+ id: 'sei-network',
50
+ name: 'Sei',
51
+ updatedAt: 0,
52
+ },
53
+ },
54
+ wrappedTokenAddresses: new Set([
55
+ '0xe30fedd158a2e3b13e9badaeabafc5516e95e8c7',
56
+ ]),
57
+ explorer,
58
+ client,
59
+ blockTime: undefined,
60
+ coingeckoId: 'sei-v2',
61
+ defillamaId: undefined,
62
+ })
63
+
64
+ export const seiHttpRpcs: HttpRpc[] = [
65
+ // Not archive node
66
+ // {
67
+ // url: 'https://evm-rpc.sei-apis.com',
68
+ // getLogsIsUsable: true,
69
+ // getLogsMaxBlockRange: 2000n,
70
+ // },
71
+ // Not archive node
72
+ // {
73
+ // url: 'https://sei.drpc.org',
74
+ // getLogsIsUsable: true,
75
+ // getLogsMaxBlockRange: 2000n,
76
+ // },
77
+ // Not archive node
78
+ // {
79
+ // url: 'https://sei-evm-rpc.stakeme.pro',
80
+ // getLogsIsUsable: true,
81
+ // getLogsMaxBlockRange: 2000n,
82
+ // },
83
+ // Not archive node
84
+ // {
85
+ // url: 'https://sei-public.nodies.app',
86
+ // getLogsIsUsable: true,
87
+ // getLogsMaxBlockRange: 10_000n,
88
+ // },
89
+ // Not archive node
90
+ // {
91
+ // url: 'https://sei.therpc.io',
92
+ // getLogsIsUsable: true,
93
+ // getLogsMaxBlockRange: 2000n,
94
+ // },
95
+ {
96
+ url: 'https://sei-mainnet.public.blastapi.io',
97
+ getLogsIsUsable: false,
98
+ getLogsMaxBlockRange: 0n,
99
+ },
100
+ {
101
+ url: 'https://1329.rpc.thirdweb.com',
102
+ getLogsIsUsable: true,
103
+ getLogsMaxBlockRange: 1000n,
104
+ },
105
+ {
106
+ url: 'https://sei.rpc.grove.city/v1/01fdb492',
107
+ getLogsIsUsable: true,
108
+ getLogsMaxBlockRange: 2000n,
109
+ },
110
+ ]
111
+
112
+ export const seiWebsocketRpcUrls: string[] = ['wss://sei.drpc.org']
@@ -1,10 +1,10 @@
1
1
  import { ethereum } from '@0xtorch/core'
2
+ import { soneium } from 'viem/chains'
2
3
  import { type Client, createClient } from '../../client'
3
4
  import type { Explorer } from '../../explorer'
4
5
  import { createBlockscout } from '../../explorer'
5
6
  import type { Chain } from '../types/chain'
6
7
  import type { HttpRpc } from '../types/rpc'
7
- import { soneium } from '../viemChains/soneium'
8
8
 
9
9
  type CreateSoneiumChainParameters = {
10
10
  client: Client
@@ -1,9 +1,9 @@
1
+ import { sonic } from 'viem/chains'
1
2
  import { type Client, createClient } from '../../client'
2
3
  import type { Explorer } from '../../explorer'
3
4
  import { createEtherscanV2 } from '../../explorer'
4
5
  import type { Chain } from '../types/chain'
5
6
  import type { HttpRpc } from '../types/rpc'
6
- import { sonic } from '../viemChains/sonic'
7
7
 
8
8
  export const createSonicChain = ({
9
9
  explorerApiKey: apiKey,
@@ -0,0 +1,90 @@
1
+ import { ethereum } from '@0xtorch/core'
2
+ import { worldchain } 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 createWorldChain = ({
11
+ explorerApiKey: apiKey,
12
+ explorerProxyUrl: proxyUrl,
13
+ explorerPageSize: pageSize,
14
+ }: {
15
+ explorerApiKey?: string
16
+ explorerProxyUrl?: string
17
+ explorerPageSize?: number
18
+ }): Chain =>
19
+ createWorldChainCustom({
20
+ client: createClient({ chain: worldchain, httpRpcs: worldChainHttpRpcs }),
21
+ explorer: createEtherscanV2({
22
+ name: 'World Scan',
23
+ baseUrl: 'https://worldscan.org',
24
+ chainId: 480,
25
+ apiKey,
26
+ proxyUrl,
27
+ pageSize,
28
+ }),
29
+ })
30
+
31
+ type CreateWorldChainCustomParameters = {
32
+ client: Client
33
+ explorer: Explorer
34
+ }
35
+
36
+ export const createWorldChainCustom = ({
37
+ client,
38
+ explorer,
39
+ }: CreateWorldChainCustomParameters): Chain => ({
40
+ id: 480,
41
+ network: 'world-chain',
42
+ name: 'World Chain',
43
+ nativeToken: {
44
+ name: 'Ethereum',
45
+ symbol: 'ETH',
46
+ decimals: 18,
47
+ currency: ethereum,
48
+ },
49
+ wrappedTokenAddresses: new Set([
50
+ '0x4200000000000000000000000000000000000006',
51
+ ]),
52
+ explorer,
53
+ client,
54
+ blockTime: 2000,
55
+ coingeckoId: 'world-chain',
56
+ defillamaId: undefined,
57
+ })
58
+
59
+ export const worldChainHttpRpcs: HttpRpc[] = [
60
+ {
61
+ url: 'https://worldchain-mainnet.g.alchemy.com/public',
62
+ getLogsIsUsable: true,
63
+ getLogsMaxBlockRange: 10_000n,
64
+ },
65
+ {
66
+ url: 'https://480.rpc.thirdweb.com',
67
+ getLogsIsUsable: true,
68
+ getLogsMaxBlockRange: 1000n,
69
+ },
70
+ {
71
+ url: 'https://worldchain-mainnet.gateway.tenderly.co',
72
+ getLogsIsUsable: true,
73
+ getLogsMaxBlockRange: 10_000n,
74
+ },
75
+ {
76
+ url: 'https://sparkling-autumn-dinghy.worldchain-mainnet.quiknode.pro',
77
+ getLogsIsUsable: true,
78
+ getLogsMaxBlockRange: 10_000n,
79
+ },
80
+ {
81
+ url: 'https://worldchain.drpc.org',
82
+ getLogsIsUsable: true,
83
+ getLogsMaxBlockRange: 10_000n,
84
+ },
85
+ ]
86
+
87
+ export const worldChainWebsocketRpcUrls: string[] = [
88
+ 'wss://worldchain-mainnet.gateway.tenderly.co',
89
+ 'wss://worldchain.drpc.org',
90
+ ]
package/chain/index.ts CHANGED
@@ -88,12 +88,24 @@ export {
88
88
  gesoVerseHttpRpcs,
89
89
  gesoVerseWebsocketRpcUrls,
90
90
  } from './definitions/gesoVerse'
91
+ export {
92
+ createGnosisChain,
93
+ createGnosisChainCustom,
94
+ gnosisHttpRpcs,
95
+ gnosisWebsocketRpcUrls,
96
+ } from './definitions/gnosis'
91
97
  export {
92
98
  createHomeVerseChain,
93
99
  createHomeVerseChainCustom,
94
100
  homeVerseHttpRpcs,
95
101
  homeVerseWebsocketRpcUrls,
96
102
  } from './definitions/homeVerse'
103
+ export {
104
+ createHyperEvmChain,
105
+ createHyperEvmChainCustom,
106
+ hyperEvmHttpRpcs,
107
+ hyperEvmWebsocketRpcUrls,
108
+ } from './definitions/hyperEvm'
97
109
  export {
98
110
  createLineaChain,
99
111
  createLineaChainCustom,
@@ -184,6 +196,12 @@ export {
184
196
  scrollHttpRpcs,
185
197
  scrollWebsocketRpcUrls,
186
198
  } from './definitions/scroll'
199
+ export {
200
+ createSeiChain,
201
+ createSeiChainCustom,
202
+ seiHttpRpcs,
203
+ seiWebsocketRpcUrls,
204
+ } from './definitions/sei'
187
205
  export {
188
206
  createSoneiumChain,
189
207
  createSoneiumChainCustom,
@@ -214,6 +232,12 @@ export {
214
232
  unichainHttpRpcs,
215
233
  unichainWebsocketRpcUrls,
216
234
  } from './definitions/unichain'
235
+ export {
236
+ createWorldChain,
237
+ createWorldChainCustom,
238
+ worldChainHttpRpcs,
239
+ worldChainWebsocketRpcUrls,
240
+ } from './definitions/worldChain'
217
241
  export {
218
242
  createYooldoVerseChain,
219
243
  createYooldoVerseChainCustom,
@@ -0,0 +1,28 @@
1
+ import { defineChain } from 'viem'
2
+ import { chainConfig } from 'viem/op-stack'
3
+
4
+ export const hyperEvm = /*#__PURE__*/ defineChain({
5
+ ...chainConfig,
6
+ id: 999,
7
+ name: 'HyperEVM',
8
+ nativeCurrency: { name: 'Hyperliquid', symbol: 'HYPE', decimals: 18 },
9
+ rpcUrls: {
10
+ default: {
11
+ http: ['https://rpc.hyperliquid.xyz/evm'],
12
+ },
13
+ },
14
+ blockExplorers: {
15
+ default: {
16
+ name: 'HyperEVMScan',
17
+ url: 'https://hyperevmscan.io',
18
+ apiUrl: 'https://hyperevmscan.io/api',
19
+ },
20
+ },
21
+ contracts: {
22
+ ...chainConfig.contracts,
23
+ multicall3: {
24
+ address: '0xcA11bde05977b3631167028862bE2a173976CA11',
25
+ blockCreated: 13051,
26
+ },
27
+ },
28
+ })
@@ -22,7 +22,7 @@ const transferSchema = z.object({
22
22
  contractAddress: lowerHexSchema,
23
23
  from: lowerHexSchema,
24
24
  to: lowerHexSchema,
25
- logIndex: z.string().regex(/^\d+$/).transform(Number),
25
+ logIndex: z.string().regex(/^\d+$/).transform(Number).nullable().optional(),
26
26
  tokenDecimal: z
27
27
  .union([
28
28
  z.literal('').transform(() => undefined),
@@ -88,7 +88,7 @@ export const getTokenTransferEventsByAddress = async ({
88
88
  transfers.push({
89
89
  address: data.contractAddress,
90
90
  from: data.from,
91
- logIndex: data.logIndex,
91
+ logIndex: data.logIndex ?? 0,
92
92
  to: data.to,
93
93
  value: data.value,
94
94
  })
package/index.ts CHANGED
@@ -48,8 +48,12 @@ export {
48
48
  createGeekVerseChainCustom,
49
49
  createGesoVerseChain,
50
50
  createGesoVerseChainCustom,
51
+ createGnosisChain,
52
+ createGnosisChainCustom,
51
53
  createHomeVerseChain,
52
54
  createHomeVerseChainCustom,
55
+ createHyperEvmChain,
56
+ createHyperEvmChainCustom,
53
57
  createLineaChain,
54
58
  createLineaChainCustom,
55
59
  createMantaPacificChain,
@@ -80,6 +84,8 @@ export {
80
84
  createSaakuruChainCustom,
81
85
  createScrollChain,
82
86
  createScrollChainCustom,
87
+ createSeiChain,
88
+ createSeiChainCustom,
83
89
  createSoneiumChain,
84
90
  createSoneiumChainCustom,
85
91
  createSonicChain,
@@ -90,6 +96,8 @@ export {
90
96
  createTcgVerseChainCustom,
91
97
  createUnichain,
92
98
  createUnichainCustom,
99
+ createWorldChain,
100
+ createWorldChainCustom,
93
101
  createYooldoVerseChain,
94
102
  createYooldoVerseChainCustom,
95
103
  createZkFairChain,
@@ -110,8 +118,12 @@ export {
110
118
  geekVerseWebsocketRpcUrls,
111
119
  gesoVerseHttpRpcs,
112
120
  gesoVerseWebsocketRpcUrls,
121
+ gnosisHttpRpcs,
122
+ gnosisWebsocketRpcUrls,
113
123
  homeVerseHttpRpcs,
114
124
  homeVerseWebsocketRpcUrls,
125
+ hyperEvmHttpRpcs,
126
+ hyperEvmWebsocketRpcUrls,
115
127
  lineaHttpRpcs,
116
128
  lineaWebsocketRpcUrls,
117
129
  mantaPacificHttpRpcs,
@@ -142,6 +154,8 @@ export {
142
154
  saakuruWebsocketRpcUrls,
143
155
  scrollHttpRpcs,
144
156
  scrollWebsocketRpcUrls,
157
+ seiHttpRpcs,
158
+ seiWebsocketRpcUrls,
145
159
  soneiumHttpRpcs,
146
160
  soneiumWebsocketRpcUrls,
147
161
  sonicHttpRpcs,
@@ -152,6 +166,8 @@ export {
152
166
  tcgVerseWebsocketRpcUrls,
153
167
  unichainHttpRpcs,
154
168
  unichainWebsocketRpcUrls,
169
+ worldChainHttpRpcs,
170
+ worldChainWebsocketRpcUrls,
155
171
  yooldoVerseHttpRpcs,
156
172
  yooldoVerseWebsocketRpcUrls,
157
173
  zkFairHttpRpcs,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xtorch/evm",
3
- "version": "0.0.147",
3
+ "version": "0.0.149",
4
4
  "description": "Cryptorch EVM extension",
5
5
  "keywords": [
6
6
  "cryptorch",
@@ -39,8 +39,8 @@
39
39
  "dependencies": {
40
40
  "@0xtorch/big-decimal": "^0.0.14",
41
41
  "@0xtorch/core": "^0.0.65",
42
- "abitype": "^1.0.8",
43
- "viem": "^2.31.4",
42
+ "abitype": "^1.0.9",
43
+ "viem": "^2.36.0",
44
44
  "zod": "^3.24.4"
45
45
  }
46
46
  }
@@ -1,55 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.soneium = void 0;
4
- const viem_1 = require("viem");
5
- const op_stack_1 = require("viem/op-stack");
6
- const sourceId = 1;
7
- exports.soneium = (0, viem_1.defineChain)({
8
- ...op_stack_1.chainConfig,
9
- id: 1868,
10
- name: 'Soneium Mainnet',
11
- nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },
12
- rpcUrls: {
13
- default: {
14
- http: ['https://rpc.soneium.org'],
15
- },
16
- },
17
- blockExplorers: {
18
- default: {
19
- name: 'Blockscout',
20
- url: 'https://soneium.blockscout.com',
21
- apiUrl: 'https://soneium.blockscout.com/api',
22
- },
23
- },
24
- contracts: {
25
- ...op_stack_1.chainConfig.contracts,
26
- disputeGameFactory: {
27
- [sourceId]: {
28
- address: '0x512a3d2c7a43bd9261d2b8e8c9c70d4bd4d503c0',
29
- },
30
- },
31
- l2OutputOracle: {
32
- [sourceId]: {
33
- address: '0x0000000000000000000000000000000000000000',
34
- },
35
- },
36
- portal: {
37
- [sourceId]: {
38
- address: '0x88e529a6ccd302c948689cd5156c83d4614fae92',
39
- blockCreated: 7061266,
40
- },
41
- },
42
- l1StandardBridge: {
43
- [sourceId]: {
44
- address: '0xeb9bf100225c214efc3e7c651ebbadcf85177607',
45
- blockCreated: 7061266,
46
- },
47
- },
48
- multicall3: {
49
- address: '0xcA11bde05977b3631167028862bE2a173976CA11',
50
- blockCreated: 1,
51
- },
52
- },
53
- sourceId,
54
- });
55
- //# sourceMappingURL=soneium.js.map