viem 2.9.15 → 2.9.17
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/CHANGELOG.md +24 -0
- package/_cjs/chains/definitions/bahamut.js +4 -4
- package/_cjs/chains/definitions/bahamut.js.map +1 -1
- package/_cjs/chains/definitions/bevmMainnet.js +20 -0
- package/_cjs/chains/definitions/bevmMainnet.js.map +1 -0
- package/_cjs/chains/definitions/boba.js +2 -2
- package/_cjs/chains/definitions/boba.js.map +1 -1
- package/_cjs/chains/definitions/chiliz.js +4 -1
- package/_cjs/chains/definitions/chiliz.js.map +1 -1
- package/_cjs/chains/definitions/edgeless.js +26 -0
- package/_cjs/chains/definitions/edgeless.js.map +1 -0
- package/_cjs/chains/definitions/edgelessTestnet.js +26 -0
- package/_cjs/chains/definitions/edgelessTestnet.js.map +1 -0
- package/_cjs/chains/definitions/holesky.js +1 -1
- package/_cjs/chains/definitions/holesky.js.map +1 -1
- package/_cjs/chains/definitions/mantaSepoliaTestnet.js +34 -0
- package/_cjs/chains/definitions/mantaSepoliaTestnet.js.map +1 -0
- package/_cjs/chains/definitions/mode.js +2 -2
- package/_cjs/chains/definitions/mode.js.map +1 -1
- package/_cjs/chains/definitions/spicy.js +2 -2
- package/_cjs/chains/definitions/spicy.js.map +1 -1
- package/_cjs/chains/index.js +15 -5
- package/_cjs/chains/index.js.map +1 -1
- package/_cjs/errors/version.js +1 -1
- package/_cjs/utils/getAction.js +3 -1
- package/_cjs/utils/getAction.js.map +1 -1
- package/_esm/chains/definitions/bahamut.js +4 -4
- package/_esm/chains/definitions/bahamut.js.map +1 -1
- package/_esm/chains/definitions/bevmMainnet.js +17 -0
- package/_esm/chains/definitions/bevmMainnet.js.map +1 -0
- package/_esm/chains/definitions/boba.js +2 -2
- package/_esm/chains/definitions/boba.js.map +1 -1
- package/_esm/chains/definitions/chiliz.js +4 -1
- package/_esm/chains/definitions/chiliz.js.map +1 -1
- package/_esm/chains/definitions/edgeless.js +23 -0
- package/_esm/chains/definitions/edgeless.js.map +1 -0
- package/_esm/chains/definitions/edgelessTestnet.js +23 -0
- package/_esm/chains/definitions/edgelessTestnet.js.map +1 -0
- package/_esm/chains/definitions/holesky.js +1 -1
- package/_esm/chains/definitions/holesky.js.map +1 -1
- package/_esm/chains/definitions/mantaSepoliaTestnet.js +31 -0
- package/_esm/chains/definitions/mantaSepoliaTestnet.js.map +1 -0
- package/_esm/chains/definitions/mode.js +2 -2
- package/_esm/chains/definitions/mode.js.map +1 -1
- package/_esm/chains/definitions/spicy.js +2 -2
- package/_esm/chains/definitions/spicy.js.map +1 -1
- package/_esm/chains/index.js +5 -0
- package/_esm/chains/index.js.map +1 -1
- package/_esm/errors/version.js +1 -1
- package/_esm/utils/getAction.js +6 -3
- package/_esm/utils/getAction.js.map +1 -1
- package/_types/chains/definitions/bahamut.d.ts +4 -4
- package/_types/chains/definitions/bevmMainnet.d.ts +36 -0
- package/_types/chains/definitions/bevmMainnet.d.ts.map +1 -0
- package/_types/chains/definitions/boba.d.ts +2 -2
- package/_types/chains/definitions/chiliz.d.ts +1 -1
- package/_types/chains/definitions/chiliz.d.ts.map +1 -1
- package/_types/chains/definitions/edgeless.d.ts +36 -0
- package/_types/chains/definitions/edgeless.d.ts.map +1 -0
- package/_types/chains/definitions/edgelessTestnet.d.ts +36 -0
- package/_types/chains/definitions/edgelessTestnet.d.ts.map +1 -0
- package/_types/chains/definitions/holesky.d.ts +1 -1
- package/_types/chains/definitions/mantaSepoliaTestnet.d.ts +35 -0
- package/_types/chains/definitions/mantaSepoliaTestnet.d.ts.map +1 -0
- package/_types/chains/definitions/mode.d.ts +2 -2
- package/_types/chains/definitions/spicy.d.ts +2 -2
- package/_types/chains/index.d.ts +5 -0
- package/_types/chains/index.d.ts.map +1 -1
- package/_types/errors/version.d.ts +1 -1
- package/_types/utils/getAction.d.ts.map +1 -1
- package/chains/definitions/bahamut.ts +4 -4
- package/chains/definitions/bevmMainnet.ts +17 -0
- package/chains/definitions/boba.ts +2 -2
- package/chains/definitions/chiliz.ts +4 -1
- package/chains/definitions/edgeless.ts +23 -0
- package/chains/definitions/edgelessTestnet.ts +23 -0
- package/chains/definitions/holesky.ts +1 -1
- package/chains/definitions/mantaSepoliaTestnet.ts +31 -0
- package/chains/definitions/mode.ts +2 -2
- package/chains/definitions/spicy.ts +2 -2
- package/chains/index.ts +5 -0
- package/errors/version.ts +1 -1
- package/package.json +1 -1
- package/utils/getAction.ts +10 -7
@@ -0,0 +1,23 @@
|
|
1
|
+
import { defineChain } from '../../utils/chain/defineChain.js'
|
2
|
+
|
3
|
+
export const edgeless = /*#__PURE__*/ defineChain({
|
4
|
+
id: 2_026,
|
5
|
+
name: 'Edgeless Network',
|
6
|
+
nativeCurrency: {
|
7
|
+
name: 'Edgeless Wrapped ETH',
|
8
|
+
symbol: 'EwETH',
|
9
|
+
decimals: 18,
|
10
|
+
},
|
11
|
+
rpcUrls: {
|
12
|
+
default: {
|
13
|
+
http: ['https://rpc.edgeless.network/http'],
|
14
|
+
webSocket: ['wss://rpc.edgeless.network/ws'],
|
15
|
+
},
|
16
|
+
},
|
17
|
+
blockExplorers: {
|
18
|
+
default: {
|
19
|
+
name: 'Edgeless Explorer',
|
20
|
+
url: 'https://explorer.edgeless.network',
|
21
|
+
},
|
22
|
+
},
|
23
|
+
})
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { defineChain } from '../../utils/chain/defineChain.js'
|
2
|
+
|
3
|
+
export const edgelessTestnet = /*#__PURE__*/ defineChain({
|
4
|
+
id: 202,
|
5
|
+
name: 'Edgeless Testnet',
|
6
|
+
nativeCurrency: {
|
7
|
+
name: 'Edgeless Wrapped ETH',
|
8
|
+
symbol: 'EwETH',
|
9
|
+
decimals: 18,
|
10
|
+
},
|
11
|
+
rpcUrls: {
|
12
|
+
default: {
|
13
|
+
http: ['https://edgeless-testnet.rpc.caldera.xyz/http'],
|
14
|
+
webSocket: ['wss://edgeless-testnet.rpc.caldera.xyz/ws'],
|
15
|
+
},
|
16
|
+
},
|
17
|
+
blockExplorers: {
|
18
|
+
default: {
|
19
|
+
name: 'Edgeless Testnet Explorer',
|
20
|
+
url: 'https://testnet.explorer.edgeless.network',
|
21
|
+
},
|
22
|
+
},
|
23
|
+
})
|
@@ -6,7 +6,7 @@ export const holesky = /*#__PURE__*/ defineChain({
|
|
6
6
|
nativeCurrency: { name: 'Holesky Ether', symbol: 'ETH', decimals: 18 },
|
7
7
|
rpcUrls: {
|
8
8
|
default: {
|
9
|
-
http: ['https://ethereum-holesky.publicnode.com'],
|
9
|
+
http: ['https://ethereum-holesky-rpc.publicnode.com'],
|
10
10
|
},
|
11
11
|
},
|
12
12
|
blockExplorers: {
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { defineChain } from '../../utils/chain/defineChain.js'
|
2
|
+
|
3
|
+
export const mantaSepoliaTestnet = /*#__PURE__*/ defineChain({
|
4
|
+
id: 3_441_006,
|
5
|
+
name: 'Manta Pacific Sepolia Testnet',
|
6
|
+
network: 'manta-sepolia',
|
7
|
+
nativeCurrency: {
|
8
|
+
decimals: 18,
|
9
|
+
name: 'ETH',
|
10
|
+
symbol: 'ETH',
|
11
|
+
},
|
12
|
+
rpcUrls: {
|
13
|
+
default: {
|
14
|
+
http: ['https://pacific-rpc.sepolia-testnet.manta.network/http'],
|
15
|
+
},
|
16
|
+
},
|
17
|
+
blockExplorers: {
|
18
|
+
default: {
|
19
|
+
name: 'Manta Sepolia Testnet Explorer',
|
20
|
+
url: 'https://pacific-explorer.sepolia-testnet.manta.network',
|
21
|
+
apiUrl: 'https://pacific-explorer.sepolia-testnet.manta.network/api',
|
22
|
+
},
|
23
|
+
},
|
24
|
+
contracts: {
|
25
|
+
multicall3: {
|
26
|
+
address: '0xca54918f7B525C8df894668846506767412b53E3',
|
27
|
+
blockCreated: 479584,
|
28
|
+
},
|
29
|
+
},
|
30
|
+
testnet: true,
|
31
|
+
})
|
@@ -13,11 +13,11 @@ export const spicy = /*#__PURE__*/ defineChain({
|
|
13
13
|
default: {
|
14
14
|
http: [
|
15
15
|
'https://spicy-rpc.chiliz.com',
|
16
|
-
'https://chiliz-spicy.publicnode.com',
|
16
|
+
'https://chiliz-spicy-rpc.publicnode.com',
|
17
17
|
],
|
18
18
|
webSocket: [
|
19
19
|
'wss://spicy-rpc-ws.chiliz.com',
|
20
|
-
'wss://chiliz-spicy.publicnode.com',
|
20
|
+
'wss://chiliz-spicy-rpc.publicnode.com',
|
21
21
|
],
|
22
22
|
},
|
23
23
|
},
|
package/chains/index.ts
CHANGED
@@ -28,6 +28,7 @@ export { beamTestnet } from './definitions/beamTestnet.js'
|
|
28
28
|
export { bearNetworkChainMainnet } from './definitions/bearNetworkChainMainnet.js'
|
29
29
|
export { bearNetworkChainTestnet } from './definitions/bearNetworkChainTestnet.js'
|
30
30
|
export { berachainTestnet } from './definitions/berachainTestnet.js'
|
31
|
+
export { bevmMainnet } from './definitions/bevmMainnet.js'
|
31
32
|
export { bitTorrent } from './definitions/bitTorrent.js'
|
32
33
|
export { bitTorrentTestnet } from './definitions/bitTorrentTestnet.js'
|
33
34
|
export { blast } from './definitions/blast.js'
|
@@ -56,8 +57,11 @@ export { defichainEvmTestnet } from './definitions/defichainEvmTestnet.js'
|
|
56
57
|
export { degen } from './definitions/degen.js'
|
57
58
|
export { dfk } from './definitions/dfk.js'
|
58
59
|
export { dogechain } from './definitions/dogechain.js'
|
60
|
+
export { edgeless } from './definitions/edgeless.js'
|
61
|
+
export { edgelessTestnet } from './definitions/edgelessTestnet.js'
|
59
62
|
export { edgeware } from './definitions/edgeware.js'
|
60
63
|
export { edgewareTestnet } from './definitions/edgewareTestnet.js'
|
64
|
+
export { eon } from './definitions/eon.js'
|
61
65
|
export { eos } from './definitions/eos.js'
|
62
66
|
export { eosTestnet } from './definitions/eosTestnet.js'
|
63
67
|
export { etherlinkTestnet } from './definitions/etherlinkTestnet.js'
|
@@ -122,6 +126,7 @@ export { luksoTestnet } from './definitions/luksoTestnet.js'
|
|
122
126
|
export { mainnet } from './definitions/mainnet.js'
|
123
127
|
export { mandala } from './definitions/mandala.js'
|
124
128
|
export { manta } from './definitions/manta.js'
|
129
|
+
export { mantaSepoliaTestnet } from './definitions/mantaSepoliaTestnet.js'
|
125
130
|
export { mantaTestnet } from './definitions/mantaTestnet.js'
|
126
131
|
export { mantle } from './definitions/mantle.js'
|
127
132
|
export { mantleTestnet } from './definitions/mantleTestnet.js'
|
package/errors/version.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export const version = '2.9.
|
1
|
+
export const version = '2.9.17'
|
package/package.json
CHANGED
package/utils/getAction.ts
CHANGED
@@ -10,14 +10,17 @@ import type { Client } from '../clients/createClient.js'
|
|
10
10
|
export function getAction<params extends {}, returnType extends {}>(
|
11
11
|
client: Client,
|
12
12
|
action: (_: any, params: params) => returnType,
|
13
|
-
// Some minifiers drop `Function.prototype.name
|
14
|
-
//
|
13
|
+
// Some minifiers drop `Function.prototype.name` or can change function
|
14
|
+
// names so that getting the name by reflection through `action.name` will
|
15
|
+
// not work.
|
15
16
|
name: string,
|
16
17
|
) {
|
18
|
+
type DecoratedClient = Client & {
|
19
|
+
[key: string]: (params: params) => returnType
|
20
|
+
}
|
21
|
+
|
17
22
|
return (params: params): returnType =>
|
18
|
-
(
|
19
|
-
|
20
|
-
|
21
|
-
}
|
22
|
-
)[action.name || name]?.(params) ?? action(client, params)
|
23
|
+
(client as DecoratedClient)[action.name]?.(params) ??
|
24
|
+
(client as DecoratedClient)[name]?.(params) ??
|
25
|
+
action(client, params)
|
23
26
|
}
|