viem 2.55.10 → 2.55.13

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 (138) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/_cjs/actions/wallet/prepareTransactionRequest.js +12 -12
  3. package/_cjs/actions/wallet/prepareTransactionRequest.js.map +1 -1
  4. package/_cjs/actions/wallet/sendTransaction.js +24 -12
  5. package/_cjs/actions/wallet/sendTransaction.js.map +1 -1
  6. package/_cjs/actions/wallet/sendTransactionSync.js +24 -12
  7. package/_cjs/actions/wallet/sendTransactionSync.js.map +1 -1
  8. package/_cjs/chains/definitions/story.js +7 -7
  9. package/_cjs/chains/definitions/story.js.map +1 -1
  10. package/_cjs/chains/definitions/storyAeneid.js +8 -8
  11. package/_cjs/chains/definitions/storyAeneid.js.map +1 -1
  12. package/_cjs/clients/createClient.js +1 -0
  13. package/_cjs/clients/createClient.js.map +1 -1
  14. package/_cjs/errors/typedData.js +11 -1
  15. package/_cjs/errors/typedData.js.map +1 -1
  16. package/_cjs/errors/version.js +1 -1
  17. package/_cjs/index.js +5 -4
  18. package/_cjs/index.js.map +1 -1
  19. package/_cjs/tempo/Abis.js +642 -253
  20. package/_cjs/tempo/Abis.js.map +1 -1
  21. package/_cjs/tempo/Decorator.js +7 -0
  22. package/_cjs/tempo/Decorator.js.map +1 -1
  23. package/_cjs/tempo/actions/earn/deployment.js +654 -0
  24. package/_cjs/tempo/actions/earn/deployment.js.map +1 -0
  25. package/_cjs/tempo/actions/earn.js +60 -17
  26. package/_cjs/tempo/actions/earn.js.map +1 -1
  27. package/_cjs/tempo/actions/token.js +18 -6
  28. package/_cjs/tempo/actions/token.js.map +1 -1
  29. package/_cjs/tempo/actions/zone.js +11 -1
  30. package/_cjs/tempo/actions/zone.js.map +1 -1
  31. package/_cjs/tempo/chainConfig.js +24 -23
  32. package/_cjs/tempo/chainConfig.js.map +1 -1
  33. package/_cjs/tempo/internal/WithdrawalSenderTag.js +2 -2
  34. package/_cjs/tempo/internal/WithdrawalSenderTag.js.map +1 -1
  35. package/_cjs/tempo/zones/Abis.js +17 -0
  36. package/_cjs/tempo/zones/Abis.js.map +1 -1
  37. package/_cjs/tokens/definitions/usdc.js +7 -0
  38. package/_cjs/tokens/definitions/usdc.js.map +1 -1
  39. package/_cjs/utils/promise/withRetry.js +2 -2
  40. package/_cjs/utils/promise/withRetry.js.map +1 -1
  41. package/_cjs/utils/typedData.js +3 -0
  42. package/_cjs/utils/typedData.js.map +1 -1
  43. package/_esm/actions/wallet/prepareTransactionRequest.js +14 -13
  44. package/_esm/actions/wallet/prepareTransactionRequest.js.map +1 -1
  45. package/_esm/actions/wallet/sendTransaction.js +24 -12
  46. package/_esm/actions/wallet/sendTransaction.js.map +1 -1
  47. package/_esm/actions/wallet/sendTransactionSync.js +24 -12
  48. package/_esm/actions/wallet/sendTransactionSync.js.map +1 -1
  49. package/_esm/chains/definitions/story.js +7 -7
  50. package/_esm/chains/definitions/story.js.map +1 -1
  51. package/_esm/chains/definitions/storyAeneid.js +8 -8
  52. package/_esm/chains/definitions/storyAeneid.js.map +1 -1
  53. package/_esm/clients/createClient.js +4 -3
  54. package/_esm/clients/createClient.js.map +1 -1
  55. package/_esm/errors/typedData.js +9 -0
  56. package/_esm/errors/typedData.js.map +1 -1
  57. package/_esm/errors/version.js +1 -1
  58. package/_esm/index.js +1 -1
  59. package/_esm/index.js.map +1 -1
  60. package/_esm/tempo/Abis.js +643 -254
  61. package/_esm/tempo/Abis.js.map +1 -1
  62. package/_esm/tempo/Decorator.js +7 -0
  63. package/_esm/tempo/Decorator.js.map +1 -1
  64. package/_esm/tempo/actions/earn/deployment.js +967 -0
  65. package/_esm/tempo/actions/earn/deployment.js.map +1 -0
  66. package/_esm/tempo/actions/earn.js +47 -17
  67. package/_esm/tempo/actions/earn.js.map +1 -1
  68. package/_esm/tempo/actions/token.js +21 -8
  69. package/_esm/tempo/actions/token.js.map +1 -1
  70. package/_esm/tempo/actions/zone.js +11 -1
  71. package/_esm/tempo/actions/zone.js.map +1 -1
  72. package/_esm/tempo/chainConfig.js +26 -28
  73. package/_esm/tempo/chainConfig.js.map +1 -1
  74. package/_esm/tempo/internal/WithdrawalSenderTag.js +3 -3
  75. package/_esm/tempo/internal/WithdrawalSenderTag.js.map +1 -1
  76. package/_esm/tempo/zones/Abis.js +17 -0
  77. package/_esm/tempo/zones/Abis.js.map +1 -1
  78. package/_esm/tokens/definitions/usdc.js +7 -0
  79. package/_esm/tokens/definitions/usdc.js.map +1 -1
  80. package/_esm/utils/promise/withRetry.js +2 -2
  81. package/_esm/utils/promise/withRetry.js.map +1 -1
  82. package/_esm/utils/typedData.js +4 -1
  83. package/_esm/utils/typedData.js.map +1 -1
  84. package/_types/actions/wallet/prepareTransactionRequest.d.ts.map +1 -1
  85. package/_types/actions/wallet/sendTransaction.d.ts.map +1 -1
  86. package/_types/actions/wallet/sendTransactionSync.d.ts.map +1 -1
  87. package/_types/chains/definitions/story.d.ts +7 -7
  88. package/_types/chains/definitions/storyAeneid.d.ts +8 -8
  89. package/_types/clients/createClient.d.ts +3 -3
  90. package/_types/clients/createClient.d.ts.map +1 -1
  91. package/_types/errors/typedData.d.ts +8 -0
  92. package/_types/errors/typedData.d.ts.map +1 -1
  93. package/_types/errors/version.d.ts +1 -1
  94. package/_types/index.d.ts +1 -1
  95. package/_types/index.d.ts.map +1 -1
  96. package/_types/tempo/Abis.d.ts +945 -388
  97. package/_types/tempo/Abis.d.ts.map +1 -1
  98. package/_types/tempo/Decorator.d.ts +18 -0
  99. package/_types/tempo/Decorator.d.ts.map +1 -1
  100. package/_types/tempo/actions/earn/deployment.d.ts +1710 -0
  101. package/_types/tempo/actions/earn/deployment.d.ts.map +1 -0
  102. package/_types/tempo/actions/earn.d.ts +1142 -535
  103. package/_types/tempo/actions/earn.d.ts.map +1 -1
  104. package/_types/tempo/actions/token.d.ts +1 -1
  105. package/_types/tempo/actions/token.d.ts.map +1 -1
  106. package/_types/tempo/actions/zone.d.ts.map +1 -1
  107. package/_types/tempo/chainConfig.d.ts.map +1 -1
  108. package/_types/tempo/internal/WithdrawalSenderTag.d.ts +2 -1
  109. package/_types/tempo/internal/WithdrawalSenderTag.d.ts.map +1 -1
  110. package/_types/tempo/zones/Abis.d.ts +48 -0
  111. package/_types/tempo/zones/Abis.d.ts.map +1 -1
  112. package/_types/tokens/definitions/usdc.d.ts +7 -0
  113. package/_types/tokens/definitions/usdc.d.ts.map +1 -1
  114. package/_types/tokens/sets.d.ts +14 -0
  115. package/_types/tokens/sets.d.ts.map +1 -1
  116. package/_types/utils/typedData.d.ts.map +1 -1
  117. package/actions/wallet/prepareTransactionRequest.ts +18 -17
  118. package/actions/wallet/sendTransaction.ts +25 -10
  119. package/actions/wallet/sendTransactionSync.ts +25 -10
  120. package/chains/definitions/story.ts +7 -7
  121. package/chains/definitions/storyAeneid.ts +8 -8
  122. package/clients/createClient.ts +4 -3
  123. package/errors/typedData.ts +13 -0
  124. package/errors/version.ts +1 -1
  125. package/index.ts +2 -0
  126. package/package.json +1 -1
  127. package/tempo/Abis.ts +644 -254
  128. package/tempo/Decorator.ts +41 -0
  129. package/tempo/actions/earn/deployment.ts +1427 -0
  130. package/tempo/actions/earn.ts +83 -63
  131. package/tempo/actions/token.ts +60 -9
  132. package/tempo/actions/zone.ts +10 -1
  133. package/tempo/chainConfig.ts +30 -27
  134. package/tempo/internal/WithdrawalSenderTag.ts +5 -4
  135. package/tempo/zones/Abis.ts +17 -0
  136. package/tokens/definitions/usdc.ts +7 -0
  137. package/utils/promise/withRetry.ts +4 -4
  138. package/utils/typedData.ts +5 -0
@@ -290,6 +290,54 @@ export declare const zonePortal: readonly [{
290
290
  }];
291
291
  }];
292
292
  export declare const zoneOutbox: readonly [{
293
+ readonly name: "WithdrawalRequested";
294
+ readonly type: "event";
295
+ readonly inputs: readonly [{
296
+ readonly name: "withdrawalIndex";
297
+ readonly type: "uint64";
298
+ readonly indexed: true;
299
+ }, {
300
+ readonly name: "sender";
301
+ readonly type: "address";
302
+ readonly indexed: true;
303
+ }, {
304
+ readonly name: "token";
305
+ readonly type: "address";
306
+ readonly indexed: false;
307
+ }, {
308
+ readonly name: "to";
309
+ readonly type: "address";
310
+ readonly indexed: false;
311
+ }, {
312
+ readonly name: "amount";
313
+ readonly type: "uint128";
314
+ readonly indexed: false;
315
+ }, {
316
+ readonly name: "fee";
317
+ readonly type: "uint128";
318
+ readonly indexed: false;
319
+ }, {
320
+ readonly name: "memo";
321
+ readonly type: "bytes32";
322
+ readonly indexed: false;
323
+ }, {
324
+ readonly name: "gasLimit";
325
+ readonly type: "uint64";
326
+ readonly indexed: false;
327
+ }, {
328
+ readonly name: "fallbackNonce";
329
+ readonly type: "uint64";
330
+ readonly indexed: false;
331
+ }, {
332
+ readonly name: "data";
333
+ readonly type: "bytes";
334
+ readonly indexed: false;
335
+ }, {
336
+ readonly name: "revealTo";
337
+ readonly type: "bytes";
338
+ readonly indexed: false;
339
+ }];
340
+ }, {
293
341
  readonly name: "requestWithdrawal";
294
342
  readonly type: "function";
295
343
  readonly stateMutability: "nonpayable";
@@ -1 +1 @@
1
- {"version":3,"file":"Abis.d.ts","sourceRoot":"","sources":["../../../tempo/zones/Abis.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoGd,CAAA;AAEV,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiEb,CAAA;AAEV,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwBb,CAAA"}
1
+ {"version":3,"file":"Abis.d.ts","sourceRoot":"","sources":["../../../tempo/zones/Abis.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoGd,CAAA;AAEV,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiEb,CAAA;AAEV,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyCb,CAAA"}
@@ -39,6 +39,7 @@ export declare const usdc: defineToken.ReturnType<{
39
39
  readonly 137: "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359";
40
40
  readonly 143: "0x754704Bc059F8C67012fEd69BC8A327a5aafb603";
41
41
  readonly 146: "0x29219dd400f2Bf60E5a23d13Be72B486D4038894";
42
+ readonly 196: "0xB6CEceAB302E2E4948951eE7843FC24E92933061";
42
43
  readonly 300: "0xAe045DE5638162fa134807Cb558E15A3F5A7F853";
43
44
  readonly 324: "0x1d17CBcF0D6D143135aE902365D2E5e2A16538D4";
44
45
  readonly 338: "0xEb33dc5fac03833e132593659e1dE7256aB59794";
@@ -49,11 +50,16 @@ export declare const usdc: defineToken.ReturnType<{
49
50
  readonly 1328: "0x4fCF1784B31630811181f670Aea7A7bEF803eaED";
50
51
  readonly 1329: "0xe15fC38F6D8c56aF07bbCBe3BAf5708A2Bf42392";
51
52
  readonly 1439: "0x0C382e685bbeeFE5d3d9C29e29E341fEE8E84C5d";
53
+ readonly 1672: "0xC879C018dB60520F4355C26eD1a6D572cdAC1815";
52
54
  readonly 1776: "0xa00C59fF5a080D2b954d0c75e46E22a0c371235a";
55
+ readonly 1952: "0xDec90b78111Ba2fc6FC6d84d8B9ec159A2d4b9B3";
53
56
  readonly 2818: "0xCfb1186F4e93D60E60a8bDd997427D1F33bc372B";
57
+ readonly 2910: "0x7433b41C6c5e1d58D4Da99483609520255ab661B";
58
+ readonly 3343: "0x98d2919b9A214E6Fa5384AC81E6864bA686Ad74c";
54
59
  readonly 4801: "0x66145f38cBAC35Ca6F1Dfb4914dF98F1614aeA88";
55
60
  readonly 8453: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913";
56
61
  readonly 10143: "0x534b2f3A21130d7a60830c2Df862319e593943A3";
62
+ readonly 33431: "0x2d9F7CAD728051AA35Ecdc472a14cf8cDF5CFD6B";
57
63
  readonly 42161: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831";
58
64
  readonly 42220: "0xcebA9300f2b948710d2653dD7B07f33A8B32118C";
59
65
  readonly 43113: "0x5425890298aed601595a70AB815c96711a31Bc65";
@@ -69,6 +75,7 @@ export declare const usdc: defineToken.ReturnType<{
69
75
  readonly 98866: "0x222365EF19F7947e5484218551B56bb3965Aa7aF";
70
76
  readonly 98867: "0xcB5f30e335672893c7eb944B374c196392C19D18";
71
77
  readonly 421614: "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d";
78
+ readonly 688689: "0xcfC8330f4BCAB529c625D12781b1C19466A9Fc8B";
72
79
  readonly 763373: "0xFabab97dCE620294D2B0b0e46C68964e326300Ac";
73
80
  readonly 812242: "0x6d7f141b6819C2c9CC2f818e6ad549E7Ca090F8f";
74
81
  readonly 5042002: "0x3600000000000000000000000000000000000000";
@@ -1 +1 @@
1
- {"version":3,"file":"usdc.d.ts","sourceRoot":"","sources":["../../../tokens/definitions/usdc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAE/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqDf,CAAA"}
1
+ {"version":3,"file":"usdc.d.ts","sourceRoot":"","sources":["../../../tokens/definitions/usdc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAE/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4Df,CAAA"}
@@ -233,6 +233,7 @@ export declare const tokens: {
233
233
  readonly 137: "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359";
234
234
  readonly 143: "0x754704Bc059F8C67012fEd69BC8A327a5aafb603";
235
235
  readonly 146: "0x29219dd400f2Bf60E5a23d13Be72B486D4038894";
236
+ readonly 196: "0xB6CEceAB302E2E4948951eE7843FC24E92933061";
236
237
  readonly 300: "0xAe045DE5638162fa134807Cb558E15A3F5A7F853";
237
238
  readonly 324: "0x1d17CBcF0D6D143135aE902365D2E5e2A16538D4";
238
239
  readonly 338: "0xEb33dc5fac03833e132593659e1dE7256aB59794";
@@ -243,11 +244,16 @@ export declare const tokens: {
243
244
  readonly 1328: "0x4fCF1784B31630811181f670Aea7A7bEF803eaED";
244
245
  readonly 1329: "0xe15fC38F6D8c56aF07bbCBe3BAf5708A2Bf42392";
245
246
  readonly 1439: "0x0C382e685bbeeFE5d3d9C29e29E341fEE8E84C5d";
247
+ readonly 1672: "0xC879C018dB60520F4355C26eD1a6D572cdAC1815";
246
248
  readonly 1776: "0xa00C59fF5a080D2b954d0c75e46E22a0c371235a";
249
+ readonly 1952: "0xDec90b78111Ba2fc6FC6d84d8B9ec159A2d4b9B3";
247
250
  readonly 2818: "0xCfb1186F4e93D60E60a8bDd997427D1F33bc372B";
251
+ readonly 2910: "0x7433b41C6c5e1d58D4Da99483609520255ab661B";
252
+ readonly 3343: "0x98d2919b9A214E6Fa5384AC81E6864bA686Ad74c";
248
253
  readonly 4801: "0x66145f38cBAC35Ca6F1Dfb4914dF98F1614aeA88";
249
254
  readonly 8453: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913";
250
255
  readonly 10143: "0x534b2f3A21130d7a60830c2Df862319e593943A3";
256
+ readonly 33431: "0x2d9F7CAD728051AA35Ecdc472a14cf8cDF5CFD6B";
251
257
  readonly 42161: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831";
252
258
  readonly 42220: "0xcebA9300f2b948710d2653dD7B07f33A8B32118C";
253
259
  readonly 43113: "0x5425890298aed601595a70AB815c96711a31Bc65";
@@ -263,6 +269,7 @@ export declare const tokens: {
263
269
  readonly 98866: "0x222365EF19F7947e5484218551B56bb3965Aa7aF";
264
270
  readonly 98867: "0xcB5f30e335672893c7eb944B374c196392C19D18";
265
271
  readonly 421614: "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d";
272
+ readonly 688689: "0xcfC8330f4BCAB529c625D12781b1C19466A9Fc8B";
266
273
  readonly 763373: "0xFabab97dCE620294D2B0b0e46C68964e326300Ac";
267
274
  readonly 812242: "0x6d7f141b6819C2c9CC2f818e6ad549E7Ca090F8f";
268
275
  readonly 5042002: "0x3600000000000000000000000000000000000000";
@@ -332,6 +339,7 @@ export declare const tokens: {
332
339
  readonly 137: "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359";
333
340
  readonly 143: "0x754704Bc059F8C67012fEd69BC8A327a5aafb603";
334
341
  readonly 146: "0x29219dd400f2Bf60E5a23d13Be72B486D4038894";
342
+ readonly 196: "0xB6CEceAB302E2E4948951eE7843FC24E92933061";
335
343
  readonly 300: "0xAe045DE5638162fa134807Cb558E15A3F5A7F853";
336
344
  readonly 324: "0x1d17CBcF0D6D143135aE902365D2E5e2A16538D4";
337
345
  readonly 338: "0xEb33dc5fac03833e132593659e1dE7256aB59794";
@@ -342,11 +350,16 @@ export declare const tokens: {
342
350
  readonly 1328: "0x4fCF1784B31630811181f670Aea7A7bEF803eaED";
343
351
  readonly 1329: "0xe15fC38F6D8c56aF07bbCBe3BAf5708A2Bf42392";
344
352
  readonly 1439: "0x0C382e685bbeeFE5d3d9C29e29E341fEE8E84C5d";
353
+ readonly 1672: "0xC879C018dB60520F4355C26eD1a6D572cdAC1815";
345
354
  readonly 1776: "0xa00C59fF5a080D2b954d0c75e46E22a0c371235a";
355
+ readonly 1952: "0xDec90b78111Ba2fc6FC6d84d8B9ec159A2d4b9B3";
346
356
  readonly 2818: "0xCfb1186F4e93D60E60a8bDd997427D1F33bc372B";
357
+ readonly 2910: "0x7433b41C6c5e1d58D4Da99483609520255ab661B";
358
+ readonly 3343: "0x98d2919b9A214E6Fa5384AC81E6864bA686Ad74c";
347
359
  readonly 4801: "0x66145f38cBAC35Ca6F1Dfb4914dF98F1614aeA88";
348
360
  readonly 8453: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913";
349
361
  readonly 10143: "0x534b2f3A21130d7a60830c2Df862319e593943A3";
362
+ readonly 33431: "0x2d9F7CAD728051AA35Ecdc472a14cf8cDF5CFD6B";
350
363
  readonly 42161: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831";
351
364
  readonly 42220: "0xcebA9300f2b948710d2653dD7B07f33A8B32118C";
352
365
  readonly 43113: "0x5425890298aed601595a70AB815c96711a31Bc65";
@@ -362,6 +375,7 @@ export declare const tokens: {
362
375
  readonly 98866: "0x222365EF19F7947e5484218551B56bb3965Aa7aF";
363
376
  readonly 98867: "0xcB5f30e335672893c7eb944B374c196392C19D18";
364
377
  readonly 421614: "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d";
378
+ readonly 688689: "0xcfC8330f4BCAB529c625D12781b1C19466A9Fc8B";
365
379
  readonly 763373: "0xFabab97dCE620294D2B0b0e46C68964e326300Ac";
366
380
  readonly 812242: "0x6d7f141b6819C2c9CC2f818e6ad549E7Ca090F8f";
367
381
  readonly 5042002: "0x3600000000000000000000000000000000000000";
@@ -1 +1 @@
1
- {"version":3,"file":"sets.d.ts","sourceRoot":"","sources":["../../tokens/sets.ts"],"names":[],"mappings":"AA2GA,6EAA6E;AAC7E,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAA0B,CAAA"}
1
+ {"version":3,"file":"sets.d.ts","sourceRoot":"","sources":["../../tokens/sets.ts"],"names":[],"mappings":"AA2GA,6EAA6E;AAC7E,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAA;CAAE,GAAG,GAAG,CAO5E"}
@@ -340,20 +340,6 @@ export async function prepareTransactionRequest<
340
340
  let account = account_ ? parseAccount(account_) : account_
341
341
 
342
342
  let nonce = request.nonce
343
- if (
344
- parameters.includes('nonce') &&
345
- typeof nonce === 'undefined' &&
346
- account &&
347
- nonceManager
348
- ) {
349
- const chainId = await getChainId()
350
- nonce = await nonceManager.consume({
351
- address: account.address,
352
- chainId,
353
- client,
354
- })
355
- }
356
-
357
343
  if (
358
344
  prepareTransactionRequest?.fn &&
359
345
  prepareTransactionRequest.runAt?.includes('beforeFillTransaction')
@@ -370,6 +356,20 @@ export async function prepareTransactionRequest<
370
356
  account = sender ? parseAccount(sender) : undefined
371
357
  }
372
358
 
359
+ if (
360
+ parameters.includes('nonce') &&
361
+ typeof nonce === 'undefined' &&
362
+ account &&
363
+ nonceManager
364
+ ) {
365
+ const chainId = await getChainId()
366
+ nonce = await nonceManager.consume({
367
+ address: account.address,
368
+ chainId,
369
+ client,
370
+ })
371
+ }
372
+
373
373
  const attemptFill = (() => {
374
374
  // Do not attempt if blobs are provided.
375
375
  if (
@@ -380,9 +380,6 @@ export async function prepareTransactionRequest<
380
380
  )
381
381
  return false
382
382
 
383
- // Do not attempt if `eth_fillTransaction` is not supported.
384
- if (supportsFillTransaction.get(client.uid) === false) return false
385
-
386
383
  // Always attempt if the caller explicitly requested a non-empty set of
387
384
  // `parameters` and a fee payer signature is being requested (e.g. Tempo
388
385
  // sponsorship via `feePayer: true`/`Account`) and has not already been
@@ -408,6 +405,10 @@ export async function prepareTransactionRequest<
408
405
  )
409
406
  return true
410
407
 
408
+ // Sponsorship can route fill requests to a different endpoint, so it must
409
+ // bypass support state cached from a non-sponsored request.
410
+ if (supportsFillTransaction.get(client.uid) === false) return false
411
+
411
412
  // Should attempt `eth_fillTransaction` if "fees" or "gas" are required to be populated,
412
413
  // otherwise, can just use the other individual calls.
413
414
  const shouldAttempt = ['fees', 'gas'].some((parameter) =>
@@ -47,6 +47,7 @@ import {
47
47
  } from '../../utils/formatters/transactionRequest.js'
48
48
  import { getAction } from '../../utils/getAction.js'
49
49
  import { LruMap } from '../../utils/lru.js'
50
+ import type { NonceManager } from '../../utils/nonceManager.js'
50
51
  import {
51
52
  type AssertRequestErrorType,
52
53
  type AssertRequestParameters,
@@ -310,15 +311,29 @@ export async function sendTransaction<
310
311
  }
311
312
 
312
313
  if (account?.type === 'local') {
313
- if (account.nonceManager && typeof nonce === 'undefined') {
314
- const requestChainId = (rest as unknown as { chainId?: number }).chainId
315
- const chainId = await (async () => {
316
- if (typeof requestChainId === 'number') return requestChainId
317
- if (chain) return chain.id
318
- return getAction(client, getChainId, 'getChainId')({})
319
- })()
320
- nonceManagerParameters = { address: account.address, chainId }
321
- }
314
+ const nonceManager = ((): NonceManager | undefined => {
315
+ if (!account.nonceManager || typeof nonce !== 'undefined')
316
+ return account.nonceManager
317
+ const nonceManager = account.nonceManager
318
+ return {
319
+ consume(parameters) {
320
+ nonceManagerParameters = {
321
+ address: parameters.address,
322
+ chainId: parameters.chainId,
323
+ }
324
+ return nonceManager.consume(parameters)
325
+ },
326
+ get(parameters) {
327
+ return nonceManager.get(parameters)
328
+ },
329
+ increment(parameters) {
330
+ return nonceManager.increment(parameters)
331
+ },
332
+ reset(parameters) {
333
+ return nonceManager.reset(parameters)
334
+ },
335
+ }
336
+ })()
322
337
 
323
338
  // Prepare the request for signing (assign appropriate fees, etc.)
324
339
  const request = await getAction(
@@ -338,7 +353,7 @@ export async function sendTransaction<
338
353
  maxFeePerGas,
339
354
  maxPriorityFeePerGas,
340
355
  nonce,
341
- nonceManager: account.nonceManager,
356
+ nonceManager,
342
357
  parameters: [...defaultParameters, 'sidecars'],
343
358
  type,
344
359
  value,
@@ -51,6 +51,7 @@ import {
51
51
  } from '../../utils/formatters/transactionRequest.js'
52
52
  import { getAction } from '../../utils/getAction.js'
53
53
  import { LruMap } from '../../utils/lru.js'
54
+ import type { NonceManager } from '../../utils/nonceManager.js'
54
55
  import {
55
56
  type AssertRequestErrorType,
56
57
  type AssertRequestParameters,
@@ -349,15 +350,29 @@ export async function sendTransactionSync<
349
350
  }
350
351
 
351
352
  if (account?.type === 'local') {
352
- if (account.nonceManager && typeof nonce === 'undefined') {
353
- const requestChainId = (rest as unknown as { chainId?: number }).chainId
354
- const chainId = await (async () => {
355
- if (typeof requestChainId === 'number') return requestChainId
356
- if (chain) return chain.id
357
- return getAction(client, getChainId, 'getChainId')({})
358
- })()
359
- nonceManagerParameters = { address: account.address, chainId }
360
- }
353
+ const nonceManager = ((): NonceManager | undefined => {
354
+ if (!account.nonceManager || typeof nonce !== 'undefined')
355
+ return account.nonceManager
356
+ const nonceManager = account.nonceManager
357
+ return {
358
+ consume(parameters) {
359
+ nonceManagerParameters = {
360
+ address: parameters.address,
361
+ chainId: parameters.chainId,
362
+ }
363
+ return nonceManager.consume(parameters)
364
+ },
365
+ get(parameters) {
366
+ return nonceManager.get(parameters)
367
+ },
368
+ increment(parameters) {
369
+ return nonceManager.increment(parameters)
370
+ },
371
+ reset(parameters) {
372
+ return nonceManager.reset(parameters)
373
+ },
374
+ }
375
+ })()
361
376
 
362
377
  // Prepare the request for signing (assign appropriate fees, etc.)
363
378
  const request = await getAction(
@@ -377,7 +392,7 @@ export async function sendTransactionSync<
377
392
  maxFeePerGas,
378
393
  maxPriorityFeePerGas,
379
394
  nonce,
380
- nonceManager: account.nonceManager,
395
+ nonceManager,
381
396
  parameters: [...defaultParameters, 'sidecars'],
382
397
  type,
383
398
  value,
@@ -2,11 +2,11 @@ import { defineChain } from '../../utils/chain/defineChain.js'
2
2
 
3
3
  export const story = /*#__PURE__*/ defineChain({
4
4
  id: 1514,
5
- name: 'Story',
5
+ name: 'Data Network',
6
6
  nativeCurrency: {
7
7
  decimals: 18,
8
- name: 'IP Token',
9
- symbol: 'IP',
8
+ name: 'DATA',
9
+ symbol: 'DATA',
10
10
  },
11
11
  contracts: {
12
12
  multicall3: {
@@ -23,13 +23,13 @@ export const story = /*#__PURE__*/ defineChain({
23
23
  },
24
24
  },
25
25
  rpcUrls: {
26
- default: { http: ['https://mainnet.storyrpc.io'] },
26
+ default: { http: ['https://mainnet.datarpc.io'] },
27
27
  },
28
28
  blockExplorers: {
29
29
  default: {
30
- name: 'Story explorer',
31
- url: 'https://storyscan.io',
32
- apiUrl: 'https://storyscan.io/api/v2',
30
+ name: 'Data Network explorer',
31
+ url: 'https://datanetscan.io',
32
+ apiUrl: 'https://datanetscan.io/api/v2',
33
33
  },
34
34
  },
35
35
  ensTlds: ['.ip'],
@@ -2,12 +2,12 @@ import { defineChain } from '../../utils/chain/defineChain.js'
2
2
 
3
3
  export const storyAeneid = /*#__PURE__*/ defineChain({
4
4
  id: 1315,
5
- name: 'Story Aeneid',
6
- network: 'story-aeneid',
5
+ name: 'Data Network Aeneid',
6
+ network: 'data-network-aeneid',
7
7
  nativeCurrency: {
8
8
  decimals: 18,
9
- name: 'IP',
10
- symbol: 'IP',
9
+ name: 'DATA',
10
+ symbol: 'DATA',
11
11
  },
12
12
  contracts: {
13
13
  multicall3: {
@@ -24,13 +24,13 @@ export const storyAeneid = /*#__PURE__*/ defineChain({
24
24
  },
25
25
  },
26
26
  rpcUrls: {
27
- default: { http: ['https://aeneid.storyrpc.io'] },
27
+ default: { http: ['https://aeneid.datarpc.io'] },
28
28
  },
29
29
  blockExplorers: {
30
30
  default: {
31
- name: 'Story Aeneid Explorer',
32
- url: 'https://aeneid.storyscan.io',
33
- apiUrl: 'https://aeneid.storyscan.io/api/v2',
31
+ name: 'Data Network Aeneid Explorer',
32
+ url: 'https://aeneid.datanetscan.io',
33
+ apiUrl: 'https://aeneid.datanetscan.io/api/v2',
34
34
  },
35
35
  },
36
36
  ensTlds: ['.ip'],
@@ -350,9 +350,9 @@ function isPlainObject(value: unknown): value is Record<string, unknown> {
350
350
  * Binds an action function to a `client`, returning a parameter-only version
351
351
  * along with any helpers the action exposes. Helpers that need a client
352
352
  * (`.call`, `.calls`, `.callWithPeriod`, `.estimateGas`, `.prepare`,
353
- * `.prepareRecipient`, `.simulate`) are bound to `client`; pure helpers
354
- * (`.extractEvent`, `.extractEvents`) are copied as-is. Used by decorators
355
- * that attach namespaced actions to a Client.
353
+ * `.prepareRecipient`, `.predict`, `.simulate`) are bound to `client`;
354
+ * pure helpers (`.extractEvent`, `.extractEvents`) are copied as-is. Used
355
+ * by decorators that attach namespaced actions to a Client.
356
356
  * @internal
357
357
  */
358
358
  export function bindActionDecorators(
@@ -367,6 +367,7 @@ export function bindActionDecorators(
367
367
  'estimateGas',
368
368
  'prepare',
369
369
  'prepareRecipient',
370
+ 'predict',
370
371
  'simulate',
371
372
  ] as const)
372
373
  if (Object.hasOwn(action, key)) {
@@ -43,3 +43,16 @@ export class InvalidStructTypeError extends BaseError {
43
43
  })
44
44
  }
45
45
  }
46
+
47
+ export type InvalidTypedDataTypeErrorType = InvalidTypedDataTypeError & {
48
+ name: 'InvalidTypedDataTypeError'
49
+ }
50
+ export class InvalidTypedDataTypeError extends BaseError {
51
+ constructor({ type }: { type: string }) {
52
+ const canonicalType = type.replace(/^(u?int)/, '$&256')
53
+ super(`Type "${type}" is not a valid EIP-712 type.`, {
54
+ metaMessages: [`Use "${canonicalType}" instead.`],
55
+ name: 'InvalidTypedDataTypeError',
56
+ })
57
+ }
58
+ }
package/errors/version.ts CHANGED
@@ -1 +1 @@
1
- export const version = '2.55.10'
1
+ export const version = '2.55.13'
package/index.ts CHANGED
@@ -1060,6 +1060,8 @@ export {
1060
1060
  type InvalidPrimaryTypeErrorType,
1061
1061
  InvalidStructTypeError,
1062
1062
  type InvalidStructTypeErrorType,
1063
+ InvalidTypedDataTypeError,
1064
+ type InvalidTypedDataTypeErrorType,
1063
1065
  } from './errors/typedData.js'
1064
1066
  export {
1065
1067
  InvalidDecimalNumberError,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "viem",
3
3
  "description": "TypeScript Interface for Ethereum",
4
- "version": "2.55.10",
4
+ "version": "2.55.13",
5
5
  "main": "./_cjs/index.js",
6
6
  "module": "./_esm/index.js",
7
7
  "types": "./_types/index.d.ts",