@0xtorch/evm 0.0.96 → 0.0.97
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/arbitrumOne.js +2 -1
- package/_cjs/chain/definitions/arbitrumOne.js.map +1 -1
- package/_cjs/chain/definitions/astar.js +3 -1
- package/_cjs/chain/definitions/astar.js.map +1 -1
- package/_cjs/chain/definitions/astarZkEvm.js +3 -1
- package/_cjs/chain/definitions/astarZkEvm.js.map +1 -1
- package/_cjs/chain/definitions/avalancheC.js +2 -1
- package/_cjs/chain/definitions/avalancheC.js.map +1 -1
- package/_cjs/chain/definitions/base.js +2 -1
- package/_cjs/chain/definitions/base.js.map +1 -1
- package/_cjs/chain/definitions/blast.js +2 -1
- package/_cjs/chain/definitions/blast.js.map +1 -1
- package/_cjs/chain/definitions/bsc.js +2 -1
- package/_cjs/chain/definitions/bsc.js.map +1 -1
- package/_cjs/chain/definitions/ethereum.js +2 -1
- package/_cjs/chain/definitions/ethereum.js.map +1 -1
- package/_cjs/chain/definitions/fantom.js +2 -1
- package/_cjs/chain/definitions/fantom.js.map +1 -1
- package/_cjs/chain/definitions/linea.js +2 -1
- package/_cjs/chain/definitions/linea.js.map +1 -1
- package/_cjs/chain/definitions/mantaPacific.js +3 -1
- package/_cjs/chain/definitions/mantaPacific.js.map +1 -1
- package/_cjs/chain/definitions/mantle.js +2 -1
- package/_cjs/chain/definitions/mantle.js.map +1 -1
- package/_cjs/chain/definitions/metis.js +3 -1
- package/_cjs/chain/definitions/metis.js.map +1 -1
- package/_cjs/chain/definitions/moonbeam.js +2 -1
- package/_cjs/chain/definitions/moonbeam.js.map +1 -1
- package/_cjs/chain/definitions/moonriver.js +2 -1
- package/_cjs/chain/definitions/moonriver.js.map +1 -1
- package/_cjs/chain/definitions/oasys.js +3 -1
- package/_cjs/chain/definitions/oasys.js.map +1 -1
- package/_cjs/chain/definitions/optimism.js +2 -1
- package/_cjs/chain/definitions/optimism.js.map +1 -1
- package/_cjs/chain/definitions/polygonPos.js +2 -1
- package/_cjs/chain/definitions/polygonPos.js.map +1 -1
- package/_cjs/chain/definitions/scroll.js +2 -1
- package/_cjs/chain/definitions/scroll.js.map +1 -1
- package/_cjs/chain/definitions/zkFair.js +3 -1
- package/_cjs/chain/definitions/zkFair.js.map +1 -1
- package/_cjs/chain/definitions/zkSyncEra.js +2 -1
- package/_cjs/chain/definitions/zkSyncEra.js.map +1 -1
- package/_cjs/chain/definitions/zora.js +3 -1
- package/_cjs/chain/definitions/zora.js.map +1 -1
- package/_cjs/explorer/blockscout/client.js +9 -2
- package/_cjs/explorer/blockscout/client.js.map +1 -1
- package/_cjs/explorer/blockscout/create.js +2 -2
- package/_cjs/explorer/blockscout/create.js.map +1 -1
- package/_cjs/explorer/etherscan/create.js +11 -9
- package/_cjs/explorer/etherscan/create.js.map +1 -1
- package/_esm/chain/definitions/arbitrumOne.js +2 -1
- package/_esm/chain/definitions/arbitrumOne.js.map +1 -1
- package/_esm/chain/definitions/astar.js +3 -1
- package/_esm/chain/definitions/astar.js.map +1 -1
- package/_esm/chain/definitions/astarZkEvm.js +3 -1
- package/_esm/chain/definitions/astarZkEvm.js.map +1 -1
- package/_esm/chain/definitions/avalancheC.js +2 -1
- package/_esm/chain/definitions/avalancheC.js.map +1 -1
- package/_esm/chain/definitions/base.js +2 -1
- package/_esm/chain/definitions/base.js.map +1 -1
- package/_esm/chain/definitions/blast.js +2 -1
- package/_esm/chain/definitions/blast.js.map +1 -1
- package/_esm/chain/definitions/bsc.js +2 -1
- package/_esm/chain/definitions/bsc.js.map +1 -1
- package/_esm/chain/definitions/ethereum.js +2 -1
- package/_esm/chain/definitions/ethereum.js.map +1 -1
- package/_esm/chain/definitions/fantom.js +2 -1
- package/_esm/chain/definitions/fantom.js.map +1 -1
- package/_esm/chain/definitions/linea.js +2 -1
- package/_esm/chain/definitions/linea.js.map +1 -1
- package/_esm/chain/definitions/mantaPacific.js +3 -1
- package/_esm/chain/definitions/mantaPacific.js.map +1 -1
- package/_esm/chain/definitions/mantle.js +2 -1
- package/_esm/chain/definitions/mantle.js.map +1 -1
- package/_esm/chain/definitions/metis.js +3 -1
- package/_esm/chain/definitions/metis.js.map +1 -1
- package/_esm/chain/definitions/moonbeam.js +2 -1
- package/_esm/chain/definitions/moonbeam.js.map +1 -1
- package/_esm/chain/definitions/moonriver.js +2 -1
- package/_esm/chain/definitions/moonriver.js.map +1 -1
- package/_esm/chain/definitions/oasys.js +3 -1
- package/_esm/chain/definitions/oasys.js.map +1 -1
- package/_esm/chain/definitions/optimism.js +2 -1
- package/_esm/chain/definitions/optimism.js.map +1 -1
- package/_esm/chain/definitions/polygonPos.js +2 -1
- package/_esm/chain/definitions/polygonPos.js.map +1 -1
- package/_esm/chain/definitions/scroll.js +2 -1
- package/_esm/chain/definitions/scroll.js.map +1 -1
- package/_esm/chain/definitions/zkFair.js +3 -1
- package/_esm/chain/definitions/zkFair.js.map +1 -1
- package/_esm/chain/definitions/zkSyncEra.js +2 -1
- package/_esm/chain/definitions/zkSyncEra.js.map +1 -1
- package/_esm/chain/definitions/zora.js +3 -1
- package/_esm/chain/definitions/zora.js.map +1 -1
- package/_esm/explorer/blockscout/client.js +9 -2
- package/_esm/explorer/blockscout/client.js.map +1 -1
- package/_esm/explorer/blockscout/create.js +2 -2
- package/_esm/explorer/blockscout/create.js.map +1 -1
- package/_esm/explorer/etherscan/create.js +11 -9
- package/_esm/explorer/etherscan/create.js.map +1 -1
- package/_types/chain/definitions/arbitrumOne.d.ts +2 -1
- package/_types/chain/definitions/arbitrumOne.d.ts.map +1 -1
- package/_types/chain/definitions/astar.d.ts +4 -1
- package/_types/chain/definitions/astar.d.ts.map +1 -1
- package/_types/chain/definitions/astarZkEvm.d.ts +4 -1
- package/_types/chain/definitions/astarZkEvm.d.ts.map +1 -1
- package/_types/chain/definitions/avalancheC.d.ts +2 -1
- package/_types/chain/definitions/avalancheC.d.ts.map +1 -1
- package/_types/chain/definitions/base.d.ts +2 -1
- package/_types/chain/definitions/base.d.ts.map +1 -1
- package/_types/chain/definitions/blast.d.ts +2 -1
- package/_types/chain/definitions/blast.d.ts.map +1 -1
- package/_types/chain/definitions/bsc.d.ts +2 -1
- package/_types/chain/definitions/bsc.d.ts.map +1 -1
- package/_types/chain/definitions/ethereum.d.ts +2 -1
- package/_types/chain/definitions/ethereum.d.ts.map +1 -1
- package/_types/chain/definitions/fantom.d.ts +2 -1
- package/_types/chain/definitions/fantom.d.ts.map +1 -1
- package/_types/chain/definitions/linea.d.ts +2 -1
- package/_types/chain/definitions/linea.d.ts.map +1 -1
- package/_types/chain/definitions/mantaPacific.d.ts +4 -1
- package/_types/chain/definitions/mantaPacific.d.ts.map +1 -1
- package/_types/chain/definitions/mantle.d.ts +2 -1
- package/_types/chain/definitions/mantle.d.ts.map +1 -1
- package/_types/chain/definitions/metis.d.ts +4 -1
- package/_types/chain/definitions/metis.d.ts.map +1 -1
- package/_types/chain/definitions/moonbeam.d.ts +2 -1
- package/_types/chain/definitions/moonbeam.d.ts.map +1 -1
- package/_types/chain/definitions/moonriver.d.ts +2 -1
- package/_types/chain/definitions/moonriver.d.ts.map +1 -1
- package/_types/chain/definitions/oasys.d.ts +4 -1
- package/_types/chain/definitions/oasys.d.ts.map +1 -1
- package/_types/chain/definitions/optimism.d.ts +2 -1
- package/_types/chain/definitions/optimism.d.ts.map +1 -1
- package/_types/chain/definitions/polygonPos.d.ts +2 -1
- package/_types/chain/definitions/polygonPos.d.ts.map +1 -1
- package/_types/chain/definitions/scroll.d.ts +2 -1
- package/_types/chain/definitions/scroll.d.ts.map +1 -1
- package/_types/chain/definitions/zkFair.d.ts +4 -1
- package/_types/chain/definitions/zkFair.d.ts.map +1 -1
- package/_types/chain/definitions/zkSyncEra.d.ts +2 -1
- package/_types/chain/definitions/zkSyncEra.d.ts.map +1 -1
- package/_types/chain/definitions/zora.d.ts +4 -1
- package/_types/chain/definitions/zora.d.ts.map +1 -1
- package/_types/explorer/blockscout/client.d.ts +7 -1
- package/_types/explorer/blockscout/client.d.ts.map +1 -1
- package/_types/explorer/blockscout/create.d.ts +3 -1
- package/_types/explorer/blockscout/create.d.ts.map +1 -1
- package/_types/explorer/etherscan/create.d.ts +2 -1
- package/_types/explorer/etherscan/create.d.ts.map +1 -1
- package/chain/definitions/arbitrumOne.ts +3 -0
- package/chain/definitions/astar.ts +9 -1
- package/chain/definitions/astarZkEvm.ts +9 -1
- package/chain/definitions/avalancheC.ts +3 -0
- package/chain/definitions/base.ts +3 -0
- package/chain/definitions/blast.ts +3 -0
- package/chain/definitions/bsc.ts +3 -0
- package/chain/definitions/ethereum.ts +3 -0
- package/chain/definitions/fantom.ts +3 -0
- package/chain/definitions/linea.ts +3 -0
- package/chain/definitions/mantaPacific.ts +9 -1
- package/chain/definitions/mantle.ts +3 -0
- package/chain/definitions/metis.ts +9 -1
- package/chain/definitions/moonbeam.ts +3 -0
- package/chain/definitions/moonriver.ts +3 -0
- package/chain/definitions/oasys.ts +9 -1
- package/chain/definitions/optimism.ts +3 -0
- package/chain/definitions/polygonPos.ts +3 -0
- package/chain/definitions/scroll.ts +3 -0
- package/chain/definitions/zkFair.ts +9 -1
- package/chain/definitions/zkSyncEra.ts +3 -0
- package/chain/definitions/zora.ts +9 -1
- package/explorer/blockscout/client.ts +24 -7
- package/explorer/blockscout/create.ts +5 -1
- package/explorer/etherscan/create.ts +12 -8
- package/package.json +1 -1
|
@@ -11,7 +11,13 @@ type CreateAstarChainParameters = {
|
|
|
11
11
|
explorer: Explorer
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
export const createAstarChain = (
|
|
14
|
+
export const createAstarChain = ({
|
|
15
|
+
explorerProxyUrl: proxyUrl,
|
|
16
|
+
explorerHeaders: headers,
|
|
17
|
+
}: {
|
|
18
|
+
explorerProxyUrl?: string
|
|
19
|
+
explorerHeaders?: Record<string, string>
|
|
20
|
+
}): Chain =>
|
|
15
21
|
createAstarChainCustom({
|
|
16
22
|
client: createClient({
|
|
17
23
|
chain: viemAstar,
|
|
@@ -21,6 +27,8 @@ export const createAstarChain = (): Chain =>
|
|
|
21
27
|
name: 'Astar explorer',
|
|
22
28
|
baseUrl: 'https://astar.blockscout.com',
|
|
23
29
|
apiBaseUrl: 'https://astar.blockscout.com/api',
|
|
30
|
+
proxyUrl,
|
|
31
|
+
headers,
|
|
24
32
|
}),
|
|
25
33
|
})
|
|
26
34
|
|
|
@@ -11,7 +11,13 @@ type CreateAstarZkEvmChainParameters = {
|
|
|
11
11
|
explorer: Explorer
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
export const createAstarZkEvmChain = (
|
|
14
|
+
export const createAstarZkEvmChain = ({
|
|
15
|
+
explorerProxyUrl: proxyUrl,
|
|
16
|
+
explorerHeaders: headers,
|
|
17
|
+
}: {
|
|
18
|
+
explorerProxyUrl?: string
|
|
19
|
+
explorerHeaders?: Record<string, string>
|
|
20
|
+
}): Chain =>
|
|
15
21
|
createAstarZkEvmChainCustom({
|
|
16
22
|
client: createClient({
|
|
17
23
|
chain: astarZkEVM,
|
|
@@ -21,6 +27,8 @@ export const createAstarZkEvmChain = (): Chain =>
|
|
|
21
27
|
name: 'Astar zkEVM explorer',
|
|
22
28
|
baseUrl: 'https://astar-zkevm.explorer.startale.com',
|
|
23
29
|
apiBaseUrl: 'https://astar-zkevm.explorer.startale.com/api',
|
|
30
|
+
proxyUrl,
|
|
31
|
+
headers,
|
|
24
32
|
}),
|
|
25
33
|
})
|
|
26
34
|
|
|
@@ -10,10 +10,12 @@ export const createAvalancheCChain = ({
|
|
|
10
10
|
explorerApiKey: apiKey,
|
|
11
11
|
explorerProxyUrl: proxyUrl,
|
|
12
12
|
explorerHeaders: headers,
|
|
13
|
+
explorerPageSize: pageSize,
|
|
13
14
|
}: {
|
|
14
15
|
explorerApiKey?: string
|
|
15
16
|
explorerProxyUrl?: string
|
|
16
17
|
explorerHeaders?: Record<string, string>
|
|
18
|
+
explorerPageSize?: number
|
|
17
19
|
}): Chain =>
|
|
18
20
|
createAvalancheCChainCustom({
|
|
19
21
|
client: createClient({
|
|
@@ -27,6 +29,7 @@ export const createAvalancheCChain = ({
|
|
|
27
29
|
apiKey,
|
|
28
30
|
proxyUrl,
|
|
29
31
|
headers,
|
|
32
|
+
pageSize,
|
|
30
33
|
}),
|
|
31
34
|
})
|
|
32
35
|
|
|
@@ -10,10 +10,12 @@ export const createBaseChain = ({
|
|
|
10
10
|
explorerApiKey: apiKey,
|
|
11
11
|
explorerProxyUrl: proxyUrl,
|
|
12
12
|
explorerHeaders: headers,
|
|
13
|
+
explorerPageSize: pageSize,
|
|
13
14
|
}: {
|
|
14
15
|
explorerApiKey?: string
|
|
15
16
|
explorerProxyUrl?: string
|
|
16
17
|
explorerHeaders?: Record<string, string>
|
|
18
|
+
explorerPageSize?: number
|
|
17
19
|
}): Chain =>
|
|
18
20
|
createBaseChainCustom({
|
|
19
21
|
client: createClient({
|
|
@@ -27,6 +29,7 @@ export const createBaseChain = ({
|
|
|
27
29
|
apiKey,
|
|
28
30
|
proxyUrl,
|
|
29
31
|
headers,
|
|
32
|
+
pageSize,
|
|
30
33
|
}),
|
|
31
34
|
})
|
|
32
35
|
|
|
@@ -10,10 +10,12 @@ export const createBlastChain = ({
|
|
|
10
10
|
explorerApiKey: apiKey,
|
|
11
11
|
explorerProxyUrl: proxyUrl,
|
|
12
12
|
explorerHeaders: headers,
|
|
13
|
+
explorerPageSize: pageSize,
|
|
13
14
|
}: {
|
|
14
15
|
explorerApiKey?: string
|
|
15
16
|
explorerProxyUrl?: string
|
|
16
17
|
explorerHeaders?: Record<string, string>
|
|
18
|
+
explorerPageSize?: number
|
|
17
19
|
}): Chain =>
|
|
18
20
|
createBlastChainCustom({
|
|
19
21
|
client: createClient({
|
|
@@ -27,6 +29,7 @@ export const createBlastChain = ({
|
|
|
27
29
|
apiKey,
|
|
28
30
|
proxyUrl,
|
|
29
31
|
headers,
|
|
32
|
+
pageSize,
|
|
30
33
|
}),
|
|
31
34
|
})
|
|
32
35
|
|
package/chain/definitions/bsc.ts
CHANGED
|
@@ -10,10 +10,12 @@ export const createBscChain = ({
|
|
|
10
10
|
explorerApiKey: apiKey,
|
|
11
11
|
explorerProxyUrl: proxyUrl,
|
|
12
12
|
explorerHeaders: headers,
|
|
13
|
+
explorerPageSize: pageSize,
|
|
13
14
|
}: {
|
|
14
15
|
explorerApiKey?: string
|
|
15
16
|
explorerProxyUrl?: string
|
|
16
17
|
explorerHeaders?: Record<string, string>
|
|
18
|
+
explorerPageSize?: number
|
|
17
19
|
}): Chain =>
|
|
18
20
|
createBscChainCustom({
|
|
19
21
|
client: createClient({
|
|
@@ -27,6 +29,7 @@ export const createBscChain = ({
|
|
|
27
29
|
apiKey,
|
|
28
30
|
proxyUrl,
|
|
29
31
|
headers,
|
|
32
|
+
pageSize,
|
|
30
33
|
}),
|
|
31
34
|
})
|
|
32
35
|
|
|
@@ -10,10 +10,12 @@ export const createEthereumChain = ({
|
|
|
10
10
|
explorerApiKey: apiKey,
|
|
11
11
|
explorerProxyUrl: proxyUrl,
|
|
12
12
|
explorerHeaders: headers,
|
|
13
|
+
explorerPageSize: pageSize,
|
|
13
14
|
}: {
|
|
14
15
|
explorerApiKey?: string
|
|
15
16
|
explorerProxyUrl?: string
|
|
16
17
|
explorerHeaders?: Record<string, string>
|
|
18
|
+
explorerPageSize?: number
|
|
17
19
|
}): Chain =>
|
|
18
20
|
createEthereumChainCustom({
|
|
19
21
|
client: createClient({
|
|
@@ -27,6 +29,7 @@ export const createEthereumChain = ({
|
|
|
27
29
|
apiKey,
|
|
28
30
|
proxyUrl,
|
|
29
31
|
headers,
|
|
32
|
+
pageSize,
|
|
30
33
|
}),
|
|
31
34
|
})
|
|
32
35
|
|
|
@@ -10,10 +10,12 @@ export const createFantomChain = ({
|
|
|
10
10
|
explorerApiKey: apiKey,
|
|
11
11
|
explorerProxyUrl: proxyUrl,
|
|
12
12
|
explorerHeaders: headers,
|
|
13
|
+
explorerPageSize: pageSize,
|
|
13
14
|
}: {
|
|
14
15
|
explorerApiKey?: string
|
|
15
16
|
explorerProxyUrl?: string
|
|
16
17
|
explorerHeaders?: Record<string, string>
|
|
18
|
+
explorerPageSize?: number
|
|
17
19
|
}): Chain =>
|
|
18
20
|
createFantomChainCustom({
|
|
19
21
|
client: createClient({
|
|
@@ -27,6 +29,7 @@ export const createFantomChain = ({
|
|
|
27
29
|
apiKey,
|
|
28
30
|
proxyUrl,
|
|
29
31
|
headers,
|
|
32
|
+
pageSize,
|
|
30
33
|
}),
|
|
31
34
|
})
|
|
32
35
|
|
|
@@ -10,10 +10,12 @@ export const createLineaChain = ({
|
|
|
10
10
|
explorerApiKey: apiKey,
|
|
11
11
|
explorerProxyUrl: proxyUrl,
|
|
12
12
|
explorerHeaders: headers,
|
|
13
|
+
explorerPageSize: pageSize,
|
|
13
14
|
}: {
|
|
14
15
|
explorerApiKey?: string
|
|
15
16
|
explorerProxyUrl?: string
|
|
16
17
|
explorerHeaders?: Record<string, string>
|
|
18
|
+
explorerPageSize?: number
|
|
17
19
|
}): Chain =>
|
|
18
20
|
createLineaChainCustom({
|
|
19
21
|
client: createClient({
|
|
@@ -27,6 +29,7 @@ export const createLineaChain = ({
|
|
|
27
29
|
apiKey,
|
|
28
30
|
proxyUrl,
|
|
29
31
|
headers,
|
|
32
|
+
pageSize,
|
|
30
33
|
}),
|
|
31
34
|
})
|
|
32
35
|
|
|
@@ -6,7 +6,13 @@ import { createBlockscout } from '../../explorer'
|
|
|
6
6
|
import type { Chain } from '../types/chain'
|
|
7
7
|
import type { HttpRpc } from '../types/rpc'
|
|
8
8
|
|
|
9
|
-
export const createMantaPacificChain = (
|
|
9
|
+
export const createMantaPacificChain = ({
|
|
10
|
+
explorerProxyUrl: proxyUrl,
|
|
11
|
+
explorerHeaders: headers,
|
|
12
|
+
}: {
|
|
13
|
+
explorerProxyUrl?: string
|
|
14
|
+
explorerHeaders?: Record<string, string>
|
|
15
|
+
}) =>
|
|
10
16
|
createMantaPacificChainCustom({
|
|
11
17
|
client: createClient({
|
|
12
18
|
chain: viemManta,
|
|
@@ -16,6 +22,8 @@ export const createMantaPacificChain = () =>
|
|
|
16
22
|
name: 'Manta Pacific explorer',
|
|
17
23
|
baseUrl: 'https://pacific-explorer.manta.network',
|
|
18
24
|
apiBaseUrl: 'https://pacific-explorer.manta.network/api',
|
|
25
|
+
proxyUrl,
|
|
26
|
+
headers,
|
|
19
27
|
}),
|
|
20
28
|
})
|
|
21
29
|
|
|
@@ -9,10 +9,12 @@ export const createMantleChain = ({
|
|
|
9
9
|
explorerApiKey: apiKey,
|
|
10
10
|
explorerProxyUrl: proxyUrl,
|
|
11
11
|
explorerHeaders: headers,
|
|
12
|
+
explorerPageSize: pageSize,
|
|
12
13
|
}: {
|
|
13
14
|
explorerApiKey?: string
|
|
14
15
|
explorerProxyUrl?: string
|
|
15
16
|
explorerHeaders?: Record<string, string>
|
|
17
|
+
explorerPageSize?: number
|
|
16
18
|
}): Chain =>
|
|
17
19
|
createMantleChainCustom({
|
|
18
20
|
client: createClient({
|
|
@@ -26,6 +28,7 @@ export const createMantleChain = ({
|
|
|
26
28
|
apiKey,
|
|
27
29
|
proxyUrl,
|
|
28
30
|
headers,
|
|
31
|
+
pageSize,
|
|
29
32
|
}),
|
|
30
33
|
})
|
|
31
34
|
|
|
@@ -5,7 +5,13 @@ import { type Explorer, createBlockscout } from '../../explorer'
|
|
|
5
5
|
import type { Chain } from '../types/chain'
|
|
6
6
|
import type { HttpRpc } from '../types/rpc'
|
|
7
7
|
|
|
8
|
-
export const createMetisChain = (
|
|
8
|
+
export const createMetisChain = ({
|
|
9
|
+
explorerProxyUrl: proxyUrl,
|
|
10
|
+
explorerHeaders: headers,
|
|
11
|
+
}: {
|
|
12
|
+
explorerProxyUrl?: string
|
|
13
|
+
explorerHeaders?: Record<string, string>
|
|
14
|
+
}) =>
|
|
9
15
|
createMetisChainCustom({
|
|
10
16
|
client: createClient({
|
|
11
17
|
chain: viemMetis,
|
|
@@ -15,6 +21,8 @@ export const createMetisChain = () =>
|
|
|
15
21
|
name: 'Metis Andromeda explorer',
|
|
16
22
|
baseUrl: 'https://andromeda-explorer.metis.io',
|
|
17
23
|
apiBaseUrl: 'https://andromeda-explorer.metis.io/api',
|
|
24
|
+
proxyUrl,
|
|
25
|
+
headers,
|
|
18
26
|
}),
|
|
19
27
|
})
|
|
20
28
|
|
|
@@ -10,10 +10,12 @@ export const createMoonbeamChain = ({
|
|
|
10
10
|
explorerApiKey: apiKey,
|
|
11
11
|
explorerProxyUrl: proxyUrl,
|
|
12
12
|
explorerHeaders: headers,
|
|
13
|
+
explorerPageSize: pageSize,
|
|
13
14
|
}: {
|
|
14
15
|
explorerApiKey?: string
|
|
15
16
|
explorerProxyUrl?: string
|
|
16
17
|
explorerHeaders?: Record<string, string>
|
|
18
|
+
explorerPageSize?: number
|
|
17
19
|
}) =>
|
|
18
20
|
createMoonbeamChainCustom({
|
|
19
21
|
client: createClient({
|
|
@@ -27,6 +29,7 @@ export const createMoonbeamChain = ({
|
|
|
27
29
|
apiKey,
|
|
28
30
|
proxyUrl,
|
|
29
31
|
headers,
|
|
32
|
+
pageSize,
|
|
30
33
|
}),
|
|
31
34
|
})
|
|
32
35
|
|
|
@@ -10,10 +10,12 @@ export const createMoonriverChain = ({
|
|
|
10
10
|
explorerApiKey: apiKey,
|
|
11
11
|
explorerProxyUrl: proxyUrl,
|
|
12
12
|
explorerHeaders: headers,
|
|
13
|
+
explorerPageSize: pageSize,
|
|
13
14
|
}: {
|
|
14
15
|
explorerApiKey?: string
|
|
15
16
|
explorerProxyUrl?: string
|
|
16
17
|
explorerHeaders?: Record<string, string>
|
|
18
|
+
explorerPageSize?: number
|
|
17
19
|
}) =>
|
|
18
20
|
createMoonriverChainCustom({
|
|
19
21
|
client: createClient({
|
|
@@ -27,6 +29,7 @@ export const createMoonriverChain = ({
|
|
|
27
29
|
apiKey,
|
|
28
30
|
proxyUrl,
|
|
29
31
|
headers,
|
|
32
|
+
pageSize,
|
|
30
33
|
}),
|
|
31
34
|
})
|
|
32
35
|
|
|
@@ -6,7 +6,13 @@ import { createBlockscout } from '../../explorer'
|
|
|
6
6
|
import type { Chain } from '../types/chain'
|
|
7
7
|
import type { HttpRpc } from '../types/rpc'
|
|
8
8
|
|
|
9
|
-
export const createOasysChain = (
|
|
9
|
+
export const createOasysChain = ({
|
|
10
|
+
explorerProxyUrl: proxyUrl,
|
|
11
|
+
explorerHeaders: headers,
|
|
12
|
+
}: {
|
|
13
|
+
explorerProxyUrl?: string
|
|
14
|
+
explorerHeaders?: Record<string, string>
|
|
15
|
+
}) =>
|
|
10
16
|
createOasysChainCustom({
|
|
11
17
|
client: createClient({
|
|
12
18
|
chain: viemOasys,
|
|
@@ -16,6 +22,8 @@ export const createOasysChain = () =>
|
|
|
16
22
|
name: 'Oasys-Hub Mainnet explorer',
|
|
17
23
|
baseUrl: 'https://explorer.oasys.games/',
|
|
18
24
|
apiBaseUrl: 'https://explorer.oasys.games/api',
|
|
25
|
+
proxyUrl,
|
|
26
|
+
headers,
|
|
19
27
|
}),
|
|
20
28
|
})
|
|
21
29
|
|
|
@@ -10,10 +10,12 @@ export const createOptimismChain = ({
|
|
|
10
10
|
explorerApiKey: apiKey,
|
|
11
11
|
explorerProxyUrl: proxyUrl,
|
|
12
12
|
explorerHeaders: headers,
|
|
13
|
+
explorerPageSize: pageSize,
|
|
13
14
|
}: {
|
|
14
15
|
explorerApiKey?: string
|
|
15
16
|
explorerProxyUrl?: string
|
|
16
17
|
explorerHeaders?: Record<string, string>
|
|
18
|
+
explorerPageSize?: number
|
|
17
19
|
}) =>
|
|
18
20
|
createOptimismChainCustom({
|
|
19
21
|
client: createClient({
|
|
@@ -27,6 +29,7 @@ export const createOptimismChain = ({
|
|
|
27
29
|
apiKey,
|
|
28
30
|
proxyUrl,
|
|
29
31
|
headers,
|
|
32
|
+
pageSize,
|
|
30
33
|
}),
|
|
31
34
|
})
|
|
32
35
|
|
|
@@ -10,10 +10,12 @@ export const createPolygonPosChain = ({
|
|
|
10
10
|
explorerApiKey: apiKey,
|
|
11
11
|
explorerProxyUrl: proxyUrl,
|
|
12
12
|
explorerHeaders: headers,
|
|
13
|
+
explorerPageSize: pageSize,
|
|
13
14
|
}: {
|
|
14
15
|
explorerApiKey?: string
|
|
15
16
|
explorerProxyUrl?: string
|
|
16
17
|
explorerHeaders?: Record<string, string>
|
|
18
|
+
explorerPageSize?: number
|
|
17
19
|
}) =>
|
|
18
20
|
createPolygonPosChainCustom({
|
|
19
21
|
client: createClient({
|
|
@@ -27,6 +29,7 @@ export const createPolygonPosChain = ({
|
|
|
27
29
|
apiKey,
|
|
28
30
|
proxyUrl,
|
|
29
31
|
headers,
|
|
32
|
+
pageSize,
|
|
30
33
|
}),
|
|
31
34
|
})
|
|
32
35
|
|
|
@@ -10,10 +10,12 @@ export const createScrollChain = ({
|
|
|
10
10
|
explorerApiKey: apiKey,
|
|
11
11
|
explorerProxyUrl: proxyUrl,
|
|
12
12
|
explorerHeaders: headers,
|
|
13
|
+
explorerPageSize: pageSize,
|
|
13
14
|
}: {
|
|
14
15
|
explorerApiKey?: string
|
|
15
16
|
explorerProxyUrl?: string
|
|
16
17
|
explorerHeaders?: Record<string, string>
|
|
18
|
+
explorerPageSize?: number
|
|
17
19
|
}) =>
|
|
18
20
|
createScrollChainCustom({
|
|
19
21
|
client: createClient({
|
|
@@ -27,6 +29,7 @@ export const createScrollChain = ({
|
|
|
27
29
|
apiKey,
|
|
28
30
|
proxyUrl,
|
|
29
31
|
headers,
|
|
32
|
+
pageSize,
|
|
30
33
|
}),
|
|
31
34
|
})
|
|
32
35
|
|
|
@@ -6,7 +6,13 @@ import { createBlockscout } from '../../explorer'
|
|
|
6
6
|
import type { Chain } from '../types/chain'
|
|
7
7
|
import type { HttpRpc } from '../types/rpc'
|
|
8
8
|
|
|
9
|
-
export const createZkFairChain = (
|
|
9
|
+
export const createZkFairChain = ({
|
|
10
|
+
explorerProxyUrl: proxyUrl,
|
|
11
|
+
explorerHeaders: headers,
|
|
12
|
+
}: {
|
|
13
|
+
explorerProxyUrl?: string
|
|
14
|
+
explorerHeaders?: Record<string, string>
|
|
15
|
+
}) =>
|
|
10
16
|
createZkFairChainCustom({
|
|
11
17
|
client: createClient({
|
|
12
18
|
chain: zkFair,
|
|
@@ -16,6 +22,8 @@ export const createZkFairChain = () =>
|
|
|
16
22
|
name: 'ZKFair-Mainnet explorer',
|
|
17
23
|
baseUrl: 'https://scan.zkfair.io',
|
|
18
24
|
apiBaseUrl: 'https://scan.zkfair.io/api',
|
|
25
|
+
proxyUrl,
|
|
26
|
+
headers,
|
|
19
27
|
}),
|
|
20
28
|
})
|
|
21
29
|
|
|
@@ -10,10 +10,12 @@ export const createZkSyncEraChain = ({
|
|
|
10
10
|
explorerApiKey: apiKey,
|
|
11
11
|
explorerProxyUrl: proxyUrl,
|
|
12
12
|
explorerHeaders: headers,
|
|
13
|
+
explorerPageSize: pageSize,
|
|
13
14
|
}: {
|
|
14
15
|
explorerApiKey?: string
|
|
15
16
|
explorerProxyUrl?: string
|
|
16
17
|
explorerHeaders?: Record<string, string>
|
|
18
|
+
explorerPageSize?: number
|
|
17
19
|
}) =>
|
|
18
20
|
createZkSyncEraChainCustom({
|
|
19
21
|
client: createClient({
|
|
@@ -27,6 +29,7 @@ export const createZkSyncEraChain = ({
|
|
|
27
29
|
apiKey,
|
|
28
30
|
proxyUrl,
|
|
29
31
|
headers,
|
|
32
|
+
pageSize,
|
|
30
33
|
}),
|
|
31
34
|
})
|
|
32
35
|
|
|
@@ -5,7 +5,13 @@ import { type Explorer, createBlockscout } from '../../explorer'
|
|
|
5
5
|
import type { Chain } from '../types/chain'
|
|
6
6
|
import type { HttpRpc } from '../types/rpc'
|
|
7
7
|
|
|
8
|
-
export const createZoraChain = (
|
|
8
|
+
export const createZoraChain = ({
|
|
9
|
+
explorerProxyUrl: proxyUrl,
|
|
10
|
+
explorerHeaders: headers,
|
|
11
|
+
}: {
|
|
12
|
+
explorerProxyUrl?: string
|
|
13
|
+
explorerHeaders?: Record<string, string>
|
|
14
|
+
}) =>
|
|
9
15
|
createZoraChainCustom({
|
|
10
16
|
client: createClient({
|
|
11
17
|
chain: zora,
|
|
@@ -15,6 +21,8 @@ export const createZoraChain = () =>
|
|
|
15
21
|
name: 'Zora Mainnet explorer',
|
|
16
22
|
baseUrl: 'https://explorer.zora.energy/',
|
|
17
23
|
apiBaseUrl: 'https://explorer.zora.energy/api',
|
|
24
|
+
proxyUrl,
|
|
25
|
+
headers,
|
|
18
26
|
}),
|
|
19
27
|
})
|
|
20
28
|
|
|
@@ -13,9 +13,17 @@ export type BlockscoutClient = {
|
|
|
13
13
|
}) => Promise<Output>
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
apiBaseUrl: string
|
|
18
|
-
|
|
16
|
+
type CreateBlockscoutClientParameters = {
|
|
17
|
+
apiBaseUrl: string
|
|
18
|
+
proxyUrl?: string
|
|
19
|
+
headers?: Record<string, string>
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export const createBlockscoutClient = ({
|
|
23
|
+
apiBaseUrl,
|
|
24
|
+
proxyUrl,
|
|
25
|
+
headers,
|
|
26
|
+
}: CreateBlockscoutClientParameters): BlockscoutClient => {
|
|
19
27
|
const rateLimitPerSecond = 5
|
|
20
28
|
const requestTimestamps: number[] = []
|
|
21
29
|
|
|
@@ -73,9 +81,19 @@ export const createBlockscoutClient = (
|
|
|
73
81
|
url.searchParams.append(key, value)
|
|
74
82
|
}
|
|
75
83
|
console.debug(`[GET] ${url.toString()}`)
|
|
76
|
-
const { status, message, result } = await rest(
|
|
77
|
-
|
|
78
|
-
|
|
84
|
+
const { status, message, result } = await rest(
|
|
85
|
+
proxyUrl === undefined
|
|
86
|
+
? url.toString()
|
|
87
|
+
: `${proxyUrl}${encodeURIComponent(url.toString())}`,
|
|
88
|
+
{
|
|
89
|
+
schema: responseSchema,
|
|
90
|
+
fetchOptions: {
|
|
91
|
+
headers: {
|
|
92
|
+
...headers,
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
)
|
|
79
97
|
if (status !== '1') {
|
|
80
98
|
throw typeof result === 'string'
|
|
81
99
|
? new Error(result)
|
|
@@ -98,7 +116,6 @@ export const createBlockscoutClient = (
|
|
|
98
116
|
await new Promise((resolve) => setTimeout(resolve, 5000))
|
|
99
117
|
return await get({ path, query, resultSchema }, repeat + 1)
|
|
100
118
|
}
|
|
101
|
-
|
|
102
119
|
throw error
|
|
103
120
|
}
|
|
104
121
|
}
|
|
@@ -17,14 +17,18 @@ type CreateBlockscoutParameters = {
|
|
|
17
17
|
name: string
|
|
18
18
|
baseUrl: string
|
|
19
19
|
apiBaseUrl: string
|
|
20
|
+
proxyUrl?: string
|
|
21
|
+
headers?: Record<string, string>
|
|
20
22
|
}
|
|
21
23
|
|
|
22
24
|
export const createBlockscout = ({
|
|
23
25
|
name,
|
|
24
26
|
baseUrl,
|
|
25
27
|
apiBaseUrl,
|
|
28
|
+
proxyUrl,
|
|
29
|
+
headers,
|
|
26
30
|
}: CreateBlockscoutParameters): Explorer => {
|
|
27
|
-
const client = createBlockscoutClient(apiBaseUrl)
|
|
31
|
+
const client = createBlockscoutClient({ apiBaseUrl, proxyUrl, headers })
|
|
28
32
|
|
|
29
33
|
return {
|
|
30
34
|
name,
|
|
@@ -22,6 +22,7 @@ type CreateEtherscanParameters = {
|
|
|
22
22
|
apiKey?: string
|
|
23
23
|
proxyUrl?: string
|
|
24
24
|
headers?: Record<string, string>
|
|
25
|
+
pageSize?: number
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
export const createEtherscan = ({
|
|
@@ -31,6 +32,7 @@ export const createEtherscan = ({
|
|
|
31
32
|
apiKey,
|
|
32
33
|
proxyUrl,
|
|
33
34
|
headers,
|
|
35
|
+
pageSize = 10_000,
|
|
34
36
|
}: CreateEtherscanParameters): Explorer => {
|
|
35
37
|
const client = createEtherscanClient({
|
|
36
38
|
apiBaseUrl,
|
|
@@ -49,13 +51,13 @@ export const createEtherscan = ({
|
|
|
49
51
|
>()
|
|
50
52
|
let startblock = fromBlock
|
|
51
53
|
const endblock = toBlock
|
|
52
|
-
const maxPageSize = 10_000
|
|
53
54
|
while (true) {
|
|
54
55
|
const result = await getListOfInternalTransactionsByAddress({
|
|
55
56
|
client,
|
|
56
57
|
address,
|
|
57
58
|
startblock,
|
|
58
59
|
endblock,
|
|
60
|
+
offset: pageSize,
|
|
59
61
|
})
|
|
60
62
|
for (const transaction of result) {
|
|
61
63
|
const id = createInternalTransactionId(transaction)
|
|
@@ -63,7 +65,7 @@ export const createEtherscan = ({
|
|
|
63
65
|
internalTransactions.set(id, transaction)
|
|
64
66
|
}
|
|
65
67
|
}
|
|
66
|
-
if (result.length <
|
|
68
|
+
if (result.length < pageSize) {
|
|
67
69
|
break
|
|
68
70
|
}
|
|
69
71
|
const maxBlockNumber = Math.max(...result.map((x) => x.blockNumber))
|
|
@@ -75,20 +77,20 @@ export const createEtherscan = ({
|
|
|
75
77
|
const indexes = new Map<LowerHex, TransactionIndex>()
|
|
76
78
|
let startblock = fromBlock
|
|
77
79
|
const endblock = toBlock
|
|
78
|
-
const maxPageSize = 10_000
|
|
79
80
|
while (true) {
|
|
80
81
|
const result = await getListOfNormalTransactionsByAddress({
|
|
81
82
|
client,
|
|
82
83
|
address,
|
|
83
84
|
startblock,
|
|
84
85
|
endblock,
|
|
86
|
+
offset: pageSize,
|
|
85
87
|
})
|
|
86
88
|
for (const index of result) {
|
|
87
89
|
if (!indexes.has(index.hash)) {
|
|
88
90
|
indexes.set(index.hash, index)
|
|
89
91
|
}
|
|
90
92
|
}
|
|
91
|
-
if (result.length <
|
|
93
|
+
if (result.length < pageSize) {
|
|
92
94
|
break
|
|
93
95
|
}
|
|
94
96
|
const maxBlockNumber = Math.max(...result.map((x) => x.blockNumber))
|
|
@@ -98,7 +100,6 @@ export const createEtherscan = ({
|
|
|
98
100
|
},
|
|
99
101
|
getAddressTokenTransferIndexes: async ({ address, fromBlock, toBlock }) => {
|
|
100
102
|
const indexes = new Map<LowerHex, TransactionIndex>()
|
|
101
|
-
const maxPageSize = 10_000
|
|
102
103
|
const endblock = toBlock
|
|
103
104
|
|
|
104
105
|
// ERC20
|
|
@@ -109,13 +110,14 @@ export const createEtherscan = ({
|
|
|
109
110
|
address,
|
|
110
111
|
startblock,
|
|
111
112
|
endblock,
|
|
113
|
+
offset: pageSize,
|
|
112
114
|
})
|
|
113
115
|
for (const index of result) {
|
|
114
116
|
if (!indexes.has(index.hash)) {
|
|
115
117
|
indexes.set(index.hash, index)
|
|
116
118
|
}
|
|
117
119
|
}
|
|
118
|
-
if (result.length <
|
|
120
|
+
if (result.length < pageSize) {
|
|
119
121
|
break
|
|
120
122
|
}
|
|
121
123
|
const maxBlockNumber = Math.max(...result.map((x) => x.blockNumber))
|
|
@@ -130,13 +132,14 @@ export const createEtherscan = ({
|
|
|
130
132
|
address,
|
|
131
133
|
startblock,
|
|
132
134
|
endblock,
|
|
135
|
+
offset: pageSize,
|
|
133
136
|
})
|
|
134
137
|
for (const index of result) {
|
|
135
138
|
if (!indexes.has(index.hash)) {
|
|
136
139
|
indexes.set(index.hash, index)
|
|
137
140
|
}
|
|
138
141
|
}
|
|
139
|
-
if (result.length <
|
|
142
|
+
if (result.length < pageSize) {
|
|
140
143
|
break
|
|
141
144
|
}
|
|
142
145
|
const maxBlockNumber = Math.max(...result.map((x) => x.blockNumber))
|
|
@@ -151,13 +154,14 @@ export const createEtherscan = ({
|
|
|
151
154
|
address,
|
|
152
155
|
startblock,
|
|
153
156
|
endblock,
|
|
157
|
+
offset: pageSize,
|
|
154
158
|
})
|
|
155
159
|
for (const index of result) {
|
|
156
160
|
if (!indexes.has(index.hash)) {
|
|
157
161
|
indexes.set(index.hash, index)
|
|
158
162
|
}
|
|
159
163
|
}
|
|
160
|
-
if (result.length <
|
|
164
|
+
if (result.length < pageSize) {
|
|
161
165
|
break
|
|
162
166
|
}
|
|
163
167
|
const maxBlockNumber = Math.max(...result.map((x) => x.blockNumber))
|