viem 1.19.8 → 1.19.10

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 (228) hide show
  1. package/CHANGELOG.md +425 -405
  2. package/README.md +46 -46
  3. package/_cjs/accounts/utils/signTransaction.js.map +1 -1
  4. package/_cjs/actions/public/createContractEventFilter.js.map +1 -1
  5. package/_cjs/actions/public/estimateMaxPriorityFeePerGas.js +1 -1
  6. package/_cjs/actions/public/estimateMaxPriorityFeePerGas.js.map +1 -1
  7. package/_cjs/chains/celo/serializers.js +3 -7
  8. package/_cjs/chains/celo/serializers.js.map +1 -1
  9. package/_cjs/chains/definitions/confluxESpace.js +2 -0
  10. package/_cjs/chains/definitions/confluxESpace.js.map +1 -1
  11. package/_cjs/chains/definitions/confluxESpaceTestnet.js +34 -0
  12. package/_cjs/chains/definitions/confluxESpaceTestnet.js.map +1 -0
  13. package/_cjs/chains/definitions/filecoin.js +6 -0
  14. package/_cjs/chains/definitions/filecoin.js.map +1 -1
  15. package/_cjs/chains/definitions/pgn.js +38 -0
  16. package/_cjs/chains/definitions/pgn.js.map +1 -0
  17. package/_cjs/chains/definitions/pgnTestnet.js +39 -0
  18. package/_cjs/chains/definitions/pgnTestnet.js.map +1 -0
  19. package/_cjs/chains/definitions/sapphire.js +33 -0
  20. package/_cjs/chains/definitions/sapphire.js.map +1 -0
  21. package/_cjs/chains/definitions/sapphireTestnet.js +28 -0
  22. package/_cjs/chains/definitions/sapphireTestnet.js.map +1 -0
  23. package/_cjs/chains/index.js +14 -4
  24. package/_cjs/chains/index.js.map +1 -1
  25. package/_cjs/errors/base.js.map +1 -1
  26. package/_cjs/errors/version.js +1 -1
  27. package/_cjs/errors/version.js.map +1 -1
  28. package/_cjs/utils/abi/encodeEventTopics.js.map +1 -1
  29. package/_cjs/utils/ccip.js +3 -1
  30. package/_cjs/utils/ccip.js.map +1 -1
  31. package/_cjs/utils/encoding/toBytes.js +2 -2
  32. package/_cjs/utils/encoding/toBytes.js.map +1 -1
  33. package/_cjs/utils/ens/avatar/utils.js +1 -1
  34. package/_cjs/utils/ens/avatar/utils.js.map +1 -1
  35. package/_cjs/utils/errors/getContractError.js.map +1 -1
  36. package/_cjs/utils/errors/getNodeError.js +11 -11
  37. package/_cjs/utils/errors/getNodeError.js.map +1 -1
  38. package/_cjs/utils/transaction/getTransactionType.js.map +1 -1
  39. package/_cjs/utils/transaction/serializeTransaction.js.map +1 -1
  40. package/_esm/accounts/utils/signTransaction.js.map +1 -1
  41. package/_esm/actions/ens/getEnsAddress.js +2 -2
  42. package/_esm/actions/ens/getEnsAvatar.js +2 -2
  43. package/_esm/actions/ens/getEnsName.js +2 -2
  44. package/_esm/actions/ens/getEnsResolver.js +2 -2
  45. package/_esm/actions/ens/getEnsText.js +2 -2
  46. package/_esm/actions/public/createContractEventFilter.js.map +1 -1
  47. package/_esm/actions/public/estimateMaxPriorityFeePerGas.js +1 -1
  48. package/_esm/actions/public/estimateMaxPriorityFeePerGas.js.map +1 -1
  49. package/_esm/actions/public/getBlock.js +1 -1
  50. package/_esm/actions/public/getBlockNumber.js +1 -1
  51. package/_esm/actions/public/getLogs.js +1 -1
  52. package/_esm/actions/public/getTransaction.js +1 -1
  53. package/_esm/actions/public/getTransactionConfirmations.js +1 -1
  54. package/_esm/actions/public/getTransactionReceipt.js +1 -1
  55. package/_esm/actions/public/readContract.js +1 -1
  56. package/_esm/actions/public/simulateContract.js +1 -1
  57. package/_esm/actions/public/waitForTransactionReceipt.js +1 -1
  58. package/_esm/actions/public/watchBlockNumber.js +1 -1
  59. package/_esm/actions/public/watchBlocks.js +1 -1
  60. package/_esm/actions/wallet/deployContract.js +1 -1
  61. package/_esm/actions/wallet/sendTransaction.js +1 -1
  62. package/_esm/actions/wallet/writeContract.js +1 -1
  63. package/_esm/chains/celo/serializers.js +3 -7
  64. package/_esm/chains/celo/serializers.js.map +1 -1
  65. package/_esm/chains/definitions/confluxESpace.js +2 -0
  66. package/_esm/chains/definitions/confluxESpace.js.map +1 -1
  67. package/_esm/chains/definitions/confluxESpaceTestnet.js +31 -0
  68. package/_esm/chains/definitions/confluxESpaceTestnet.js.map +1 -0
  69. package/_esm/chains/definitions/filecoin.js +6 -0
  70. package/_esm/chains/definitions/filecoin.js.map +1 -1
  71. package/_esm/chains/definitions/pgn.js +35 -0
  72. package/_esm/chains/definitions/pgn.js.map +1 -0
  73. package/_esm/chains/definitions/pgnTestnet.js +36 -0
  74. package/_esm/chains/definitions/pgnTestnet.js.map +1 -0
  75. package/_esm/chains/definitions/sapphire.js +30 -0
  76. package/_esm/chains/definitions/sapphire.js.map +1 -0
  77. package/_esm/chains/definitions/sapphireTestnet.js +25 -0
  78. package/_esm/chains/definitions/sapphireTestnet.js.map +1 -0
  79. package/_esm/chains/index.js +5 -0
  80. package/_esm/chains/index.js.map +1 -1
  81. package/_esm/errors/base.js.map +1 -1
  82. package/_esm/errors/version.js +1 -1
  83. package/_esm/errors/version.js.map +1 -1
  84. package/_esm/utils/abi/encodeEventTopics.js.map +1 -1
  85. package/_esm/utils/ccip.js +3 -1
  86. package/_esm/utils/ccip.js.map +1 -1
  87. package/_esm/utils/encoding/toBytes.js +2 -2
  88. package/_esm/utils/encoding/toBytes.js.map +1 -1
  89. package/_esm/utils/ens/avatar/utils.js +1 -1
  90. package/_esm/utils/ens/avatar/utils.js.map +1 -1
  91. package/_esm/utils/ens/namehash.js +1 -1
  92. package/_esm/utils/ens/normalize.js +2 -2
  93. package/_esm/utils/errors/getContractError.js.map +1 -1
  94. package/_esm/utils/errors/getNodeError.js +11 -11
  95. package/_esm/utils/errors/getNodeError.js.map +1 -1
  96. package/_esm/utils/transaction/getTransactionType.js.map +1 -1
  97. package/_esm/utils/transaction/serializeTransaction.js.map +1 -1
  98. package/_types/accounts/utils/signTransaction.d.ts.map +1 -1
  99. package/_types/actions/ens/getEnsAddress.d.ts +2 -2
  100. package/_types/actions/ens/getEnsAvatar.d.ts +2 -2
  101. package/_types/actions/ens/getEnsName.d.ts +2 -2
  102. package/_types/actions/ens/getEnsResolver.d.ts +2 -2
  103. package/_types/actions/ens/getEnsText.d.ts +2 -2
  104. package/_types/actions/public/createContractEventFilter.d.ts.map +1 -1
  105. package/_types/actions/public/estimateMaxPriorityFeePerGas.d.ts.map +1 -1
  106. package/_types/actions/public/getBlock.d.ts +1 -1
  107. package/_types/actions/public/getBlockNumber.d.ts +1 -1
  108. package/_types/actions/public/getLogs.d.ts +1 -1
  109. package/_types/actions/public/getTransaction.d.ts +1 -1
  110. package/_types/actions/public/getTransactionConfirmations.d.ts +1 -1
  111. package/_types/actions/public/getTransactionReceipt.d.ts +1 -1
  112. package/_types/actions/public/readContract.d.ts +1 -1
  113. package/_types/actions/public/simulateContract.d.ts +1 -1
  114. package/_types/actions/public/waitForTransactionReceipt.d.ts +1 -1
  115. package/_types/actions/public/watchBlockNumber.d.ts +1 -1
  116. package/_types/actions/public/watchBlocks.d.ts +1 -1
  117. package/_types/actions/wallet/deployContract.d.ts +1 -1
  118. package/_types/actions/wallet/sendTransaction.d.ts +1 -1
  119. package/_types/actions/wallet/writeContract.d.ts +1 -1
  120. package/_types/chains/celo/serializers.d.ts.map +1 -1
  121. package/_types/chains/definitions/confluxESpace.d.ts +2 -0
  122. package/_types/chains/definitions/confluxESpace.d.ts.map +1 -1
  123. package/_types/chains/definitions/confluxESpaceTestnet.d.ts +34 -0
  124. package/_types/chains/definitions/confluxESpaceTestnet.d.ts.map +1 -0
  125. package/_types/chains/definitions/filecoin.d.ts +6 -0
  126. package/_types/chains/definitions/filecoin.d.ts.map +1 -1
  127. package/_types/chains/definitions/pgn.d.ts +340 -0
  128. package/_types/chains/definitions/pgn.d.ts.map +1 -0
  129. package/_types/chains/definitions/pgnTestnet.d.ts +341 -0
  130. package/_types/chains/definitions/pgnTestnet.d.ts.map +1 -0
  131. package/_types/chains/definitions/sapphire.d.ts +33 -0
  132. package/_types/chains/definitions/sapphire.d.ts.map +1 -0
  133. package/_types/chains/definitions/sapphireTestnet.d.ts +28 -0
  134. package/_types/chains/definitions/sapphireTestnet.d.ts.map +1 -0
  135. package/_types/chains/index.d.ts +5 -0
  136. package/_types/chains/index.d.ts.map +1 -1
  137. package/_types/clients/decorators/public.d.ts +21 -21
  138. package/_types/clients/decorators/wallet.d.ts +3 -3
  139. package/_types/errors/version.d.ts +1 -1
  140. package/_types/errors/version.d.ts.map +1 -1
  141. package/_types/types/contract.d.ts.map +1 -1
  142. package/_types/types/filter.d.ts.map +1 -1
  143. package/_types/types/log.d.ts.map +1 -1
  144. package/_types/types/multicall.d.ts.map +1 -1
  145. package/_types/types/transaction.d.ts.map +1 -1
  146. package/_types/types/typedData.d.ts.map +1 -1
  147. package/_types/types/utils.d.ts.map +1 -1
  148. package/_types/utils/abi/decodeFunctionResult.d.ts.map +1 -1
  149. package/_types/utils/abi/encodeErrorResult.d.ts.map +1 -1
  150. package/_types/utils/abi/encodeEventTopics.d.ts.map +1 -1
  151. package/_types/utils/abi/encodeFunctionData.d.ts.map +1 -1
  152. package/_types/utils/abi/encodeFunctionResult.d.ts.map +1 -1
  153. package/_types/utils/ccip.d.ts.map +1 -1
  154. package/_types/utils/encoding/fromBytes.d.ts.map +1 -1
  155. package/_types/utils/encoding/fromHex.d.ts.map +1 -1
  156. package/_types/utils/ens/avatar/utils.d.ts.map +1 -1
  157. package/_types/utils/ens/namehash.d.ts +1 -1
  158. package/_types/utils/ens/normalize.d.ts +2 -2
  159. package/_types/utils/errors/getNodeError.d.ts.map +1 -1
  160. package/_types/utils/transaction/getSerializedTransactionType.d.ts.map +1 -1
  161. package/_types/utils/transaction/getTransactionType.d.ts.map +1 -1
  162. package/_types/utils/transaction/serializeTransaction.d.ts.map +1 -1
  163. package/accounts/utils/signTransaction.ts +4 -2
  164. package/actions/ens/getEnsAddress.ts +3 -3
  165. package/actions/ens/getEnsAvatar.ts +2 -2
  166. package/actions/ens/getEnsName.ts +2 -2
  167. package/actions/ens/getEnsResolver.ts +2 -2
  168. package/actions/ens/getEnsText.ts +2 -2
  169. package/actions/public/call.ts +1 -1
  170. package/actions/public/createContractEventFilter.ts +11 -9
  171. package/actions/public/estimateMaxPriorityFeePerGas.ts +3 -1
  172. package/actions/public/getBlock.ts +1 -1
  173. package/actions/public/getBlockNumber.ts +1 -1
  174. package/actions/public/getLogs.ts +1 -1
  175. package/actions/public/getTransaction.ts +1 -1
  176. package/actions/public/getTransactionConfirmations.ts +1 -1
  177. package/actions/public/getTransactionReceipt.ts +1 -1
  178. package/actions/public/readContract.ts +1 -1
  179. package/actions/public/simulateContract.ts +1 -1
  180. package/actions/public/verifyHash.ts +1 -1
  181. package/actions/public/verifyMessage.ts +1 -1
  182. package/actions/public/verifyTypedData.ts +1 -1
  183. package/actions/public/waitForTransactionReceipt.ts +1 -1
  184. package/actions/public/watchBlockNumber.ts +1 -1
  185. package/actions/public/watchBlocks.ts +1 -1
  186. package/actions/wallet/deployContract.ts +1 -1
  187. package/actions/wallet/sendRawTransaction.ts +1 -1
  188. package/actions/wallet/sendTransaction.ts +1 -1
  189. package/actions/wallet/writeContract.ts +1 -1
  190. package/chains/celo/serializers.ts +3 -7
  191. package/chains/definitions/confluxESpace.ts +2 -0
  192. package/chains/definitions/confluxESpaceTestnet.ts +31 -0
  193. package/chains/definitions/filecoin.ts +6 -0
  194. package/chains/definitions/pgn.ts +38 -0
  195. package/chains/definitions/pgnTestnet.ts +39 -0
  196. package/chains/definitions/sapphire.ts +30 -0
  197. package/chains/definitions/sapphireTestnet.ts +25 -0
  198. package/chains/index.ts +5 -0
  199. package/clients/decorators/public.ts +21 -21
  200. package/clients/decorators/wallet.ts +3 -3
  201. package/errors/base.ts +2 -2
  202. package/errors/version.ts +1 -1
  203. package/package.json +3 -3
  204. package/types/contract.ts +63 -64
  205. package/types/filter.ts +12 -12
  206. package/types/log.ts +4 -4
  207. package/types/multicall.ts +65 -57
  208. package/types/transaction.ts +4 -4
  209. package/types/typedData.ts +12 -12
  210. package/types/utils.ts +6 -7
  211. package/utils/abi/decodeFunctionResult.ts +2 -2
  212. package/utils/abi/encodeErrorResult.ts +2 -2
  213. package/utils/abi/encodeEventTopics.ts +6 -6
  214. package/utils/abi/encodeFunctionData.ts +2 -2
  215. package/utils/abi/encodeFunctionResult.ts +5 -5
  216. package/utils/ccip.ts +4 -2
  217. package/utils/encoding/fromBytes.ts +8 -8
  218. package/utils/encoding/fromHex.ts +8 -8
  219. package/utils/encoding/toBytes.ts +2 -2
  220. package/utils/ens/avatar/utils.ts +3 -1
  221. package/utils/ens/namehash.ts +1 -1
  222. package/utils/ens/normalize.ts +2 -2
  223. package/utils/errors/getContractError.ts +2 -2
  224. package/utils/errors/getNodeError.ts +12 -11
  225. package/utils/rpc.ts +1 -1
  226. package/utils/transaction/getSerializedTransactionType.ts +2 -2
  227. package/utils/transaction/getTransactionType.ts +2 -1
  228. package/utils/transaction/serializeTransaction.ts +6 -3
@@ -507,7 +507,7 @@ export type PublicActions<
507
507
  * Returns information about a block at a block number, hash, or tag.
508
508
  *
509
509
  * - Docs: https://viem.sh/docs/actions/public/getBlock.html
510
- * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/blocks/fetching-blocks
510
+ * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks/fetching-blocks
511
511
  * - JSON-RPC Methods:
512
512
  * - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) for `blockNumber` & `blockTag`.
513
513
  * - Calls [`eth_getBlockByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbyhash) for `blockHash`.
@@ -535,7 +535,7 @@ export type PublicActions<
535
535
  * Returns the number of the most recent block seen.
536
536
  *
537
537
  * - Docs: https://viem.sh/docs/actions/public/getBlockNumber.html
538
- * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/blocks/fetching-blocks
538
+ * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks/fetching-blocks
539
539
  * - JSON-RPC Methods: [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber)
540
540
  *
541
541
  * @param args - {@link GetBlockNumberParameters}
@@ -667,7 +667,7 @@ export type PublicActions<
667
667
  * Gets address for ENS name.
668
668
  *
669
669
  * - Docs: https://viem.sh/docs/ens/actions/getEnsAddress.html
670
- * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/ens
670
+ * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens
671
671
  *
672
672
  * @remarks
673
673
  * Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract.
@@ -687,7 +687,7 @@ export type PublicActions<
687
687
  * transport: http(),
688
688
  * })
689
689
  * const ensAddress = await client.getEnsAddress({
690
- * name: normalize('wagmi-dev.eth'),
690
+ * name: normalize('wevm.eth'),
691
691
  * })
692
692
  * // '0xd2135CfB216b74109775236E36d4b433F1DF507B'
693
693
  */
@@ -698,7 +698,7 @@ export type PublicActions<
698
698
  * Gets the avatar of an ENS name.
699
699
  *
700
700
  * - Docs: https://viem.sh/docs/ens/actions/getEnsAvatar.html
701
- * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/ens
701
+ * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens
702
702
  *
703
703
  * @remarks
704
704
  * Calls [`getEnsText`](https://viem.sh/docs/ens/actions/getEnsText.html) with `key` set to `'avatar'`.
@@ -718,7 +718,7 @@ export type PublicActions<
718
718
  * transport: http(),
719
719
  * })
720
720
  * const ensAvatar = await client.getEnsAvatar({
721
- * name: normalize('wagmi-dev.eth'),
721
+ * name: normalize('wevm.eth'),
722
722
  * })
723
723
  * // 'https://ipfs.io/ipfs/Qma8mnp6xV3J2cRNf3mTth5C8nV11CAnceVinc3y8jSbio'
724
724
  */
@@ -729,7 +729,7 @@ export type PublicActions<
729
729
  * Gets primary name for specified address.
730
730
  *
731
731
  * - Docs: https://viem.sh/docs/ens/actions/getEnsName.html
732
- * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/ens
732
+ * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens
733
733
  *
734
734
  * @remarks
735
735
  * Calls `reverse(bytes)` on ENS Universal Resolver Contract to "reverse resolve" the address to the primary ENS name.
@@ -748,14 +748,14 @@ export type PublicActions<
748
748
  * const ensName = await client.getEnsName({
749
749
  * address: '0xd2135CfB216b74109775236E36d4b433F1DF507B',
750
750
  * })
751
- * // 'wagmi-dev.eth'
751
+ * // 'wevm.eth'
752
752
  */
753
753
  getEnsName: (args: GetEnsNameParameters) => Promise<GetEnsNameReturnType>
754
754
  /**
755
755
  * Gets resolver for ENS name.
756
756
  *
757
757
  * - Docs: https://viem.sh/docs/ens/actions/getEnsResolver.html
758
- * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/ens
758
+ * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens
759
759
  *
760
760
  * @remarks
761
761
  * Calls `findResolver(bytes)` on ENS Universal Resolver Contract to retrieve the resolver of an ENS name.
@@ -775,7 +775,7 @@ export type PublicActions<
775
775
  * transport: http(),
776
776
  * })
777
777
  * const resolverAddress = await client.getEnsResolver({
778
- * name: normalize('wagmi-dev.eth'),
778
+ * name: normalize('wevm.eth'),
779
779
  * })
780
780
  * // '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41'
781
781
  */
@@ -786,7 +786,7 @@ export type PublicActions<
786
786
  * Gets a text record for specified ENS name.
787
787
  *
788
788
  * - Docs: https://viem.sh/docs/ens/actions/getEnsResolver.html
789
- * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/ens
789
+ * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens
790
790
  *
791
791
  * @remarks
792
792
  * Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract.
@@ -806,7 +806,7 @@ export type PublicActions<
806
806
  * transport: http(),
807
807
  * })
808
808
  * const twitterRecord = await client.getEnsText({
809
- * name: normalize('wagmi-dev.eth'),
809
+ * name: normalize('wevm.eth'),
810
810
  * key: 'com.twitter',
811
811
  * })
812
812
  * // 'wagmi_sh'
@@ -1034,7 +1034,7 @@ export type PublicActions<
1034
1034
  * Returns a list of event logs matching the provided parameters.
1035
1035
  *
1036
1036
  * - Docs: https://viem.sh/docs/actions/public/getLogs.html
1037
- * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/filters-and-logs/event-logs
1037
+ * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/filters-and-logs/event-logs
1038
1038
  * - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs)
1039
1039
  *
1040
1040
  * @param args - {@link GetLogsParameters}
@@ -1150,7 +1150,7 @@ export type PublicActions<
1150
1150
  * Returns information about a [Transaction](https://viem.sh/docs/glossary/terms.html#transaction) given a hash or block identifier.
1151
1151
  *
1152
1152
  * - Docs: https://viem.sh/docs/actions/public/getTransaction.html
1153
- * - Example: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/transactions/fetching-transactions
1153
+ * - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions/fetching-transactions
1154
1154
  * - JSON-RPC Methods: [`eth_getTransactionByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionByHash)
1155
1155
  *
1156
1156
  * @param args - {@link GetTransactionParameters}
@@ -1175,7 +1175,7 @@ export type PublicActions<
1175
1175
  * Returns the number of blocks passed (confirmations) since the transaction was processed on a block.
1176
1176
  *
1177
1177
  * - Docs: https://viem.sh/docs/actions/public/getTransactionConfirmations.html
1178
- * - Example: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/transactions/fetching-transactions
1178
+ * - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions/fetching-transactions
1179
1179
  * - JSON-RPC Methods: [`eth_getTransactionConfirmations`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionConfirmations)
1180
1180
  *
1181
1181
  * @param args - {@link GetTransactionConfirmationsParameters}
@@ -1224,7 +1224,7 @@ export type PublicActions<
1224
1224
  * Returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms.html#transaction-receipt) given a [Transaction](https://viem.sh/docs/glossary/terms.html#transaction) hash.
1225
1225
  *
1226
1226
  * - Docs: https://viem.sh/docs/actions/public/getTransactionReceipt.html
1227
- * - Example: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/transactions/fetching-transactions
1227
+ * - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions/fetching-transactions
1228
1228
  * - JSON-RPC Methods: [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt)
1229
1229
  *
1230
1230
  * @param args - {@link GetTransactionReceiptParameters}
@@ -1335,7 +1335,7 @@ export type PublicActions<
1335
1335
  * Calls a read-only function on a contract, and returns the response.
1336
1336
  *
1337
1337
  * - Docs: https://viem.sh/docs/contract/readContract.html
1338
- * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/contracts/reading-contracts
1338
+ * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts/reading-contracts
1339
1339
  *
1340
1340
  * @remarks
1341
1341
  * A "read-only" function (constant function) on a Solidity contract is denoted by a `view` or `pure` keyword. They can only read the state of the contract, and cannot make any changes to it. Since read-only methods do not change the state of the contract, they do not require any gas to be executed, and can be called by any user without the need to pay for gas.
@@ -1399,7 +1399,7 @@ export type PublicActions<
1399
1399
  * Simulates/validates a contract interaction. This is useful for retrieving **return data** and **revert reasons** of contract write functions.
1400
1400
  *
1401
1401
  * - Docs: https://viem.sh/docs/contract/simulateContract.html
1402
- * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/contracts/writing-to-contracts
1402
+ * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts/writing-to-contracts
1403
1403
  *
1404
1404
  * @remarks
1405
1405
  * This function does not require gas to execute and _**does not**_ change the state of the blockchain. It is almost identical to [`readContract`](https://viem.sh/docs/contract/readContract.html), but also supports contract write functions.
@@ -1474,7 +1474,7 @@ export type PublicActions<
1474
1474
  * Waits for the [Transaction](https://viem.sh/docs/glossary/terms.html#transaction) to be included on a [Block](https://viem.sh/docs/glossary/terms.html#block) (one confirmation), and then returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms.html#transaction-receipt). If the Transaction reverts, then the action will throw an error.
1475
1475
  *
1476
1476
  * - Docs: https://viem.sh/docs/actions/public/waitForTransactionReceipt.html
1477
- * - Example: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/transactions/sending-transactions
1477
+ * - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions/sending-transactions
1478
1478
  * - JSON-RPC Methods:
1479
1479
  * - Polls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) on each block until it has been processed.
1480
1480
  * - If a Transaction has been replaced:
@@ -1515,7 +1515,7 @@ export type PublicActions<
1515
1515
  * Watches and returns incoming block numbers.
1516
1516
  *
1517
1517
  * - Docs: https://viem.sh/docs/actions/public/watchBlockNumber.html
1518
- * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/blocks/watching-blocks
1518
+ * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks/watching-blocks
1519
1519
  * - JSON-RPC Methods:
1520
1520
  * - When `poll: true`, calls [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) on a polling interval.
1521
1521
  * - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event.
@@ -1542,7 +1542,7 @@ export type PublicActions<
1542
1542
  * Watches and returns information for incoming blocks.
1543
1543
  *
1544
1544
  * - Docs: https://viem.sh/docs/actions/public/watchBlocks.html
1545
- * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/blocks/watching-blocks
1545
+ * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks/watching-blocks
1546
1546
  * - JSON-RPC Methods:
1547
1547
  * - When `poll: true`, calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getBlockByNumber) on a polling interval.
1548
1548
  * - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event.
@@ -105,7 +105,7 @@ export type WalletActions<
105
105
  * Deploys a contract to the network, given bytecode and constructor arguments.
106
106
  *
107
107
  * - Docs: https://viem.sh/docs/contract/deployContract.html
108
- * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/contracts/deploying-contracts
108
+ * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts/deploying-contracts
109
109
  *
110
110
  * @param args - {@link DeployContractParameters}
111
111
  * @returns The [Transaction](https://viem.sh/docs/glossary/terms.html#transaction) hash. {@link DeployContractReturnType}
@@ -311,7 +311,7 @@ export type WalletActions<
311
311
  * Creates, signs, and sends a new transaction to the network.
312
312
  *
313
313
  * - Docs: https://viem.sh/docs/actions/wallet/sendTransaction.html
314
- * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/transactions/sending-transactions
314
+ * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions/sending-transactions
315
315
  * - JSON-RPC Methods:
316
316
  * - JSON-RPC Accounts: [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction)
317
317
  * - Local Accounts: [`eth_sendRawTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction)
@@ -596,7 +596,7 @@ export type WalletActions<
596
596
  * Executes a write function on a contract.
597
597
  *
598
598
  * - Docs: https://viem.sh/docs/contract/writeContract.html
599
- * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/contracts/writing-to-contracts
599
+ * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts/writing-to-contracts
600
600
  *
601
601
  * A "write" function on a Solidity contract modifies the state of the blockchain. These types of functions require gas to be executed, and hence a [Transaction](https://viem.sh/docs/glossary/terms.html) is needed to be broadcast in order to change the state.
602
602
  *
package/errors/base.ts CHANGED
@@ -32,8 +32,8 @@ export class BaseError extends Error {
32
32
  args.cause instanceof BaseError
33
33
  ? args.cause.details
34
34
  : args.cause?.message
35
- ? args.cause.message
36
- : args.details!
35
+ ? args.cause.message
36
+ : args.details!
37
37
  const docsPath =
38
38
  args.cause instanceof BaseError
39
39
  ? args.cause.docsPath || args.docsPath
package/errors/version.ts CHANGED
@@ -1 +1 @@
1
- export const version = '1.19.7'
1
+ export const version = '1.19.10'
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "viem",
3
3
  "description": "TypeScript Interface for Ethereum",
4
- "version": "1.19.8",
4
+ "version": "1.19.10",
5
5
  "main": "./_cjs/index.js",
6
6
  "module": "./_esm/index.js",
7
7
  "types": "./_types/index.d.ts",
@@ -144,7 +144,7 @@
144
144
  },
145
145
  "license": "MIT",
146
146
  "homepage": "https://viem.sh",
147
- "repository": "wagmi-dev/viem",
147
+ "repository": "wevm/viem",
148
148
  "authors": [
149
149
  "awkweb.eth",
150
150
  "jxom.eth"
@@ -152,7 +152,7 @@
152
152
  "funding": [
153
153
  {
154
154
  "type": "github",
155
- "url": "https://github.com/sponsors/wagmi-dev"
155
+ "url": "https://github.com/sponsors/wevm"
156
156
  }
157
157
  ],
158
158
  "keywords": [
package/types/contract.ts CHANGED
@@ -58,10 +58,10 @@ export type ContractFunctionResult<
58
58
  > = true extends FailedToParseArgs
59
59
  ? unknown
60
60
  : TArgs extends readonly []
61
- ? void
62
- : TArgs extends readonly [infer Arg]
63
- ? Arg
64
- : TArgs
61
+ ? void
62
+ : TArgs extends readonly [infer Arg]
63
+ ? Arg
64
+ : TArgs
65
65
 
66
66
  export type GetValue<
67
67
  TAbi extends Abi | readonly unknown[],
@@ -75,8 +75,8 @@ export type GetValue<
75
75
  ? TAbiFunction['stateMutability'] extends 'payable'
76
76
  ? { value?: NoUndefined<TValueType> }
77
77
  : TAbiFunction['payable'] extends true
78
- ? { value?: NoUndefined<TValueType> }
79
- : { value?: never }
78
+ ? { value?: NoUndefined<TValueType> }
79
+ : { value?: never }
80
80
  : { value?: TValueType }
81
81
 
82
82
  export type MaybeAbiEventName<TAbiEvent extends AbiEvent | undefined> =
@@ -170,10 +170,10 @@ export type GetFunctionArgs<
170
170
  args?: readonly unknown[]
171
171
  }
172
172
  : TArgs extends readonly []
173
- ? { args?: never }
174
- : {
175
- /** Arguments to pass contract method */ args: TArgs
176
- }
173
+ ? { args?: never }
174
+ : {
175
+ /** Arguments to pass contract method */ args: TArgs
176
+ }
177
177
 
178
178
  export type GetConstructorArgs<
179
179
  TAbi extends Abi | readonly unknown[],
@@ -194,10 +194,10 @@ export type GetConstructorArgs<
194
194
  args?: readonly unknown[]
195
195
  }
196
196
  : TArgs extends readonly []
197
- ? { args?: never }
198
- : {
199
- /** Arguments to pass contract constructor */ args: TArgs
200
- }
197
+ ? { args?: never }
198
+ : {
199
+ /** Arguments to pass contract constructor */ args: TArgs
200
+ }
201
201
 
202
202
  export type GetErrorArgs<
203
203
  TAbi extends Abi | readonly unknown[],
@@ -219,10 +219,10 @@ export type GetErrorArgs<
219
219
  args?: readonly unknown[]
220
220
  }
221
221
  : TArgs extends readonly []
222
- ? { args?: never }
223
- : {
224
- /** Arguments to pass contract method */ args: TArgs
225
- }
222
+ ? { args?: never }
223
+ : {
224
+ /** Arguments to pass contract method */ args: TArgs
225
+ }
226
226
 
227
227
  export type GetEventArgs<
228
228
  TAbi extends Abi | readonly unknown[],
@@ -296,10 +296,10 @@ export type LogTopicType<
296
296
  > = TTopic extends Hex
297
297
  ? TPrimitiveType
298
298
  : TTopic extends Hex[]
299
- ? TPrimitiveType[]
300
- : TTopic extends null
301
- ? null
302
- : never
299
+ ? TPrimitiveType[]
300
+ : TTopic extends null
301
+ ? null
302
+ : never
303
303
 
304
304
  /**
305
305
  * @internal
@@ -328,46 +328,45 @@ export type AbiEventParametersToPrimitiveTypes<
328
328
  > = TAbiParameters extends readonly []
329
329
  ? readonly []
330
330
  : Filter<
331
- TAbiParameters,
332
- Options['IndexedOnly'] extends true ? { indexed: true } : object
333
- > extends infer Filtered extends readonly AbiParameter[]
334
- ? _HasUnnamedAbiParameter<Filtered> extends true
335
- ? // Has unnamed tuple parameters so return as array
336
- | readonly [
337
- ...{
338
- [K in keyof Filtered]: AbiEventParameterToPrimitiveType<
339
- Filtered[K],
340
- Options
341
- >
342
- },
343
- ]
344
- // Distribute over tuple to represent optional parameters
345
- | (Options['Required'] extends true
346
- ? never
347
- : // Distribute over tuple to represent optional parameters
348
- Filtered extends readonly [
349
- ...infer Head extends readonly AbiParameter[],
350
- infer _,
351
- ]
352
- ? AbiEventParametersToPrimitiveTypes<
353
- readonly [...{ [K in keyof Head]: Omit<Head[K], 'name'> }],
354
- Options
355
- >
356
- : never)
357
- : // All tuple parameters are named so return as object
358
- {
359
- [Parameter in
360
- Filtered[number] as Parameter extends {
361
- name: infer Name extends string
362
- }
363
- ? Name
364
- : never]?: AbiEventParameterToPrimitiveType<Parameter, Options>
365
- } extends infer Mapped
366
- ? Prettify<
367
- MaybeRequired<
368
- Mapped,
369
- Options['Required'] extends boolean ? Options['Required'] : false
370
- >
371
- >
331
+ TAbiParameters,
332
+ Options['IndexedOnly'] extends true ? { indexed: true } : object
333
+ > extends infer Filtered extends readonly AbiParameter[]
334
+ ? _HasUnnamedAbiParameter<Filtered> extends true
335
+ ? // Has unnamed tuple parameters so return as array
336
+ | readonly [
337
+ ...{
338
+ [K in keyof Filtered]: AbiEventParameterToPrimitiveType<
339
+ Filtered[K],
340
+ Options
341
+ >
342
+ },
343
+ ]
344
+ // Distribute over tuple to represent optional parameters
345
+ | (Options['Required'] extends true
346
+ ? never
347
+ : // Distribute over tuple to represent optional parameters
348
+ Filtered extends readonly [
349
+ ...infer Head extends readonly AbiParameter[],
350
+ infer _,
351
+ ]
352
+ ? AbiEventParametersToPrimitiveTypes<
353
+ readonly [...{ [K in keyof Head]: Omit<Head[K], 'name'> }],
354
+ Options
355
+ >
356
+ : never)
357
+ : // All tuple parameters are named so return as object
358
+ {
359
+ [Parameter in Filtered[number] as Parameter extends {
360
+ name: infer Name extends string
361
+ }
362
+ ? Name
363
+ : never]?: AbiEventParameterToPrimitiveType<Parameter, Options>
364
+ } extends infer Mapped
365
+ ? Prettify<
366
+ MaybeRequired<
367
+ Mapped,
368
+ Options['Required'] extends boolean ? Options['Required'] : false
369
+ >
370
+ >
371
+ : never
372
372
  : never
373
- : never
package/types/filter.ts CHANGED
@@ -42,18 +42,18 @@ export type Filter<
42
42
  strict: TStrict
43
43
  }
44
44
  : TArgs extends MaybeExtractEventArgsFromAbi<TAbi, TEventName>
45
- ? {
46
- abi: TAbi
47
- args: TArgs
48
- eventName: TEventName
49
- strict: TStrict
50
- }
51
- : {
52
- abi: TAbi
53
- args?: never
54
- eventName: TEventName
55
- strict: TStrict
56
- }
45
+ ? {
46
+ abi: TAbi
47
+ args: TArgs
48
+ eventName: TEventName
49
+ strict: TStrict
50
+ }
51
+ : {
52
+ abi: TAbi
53
+ args?: never
54
+ eventName: TEventName
55
+ strict: TStrict
56
+ }
57
57
  : {
58
58
  abi?: never
59
59
  args?: never
package/types/log.ts CHANGED
@@ -75,10 +75,10 @@ type GetTopics<
75
75
  > = true extends _FailedToParseArgs
76
76
  ? [Hex, ...Hex[]] | []
77
77
  : TAbiEvent extends AbiEvent
78
- ? Topics<TAbiEvent['inputs']>
79
- : _AbiEvent extends AbiEvent
80
- ? Topics<_AbiEvent['inputs']>
81
- : [Hex, ...Hex[]] | []
78
+ ? Topics<TAbiEvent['inputs']>
79
+ : _AbiEvent extends AbiEvent
80
+ ? Topics<_AbiEvent['inputs']>
81
+ : [Hex, ...Hex[]] | []
82
82
 
83
83
  type GetInferredLogValues<
84
84
  TAbiEvent extends AbiEvent | undefined = undefined,
@@ -23,32 +23,37 @@ export type MulticallContracts<
23
23
  > = Depth['length'] extends MAXIMUM_DEPTH
24
24
  ? (ContractFunctionConfig & TProperties)[]
25
25
  : TContracts extends []
26
- ? []
27
- : TContracts extends [infer Head extends MulticallContract]
28
- ? [
29
- ...Result,
30
- ContractFunctionConfig<Head['abi'], Head['functionName']> & TProperties,
31
- ]
32
- : TContracts extends [
33
- infer Head extends MulticallContract,
34
- ...infer Tail extends readonly MulticallContract[],
35
- ]
36
- ? MulticallContracts<
37
- [...Tail],
38
- TProperties,
39
- [
40
- ...Result,
41
- ContractFunctionConfig<Head['abi'], Head['functionName']> & TProperties,
42
- ],
43
- [...Depth, 1]
44
- >
45
- : unknown[] extends TContracts
46
- ? TContracts
47
- : // If `TContracts` is *some* array but we couldn't assign `unknown[]` to it, then it must hold some known/homogenous type!
48
- // use this to infer the param types in the case of Array.map() argument
49
- TContracts extends ContractFunctionConfig<infer TAbi, infer TFunctionName>[]
50
- ? (ContractFunctionConfig<TAbi, TFunctionName> & TProperties)[]
51
- : (ContractFunctionConfig & TProperties)[]
26
+ ? []
27
+ : TContracts extends [infer Head extends MulticallContract]
28
+ ? [
29
+ ...Result,
30
+ ContractFunctionConfig<Head['abi'], Head['functionName']> &
31
+ TProperties,
32
+ ]
33
+ : TContracts extends [
34
+ infer Head extends MulticallContract,
35
+ ...infer Tail extends readonly MulticallContract[],
36
+ ]
37
+ ? MulticallContracts<
38
+ [...Tail],
39
+ TProperties,
40
+ [
41
+ ...Result,
42
+ ContractFunctionConfig<Head['abi'], Head['functionName']> &
43
+ TProperties,
44
+ ],
45
+ [...Depth, 1]
46
+ >
47
+ : unknown[] extends TContracts
48
+ ? TContracts
49
+ : // If `TContracts` is *some* array but we couldn't assign `unknown[]` to it, then it must hold some known/homogenous type!
50
+ // use this to infer the param types in the case of Array.map() argument
51
+ TContracts extends ContractFunctionConfig<
52
+ infer TAbi,
53
+ infer TFunctionName
54
+ >[]
55
+ ? (ContractFunctionConfig<TAbi, TFunctionName> & TProperties)[]
56
+ : (ContractFunctionConfig & TProperties)[]
52
57
 
53
58
  export type MulticallResult<
54
59
  Result,
@@ -75,34 +80,37 @@ export type MulticallResults<
75
80
  > = Depth['length'] extends MAXIMUM_DEPTH
76
81
  ? MulticallResult<ContractFunctionResult, TAllowFailure>[]
77
82
  : TContracts extends []
78
- ? []
79
- : TContracts extends [infer Head extends MulticallContract]
80
- ? [
81
- ...Result,
82
- MulticallResult<
83
- ContractFunctionResult<Head['abi'], Head['functionName']>,
84
- TAllowFailure
85
- >,
86
- ]
87
- : TContracts extends [
88
- infer Head extends MulticallContract,
89
- ...infer Tail extends readonly MulticallContract[],
90
- ]
91
- ? MulticallResults<
92
- [...Tail],
93
- TAllowFailure,
94
- [
95
- ...Result,
96
- MulticallResult<
97
- ContractFunctionResult<Head['abi'], Head['functionName']>,
98
- TAllowFailure
99
- >,
100
- ],
101
- [...Depth, 1]
102
- >
103
- : TContracts extends ContractFunctionConfig<infer TAbi, infer TFunctionName>[]
104
- ? MulticallResult<
105
- ContractFunctionResult<TAbi, TFunctionName>,
106
- TAllowFailure
107
- >[]
108
- : MulticallResult<ContractFunctionResult, TAllowFailure>[]
83
+ ? []
84
+ : TContracts extends [infer Head extends MulticallContract]
85
+ ? [
86
+ ...Result,
87
+ MulticallResult<
88
+ ContractFunctionResult<Head['abi'], Head['functionName']>,
89
+ TAllowFailure
90
+ >,
91
+ ]
92
+ : TContracts extends [
93
+ infer Head extends MulticallContract,
94
+ ...infer Tail extends readonly MulticallContract[],
95
+ ]
96
+ ? MulticallResults<
97
+ [...Tail],
98
+ TAllowFailure,
99
+ [
100
+ ...Result,
101
+ MulticallResult<
102
+ ContractFunctionResult<Head['abi'], Head['functionName']>,
103
+ TAllowFailure
104
+ >,
105
+ ],
106
+ [...Depth, 1]
107
+ >
108
+ : TContracts extends ContractFunctionConfig<
109
+ infer TAbi,
110
+ infer TFunctionName
111
+ >[]
112
+ ? MulticallResult<
113
+ ContractFunctionResult<TAbi, TFunctionName>,
114
+ TAllowFailure
115
+ >[]
116
+ : MulticallResult<ContractFunctionResult, TAllowFailure>[]
@@ -186,10 +186,10 @@ export type TransactionSerialized<TType extends TransactionType = 'legacy'> =
186
186
  TType extends 'eip1559'
187
187
  ? TransactionSerializedEIP1559
188
188
  : TType extends 'eip2930'
189
- ? TransactionSerializedEIP2930
190
- : TType extends 'legacy'
191
- ? TransactionSerializedLegacy
192
- : TransactionSerializedGeneric
189
+ ? TransactionSerializedEIP2930
190
+ : TType extends 'legacy'
191
+ ? TransactionSerializedLegacy
192
+ : TransactionSerializedGeneric
193
193
 
194
194
  export type TransactionSerializableBase<
195
195
  TQuantity = bigint,