viem 2.21.53 → 2.21.54

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/_cjs/account-abstraction/accounts/toWebAuthnAccount.js +1 -0
  3. package/_cjs/account-abstraction/accounts/toWebAuthnAccount.js.map +1 -1
  4. package/_cjs/chains/definitions/adf.js +22 -0
  5. package/_cjs/chains/definitions/adf.js.map +1 -0
  6. package/_cjs/chains/definitions/storyOdyssey.js +24 -0
  7. package/_cjs/chains/definitions/storyOdyssey.js.map +1 -0
  8. package/_cjs/chains/definitions/thunderCore.js +7 -1
  9. package/_cjs/chains/definitions/thunderCore.js.map +1 -1
  10. package/_cjs/chains/definitions/zksyncLocalCustomHyperchain.js +26 -0
  11. package/_cjs/chains/definitions/zksyncLocalCustomHyperchain.js.map +1 -0
  12. package/_cjs/chains/definitions/zksyncLocalHyperchain.js +26 -0
  13. package/_cjs/chains/definitions/zksyncLocalHyperchain.js.map +1 -0
  14. package/_cjs/chains/definitions/zksyncLocalHyperchainL1.js +23 -0
  15. package/_cjs/chains/definitions/zksyncLocalHyperchainL1.js.map +1 -0
  16. package/_cjs/chains/index.js +20 -10
  17. package/_cjs/chains/index.js.map +1 -1
  18. package/_cjs/clients/transports/fallback.js +5 -2
  19. package/_cjs/clients/transports/fallback.js.map +1 -1
  20. package/_cjs/errors/version.js +1 -1
  21. package/_cjs/utils/abi/encodeAbiParameters.js +20 -2
  22. package/_cjs/utils/abi/encodeAbiParameters.js.map +1 -1
  23. package/_cjs/zksync/chains.js +7 -1
  24. package/_cjs/zksync/chains.js.map +1 -1
  25. package/_cjs/zksync/index.js +4 -1
  26. package/_cjs/zksync/index.js.map +1 -1
  27. package/_esm/account-abstraction/accounts/toWebAuthnAccount.js +1 -0
  28. package/_esm/account-abstraction/accounts/toWebAuthnAccount.js.map +1 -1
  29. package/_esm/account-abstraction/actions/bundler/getUserOperation.js +1 -1
  30. package/_esm/chains/definitions/adf.js +19 -0
  31. package/_esm/chains/definitions/adf.js.map +1 -0
  32. package/_esm/chains/definitions/storyOdyssey.js +21 -0
  33. package/_esm/chains/definitions/storyOdyssey.js.map +1 -0
  34. package/_esm/chains/definitions/thunderCore.js +7 -1
  35. package/_esm/chains/definitions/thunderCore.js.map +1 -1
  36. package/_esm/chains/definitions/zksyncLocalCustomHyperchain.js +24 -0
  37. package/_esm/chains/definitions/zksyncLocalCustomHyperchain.js.map +1 -0
  38. package/_esm/chains/definitions/zksyncLocalHyperchain.js +24 -0
  39. package/_esm/chains/definitions/zksyncLocalHyperchain.js.map +1 -0
  40. package/_esm/chains/definitions/zksyncLocalHyperchainL1.js +21 -0
  41. package/_esm/chains/definitions/zksyncLocalHyperchainL1.js.map +1 -0
  42. package/_esm/chains/index.js +5 -0
  43. package/_esm/chains/index.js.map +1 -1
  44. package/_esm/clients/transports/fallback.js +5 -2
  45. package/_esm/clients/transports/fallback.js.map +1 -1
  46. package/_esm/errors/version.js +1 -1
  47. package/_esm/utils/abi/encodeAbiParameters.js +20 -2
  48. package/_esm/utils/abi/encodeAbiParameters.js.map +1 -1
  49. package/_esm/zksync/chains.js +3 -0
  50. package/_esm/zksync/chains.js.map +1 -1
  51. package/_esm/zksync/index.js +1 -1
  52. package/_esm/zksync/index.js.map +1 -1
  53. package/_types/account-abstraction/accounts/toWebAuthnAccount.d.ts.map +1 -1
  54. package/_types/account-abstraction/accounts/types.d.ts +1 -0
  55. package/_types/account-abstraction/accounts/types.d.ts.map +1 -1
  56. package/_types/account-abstraction/actions/bundler/getUserOperation.d.ts +1 -1
  57. package/_types/chains/definitions/adf.d.ts +37 -0
  58. package/_types/chains/definitions/adf.d.ts.map +1 -0
  59. package/_types/chains/definitions/storyOdyssey.d.ts +37 -0
  60. package/_types/chains/definitions/storyOdyssey.d.ts.map +1 -0
  61. package/_types/chains/definitions/thunderCore.d.ts +7 -11
  62. package/_types/chains/definitions/thunderCore.d.ts.map +1 -1
  63. package/_types/chains/definitions/zksyncLocalCustomHyperchain.d.ts +410 -0
  64. package/_types/chains/definitions/zksyncLocalCustomHyperchain.d.ts.map +1 -0
  65. package/_types/chains/definitions/zksyncLocalHyperchain.d.ts +410 -0
  66. package/_types/chains/definitions/zksyncLocalHyperchain.d.ts.map +1 -0
  67. package/_types/chains/definitions/zksyncLocalHyperchainL1.d.ts +38 -0
  68. package/_types/chains/definitions/zksyncLocalHyperchainL1.d.ts.map +1 -0
  69. package/_types/chains/index.d.ts +5 -0
  70. package/_types/chains/index.d.ts.map +1 -1
  71. package/_types/clients/transports/fallback.d.ts +8 -1
  72. package/_types/clients/transports/fallback.d.ts.map +1 -1
  73. package/_types/errors/version.d.ts +1 -1
  74. package/_types/utils/abi/encodeAbiParameters.d.ts.map +1 -1
  75. package/_types/zksync/chains.d.ts +3 -0
  76. package/_types/zksync/chains.d.ts.map +1 -1
  77. package/_types/zksync/index.d.ts +1 -1
  78. package/_types/zksync/index.d.ts.map +1 -1
  79. package/account-abstraction/accounts/toWebAuthnAccount.ts +1 -0
  80. package/account-abstraction/accounts/types.ts +1 -0
  81. package/account-abstraction/actions/bundler/getUserOperation.ts +1 -1
  82. package/chains/definitions/adf.ts +19 -0
  83. package/chains/definitions/storyOdyssey.ts +21 -0
  84. package/chains/definitions/thunderCore.ts +7 -1
  85. package/chains/definitions/zksyncLocalCustomHyperchain.ts +25 -0
  86. package/chains/definitions/zksyncLocalHyperchain.ts +25 -0
  87. package/chains/definitions/zksyncLocalHyperchainL1.ts +22 -0
  88. package/chains/index.ts +5 -0
  89. package/clients/transports/fallback.ts +12 -1
  90. package/errors/version.ts +1 -1
  91. package/package.json +6 -6
  92. package/utils/abi/encodeAbiParameters.ts +20 -2
  93. package/zksync/chains.ts +3 -0
  94. package/zksync/index.ts +3 -0
@@ -1 +1 @@
1
- {"version":3,"file":"encodeAbiParameters.d.ts","sourceRoot":"","sources":["../../../utils/abi/encodeAbiParameters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EAEZ,6BAA6B,EAC9B,MAAM,SAAS,CA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GAC/B,SAAS,CAAA;AA8Cb,KAAK,qBAAqB,GAAG,oBAAoB,GAAG,aAAa,GAAG,SAAS,CAAA;AAgC7E,KAAK,sBAAsB,GACvB,uBAAuB,GACvB,kBAAkB,GAClB,SAAS,CAAA;AAOb,KAAK,oBAAoB,GACrB,uCAAuC,GACvC,eAAe,GACf,qBAAqB,GACrB,qBAAqB,GACrB,oBAAoB,GAGpB,SAAS,CAAA;AA+Cb,KAAK,oBAAoB,GACrB,qCAAqC,GACrC,eAAe,GACf,eAAe,GACf,oBAAoB,GACpB,aAAa,GACb,SAAS,CAAA;AA8Bb,KAAK,mBAAmB,GAAG,eAAe,GAAG,kBAAkB,GAAG,SAAS,CAAA;AAU3E,KAAK,qBAAqB,GAAG,oBAAoB,GAAG,SAAS,CAAA;AA2B7D,KAAK,qBAAqB,GACtB,eAAe,GACf,oBAAoB,GACpB,eAAe,GACf,aAAa,GACb,cAAc,GACd,oBAAoB,GACpB,SAAS,CAAA;AAsBb,KAAK,oBAAoB,GACrB,eAAe,GACf,qBAAqB,GAGrB,SAAS,CAAA;AA4Bb,KAAK,2BAA2B,GAAG,SAAS,CAAA;AAE5C,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,MAAM,GACX,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,EAAE,SAAS,EAAE,MAAM,CAAC,GAAG,SAAS,CAMxD"}
@@ -1,5 +1,8 @@
1
1
  export { zksync } from '../chains/definitions/zksync.js';
2
2
  export { zksyncInMemoryNode } from '../chains/definitions/zksyncInMemoryNode.js';
3
+ export { zksyncLocalCustomHyperchain } from '../chains/definitions/zksyncLocalCustomHyperchain.js';
4
+ export { zksyncLocalHyperchain } from '../chains/definitions/zksyncLocalHyperchain.js';
5
+ export { zksyncLocalHyperchainL1 } from '../chains/definitions/zksyncLocalHyperchainL1.js';
3
6
  export { zksyncLocalNode } from '../chains/definitions/zksyncLocalNode.js';
4
7
  export { zksyncSepoliaTestnet } from '../chains/definitions/zksyncSepoliaTestnet.js';
5
8
  //# sourceMappingURL=chains.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chains.d.ts","sourceRoot":"","sources":["../../zksync/chains.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAA;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAA;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAA"}
1
+ {"version":3,"file":"chains.d.ts","sourceRoot":"","sources":["../../zksync/chains.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAA;AAChF,OAAO,EAAE,2BAA2B,EAAE,MAAM,sDAAsD,CAAA;AAClG,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAA;AACtF,OAAO,EAAE,uBAAuB,EAAE,MAAM,kDAAkD,CAAA;AAC1F,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAA;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAA"}
@@ -29,7 +29,7 @@ export {
29
29
  /** @deprecated Use `zksync` instead */
30
30
  zksync as zkSync, zksync,
31
31
  /** @deprecated Use `zksync` instead */
32
- zksyncInMemoryNode as zkSyncInMemoryNode, zksyncInMemoryNode,
32
+ zksyncInMemoryNode as zkSyncInMemoryNode, zksyncLocalCustomHyperchain, zksyncLocalHyperchain, zksyncLocalHyperchainL1, zksyncInMemoryNode,
33
33
  /** @deprecated Use `zksync` instead */
34
34
  zksyncLocalNode as zkSyncLocalNode, zksyncLocalNode,
35
35
  /** @deprecated Use `zksync` instead */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../zksync/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,uBAA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AiC,EACtE,iCAAiC;AACjC,kDAAkD;AAClD,iBAAiB,IAAI,iBAAiB,EACtC,iBAAiB;AACjB,wDAAwD;AACxD,uBAAuB,IAAI,uBAAuB,EAClD,uBAAuB;AACvB,yDAAyD;AACzD,wBAAwB,IAAI,wBAAwB,EACpD,wBAAwB;AACxB,kEAAkE;AAClE,iCAAiC,IAAI,iCAAiC,EACtE,iCAAiC;AACjC,yDAAyD;AACzD,wBAAwB,IAAI,wBAAwB,EACpD,wBAAwB;AACxB,+DAA+D;AAC/D,8BAA8B,IAAI,8BAA8B,EAChE,8BAA8B;AAC9B,8DAA8D;AAC9D,6BAA6B,IAAI,6BAA6B,EAC9D,6BAA6B;AAC7B,oEAAoE;AACpE,mCAAmC,IAAI,mCAAmC,EAC1E,mCAAmC;AACnC,4DAA4D;AAC5D,2BAA2B,IAAI,2BAA2B,EAC1D,2BAA2B;AAC3B,kEAAkE;AAClE,iCAAiC,IAAI,iCAAiC,EACtE,iCAAiC;AACjC,sDAAsD;AACtD,qBAAqB,IAAI,qBAAqB,EAC9C,qBAAqB;AACrB,2DAA2D;AAC3D,0BAA0B,IAAI,0BAA0B,EACxD,0BAA0B;AAC1B,4DAA4D;AAC5D,2BAA2B,IAAI,2BAA2B,EAC1D,2BAA2B;AAC3B,yDAAyD;AACzD,wBAAwB,IAAI,wBAAwB,EACpD,wBAAwB,GACzB,MAAM,wBAAwB,CAAA;AAE/B,OAAO,EACL,KAAK,wCAAwC,EAC7C,KAAK,wCAAwC,EAC7C,8BAA8B,GAC/B,MAAM,qDAAqD,CAAA;AAC5D,OAAO,EACL,KAAK,kCAAkC,EACvC,KAAK,kCAAkC,EACvC,wBAAwB,GACzB,MAAM,+CAA+C,CAAA;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAA"}
@@ -41,6 +41,7 @@ export function toWebAuthnAccount(
41
41
  const { getFn, rpId } = parameters
42
42
  const { id, publicKey } = parameters.credential
43
43
  return {
44
+ id,
44
45
  publicKey,
45
46
  async sign({ hash }) {
46
47
  return sign({ credentialId: id, getFn, hash, rpId })
@@ -220,6 +220,7 @@ export type SmartAccount<
220
220
  >
221
221
 
222
222
  export type WebAuthnAccount = {
223
+ id: string
223
224
  publicKey: Hex
224
225
  sign: ({ hash }: { hash: Hash }) => Promise<WebAuthnSignReturnType>
225
226
  signMessage: ({
@@ -38,7 +38,7 @@ export type GetUserOperationErrorType =
38
38
  /**
39
39
  * Retrieves information about a User Operation given a hash.
40
40
  *
41
- * - Docs: https://viem.sh/docs/actions/bundler/getUserOperation
41
+ * - Docs: https://viem.sh/account-abstraction/actions/bundler/getUserOperation
42
42
  *
43
43
  * @param client - Client to use
44
44
  * @param parameters - {@link GetUserOperationParameters}
@@ -0,0 +1,19 @@
1
+ import { defineChain } from '../../utils/chain/defineChain.js'
2
+
3
+ export const adf = /*#__PURE__*/ defineChain({
4
+ id: 1215,
5
+ name: 'ADF Chain',
6
+ nativeCurrency: { name: 'ADDFILL', symbol: 'ADF', decimals: 18 },
7
+ rpcUrls: {
8
+ default: {
9
+ http: ['https://mainnet.adftechnology.com'],
10
+ },
11
+ },
12
+ blockExplorers: {
13
+ default: {
14
+ name: 'ADF Mainnet Explorer',
15
+ url: 'https://explorer.adftechnology.com',
16
+ },
17
+ },
18
+ testnet: false,
19
+ })
@@ -0,0 +1,21 @@
1
+ import { defineChain } from '../../utils/chain/defineChain.js'
2
+
3
+ export const storyOdyssey = /*#__PURE__*/ defineChain({
4
+ id: 1516,
5
+ name: 'Story Odyssey',
6
+ nativeCurrency: {
7
+ decimals: 18,
8
+ name: 'IP',
9
+ symbol: 'IP',
10
+ },
11
+ rpcUrls: {
12
+ default: { http: ['https://rpc.odyssey.storyrpc.io'] },
13
+ },
14
+ blockExplorers: {
15
+ default: {
16
+ name: 'Story Odyssey Explorer',
17
+ url: 'https://odyssey.storyscan.xyz',
18
+ },
19
+ },
20
+ testnet: true,
21
+ })
@@ -12,7 +12,13 @@ export const thunderCore = /*#__PURE__*/ defineChain({
12
12
  blockExplorers: {
13
13
  default: {
14
14
  name: 'ThunderCore Explorer',
15
- url: 'https://viewblock.io/thundercore',
15
+ url: 'https://explorer-mainnet.thundercore.com',
16
+ },
17
+ },
18
+ contracts: {
19
+ multicall3: {
20
+ address: '0xcA11bde05977b3631167028862bE2a173976CA11',
21
+ blockCreated: 0,
16
22
  },
17
23
  },
18
24
  testnet: false,
@@ -0,0 +1,25 @@
1
+ import { defineChain } from '../../utils/chain/defineChain.js'
2
+ import { chainConfig } from '../../zksync/chainConfig.js'
3
+
4
+ // The local hyperchain setup: https://github.com/matter-labs/local-setup/blob/main/zk-chains-docker-compose.yml
5
+
6
+ export const zksyncLocalCustomHyperchain = /*#__PURE__*/ defineChain({
7
+ ...chainConfig,
8
+ id: 272,
9
+ name: 'ZKsync CLI Local Custom Hyperchain',
10
+ nativeCurrency: { name: 'BAT', symbol: 'BAT', decimals: 18 },
11
+ rpcUrls: {
12
+ default: {
13
+ http: ['http://localhost:15200'],
14
+ webSocket: ['ws://localhost:15201'],
15
+ },
16
+ },
17
+ blockExplorers: {
18
+ default: {
19
+ name: 'ZKsync explorer',
20
+ url: 'http://localhost:15005/',
21
+ apiUrl: 'http://localhost:15005/api',
22
+ },
23
+ },
24
+ testnet: true,
25
+ })
@@ -0,0 +1,25 @@
1
+ import { defineChain } from '../../utils/chain/defineChain.js'
2
+ import { chainConfig } from '../../zksync/chainConfig.js'
3
+
4
+ // The local hyperchain setup: https://github.com/matter-labs/local-setup/blob/main/zk-chains-docker-compose.yml
5
+
6
+ export const zksyncLocalHyperchain = /*#__PURE__*/ defineChain({
7
+ ...chainConfig,
8
+ id: 270,
9
+ name: 'ZKsync CLI Local Hyperchain',
10
+ nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },
11
+ rpcUrls: {
12
+ default: {
13
+ http: ['http://localhost:15100'],
14
+ webSocket: ['ws://localhost:15101'],
15
+ },
16
+ },
17
+ blockExplorers: {
18
+ default: {
19
+ name: 'ZKsync explorer',
20
+ url: 'http://localhost:15005/',
21
+ apiUrl: 'http://localhost:15005/api',
22
+ },
23
+ },
24
+ testnet: true,
25
+ })
@@ -0,0 +1,22 @@
1
+ import { defineChain } from '../../utils/chain/defineChain.js'
2
+
3
+ // The local hyperchain setup: https://github.com/matter-labs/local-setup/blob/main/zk-chains-docker-compose.yml
4
+
5
+ export const zksyncLocalHyperchainL1 = /*#__PURE__*/ defineChain({
6
+ id: 9,
7
+ name: 'ZKsync CLI Local Hyperchain L1',
8
+ nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },
9
+ rpcUrls: {
10
+ default: {
11
+ http: ['http://localhost:15045'],
12
+ },
13
+ },
14
+ blockExplorers: {
15
+ default: {
16
+ name: 'Blockscout',
17
+ url: 'http://localhost:15001/',
18
+ apiUrl: 'http://localhost:15001/api/v2',
19
+ },
20
+ },
21
+ testnet: true,
22
+ })
package/chains/index.ts CHANGED
@@ -5,6 +5,7 @@ export { abey } from './definitions/abey.js'
5
5
  export { abstractTestnet } from './definitions/abstractTestnet.js'
6
6
  export { acala } from './definitions/acala.js'
7
7
  export { acria } from './definitions/acria.js'
8
+ export { adf } from './definitions/adf.js'
8
9
  export { aioz } from './definitions/aioz.js'
9
10
  export { alienx } from './definitions/alienX.js'
10
11
  export { alienxHalTestnet } from './definitions/alienXHalTestnet.js'
@@ -388,6 +389,7 @@ export { sophon } from './definitions/sophon.js'
388
389
  export { sophonTestnet } from './definitions/sophonTestnet.js'
389
390
  export { spicy } from './definitions/spicy.js'
390
391
  export { step } from './definitions/step.js'
392
+ export { storyOdyssey } from './definitions/storyOdyssey.js'
391
393
  export { storyTestnet } from './definitions/storyTestnet.js'
392
394
  export { stratis } from './definitions/stratis.js'
393
395
  export { superlumio } from './definitions/superlumio.js'
@@ -477,6 +479,9 @@ export {
477
479
  zksyncInMemoryNode as zkSyncInMemoryNode,
478
480
  zksyncInMemoryNode,
479
481
  } from './definitions/zksyncInMemoryNode.js'
482
+ export { zksyncLocalCustomHyperchain } from './definitions/zksyncLocalCustomHyperchain.js'
483
+ export { zksyncLocalHyperchain } from './definitions/zksyncLocalHyperchain.js'
484
+ export { zksyncLocalHyperchainL1 } from './definitions/zksyncLocalHyperchainL1.js'
480
485
  export {
481
486
  /** @deprecated Use `zksync` instead */
482
487
  zksyncLocalNode as zkSyncLocalNode,
@@ -38,6 +38,12 @@ type RankOptions = {
38
38
  * @default client.pollingInterval
39
39
  */
40
40
  interval?: number | undefined
41
+ /**
42
+ * Ping method to determine latency.
43
+ */
44
+ ping?: (parameters: { transport: ReturnType<Transport> }) =>
45
+ | Promise<unknown>
46
+ | undefined
41
47
  /**
42
48
  * The number of previous samples to perform ranking on.
43
49
  * @default 10
@@ -173,6 +179,7 @@ export function fallback<const transports extends readonly Transport[]>(
173
179
  chain,
174
180
  interval: rankOptions.interval ?? pollingInterval,
175
181
  onTransports: (transports_) => (transports = transports_ as transports),
182
+ ping: rankOptions.ping,
176
183
  sampleCount: rankOptions.sampleCount,
177
184
  timeout: rankOptions.timeout,
178
185
  transports,
@@ -200,6 +207,7 @@ export function rankTransports({
200
207
  chain,
201
208
  interval = 4_000,
202
209
  onTransports,
210
+ ping,
203
211
  sampleCount = 10,
204
212
  timeout = 1_000,
205
213
  transports,
@@ -208,6 +216,7 @@ export function rankTransports({
208
216
  chain?: Chain | undefined
209
217
  interval: RankOptions['interval']
210
218
  onTransports: (transports: readonly Transport[]) => void
219
+ ping?: RankOptions['ping'] | undefined
211
220
  sampleCount?: RankOptions['sampleCount'] | undefined
212
221
  timeout?: RankOptions['timeout'] | undefined
213
222
  transports: readonly Transport[]
@@ -230,7 +239,9 @@ export function rankTransports({
230
239
  let end: number
231
240
  let success: number
232
241
  try {
233
- await transport_.request({ method: 'net_listening' })
242
+ await (ping
243
+ ? ping({ transport: transport_ })
244
+ : transport_.request({ method: 'net_listening' }))
234
245
  success = 1
235
246
  } catch {
236
247
  success = 0
package/errors/version.ts CHANGED
@@ -1 +1 @@
1
- export const version = '2.21.53'
1
+ export const version = '2.21.54'
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "viem",
3
3
  "description": "TypeScript Interface for Ethereum",
4
- "version": "2.21.53",
4
+ "version": "2.21.54",
5
5
  "main": "./_cjs/index.js",
6
6
  "module": "./_esm/index.js",
7
7
  "types": "./_types/index.d.ts",
@@ -166,11 +166,11 @@
166
166
  }
167
167
  },
168
168
  "dependencies": {
169
- "@noble/curves": "1.6.0",
170
- "@noble/hashes": "1.5.0",
171
- "@scure/bip32": "1.5.0",
172
- "@scure/bip39": "1.4.0",
173
- "abitype": "1.0.6",
169
+ "@noble/curves": "1.7.0",
170
+ "@noble/hashes": "1.6.1",
171
+ "@scure/bip32": "1.6.0",
172
+ "@scure/bip39": "1.5.0",
173
+ "abitype": "1.0.7",
174
174
  "isows": "1.0.6",
175
175
  "ox": "0.1.2",
176
176
  "webauthn-p256": "0.0.10",
@@ -21,6 +21,7 @@ import {
21
21
  type InvalidAddressErrorType,
22
22
  } from '../../errors/address.js'
23
23
  import { BaseError } from '../../errors/base.js'
24
+ import { IntegerOutOfRangeError } from '../../errors/encoding.js'
24
25
  import type { ErrorType } from '../../errors/utils.js'
25
26
  import type { Hex } from '../../types/misc.js'
26
27
  import { type IsAddressErrorType, isAddress } from '../address/isAddress.js'
@@ -36,6 +37,7 @@ import {
36
37
  numberToHex,
37
38
  stringToHex,
38
39
  } from '../encoding/toHex.js'
40
+ import { integerRegex } from '../regex.js'
39
41
 
40
42
  export type EncodeAbiParametersReturnType = Hex
41
43
 
@@ -163,7 +165,11 @@ function prepareParam<const param extends AbiParameter>({
163
165
  }
164
166
  if (param.type.startsWith('uint') || param.type.startsWith('int')) {
165
167
  const signed = param.type.startsWith('int')
166
- return encodeNumber(value as unknown as number, { signed })
168
+ const [, , size = '256'] = integerRegex.exec(param.type) ?? []
169
+ return encodeNumber(value as unknown as number, {
170
+ signed,
171
+ size: Number(size),
172
+ })
167
173
  }
168
174
  if (param.type.startsWith('bytes')) {
169
175
  return encodeBytes(value as unknown as Hex, { param })
@@ -325,8 +331,20 @@ type EncodeNumberErrorType = NumberToHexErrorType | ErrorType
325
331
 
326
332
  function encodeNumber(
327
333
  value: number,
328
- { signed }: { signed: boolean },
334
+ { signed, size = 256 }: { signed: boolean; size?: number | undefined },
329
335
  ): PreparedParam {
336
+ if (typeof size === 'number') {
337
+ const max = 2n ** (BigInt(size) - (signed ? 1n : 0n)) - 1n
338
+ const min = signed ? -max - 1n : 0n
339
+ if (value > max || value < min)
340
+ throw new IntegerOutOfRangeError({
341
+ max: max.toString(),
342
+ min: min.toString(),
343
+ signed,
344
+ size: size / 8,
345
+ value: value.toString(),
346
+ })
347
+ }
330
348
  return {
331
349
  dynamic: false,
332
350
  encoded: numberToHex(value, {
package/zksync/chains.ts CHANGED
@@ -1,5 +1,8 @@
1
1
  // biome-ignore lint/performance/noBarrelFile: entrypoint module
2
2
  export { zksync } from '../chains/definitions/zksync.js'
3
3
  export { zksyncInMemoryNode } from '../chains/definitions/zksyncInMemoryNode.js'
4
+ export { zksyncLocalCustomHyperchain } from '../chains/definitions/zksyncLocalCustomHyperchain.js'
5
+ export { zksyncLocalHyperchain } from '../chains/definitions/zksyncLocalHyperchain.js'
6
+ export { zksyncLocalHyperchainL1 } from '../chains/definitions/zksyncLocalHyperchainL1.js'
4
7
  export { zksyncLocalNode } from '../chains/definitions/zksyncLocalNode.js'
5
8
  export { zksyncSepoliaTestnet } from '../chains/definitions/zksyncSepoliaTestnet.js'
package/zksync/index.ts CHANGED
@@ -126,6 +126,9 @@ export {
126
126
  zksync,
127
127
  /** @deprecated Use `zksync` instead */
128
128
  zksyncInMemoryNode as zkSyncInMemoryNode,
129
+ zksyncLocalCustomHyperchain,
130
+ zksyncLocalHyperchain,
131
+ zksyncLocalHyperchainL1,
129
132
  zksyncInMemoryNode,
130
133
  /** @deprecated Use `zksync` instead */
131
134
  zksyncLocalNode as zkSyncLocalNode,