@0xtorch/evm 0.0.149 → 0.0.150
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.
- package/_cjs/chain/definitions/abstract.js +63 -0
- package/_cjs/chain/definitions/abstract.js.map +1 -0
- package/_cjs/chain/definitions/apeChain.js +61 -0
- package/_cjs/chain/definitions/apeChain.js.map +1 -0
- package/_cjs/chain/definitions/arbitrumNova.js +83 -0
- package/_cjs/chain/definitions/arbitrumNova.js.map +1 -0
- package/_cjs/chain/definitions/bitTorrent.js +68 -0
- package/_cjs/chain/definitions/bitTorrent.js.map +1 -0
- package/_cjs/chain/definitions/celo.js +81 -0
- package/_cjs/chain/definitions/celo.js.map +1 -0
- package/_cjs/chain/definitions/fraxtal.js +71 -0
- package/_cjs/chain/definitions/fraxtal.js.map +1 -0
- package/_cjs/chain/definitions/immutableZkEvm.js +66 -0
- package/_cjs/chain/definitions/immutableZkEvm.js.map +1 -0
- package/_cjs/chain/definitions/katana.js +51 -0
- package/_cjs/chain/definitions/katana.js.map +1 -0
- package/_cjs/chain/definitions/memeCore.js +56 -0
- package/_cjs/chain/definitions/memeCore.js.map +1 -0
- package/_cjs/chain/definitions/sophon.js +61 -0
- package/_cjs/chain/definitions/sophon.js.map +1 -0
- package/_cjs/chain/definitions/swell.js +53 -0
- package/_cjs/chain/definitions/swell.js.map +1 -0
- package/_cjs/chain/definitions/xdcNetwork.js +102 -0
- package/_cjs/chain/definitions/xdcNetwork.js.map +1 -0
- package/_cjs/chain/index.js +65 -4
- package/_cjs/chain/index.js.map +1 -1
- package/_cjs/index.js +54 -5
- package/_cjs/index.js.map +1 -1
- package/_esm/chain/definitions/abstract.js +58 -0
- package/_esm/chain/definitions/abstract.js.map +1 -0
- package/_esm/chain/definitions/apeChain.js +56 -0
- package/_esm/chain/definitions/apeChain.js.map +1 -0
- package/_esm/chain/definitions/arbitrumNova.js +78 -0
- package/_esm/chain/definitions/arbitrumNova.js.map +1 -0
- package/_esm/chain/definitions/bitTorrent.js +63 -0
- package/_esm/chain/definitions/bitTorrent.js.map +1 -0
- package/_esm/chain/definitions/celo.js +76 -0
- package/_esm/chain/definitions/celo.js.map +1 -0
- package/_esm/chain/definitions/fraxtal.js +66 -0
- package/_esm/chain/definitions/fraxtal.js.map +1 -0
- package/_esm/chain/definitions/immutableZkEvm.js +61 -0
- package/_esm/chain/definitions/immutableZkEvm.js.map +1 -0
- package/_esm/chain/definitions/katana.js +46 -0
- package/_esm/chain/definitions/katana.js.map +1 -0
- package/_esm/chain/definitions/memeCore.js +51 -0
- package/_esm/chain/definitions/memeCore.js.map +1 -0
- package/_esm/chain/definitions/sophon.js +56 -0
- package/_esm/chain/definitions/sophon.js.map +1 -0
- package/_esm/chain/definitions/swell.js +48 -0
- package/_esm/chain/definitions/swell.js.map +1 -0
- package/_esm/chain/definitions/xdcNetwork.js +97 -0
- package/_esm/chain/definitions/xdcNetwork.js.map +1 -0
- package/_esm/chain/index.js +12 -0
- package/_esm/chain/index.js.map +1 -1
- package/_esm/index.js +1 -1
- package/_esm/index.js.map +1 -1
- package/_types/chain/definitions/abstract.d.ts +18 -0
- package/_types/chain/definitions/abstract.d.ts.map +1 -0
- package/_types/chain/definitions/apeChain.d.ts +18 -0
- package/_types/chain/definitions/apeChain.d.ts.map +1 -0
- package/_types/chain/definitions/arbitrumNova.d.ts +18 -0
- package/_types/chain/definitions/arbitrumNova.d.ts.map +1 -0
- package/_types/chain/definitions/bitTorrent.d.ts +18 -0
- package/_types/chain/definitions/bitTorrent.d.ts.map +1 -0
- package/_types/chain/definitions/celo.d.ts +18 -0
- package/_types/chain/definitions/celo.d.ts.map +1 -0
- package/_types/chain/definitions/fraxtal.d.ts +18 -0
- package/_types/chain/definitions/fraxtal.d.ts.map +1 -0
- package/_types/chain/definitions/immutableZkEvm.d.ts +18 -0
- package/_types/chain/definitions/immutableZkEvm.d.ts.map +1 -0
- package/_types/chain/definitions/katana.d.ts +18 -0
- package/_types/chain/definitions/katana.d.ts.map +1 -0
- package/_types/chain/definitions/memeCore.d.ts +18 -0
- package/_types/chain/definitions/memeCore.d.ts.map +1 -0
- package/_types/chain/definitions/sophon.d.ts +18 -0
- package/_types/chain/definitions/sophon.d.ts.map +1 -0
- package/_types/chain/definitions/swell.d.ts +18 -0
- package/_types/chain/definitions/swell.d.ts.map +1 -0
- package/_types/chain/definitions/xdcNetwork.d.ts +18 -0
- package/_types/chain/definitions/xdcNetwork.d.ts.map +1 -0
- package/_types/chain/index.d.ts +12 -0
- package/_types/chain/index.d.ts.map +1 -1
- package/_types/index.d.ts +1 -1
- package/_types/index.d.ts.map +1 -1
- package/chain/definitions/abstract.ts +82 -0
- package/chain/definitions/apeChain.ts +80 -0
- package/chain/definitions/arbitrumNova.ts +102 -0
- package/chain/definitions/bitTorrent.ts +87 -0
- package/chain/definitions/celo.ts +100 -0
- package/chain/definitions/fraxtal.ts +90 -0
- package/chain/definitions/immutableZkEvm.ts +83 -0
- package/chain/definitions/katana.ts +70 -0
- package/chain/definitions/memeCore.ts +75 -0
- package/chain/definitions/sophon.ts +80 -0
- package/chain/definitions/swell.ts +72 -0
- package/chain/definitions/xdcNetwork.ts +121 -0
- package/chain/index.ts +72 -0
- package/index.ts +48 -0
- package/package.json +1 -1
|
@@ -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[] = []
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { ethereum } from '@0xtorch/core'
|
|
2
|
+
import { swellchain } 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 createSwellChain = ({
|
|
11
|
+
explorerApiKey: apiKey,
|
|
12
|
+
explorerProxyUrl: proxyUrl,
|
|
13
|
+
explorerPageSize: pageSize,
|
|
14
|
+
}: {
|
|
15
|
+
explorerApiKey?: string
|
|
16
|
+
explorerProxyUrl?: string
|
|
17
|
+
explorerPageSize?: number
|
|
18
|
+
}): Chain =>
|
|
19
|
+
createSwellChainCustom({
|
|
20
|
+
client: createClient({ chain: swellchain, httpRpcs: swellHttpRpcs }),
|
|
21
|
+
explorer: createEtherscanV2({
|
|
22
|
+
name: 'Swellchainscan',
|
|
23
|
+
baseUrl: 'https://swellchainscan.io',
|
|
24
|
+
chainId: 1923,
|
|
25
|
+
apiKey,
|
|
26
|
+
proxyUrl,
|
|
27
|
+
pageSize,
|
|
28
|
+
}),
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
type CreateSwellChainCustomParameters = {
|
|
32
|
+
client: Client
|
|
33
|
+
explorer: Explorer
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export const createSwellChainCustom = ({
|
|
37
|
+
client,
|
|
38
|
+
explorer,
|
|
39
|
+
}: CreateSwellChainCustomParameters): Chain => ({
|
|
40
|
+
id: 1923,
|
|
41
|
+
network: 'swellchain',
|
|
42
|
+
name: 'Swellchain',
|
|
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: 'swellchain',
|
|
56
|
+
defillamaId: undefined,
|
|
57
|
+
})
|
|
58
|
+
|
|
59
|
+
export const swellHttpRpcs: HttpRpc[] = [
|
|
60
|
+
{
|
|
61
|
+
url: 'https://rpc.ankr.com/swell',
|
|
62
|
+
getLogsIsUsable: true,
|
|
63
|
+
getLogsMaxBlockRange: 1000n,
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
url: 'https://swell-mainnet.alt.technology',
|
|
67
|
+
getLogsIsUsable: true,
|
|
68
|
+
getLogsMaxBlockRange: 1000n,
|
|
69
|
+
},
|
|
70
|
+
]
|
|
71
|
+
|
|
72
|
+
export const swellWebsocketRpcUrls: string[] = []
|