viem 2.0.0-beta.3 → 2.0.0-beta.5

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 (1085) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/_cjs/accounts/generateMnemonic.js +9 -0
  3. package/_cjs/accounts/generateMnemonic.js.map +1 -0
  4. package/_cjs/accounts/generatePrivateKey.js +10 -0
  5. package/_cjs/accounts/generatePrivateKey.js.map +1 -0
  6. package/_cjs/accounts/hdKeyToAccount.js +16 -0
  7. package/_cjs/accounts/hdKeyToAccount.js.map +1 -0
  8. package/_cjs/accounts/index.js +52 -0
  9. package/_cjs/accounts/index.js.map +1 -0
  10. package/_cjs/accounts/mnemonicToAccount.js +12 -0
  11. package/_cjs/accounts/mnemonicToAccount.js.map +1 -0
  12. package/_cjs/accounts/privateKeyToAccount.js +33 -0
  13. package/_cjs/accounts/privateKeyToAccount.js.map +1 -0
  14. package/_cjs/accounts/toAccount.js +27 -0
  15. package/_cjs/accounts/toAccount.js.map +1 -0
  16. package/_cjs/accounts/types.js +3 -0
  17. package/_cjs/accounts/types.js.map +1 -0
  18. package/_cjs/accounts/utils/parseAccount.js +10 -0
  19. package/_cjs/accounts/utils/parseAccount.js.map +1 -0
  20. package/_cjs/accounts/utils/privateKeyToAddress.js +12 -0
  21. package/_cjs/accounts/utils/privateKeyToAddress.js.map +1 -0
  22. package/_cjs/accounts/utils/publicKeyToAddress.js +11 -0
  23. package/_cjs/accounts/utils/publicKeyToAddress.js.map +1 -0
  24. package/_cjs/accounts/utils/sign.js +15 -0
  25. package/_cjs/accounts/utils/sign.js.map +1 -0
  26. package/_cjs/accounts/utils/signMessage.js +12 -0
  27. package/_cjs/accounts/utils/signMessage.js.map +1 -0
  28. package/_cjs/accounts/utils/signTransaction.js +15 -0
  29. package/_cjs/accounts/utils/signTransaction.js.map +1 -0
  30. package/_cjs/accounts/utils/signTypedData.js +16 -0
  31. package/_cjs/accounts/utils/signTypedData.js.map +1 -0
  32. package/_cjs/actions/ens/getEnsAddress.js +63 -0
  33. package/_cjs/actions/ens/getEnsAddress.js.map +1 -0
  34. package/_cjs/actions/ens/getEnsAvatar.js +25 -0
  35. package/_cjs/actions/ens/getEnsAvatar.js.map +1 -0
  36. package/_cjs/actions/ens/getEnsName.js +41 -0
  37. package/_cjs/actions/ens/getEnsName.js.map +1 -0
  38. package/_cjs/actions/ens/getEnsResolver.js +39 -0
  39. package/_cjs/actions/ens/getEnsResolver.js.map +1 -0
  40. package/_cjs/actions/ens/getEnsText.js +57 -0
  41. package/_cjs/actions/ens/getEnsText.js.map +1 -0
  42. package/_cjs/actions/getContract.js +184 -0
  43. package/_cjs/actions/getContract.js.map +1 -0
  44. package/_cjs/actions/index.js +167 -0
  45. package/_cjs/actions/index.js.map +1 -0
  46. package/_cjs/actions/public/call.js +156 -0
  47. package/_cjs/actions/public/call.js.map +1 -0
  48. package/_cjs/actions/public/createBlockFilter.js +15 -0
  49. package/_cjs/actions/public/createBlockFilter.js.map +1 -0
  50. package/_cjs/actions/public/createContractEventFilter.js +41 -0
  51. package/_cjs/actions/public/createContractEventFilter.js.map +1 -0
  52. package/_cjs/actions/public/createEventFilter.js +48 -0
  53. package/_cjs/actions/public/createEventFilter.js.map +1 -0
  54. package/_cjs/actions/public/createPendingTransactionFilter.js +15 -0
  55. package/_cjs/actions/public/createPendingTransactionFilter.js.map +1 -0
  56. package/_cjs/actions/public/estimateContractGas.js +37 -0
  57. package/_cjs/actions/public/estimateContractGas.js.map +1 -0
  58. package/_cjs/actions/public/estimateFeesPerGas.js +62 -0
  59. package/_cjs/actions/public/estimateFeesPerGas.js.map +1 -0
  60. package/_cjs/actions/public/estimateGas.js +56 -0
  61. package/_cjs/actions/public/estimateGas.js.map +1 -0
  62. package/_cjs/actions/public/estimateMaxPriorityFeePerGas.js +45 -0
  63. package/_cjs/actions/public/estimateMaxPriorityFeePerGas.js.map +1 -0
  64. package/_cjs/actions/public/getBalance.js +14 -0
  65. package/_cjs/actions/public/getBalance.js.map +1 -0
  66. package/_cjs/actions/public/getBlock.js +30 -0
  67. package/_cjs/actions/public/getBlock.js.map +1 -0
  68. package/_cjs/actions/public/getBlockNumber.js +17 -0
  69. package/_cjs/actions/public/getBlockNumber.js.map +1 -0
  70. package/_cjs/actions/public/getBlockTransactionCount.js +24 -0
  71. package/_cjs/actions/public/getBlockTransactionCount.js.map +1 -0
  72. package/_cjs/actions/public/getBytecode.js +16 -0
  73. package/_cjs/actions/public/getBytecode.js.map +1 -0
  74. package/_cjs/actions/public/getChainId.js +12 -0
  75. package/_cjs/actions/public/getChainId.js.map +1 -0
  76. package/_cjs/actions/public/getContractEvents.js +27 -0
  77. package/_cjs/actions/public/getContractEvents.js.map +1 -0
  78. package/_cjs/actions/public/getFeeHistory.js +19 -0
  79. package/_cjs/actions/public/getFeeHistory.js.map +1 -0
  80. package/_cjs/actions/public/getFilterChanges.js +44 -0
  81. package/_cjs/actions/public/getFilterChanges.js.map +1 -0
  82. package/_cjs/actions/public/getFilterLogs.js +42 -0
  83. package/_cjs/actions/public/getFilterLogs.js.map +1 -0
  84. package/_cjs/actions/public/getGasPrice.js +11 -0
  85. package/_cjs/actions/public/getGasPrice.js.map +1 -0
  86. package/_cjs/actions/public/getLogs.js +73 -0
  87. package/_cjs/actions/public/getLogs.js.map +1 -0
  88. package/_cjs/actions/public/getProof.js +16 -0
  89. package/_cjs/actions/public/getProof.js.map +1 -0
  90. package/_cjs/actions/public/getStorageAt.js +14 -0
  91. package/_cjs/actions/public/getStorageAt.js.map +1 -0
  92. package/_cjs/actions/public/getTransaction.js +41 -0
  93. package/_cjs/actions/public/getTransaction.js.map +1 -0
  94. package/_cjs/actions/public/getTransactionConfirmations.js +18 -0
  95. package/_cjs/actions/public/getTransactionConfirmations.js.map +1 -0
  96. package/_cjs/actions/public/getTransactionCount.js +14 -0
  97. package/_cjs/actions/public/getTransactionCount.js.map +1 -0
  98. package/_cjs/actions/public/getTransactionReceipt.js +18 -0
  99. package/_cjs/actions/public/getTransactionReceipt.js.map +1 -0
  100. package/_cjs/actions/public/multicall.js +135 -0
  101. package/_cjs/actions/public/multicall.js.map +1 -0
  102. package/_cjs/actions/public/readContract.js +40 -0
  103. package/_cjs/actions/public/readContract.js.map +1 -0
  104. package/_cjs/actions/public/simulateContract.js +56 -0
  105. package/_cjs/actions/public/simulateContract.js.map +1 -0
  106. package/_cjs/actions/public/uninstallFilter.js +11 -0
  107. package/_cjs/actions/public/uninstallFilter.js.map +1 -0
  108. package/_cjs/actions/public/verifyHash.js +32 -0
  109. package/_cjs/actions/public/verifyHash.js.map +1 -0
  110. package/_cjs/actions/public/verifyMessage.js +16 -0
  111. package/_cjs/actions/public/verifyMessage.js.map +1 -0
  112. package/_cjs/actions/public/verifyTypedData.js +16 -0
  113. package/_cjs/actions/public/verifyTypedData.js.map +1 -0
  114. package/_cjs/actions/public/waitForTransactionReceipt.js +119 -0
  115. package/_cjs/actions/public/waitForTransactionReceipt.js.map +1 -0
  116. package/_cjs/actions/public/watchBlockNumber.js +78 -0
  117. package/_cjs/actions/public/watchBlockNumber.js.map +1 -0
  118. package/_cjs/actions/public/watchBlocks.js +90 -0
  119. package/_cjs/actions/public/watchBlocks.js.map +1 -0
  120. package/_cjs/actions/public/watchContractEvent.js +162 -0
  121. package/_cjs/actions/public/watchContractEvent.js.map +1 -0
  122. package/_cjs/actions/public/watchEvent.js +161 -0
  123. package/_cjs/actions/public/watchEvent.js.map +1 -0
  124. package/_cjs/actions/public/watchPendingTransactions.js +88 -0
  125. package/_cjs/actions/public/watchPendingTransactions.js.map +1 -0
  126. package/_cjs/actions/test/dropTransaction.js +11 -0
  127. package/_cjs/actions/test/dropTransaction.js.map +1 -0
  128. package/_cjs/actions/test/dumpState.js +10 -0
  129. package/_cjs/actions/test/dumpState.js.map +1 -0
  130. package/_cjs/actions/test/getAutomine.js +14 -0
  131. package/_cjs/actions/test/getAutomine.js.map +1 -0
  132. package/_cjs/actions/test/getTxpoolContent.js +10 -0
  133. package/_cjs/actions/test/getTxpoolContent.js.map +1 -0
  134. package/_cjs/actions/test/getTxpoolStatus.js +15 -0
  135. package/_cjs/actions/test/getTxpoolStatus.js.map +1 -0
  136. package/_cjs/actions/test/impersonateAccount.js +11 -0
  137. package/_cjs/actions/test/impersonateAccount.js.map +1 -0
  138. package/_cjs/actions/test/increaseTime.js +12 -0
  139. package/_cjs/actions/test/increaseTime.js.map +1 -0
  140. package/_cjs/actions/test/inspectTxpool.js +10 -0
  141. package/_cjs/actions/test/inspectTxpool.js.map +1 -0
  142. package/_cjs/actions/test/loadState.js +11 -0
  143. package/_cjs/actions/test/loadState.js.map +1 -0
  144. package/_cjs/actions/test/mine.js +18 -0
  145. package/_cjs/actions/test/mine.js.map +1 -0
  146. package/_cjs/actions/test/removeBlockTimestampInterval.js +10 -0
  147. package/_cjs/actions/test/removeBlockTimestampInterval.js.map +1 -0
  148. package/_cjs/actions/test/reset.js +11 -0
  149. package/_cjs/actions/test/reset.js.map +1 -0
  150. package/_cjs/actions/test/revert.js +11 -0
  151. package/_cjs/actions/test/revert.js.map +1 -0
  152. package/_cjs/actions/test/sendUnsignedTransaction.js +30 -0
  153. package/_cjs/actions/test/sendUnsignedTransaction.js.map +1 -0
  154. package/_cjs/actions/test/setAutomine.js +18 -0
  155. package/_cjs/actions/test/setAutomine.js.map +1 -0
  156. package/_cjs/actions/test/setBalance.js +18 -0
  157. package/_cjs/actions/test/setBalance.js.map +1 -0
  158. package/_cjs/actions/test/setBlockGasLimit.js +12 -0
  159. package/_cjs/actions/test/setBlockGasLimit.js.map +1 -0
  160. package/_cjs/actions/test/setBlockTimestampInterval.js +16 -0
  161. package/_cjs/actions/test/setBlockTimestampInterval.js.map +1 -0
  162. package/_cjs/actions/test/setCode.js +11 -0
  163. package/_cjs/actions/test/setCode.js.map +1 -0
  164. package/_cjs/actions/test/setCoinbase.js +11 -0
  165. package/_cjs/actions/test/setCoinbase.js.map +1 -0
  166. package/_cjs/actions/test/setIntervalMining.js +16 -0
  167. package/_cjs/actions/test/setIntervalMining.js.map +1 -0
  168. package/_cjs/actions/test/setLoggingEnabled.js +11 -0
  169. package/_cjs/actions/test/setLoggingEnabled.js.map +1 -0
  170. package/_cjs/actions/test/setMinGasPrice.js +12 -0
  171. package/_cjs/actions/test/setMinGasPrice.js.map +1 -0
  172. package/_cjs/actions/test/setNextBlockBaseFeePerGas.js +12 -0
  173. package/_cjs/actions/test/setNextBlockBaseFeePerGas.js.map +1 -0
  174. package/_cjs/actions/test/setNextBlockTimestamp.js +12 -0
  175. package/_cjs/actions/test/setNextBlockTimestamp.js.map +1 -0
  176. package/_cjs/actions/test/setNonce.js +12 -0
  177. package/_cjs/actions/test/setNonce.js.map +1 -0
  178. package/_cjs/actions/test/setRpcUrl.js +11 -0
  179. package/_cjs/actions/test/setRpcUrl.js.map +1 -0
  180. package/_cjs/actions/test/setStorageAt.js +16 -0
  181. package/_cjs/actions/test/setStorageAt.js.map +1 -0
  182. package/_cjs/actions/test/snapshot.js +10 -0
  183. package/_cjs/actions/test/snapshot.js.map +1 -0
  184. package/_cjs/actions/test/stopImpersonatingAccount.js +11 -0
  185. package/_cjs/actions/test/stopImpersonatingAccount.js.map +1 -0
  186. package/_cjs/actions/wallet/addChain.js +23 -0
  187. package/_cjs/actions/wallet/addChain.js.map +1 -0
  188. package/_cjs/actions/wallet/deployContract.js +15 -0
  189. package/_cjs/actions/wallet/deployContract.js.map +1 -0
  190. package/_cjs/actions/wallet/getAddresses.js +12 -0
  191. package/_cjs/actions/wallet/getAddresses.js.map +1 -0
  192. package/_cjs/actions/wallet/getPermissions.js +9 -0
  193. package/_cjs/actions/wallet/getPermissions.js.map +1 -0
  194. package/_cjs/actions/wallet/prepareTransactionRequest.js +71 -0
  195. package/_cjs/actions/wallet/prepareTransactionRequest.js.map +1 -0
  196. package/_cjs/actions/wallet/requestAddresses.js +10 -0
  197. package/_cjs/actions/wallet/requestAddresses.js.map +1 -0
  198. package/_cjs/actions/wallet/requestPermissions.js +11 -0
  199. package/_cjs/actions/wallet/requestPermissions.js.map +1 -0
  200. package/_cjs/actions/wallet/sendRawTransaction.js +11 -0
  201. package/_cjs/actions/wallet/sendRawTransaction.js.map +1 -0
  202. package/_cjs/actions/wallet/sendTransaction.js +87 -0
  203. package/_cjs/actions/wallet/sendTransaction.js.map +1 -0
  204. package/_cjs/actions/wallet/signMessage.js +28 -0
  205. package/_cjs/actions/wallet/signMessage.js.map +1 -0
  206. package/_cjs/actions/wallet/signTransaction.js +48 -0
  207. package/_cjs/actions/wallet/signTransaction.js.map +1 -0
  208. package/_cjs/actions/wallet/signTypedData.js +30 -0
  209. package/_cjs/actions/wallet/signTypedData.js.map +1 -0
  210. package/_cjs/actions/wallet/switchChain.js +16 -0
  211. package/_cjs/actions/wallet/switchChain.js.map +1 -0
  212. package/_cjs/actions/wallet/watchAsset.js +12 -0
  213. package/_cjs/actions/wallet/watchAsset.js.map +1 -0
  214. package/_cjs/actions/wallet/writeContract.js +18 -0
  215. package/_cjs/actions/wallet/writeContract.js.map +1 -0
  216. package/_cjs/chains/celo/chainConfig.js +10 -0
  217. package/_cjs/chains/celo/chainConfig.js.map +1 -0
  218. package/_cjs/chains/celo/formatters.js +82 -0
  219. package/_cjs/chains/celo/formatters.js.map +1 -0
  220. package/_cjs/chains/celo/index.js +10 -0
  221. package/_cjs/chains/celo/index.js.map +1 -0
  222. package/_cjs/chains/celo/parsers.js +131 -0
  223. package/_cjs/chains/celo/parsers.js.map +1 -0
  224. package/_cjs/chains/celo/serializers.js +131 -0
  225. package/_cjs/chains/celo/serializers.js.map +1 -0
  226. package/_cjs/chains/celo/types.js +3 -0
  227. package/_cjs/chains/celo/types.js.map +1 -0
  228. package/_cjs/chains/celo/utils.js +44 -0
  229. package/_cjs/chains/celo/utils.js.map +1 -0
  230. package/_cjs/chains/definitions/arbitrum.js +24 -0
  231. package/_cjs/chains/definitions/arbitrum.js.map +1 -0
  232. package/_cjs/chains/definitions/arbitrumGoerli.js +30 -0
  233. package/_cjs/chains/definitions/arbitrumGoerli.js.map +1 -0
  234. package/_cjs/chains/definitions/arbitrumNova.js +24 -0
  235. package/_cjs/chains/definitions/arbitrumNova.js.map +1 -0
  236. package/_cjs/chains/definitions/arbitrumSepolia.js +32 -0
  237. package/_cjs/chains/definitions/arbitrumSepolia.js.map +1 -0
  238. package/_cjs/chains/definitions/astar.js +29 -0
  239. package/_cjs/chains/definitions/astar.js.map +1 -0
  240. package/_cjs/chains/definitions/astarZkatana.js +42 -0
  241. package/_cjs/chains/definitions/astarZkatana.js.map +1 -0
  242. package/_cjs/chains/definitions/aurora.js +20 -0
  243. package/_cjs/chains/definitions/aurora.js.map +1 -0
  244. package/_cjs/chains/definitions/auroraTestnet.js +21 -0
  245. package/_cjs/chains/definitions/auroraTestnet.js.map +1 -0
  246. package/_cjs/chains/definitions/avalanche.js +26 -0
  247. package/_cjs/chains/definitions/avalanche.js.map +1 -0
  248. package/_cjs/chains/definitions/avalancheFuji.js +27 -0
  249. package/_cjs/chains/definitions/avalancheFuji.js.map +1 -0
  250. package/_cjs/chains/definitions/base.js +30 -0
  251. package/_cjs/chains/definitions/base.js.map +1 -0
  252. package/_cjs/chains/definitions/baseGoerli.js +30 -0
  253. package/_cjs/chains/definitions/baseGoerli.js.map +1 -0
  254. package/_cjs/chains/definitions/baseSepolia.js +34 -0
  255. package/_cjs/chains/definitions/baseSepolia.js.map +1 -0
  256. package/_cjs/chains/definitions/bearNetworkChainMainnet.js +20 -0
  257. package/_cjs/chains/definitions/bearNetworkChainMainnet.js.map +1 -0
  258. package/_cjs/chains/definitions/bearNetworkChainTestnet.js +24 -0
  259. package/_cjs/chains/definitions/bearNetworkChainTestnet.js.map +1 -0
  260. package/_cjs/chains/definitions/boba.js +26 -0
  261. package/_cjs/chains/definitions/boba.js.map +1 -0
  262. package/_cjs/chains/definitions/bronos.js +20 -0
  263. package/_cjs/chains/definitions/bronos.js.map +1 -0
  264. package/_cjs/chains/definitions/bronosTestnet.js +21 -0
  265. package/_cjs/chains/definitions/bronosTestnet.js.map +1 -0
  266. package/_cjs/chains/definitions/bsc.js +26 -0
  267. package/_cjs/chains/definitions/bsc.js.map +1 -0
  268. package/_cjs/chains/definitions/bscTestnet.js +27 -0
  269. package/_cjs/chains/definitions/bscTestnet.js.map +1 -0
  270. package/_cjs/chains/definitions/bxn.js +21 -0
  271. package/_cjs/chains/definitions/bxn.js.map +1 -0
  272. package/_cjs/chains/definitions/bxnTestnet.js +25 -0
  273. package/_cjs/chains/definitions/bxnTestnet.js.map +1 -0
  274. package/_cjs/chains/definitions/canto.js +29 -0
  275. package/_cjs/chains/definitions/canto.js.map +1 -0
  276. package/_cjs/chains/definitions/celo.js +32 -0
  277. package/_cjs/chains/definitions/celo.js.map +1 -0
  278. package/_cjs/chains/definitions/celoAlfajores.js +34 -0
  279. package/_cjs/chains/definitions/celoAlfajores.js.map +1 -0
  280. package/_cjs/chains/definitions/celoCannoli.js +34 -0
  281. package/_cjs/chains/definitions/celoCannoli.js.map +1 -0
  282. package/_cjs/chains/definitions/chiliz.js +26 -0
  283. package/_cjs/chains/definitions/chiliz.js.map +1 -0
  284. package/_cjs/chains/definitions/classic.js +23 -0
  285. package/_cjs/chains/definitions/classic.js.map +1 -0
  286. package/_cjs/chains/definitions/confluxESpace.js +27 -0
  287. package/_cjs/chains/definitions/confluxESpace.js.map +1 -0
  288. package/_cjs/chains/definitions/coreDao.js +27 -0
  289. package/_cjs/chains/definitions/coreDao.js.map +1 -0
  290. package/_cjs/chains/definitions/cronos.js +26 -0
  291. package/_cjs/chains/definitions/cronos.js.map +1 -0
  292. package/_cjs/chains/definitions/cronosTestnet.js +30 -0
  293. package/_cjs/chains/definitions/cronosTestnet.js.map +1 -0
  294. package/_cjs/chains/definitions/crossbell.js +28 -0
  295. package/_cjs/chains/definitions/crossbell.js.map +1 -0
  296. package/_cjs/chains/definitions/dfk.js +25 -0
  297. package/_cjs/chains/definitions/dfk.js.map +1 -0
  298. package/_cjs/chains/definitions/dogechain.js +23 -0
  299. package/_cjs/chains/definitions/dogechain.js.map +1 -0
  300. package/_cjs/chains/definitions/edgeware.js +26 -0
  301. package/_cjs/chains/definitions/edgeware.js.map +1 -0
  302. package/_cjs/chains/definitions/edgewareTestnet.js +23 -0
  303. package/_cjs/chains/definitions/edgewareTestnet.js.map +1 -0
  304. package/_cjs/chains/definitions/ekta.js +20 -0
  305. package/_cjs/chains/definitions/ekta.js.map +1 -0
  306. package/_cjs/chains/definitions/ektaTestnet.js +21 -0
  307. package/_cjs/chains/definitions/ektaTestnet.js.map +1 -0
  308. package/_cjs/chains/definitions/eon.js +24 -0
  309. package/_cjs/chains/definitions/eon.js.map +1 -0
  310. package/_cjs/chains/definitions/eos.js +29 -0
  311. package/_cjs/chains/definitions/eos.js.map +1 -0
  312. package/_cjs/chains/definitions/eosTestnet.js +30 -0
  313. package/_cjs/chains/definitions/eosTestnet.js.map +1 -0
  314. package/_cjs/chains/definitions/evmos.js +20 -0
  315. package/_cjs/chains/definitions/evmos.js.map +1 -0
  316. package/_cjs/chains/definitions/evmosTestnet.js +23 -0
  317. package/_cjs/chains/definitions/evmosTestnet.js.map +1 -0
  318. package/_cjs/chains/definitions/fantom.js +26 -0
  319. package/_cjs/chains/definitions/fantom.js.map +1 -0
  320. package/_cjs/chains/definitions/fantomTestnet.js +26 -0
  321. package/_cjs/chains/definitions/fantomTestnet.js.map +1 -0
  322. package/_cjs/chains/definitions/fibo.js +20 -0
  323. package/_cjs/chains/definitions/fibo.js.map +1 -0
  324. package/_cjs/chains/definitions/filecoin.js +20 -0
  325. package/_cjs/chains/definitions/filecoin.js.map +1 -0
  326. package/_cjs/chains/definitions/filecoinCalibration.js +20 -0
  327. package/_cjs/chains/definitions/filecoinCalibration.js.map +1 -0
  328. package/_cjs/chains/definitions/filecoinHyperspace.js +20 -0
  329. package/_cjs/chains/definitions/filecoinHyperspace.js.map +1 -0
  330. package/_cjs/chains/definitions/flare.js +23 -0
  331. package/_cjs/chains/definitions/flare.js.map +1 -0
  332. package/_cjs/chains/definitions/flareTestnet.js +24 -0
  333. package/_cjs/chains/definitions/flareTestnet.js.map +1 -0
  334. package/_cjs/chains/definitions/foundry.js +20 -0
  335. package/_cjs/chains/definitions/foundry.js.map +1 -0
  336. package/_cjs/chains/definitions/fuse.js +22 -0
  337. package/_cjs/chains/definitions/fuse.js.map +1 -0
  338. package/_cjs/chains/definitions/fuseSparknet.js +19 -0
  339. package/_cjs/chains/definitions/fuseSparknet.js.map +1 -0
  340. package/_cjs/chains/definitions/gnosis.js +32 -0
  341. package/_cjs/chains/definitions/gnosis.js.map +1 -0
  342. package/_cjs/chains/definitions/gnosisChiado.js +33 -0
  343. package/_cjs/chains/definitions/gnosisChiado.js.map +1 -0
  344. package/_cjs/chains/definitions/gobi.js +22 -0
  345. package/_cjs/chains/definitions/gobi.js.map +1 -0
  346. package/_cjs/chains/definitions/goerli.js +35 -0
  347. package/_cjs/chains/definitions/goerli.js.map +1 -0
  348. package/_cjs/chains/definitions/haqqMainnet.js +25 -0
  349. package/_cjs/chains/definitions/haqqMainnet.js.map +1 -0
  350. package/_cjs/chains/definitions/haqqTestedge2.js +25 -0
  351. package/_cjs/chains/definitions/haqqTestedge2.js.map +1 -0
  352. package/_cjs/chains/definitions/hardhat.js +17 -0
  353. package/_cjs/chains/definitions/hardhat.js.map +1 -0
  354. package/_cjs/chains/definitions/harmonyOne.js +26 -0
  355. package/_cjs/chains/definitions/harmonyOne.js.map +1 -0
  356. package/_cjs/chains/definitions/holesky.js +22 -0
  357. package/_cjs/chains/definitions/holesky.js.map +1 -0
  358. package/_cjs/chains/definitions/iotex.js +23 -0
  359. package/_cjs/chains/definitions/iotex.js.map +1 -0
  360. package/_cjs/chains/definitions/iotexTestnet.js +23 -0
  361. package/_cjs/chains/definitions/iotexTestnet.js.map +1 -0
  362. package/_cjs/chains/definitions/kava.js +29 -0
  363. package/_cjs/chains/definitions/kava.js.map +1 -0
  364. package/_cjs/chains/definitions/kavaTestnet.js +32 -0
  365. package/_cjs/chains/definitions/kavaTestnet.js.map +1 -0
  366. package/_cjs/chains/definitions/klaytn.js +20 -0
  367. package/_cjs/chains/definitions/klaytn.js.map +1 -0
  368. package/_cjs/chains/definitions/kroma.js +22 -0
  369. package/_cjs/chains/definitions/kroma.js.map +1 -0
  370. package/_cjs/chains/definitions/kromaSepolia.js +22 -0
  371. package/_cjs/chains/definitions/kromaSepolia.js.map +1 -0
  372. package/_cjs/chains/definitions/linea.js +29 -0
  373. package/_cjs/chains/definitions/linea.js.map +1 -0
  374. package/_cjs/chains/definitions/lineaTestnet.js +29 -0
  375. package/_cjs/chains/definitions/lineaTestnet.js.map +1 -0
  376. package/_cjs/chains/definitions/localhost.js +17 -0
  377. package/_cjs/chains/definitions/localhost.js.map +1 -0
  378. package/_cjs/chains/definitions/lukso.js +31 -0
  379. package/_cjs/chains/definitions/lukso.js.map +1 -0
  380. package/_cjs/chains/definitions/mainnet.js +34 -0
  381. package/_cjs/chains/definitions/mainnet.js.map +1 -0
  382. package/_cjs/chains/definitions/manta.js +35 -0
  383. package/_cjs/chains/definitions/manta.js.map +1 -0
  384. package/_cjs/chains/definitions/mantaTestnet.js +36 -0
  385. package/_cjs/chains/definitions/mantaTestnet.js.map +1 -0
  386. package/_cjs/chains/definitions/mantle.js +29 -0
  387. package/_cjs/chains/definitions/mantle.js.map +1 -0
  388. package/_cjs/chains/definitions/mantleTestnet.js +24 -0
  389. package/_cjs/chains/definitions/mantleTestnet.js.map +1 -0
  390. package/_cjs/chains/definitions/meter.js +20 -0
  391. package/_cjs/chains/definitions/meter.js.map +1 -0
  392. package/_cjs/chains/definitions/meterTestnet.js +23 -0
  393. package/_cjs/chains/definitions/meterTestnet.js.map +1 -0
  394. package/_cjs/chains/definitions/metis.js +29 -0
  395. package/_cjs/chains/definitions/metis.js.map +1 -0
  396. package/_cjs/chains/definitions/metisGoerli.js +29 -0
  397. package/_cjs/chains/definitions/metisGoerli.js.map +1 -0
  398. package/_cjs/chains/definitions/mev.js +31 -0
  399. package/_cjs/chains/definitions/mev.js.map +1 -0
  400. package/_cjs/chains/definitions/mevTestnet.js +32 -0
  401. package/_cjs/chains/definitions/mevTestnet.js.map +1 -0
  402. package/_cjs/chains/definitions/modeTestnet.js +28 -0
  403. package/_cjs/chains/definitions/modeTestnet.js.map +1 -0
  404. package/_cjs/chains/definitions/moonbaseAlpha.js +33 -0
  405. package/_cjs/chains/definitions/moonbaseAlpha.js.map +1 -0
  406. package/_cjs/chains/definitions/moonbeam.js +33 -0
  407. package/_cjs/chains/definitions/moonbeam.js.map +1 -0
  408. package/_cjs/chains/definitions/moonbeamDev.js +20 -0
  409. package/_cjs/chains/definitions/moonbeamDev.js.map +1 -0
  410. package/_cjs/chains/definitions/moonriver.js +33 -0
  411. package/_cjs/chains/definitions/moonriver.js.map +1 -0
  412. package/_cjs/chains/definitions/neonDevnet.js +28 -0
  413. package/_cjs/chains/definitions/neonDevnet.js.map +1 -0
  414. package/_cjs/chains/definitions/neonMainnet.js +27 -0
  415. package/_cjs/chains/definitions/neonMainnet.js.map +1 -0
  416. package/_cjs/chains/definitions/nexi.js +27 -0
  417. package/_cjs/chains/definitions/nexi.js.map +1 -0
  418. package/_cjs/chains/definitions/nexilix.js +26 -0
  419. package/_cjs/chains/definitions/nexilix.js.map +1 -0
  420. package/_cjs/chains/definitions/oasys.js +21 -0
  421. package/_cjs/chains/definitions/oasys.js.map +1 -0
  422. package/_cjs/chains/definitions/okc.js +26 -0
  423. package/_cjs/chains/definitions/okc.js.map +1 -0
  424. package/_cjs/chains/definitions/opBNB.js +26 -0
  425. package/_cjs/chains/definitions/opBNB.js.map +1 -0
  426. package/_cjs/chains/definitions/opBNBTestnet.js +27 -0
  427. package/_cjs/chains/definitions/opBNBTestnet.js.map +1 -0
  428. package/_cjs/chains/definitions/optimism.js +30 -0
  429. package/_cjs/chains/definitions/optimism.js.map +1 -0
  430. package/_cjs/chains/definitions/optimismGoerli.js +31 -0
  431. package/_cjs/chains/definitions/optimismGoerli.js.map +1 -0
  432. package/_cjs/chains/definitions/optimismSepolia.js +31 -0
  433. package/_cjs/chains/definitions/optimismSepolia.js.map +1 -0
  434. package/_cjs/chains/definitions/plinga.js +27 -0
  435. package/_cjs/chains/definitions/plinga.js.map +1 -0
  436. package/_cjs/chains/definitions/polygon.js +27 -0
  437. package/_cjs/chains/definitions/polygon.js.map +1 -0
  438. package/_cjs/chains/definitions/polygonMumbai.js +28 -0
  439. package/_cjs/chains/definitions/polygonMumbai.js.map +1 -0
  440. package/_cjs/chains/definitions/polygonZkEvm.js +27 -0
  441. package/_cjs/chains/definitions/polygonZkEvm.js.map +1 -0
  442. package/_cjs/chains/definitions/polygonZkEvmTestnet.js +28 -0
  443. package/_cjs/chains/definitions/polygonZkEvmTestnet.js.map +1 -0
  444. package/_cjs/chains/definitions/pulsechain.js +32 -0
  445. package/_cjs/chains/definitions/pulsechain.js.map +1 -0
  446. package/_cjs/chains/definitions/pulsechainV4.js +32 -0
  447. package/_cjs/chains/definitions/pulsechainV4.js.map +1 -0
  448. package/_cjs/chains/definitions/qMainnet.js +23 -0
  449. package/_cjs/chains/definitions/qMainnet.js.map +1 -0
  450. package/_cjs/chains/definitions/qTestnet.js +24 -0
  451. package/_cjs/chains/definitions/qTestnet.js.map +1 -0
  452. package/_cjs/chains/definitions/rollux.js +29 -0
  453. package/_cjs/chains/definitions/rollux.js.map +1 -0
  454. package/_cjs/chains/definitions/rolluxTestnet.js +32 -0
  455. package/_cjs/chains/definitions/rolluxTestnet.js.map +1 -0
  456. package/_cjs/chains/definitions/ronin.js +24 -0
  457. package/_cjs/chains/definitions/ronin.js.map +1 -0
  458. package/_cjs/chains/definitions/saigon.js +28 -0
  459. package/_cjs/chains/definitions/saigon.js.map +1 -0
  460. package/_cjs/chains/definitions/scroll.js +29 -0
  461. package/_cjs/chains/definitions/scroll.js.map +1 -0
  462. package/_cjs/chains/definitions/scrollSepolia.js +28 -0
  463. package/_cjs/chains/definitions/scrollSepolia.js.map +1 -0
  464. package/_cjs/chains/definitions/scrollTestnet.js +23 -0
  465. package/_cjs/chains/definitions/scrollTestnet.js.map +1 -0
  466. package/_cjs/chains/definitions/sepolia.js +33 -0
  467. package/_cjs/chains/definitions/sepolia.js.map +1 -0
  468. package/_cjs/chains/definitions/shardeumSphinx.js +22 -0
  469. package/_cjs/chains/definitions/shardeumSphinx.js.map +1 -0
  470. package/_cjs/chains/definitions/skale/brawl.js +23 -0
  471. package/_cjs/chains/definitions/skale/brawl.js.map +1 -0
  472. package/_cjs/chains/definitions/skale/calypso.js +30 -0
  473. package/_cjs/chains/definitions/skale/calypso.js.map +1 -0
  474. package/_cjs/chains/definitions/skale/calypsoTestnet.js +33 -0
  475. package/_cjs/chains/definitions/skale/calypsoTestnet.js.map +1 -0
  476. package/_cjs/chains/definitions/skale/chaosTestnet.js +33 -0
  477. package/_cjs/chains/definitions/skale/chaosTestnet.js.map +1 -0
  478. package/_cjs/chains/definitions/skale/cryptoBlades.js +25 -0
  479. package/_cjs/chains/definitions/skale/cryptoBlades.js.map +1 -0
  480. package/_cjs/chains/definitions/skale/cryptoColosseum.js +23 -0
  481. package/_cjs/chains/definitions/skale/cryptoColosseum.js.map +1 -0
  482. package/_cjs/chains/definitions/skale/europa.js +28 -0
  483. package/_cjs/chains/definitions/skale/europa.js.map +1 -0
  484. package/_cjs/chains/definitions/skale/europaTestnet.js +31 -0
  485. package/_cjs/chains/definitions/skale/europaTestnet.js.map +1 -0
  486. package/_cjs/chains/definitions/skale/exorde.js +23 -0
  487. package/_cjs/chains/definitions/skale/exorde.js.map +1 -0
  488. package/_cjs/chains/definitions/skale/humanProtocol.js +23 -0
  489. package/_cjs/chains/definitions/skale/humanProtocol.js.map +1 -0
  490. package/_cjs/chains/definitions/skale/nebula.js +28 -0
  491. package/_cjs/chains/definitions/skale/nebula.js.map +1 -0
  492. package/_cjs/chains/definitions/skale/nebulaTestnet.js +31 -0
  493. package/_cjs/chains/definitions/skale/nebulaTestnet.js.map +1 -0
  494. package/_cjs/chains/definitions/skale/razor.js +23 -0
  495. package/_cjs/chains/definitions/skale/razor.js.map +1 -0
  496. package/_cjs/chains/definitions/skale/titan.js +28 -0
  497. package/_cjs/chains/definitions/skale/titan.js.map +1 -0
  498. package/_cjs/chains/definitions/skale/titanTestnet.js +33 -0
  499. package/_cjs/chains/definitions/skale/titanTestnet.js.map +1 -0
  500. package/_cjs/chains/definitions/songbird.js +23 -0
  501. package/_cjs/chains/definitions/songbird.js.map +1 -0
  502. package/_cjs/chains/definitions/songbirdTestnet.js +24 -0
  503. package/_cjs/chains/definitions/songbirdTestnet.js.map +1 -0
  504. package/_cjs/chains/definitions/spicy.js +34 -0
  505. package/_cjs/chains/definitions/spicy.js.map +1 -0
  506. package/_cjs/chains/definitions/syscoin.js +29 -0
  507. package/_cjs/chains/definitions/syscoin.js.map +1 -0
  508. package/_cjs/chains/definitions/syscoinTestnet.js +29 -0
  509. package/_cjs/chains/definitions/syscoinTestnet.js.map +1 -0
  510. package/_cjs/chains/definitions/taikoJolnir.js +21 -0
  511. package/_cjs/chains/definitions/taikoJolnir.js.map +1 -0
  512. package/_cjs/chains/definitions/taikoTestnetSepolia.js +21 -0
  513. package/_cjs/chains/definitions/taikoTestnetSepolia.js.map +1 -0
  514. package/_cjs/chains/definitions/taraxa.js +21 -0
  515. package/_cjs/chains/definitions/taraxa.js.map +1 -0
  516. package/_cjs/chains/definitions/taraxaTestnet.js +22 -0
  517. package/_cjs/chains/definitions/taraxaTestnet.js.map +1 -0
  518. package/_cjs/chains/definitions/telos.js +29 -0
  519. package/_cjs/chains/definitions/telos.js.map +1 -0
  520. package/_cjs/chains/definitions/telosTestnet.js +24 -0
  521. package/_cjs/chains/definitions/telosTestnet.js.map +1 -0
  522. package/_cjs/chains/definitions/tenet.js +23 -0
  523. package/_cjs/chains/definitions/tenet.js.map +1 -0
  524. package/_cjs/chains/definitions/thunderTestnet.js +22 -0
  525. package/_cjs/chains/definitions/thunderTestnet.js.map +1 -0
  526. package/_cjs/chains/definitions/vechain.js +25 -0
  527. package/_cjs/chains/definitions/vechain.js.map +1 -0
  528. package/_cjs/chains/definitions/wanchain.js +30 -0
  529. package/_cjs/chains/definitions/wanchain.js.map +1 -0
  530. package/_cjs/chains/definitions/wanchainTestnet.js +28 -0
  531. package/_cjs/chains/definitions/wanchainTestnet.js.map +1 -0
  532. package/_cjs/chains/definitions/xdc.js +21 -0
  533. package/_cjs/chains/definitions/xdc.js.map +1 -0
  534. package/_cjs/chains/definitions/xdcTestnet.js +21 -0
  535. package/_cjs/chains/definitions/xdcTestnet.js.map +1 -0
  536. package/_cjs/chains/definitions/zetachainAthensTestnet.js +26 -0
  537. package/_cjs/chains/definitions/zetachainAthensTestnet.js.map +1 -0
  538. package/_cjs/chains/definitions/zhejiang.js +22 -0
  539. package/_cjs/chains/definitions/zhejiang.js.map +1 -0
  540. package/_cjs/chains/definitions/zkSync.js +34 -0
  541. package/_cjs/chains/definitions/zkSync.js.map +1 -0
  542. package/_cjs/chains/definitions/zkSyncTestnet.js +31 -0
  543. package/_cjs/chains/definitions/zkSyncTestnet.js.map +1 -0
  544. package/_cjs/chains/definitions/zora.js +32 -0
  545. package/_cjs/chains/definitions/zora.js.map +1 -0
  546. package/_cjs/chains/definitions/zoraSepolia.js +41 -0
  547. package/_cjs/chains/definitions/zoraSepolia.js.map +1 -0
  548. package/_cjs/chains/definitions/zoraTestnet.js +36 -0
  549. package/_cjs/chains/definitions/zoraTestnet.js.map +1 -0
  550. package/_cjs/chains/index.js +325 -0
  551. package/_cjs/chains/index.js.map +1 -0
  552. package/_cjs/chains/opStack/abis.js +77 -0
  553. package/_cjs/chains/opStack/abis.js.map +1 -0
  554. package/_cjs/chains/opStack/actions/estimateContractL1Fee.js +36 -0
  555. package/_cjs/chains/opStack/actions/estimateContractL1Fee.js.map +1 -0
  556. package/_cjs/chains/opStack/actions/estimateContractL1Gas.js +36 -0
  557. package/_cjs/chains/opStack/actions/estimateContractL1Gas.js.map +1 -0
  558. package/_cjs/chains/opStack/actions/estimateContractTotalFee.js +36 -0
  559. package/_cjs/chains/opStack/actions/estimateContractTotalFee.js.map +1 -0
  560. package/_cjs/chains/opStack/actions/estimateContractTotalGas.js +36 -0
  561. package/_cjs/chains/opStack/actions/estimateContractTotalGas.js.map +1 -0
  562. package/_cjs/chains/opStack/actions/estimateL1Fee.js +53 -0
  563. package/_cjs/chains/opStack/actions/estimateL1Fee.js.map +1 -0
  564. package/_cjs/chains/opStack/actions/estimateL1Gas.js +53 -0
  565. package/_cjs/chains/opStack/actions/estimateL1Gas.js.map +1 -0
  566. package/_cjs/chains/opStack/actions/estimateTotalFee.js +18 -0
  567. package/_cjs/chains/opStack/actions/estimateTotalFee.js.map +1 -0
  568. package/_cjs/chains/opStack/actions/estimateTotalGas.js +16 -0
  569. package/_cjs/chains/opStack/actions/estimateTotalGas.js.map +1 -0
  570. package/_cjs/chains/opStack/chainConfig.js +10 -0
  571. package/_cjs/chains/opStack/chainConfig.js.map +1 -0
  572. package/_cjs/chains/opStack/contracts.js +16 -0
  573. package/_cjs/chains/opStack/contracts.js.map +1 -0
  574. package/_cjs/chains/opStack/decorators/public.js +27 -0
  575. package/_cjs/chains/opStack/decorators/public.js.map +1 -0
  576. package/_cjs/chains/opStack/formatters.js +54 -0
  577. package/_cjs/chains/opStack/formatters.js.map +1 -0
  578. package/_cjs/chains/opStack/index.js +42 -0
  579. package/_cjs/chains/opStack/index.js.map +1 -0
  580. package/_cjs/chains/opStack/types.js +3 -0
  581. package/_cjs/chains/opStack/types.js.map +1 -0
  582. package/_cjs/chains/utils.js +12 -0
  583. package/_cjs/chains/utils.js.map +1 -0
  584. package/_cjs/chains/zksync/chainConfig.js +10 -0
  585. package/_cjs/chains/zksync/chainConfig.js.map +1 -0
  586. package/_cjs/chains/zksync/formatters.js +128 -0
  587. package/_cjs/chains/zksync/formatters.js.map +1 -0
  588. package/_cjs/chains/zksync/index.js +8 -0
  589. package/_cjs/chains/zksync/index.js.map +1 -0
  590. package/_cjs/chains/zksync/serializers.js +74 -0
  591. package/_cjs/chains/zksync/serializers.js.map +1 -0
  592. package/_cjs/chains/zksync/types.js +3 -0
  593. package/_cjs/chains/zksync/types.js.map +1 -0
  594. package/_cjs/clients/createClient.js +42 -0
  595. package/_cjs/clients/createClient.js.map +1 -0
  596. package/_cjs/clients/createPublicClient.js +17 -0
  597. package/_cjs/clients/createPublicClient.js.map +1 -0
  598. package/_cjs/clients/createTestClient.js +20 -0
  599. package/_cjs/clients/createTestClient.js.map +1 -0
  600. package/_cjs/clients/createWalletClient.js +18 -0
  601. package/_cjs/clients/createWalletClient.js.map +1 -0
  602. package/_cjs/clients/decorators/public.js +101 -0
  603. package/_cjs/clients/decorators/public.js.map +1 -0
  604. package/_cjs/clients/decorators/test.js +74 -0
  605. package/_cjs/clients/decorators/test.js.map +1 -0
  606. package/_cjs/clients/decorators/wallet.js +41 -0
  607. package/_cjs/clients/decorators/wallet.js.map +1 -0
  608. package/_cjs/clients/transports/createTransport.js +13 -0
  609. package/_cjs/clients/transports/createTransport.js.map +1 -0
  610. package/_cjs/clients/transports/custom.js +17 -0
  611. package/_cjs/clients/transports/custom.js.map +1 -0
  612. package/_cjs/clients/transports/fallback.js +122 -0
  613. package/_cjs/clients/transports/fallback.js.map +1 -0
  614. package/_cjs/clients/transports/http.js +59 -0
  615. package/_cjs/clients/transports/http.js.map +1 -0
  616. package/_cjs/clients/transports/webSocket.js +81 -0
  617. package/_cjs/clients/transports/webSocket.js.map +1 -0
  618. package/_cjs/constants/abis.js +1350 -0
  619. package/_cjs/constants/abis.js.map +1 -0
  620. package/_cjs/constants/address.js +5 -0
  621. package/_cjs/constants/address.js.map +1 -0
  622. package/_cjs/constants/bytes.js +5 -0
  623. package/_cjs/constants/bytes.js.map +1 -0
  624. package/_cjs/constants/contract.js +5 -0
  625. package/_cjs/constants/contract.js.map +1 -0
  626. package/_cjs/constants/contracts.js +5 -0
  627. package/_cjs/constants/contracts.js.map +1 -0
  628. package/_cjs/constants/number.js +101 -0
  629. package/_cjs/constants/number.js.map +1 -0
  630. package/_cjs/constants/solidity.js +35 -0
  631. package/_cjs/constants/solidity.js.map +1 -0
  632. package/_cjs/constants/strings.js +5 -0
  633. package/_cjs/constants/strings.js.map +1 -0
  634. package/_cjs/constants/unit.js +16 -0
  635. package/_cjs/constants/unit.js.map +1 -0
  636. package/_cjs/ens/index.js +20 -0
  637. package/_cjs/ens/index.js.map +1 -0
  638. package/_cjs/errors/abi.js +461 -0
  639. package/_cjs/errors/abi.js.map +1 -0
  640. package/_cjs/errors/account.js +23 -0
  641. package/_cjs/errors/account.js.map +1 -0
  642. package/_cjs/errors/address.js +17 -0
  643. package/_cjs/errors/address.js.map +1 -0
  644. package/_cjs/errors/base.js +83 -0
  645. package/_cjs/errors/base.js.map +1 -0
  646. package/_cjs/errors/block.js +22 -0
  647. package/_cjs/errors/block.js.map +1 -0
  648. package/_cjs/errors/ccip.js +69 -0
  649. package/_cjs/errors/ccip.js.map +1 -0
  650. package/_cjs/errors/chain.js +86 -0
  651. package/_cjs/errors/chain.js.map +1 -0
  652. package/_cjs/errors/contract.js +286 -0
  653. package/_cjs/errors/contract.js.map +1 -0
  654. package/_cjs/errors/cursor.js +29 -0
  655. package/_cjs/errors/cursor.js.map +1 -0
  656. package/_cjs/errors/data.js +31 -0
  657. package/_cjs/errors/data.js.map +1 -0
  658. package/_cjs/errors/encoding.js +65 -0
  659. package/_cjs/errors/encoding.js.map +1 -0
  660. package/_cjs/errors/ens.js +59 -0
  661. package/_cjs/errors/ens.js.map +1 -0
  662. package/_cjs/errors/estimateGas.js +49 -0
  663. package/_cjs/errors/estimateGas.js.map +1 -0
  664. package/_cjs/errors/fee.js +42 -0
  665. package/_cjs/errors/fee.js.map +1 -0
  666. package/_cjs/errors/log.js +17 -0
  667. package/_cjs/errors/log.js.map +1 -0
  668. package/_cjs/errors/node.js +262 -0
  669. package/_cjs/errors/node.js.map +1 -0
  670. package/_cjs/errors/request.js +107 -0
  671. package/_cjs/errors/request.js.map +1 -0
  672. package/_cjs/errors/rpc.js +448 -0
  673. package/_cjs/errors/rpc.js.map +1 -0
  674. package/_cjs/errors/transaction.js +225 -0
  675. package/_cjs/errors/transaction.js.map +1 -0
  676. package/_cjs/errors/transport.js +13 -0
  677. package/_cjs/errors/transport.js.map +1 -0
  678. package/_cjs/errors/version.js +1 -1
  679. package/_cjs/index.js +486 -0
  680. package/_cjs/index.js.map +1 -0
  681. package/_cjs/types/account.js +3 -0
  682. package/_cjs/types/account.js.map +1 -0
  683. package/_cjs/types/block.js +3 -0
  684. package/_cjs/types/block.js.map +1 -0
  685. package/_cjs/types/chain.js +3 -0
  686. package/_cjs/types/chain.js.map +1 -0
  687. package/_cjs/types/contract.js +3 -0
  688. package/_cjs/types/contract.js.map +1 -0
  689. package/_cjs/types/eip1193.js +24 -0
  690. package/_cjs/types/eip1193.js.map +1 -0
  691. package/_cjs/types/ens.js +3 -0
  692. package/_cjs/types/ens.js.map +1 -0
  693. package/_cjs/types/fee.js +3 -0
  694. package/_cjs/types/fee.js.map +1 -0
  695. package/_cjs/types/filter.js +3 -0
  696. package/_cjs/types/filter.js.map +1 -0
  697. package/_cjs/types/log.js +3 -0
  698. package/_cjs/types/log.js.map +1 -0
  699. package/_cjs/types/misc.js +3 -0
  700. package/_cjs/types/misc.js.map +1 -0
  701. package/_cjs/types/multicall.js +3 -0
  702. package/_cjs/types/multicall.js.map +1 -0
  703. package/_cjs/types/proof.js +3 -0
  704. package/_cjs/types/proof.js.map +1 -0
  705. package/_cjs/types/rpc.js +3 -0
  706. package/_cjs/types/rpc.js.map +1 -0
  707. package/_cjs/types/transaction.js +3 -0
  708. package/_cjs/types/transaction.js.map +1 -0
  709. package/_cjs/types/transport.js +3 -0
  710. package/_cjs/types/transport.js.map +1 -0
  711. package/_cjs/types/typedData.js +3 -0
  712. package/_cjs/types/typedData.js.map +1 -0
  713. package/_cjs/types/utils.js +3 -0
  714. package/_cjs/types/utils.js.map +1 -0
  715. package/_cjs/types/window.js +3 -0
  716. package/_cjs/types/window.js.map +1 -0
  717. package/_cjs/types/withdrawal.js +3 -0
  718. package/_cjs/types/withdrawal.js.map +1 -0
  719. package/_cjs/utils/abi/decodeAbiParameters.js +210 -0
  720. package/_cjs/utils/abi/decodeAbiParameters.js.map +1 -0
  721. package/_cjs/utils/abi/decodeDeployData.js +22 -0
  722. package/_cjs/utils/abi/decodeDeployData.js.map +1 -0
  723. package/_cjs/utils/abi/decodeErrorResult.js +30 -0
  724. package/_cjs/utils/abi/decodeErrorResult.js.map +1 -0
  725. package/_cjs/utils/abi/decodeEventLog.js +85 -0
  726. package/_cjs/utils/abi/decodeEventLog.js.map +1 -0
  727. package/_cjs/utils/abi/decodeFunctionData.js +28 -0
  728. package/_cjs/utils/abi/decodeFunctionData.js.map +1 -0
  729. package/_cjs/utils/abi/decodeFunctionResult.js +29 -0
  730. package/_cjs/utils/abi/decodeFunctionResult.js.map +1 -0
  731. package/_cjs/utils/abi/encodeAbiParameters.js +211 -0
  732. package/_cjs/utils/abi/encodeAbiParameters.js.map +1 -0
  733. package/_cjs/utils/abi/encodeDeployData.js +23 -0
  734. package/_cjs/utils/abi/encodeDeployData.js.map +1 -0
  735. package/_cjs/utils/abi/encodeErrorResult.js +33 -0
  736. package/_cjs/utils/abi/encodeErrorResult.js.map +1 -0
  737. package/_cjs/utils/abi/encodeEventTopics.js +53 -0
  738. package/_cjs/utils/abi/encodeEventTopics.js.map +1 -0
  739. package/_cjs/utils/abi/encodeFunctionData.js +34 -0
  740. package/_cjs/utils/abi/encodeFunctionData.js.map +1 -0
  741. package/_cjs/utils/abi/encodeFunctionResult.js +27 -0
  742. package/_cjs/utils/abi/encodeFunctionResult.js.map +1 -0
  743. package/_cjs/utils/abi/encodePacked.js +73 -0
  744. package/_cjs/utils/abi/encodePacked.js.map +1 -0
  745. package/_cjs/utils/abi/formatAbiItem.js +27 -0
  746. package/_cjs/utils/abi/formatAbiItem.js.map +1 -0
  747. package/_cjs/utils/abi/formatAbiItemWithArgs.js +17 -0
  748. package/_cjs/utils/abi/formatAbiItemWithArgs.js.map +1 -0
  749. package/_cjs/utils/abi/getAbiItem.js +84 -0
  750. package/_cjs/utils/abi/getAbiItem.js.map +1 -0
  751. package/_cjs/utils/accounts.js +8 -0
  752. package/_cjs/utils/accounts.js.map +1 -0
  753. package/_cjs/utils/address/getAddress.js +31 -0
  754. package/_cjs/utils/address/getAddress.js.map +1 -0
  755. package/_cjs/utils/address/getContractAddress.js +42 -0
  756. package/_cjs/utils/address/getContractAddress.js.map +1 -0
  757. package/_cjs/utils/address/isAddress.js +9 -0
  758. package/_cjs/utils/address/isAddress.js.map +1 -0
  759. package/_cjs/utils/address/isAddressEqual.js +14 -0
  760. package/_cjs/utils/address/isAddressEqual.js.map +1 -0
  761. package/_cjs/utils/buildRequest.js +93 -0
  762. package/_cjs/utils/buildRequest.js.map +1 -0
  763. package/_cjs/utils/ccip.js +121 -0
  764. package/_cjs/utils/ccip.js.map +1 -0
  765. package/_cjs/utils/chain/assertCurrentChain.js +12 -0
  766. package/_cjs/utils/chain/assertCurrentChain.js.map +1 -0
  767. package/_cjs/utils/chain/defineChain.js +13 -0
  768. package/_cjs/utils/chain/defineChain.js.map +1 -0
  769. package/_cjs/utils/chain/extractChain.js +8 -0
  770. package/_cjs/utils/chain/extractChain.js.map +1 -0
  771. package/_cjs/utils/chain/getChainContractAddress.js +26 -0
  772. package/_cjs/utils/chain/getChainContractAddress.js.map +1 -0
  773. package/_cjs/utils/cursor.js +134 -0
  774. package/_cjs/utils/cursor.js.map +1 -0
  775. package/_cjs/utils/data/concat.js +28 -0
  776. package/_cjs/utils/data/concat.js.map +1 -0
  777. package/_cjs/utils/data/isBytes.js +14 -0
  778. package/_cjs/utils/data/isBytes.js.map +1 -0
  779. package/_cjs/utils/data/isBytesEqual.js +13 -0
  780. package/_cjs/utils/data/isBytesEqual.js.map +1 -0
  781. package/_cjs/utils/data/isHex.js +12 -0
  782. package/_cjs/utils/data/isHex.js.map +1 -0
  783. package/_cjs/utils/data/pad.js +42 -0
  784. package/_cjs/utils/data/pad.js.map +1 -0
  785. package/_cjs/utils/data/size.js +11 -0
  786. package/_cjs/utils/data/size.js.map +1 -0
  787. package/_cjs/utils/data/slice.js +54 -0
  788. package/_cjs/utils/data/slice.js.map +1 -0
  789. package/_cjs/utils/data/trim.js +25 -0
  790. package/_cjs/utils/data/trim.js.map +1 -0
  791. package/_cjs/utils/encoding/fromBytes.js +56 -0
  792. package/_cjs/utils/encoding/fromBytes.js.map +1 -0
  793. package/_cjs/utils/encoding/fromHex.js +70 -0
  794. package/_cjs/utils/encoding/fromHex.js.map +1 -0
  795. package/_cjs/utils/encoding/fromRlp.js +67 -0
  796. package/_cjs/utils/encoding/fromRlp.js.map +1 -0
  797. package/_cjs/utils/encoding/toBytes.js +83 -0
  798. package/_cjs/utils/encoding/toBytes.js.map +1 -0
  799. package/_cjs/utils/encoding/toHex.js +79 -0
  800. package/_cjs/utils/encoding/toHex.js.map +1 -0
  801. package/_cjs/utils/encoding/toRlp.js +105 -0
  802. package/_cjs/utils/encoding/toRlp.js.map +1 -0
  803. package/_cjs/utils/ens/avatar/parseAvatarRecord.js +34 -0
  804. package/_cjs/utils/ens/avatar/parseAvatarRecord.js.map +1 -0
  805. package/_cjs/utils/ens/avatar/utils.js +186 -0
  806. package/_cjs/utils/ens/avatar/utils.js.map +1 -0
  807. package/_cjs/utils/ens/encodeLabelhash.js +8 -0
  808. package/_cjs/utils/ens/encodeLabelhash.js.map +1 -0
  809. package/_cjs/utils/ens/encodedLabelToLabelhash.js +18 -0
  810. package/_cjs/utils/ens/encodedLabelToLabelhash.js.map +1 -0
  811. package/_cjs/utils/ens/errors.js +24 -0
  812. package/_cjs/utils/ens/errors.js.map +1 -0
  813. package/_cjs/utils/ens/labelhash.js +15 -0
  814. package/_cjs/utils/ens/labelhash.js.map +1 -0
  815. package/_cjs/utils/ens/namehash.js +24 -0
  816. package/_cjs/utils/ens/namehash.js.map +1 -0
  817. package/_cjs/utils/ens/normalize.js +9 -0
  818. package/_cjs/utils/ens/normalize.js.map +1 -0
  819. package/_cjs/utils/ens/packetToBytes.js +27 -0
  820. package/_cjs/utils/ens/packetToBytes.js.map +1 -0
  821. package/_cjs/utils/errors/getCallError.js +20 -0
  822. package/_cjs/utils/errors/getCallError.js.map +1 -0
  823. package/_cjs/utils/errors/getContractError.js +39 -0
  824. package/_cjs/utils/errors/getContractError.js.map +1 -0
  825. package/_cjs/utils/errors/getEstimateGasError.js +20 -0
  826. package/_cjs/utils/errors/getEstimateGasError.js.map +1 -0
  827. package/_cjs/utils/errors/getNodeError.js +65 -0
  828. package/_cjs/utils/errors/getNodeError.js.map +1 -0
  829. package/_cjs/utils/errors/getTransactionError.js +20 -0
  830. package/_cjs/utils/errors/getTransactionError.js.map +1 -0
  831. package/_cjs/utils/filters/createFilterRequestScope.js +14 -0
  832. package/_cjs/utils/filters/createFilterRequestScope.js.map +1 -0
  833. package/_cjs/utils/formatters/block.js +32 -0
  834. package/_cjs/utils/formatters/block.js.map +1 -0
  835. package/_cjs/utils/formatters/extract.js +24 -0
  836. package/_cjs/utils/formatters/extract.js.map +1 -0
  837. package/_cjs/utils/formatters/feeHistory.js +13 -0
  838. package/_cjs/utils/formatters/feeHistory.js.map +1 -0
  839. package/_cjs/utils/formatters/formatter.js +25 -0
  840. package/_cjs/utils/formatters/formatter.js.map +1 -0
  841. package/_cjs/utils/formatters/log.js +18 -0
  842. package/_cjs/utils/formatters/log.js.map +1 -0
  843. package/_cjs/utils/formatters/proof.js +22 -0
  844. package/_cjs/utils/formatters/proof.js.map +1 -0
  845. package/_cjs/utils/formatters/transaction.js +66 -0
  846. package/_cjs/utils/formatters/transaction.js.map +1 -0
  847. package/_cjs/utils/formatters/transactionReceipt.js +47 -0
  848. package/_cjs/utils/formatters/transactionReceipt.js.map +1 -0
  849. package/_cjs/utils/formatters/transactionRequest.js +39 -0
  850. package/_cjs/utils/formatters/transactionRequest.js.map +1 -0
  851. package/_cjs/utils/getAction.js +8 -0
  852. package/_cjs/utils/getAction.js.map +1 -0
  853. package/_cjs/utils/hash/getEventSelector.js +10 -0
  854. package/_cjs/utils/hash/getEventSelector.js.map +1 -0
  855. package/_cjs/utils/hash/getEventSignature.js +9 -0
  856. package/_cjs/utils/hash/getEventSignature.js.map +1 -0
  857. package/_cjs/utils/hash/getFunctionSelector.js +11 -0
  858. package/_cjs/utils/hash/getFunctionSelector.js.map +1 -0
  859. package/_cjs/utils/hash/getFunctionSignature.js +15 -0
  860. package/_cjs/utils/hash/getFunctionSignature.js.map +1 -0
  861. package/_cjs/utils/hash/hashFunction.js +17 -0
  862. package/_cjs/utils/hash/hashFunction.js.map +1 -0
  863. package/_cjs/utils/hash/isHash.js +10 -0
  864. package/_cjs/utils/hash/isHash.js.map +1 -0
  865. package/_cjs/utils/hash/keccak256.js +16 -0
  866. package/_cjs/utils/hash/keccak256.js.map +1 -0
  867. package/_cjs/utils/hash/normalizeSignature.js +48 -0
  868. package/_cjs/utils/hash/normalizeSignature.js.map +1 -0
  869. package/_cjs/utils/index.js +213 -0
  870. package/_cjs/utils/index.js.map +1 -0
  871. package/_cjs/utils/observe.js +42 -0
  872. package/_cjs/utils/observe.js.map +1 -0
  873. package/_cjs/utils/poll.js +27 -0
  874. package/_cjs/utils/poll.js.map +1 -0
  875. package/_cjs/utils/promise/createBatchScheduler.js +49 -0
  876. package/_cjs/utils/promise/createBatchScheduler.js.map +1 -0
  877. package/_cjs/utils/promise/withCache.js +47 -0
  878. package/_cjs/utils/promise/withCache.js.map +1 -0
  879. package/_cjs/utils/promise/withRetry.js +29 -0
  880. package/_cjs/utils/promise/withRetry.js.map +1 -0
  881. package/_cjs/utils/promise/withTimeout.js +35 -0
  882. package/_cjs/utils/promise/withTimeout.js.map +1 -0
  883. package/_cjs/utils/regex.js +7 -0
  884. package/_cjs/utils/regex.js.map +1 -0
  885. package/_cjs/utils/rpc.js +154 -0
  886. package/_cjs/utils/rpc.js.map +1 -0
  887. package/_cjs/utils/signature/compactSignatureToHex.js +10 -0
  888. package/_cjs/utils/signature/compactSignatureToHex.js.map +1 -0
  889. package/_cjs/utils/signature/compactSignatureToSignature.js +15 -0
  890. package/_cjs/utils/signature/compactSignatureToSignature.js.map +1 -0
  891. package/_cjs/utils/signature/hashMessage.js +20 -0
  892. package/_cjs/utils/signature/hashMessage.js.map +1 -0
  893. package/_cjs/utils/signature/hashTypedData.js +124 -0
  894. package/_cjs/utils/signature/hashTypedData.js.map +1 -0
  895. package/_cjs/utils/signature/hexToCompactSignature.js +14 -0
  896. package/_cjs/utils/signature/hexToCompactSignature.js.map +1 -0
  897. package/_cjs/utils/signature/hexToSignature.js +12 -0
  898. package/_cjs/utils/signature/hexToSignature.js.map +1 -0
  899. package/_cjs/utils/signature/recoverAddress.js +10 -0
  900. package/_cjs/utils/signature/recoverAddress.js.map +1 -0
  901. package/_cjs/utils/signature/recoverMessageAddress.js +10 -0
  902. package/_cjs/utils/signature/recoverMessageAddress.js.map +1 -0
  903. package/_cjs/utils/signature/recoverPublicKey.js +21 -0
  904. package/_cjs/utils/signature/recoverPublicKey.js.map +1 -0
  905. package/_cjs/utils/signature/recoverTypedDataAddress.js +19 -0
  906. package/_cjs/utils/signature/recoverTypedDataAddress.js.map +1 -0
  907. package/_cjs/utils/signature/signatureToCompactSignature.js +17 -0
  908. package/_cjs/utils/signature/signatureToCompactSignature.js.map +1 -0
  909. package/_cjs/utils/signature/signatureToHex.js +11 -0
  910. package/_cjs/utils/signature/signatureToHex.js.map +1 -0
  911. package/_cjs/utils/signature/verifyMessage.js +11 -0
  912. package/_cjs/utils/signature/verifyMessage.js.map +1 -0
  913. package/_cjs/utils/signature/verifyTypedData.js +18 -0
  914. package/_cjs/utils/signature/verifyTypedData.js.map +1 -0
  915. package/_cjs/utils/stringify.js +9 -0
  916. package/_cjs/utils/stringify.js.map +1 -0
  917. package/_cjs/utils/transaction/assertRequest.js +28 -0
  918. package/_cjs/utils/transaction/assertRequest.js.map +1 -0
  919. package/_cjs/utils/transaction/assertTransaction.js +51 -0
  920. package/_cjs/utils/transaction/assertTransaction.js.map +1 -0
  921. package/_cjs/utils/transaction/getSerializedTransactionType.js +18 -0
  922. package/_cjs/utils/transaction/getSerializedTransactionType.js.map +1 -0
  923. package/_cjs/utils/transaction/getTransactionType.js +19 -0
  924. package/_cjs/utils/transaction/getTransactionType.js.map +1 -0
  925. package/_cjs/utils/transaction/parseTransaction.js +213 -0
  926. package/_cjs/utils/transaction/parseTransaction.js.map +1 -0
  927. package/_cjs/utils/transaction/serializeAccessList.js +26 -0
  928. package/_cjs/utils/transaction/serializeAccessList.js.map +1 -0
  929. package/_cjs/utils/transaction/serializeTransaction.js +123 -0
  930. package/_cjs/utils/transaction/serializeTransaction.js.map +1 -0
  931. package/_cjs/utils/typedData.js +75 -0
  932. package/_cjs/utils/typedData.js.map +1 -0
  933. package/_cjs/utils/uid.js +18 -0
  934. package/_cjs/utils/uid.js.map +1 -0
  935. package/_cjs/utils/unit/formatEther.js +10 -0
  936. package/_cjs/utils/unit/formatEther.js.map +1 -0
  937. package/_cjs/utils/unit/formatGwei.js +10 -0
  938. package/_cjs/utils/unit/formatGwei.js.map +1 -0
  939. package/_cjs/utils/unit/formatUnits.js +18 -0
  940. package/_cjs/utils/unit/formatUnits.js.map +1 -0
  941. package/_cjs/utils/unit/parseEther.js +10 -0
  942. package/_cjs/utils/unit/parseEther.js.map +1 -0
  943. package/_cjs/utils/unit/parseGwei.js +10 -0
  944. package/_cjs/utils/unit/parseGwei.js.map +1 -0
  945. package/_cjs/utils/unit/parseUnits.js +38 -0
  946. package/_cjs/utils/unit/parseUnits.js.map +1 -0
  947. package/_cjs/utils/wait.js +8 -0
  948. package/_cjs/utils/wait.js.map +1 -0
  949. package/_cjs/window/index.js +4 -0
  950. package/_cjs/window/index.js.map +1 -0
  951. package/_esm/actions/test/dumpState.js +26 -0
  952. package/_esm/actions/test/dumpState.js.map +1 -0
  953. package/_esm/actions/test/loadState.js +27 -0
  954. package/_esm/actions/test/loadState.js.map +1 -0
  955. package/_esm/chains/celo/formatters.js.map +1 -1
  956. package/_esm/chains/definitions/chiliz.js +23 -0
  957. package/_esm/chains/definitions/chiliz.js.map +1 -0
  958. package/_esm/chains/definitions/lukso.js +28 -0
  959. package/_esm/chains/definitions/lukso.js.map +1 -0
  960. package/_esm/chains/definitions/spicy.js +31 -0
  961. package/_esm/chains/definitions/spicy.js.map +1 -0
  962. package/_esm/chains/index.js +3 -0
  963. package/_esm/chains/index.js.map +1 -1
  964. package/_esm/chains/opStack/decorators/public.js +1 -1
  965. package/_esm/chains/opStack/decorators/public.js.map +1 -1
  966. package/_esm/chains/opStack/index.js +1 -1
  967. package/_esm/chains/opStack/index.js.map +1 -1
  968. package/_esm/clients/decorators/test.js +4 -0
  969. package/_esm/clients/decorators/test.js.map +1 -1
  970. package/_esm/constants/bytes.js +2 -0
  971. package/_esm/constants/bytes.js.map +1 -0
  972. package/_esm/constants/strings.js +2 -0
  973. package/_esm/constants/strings.js.map +1 -0
  974. package/_esm/errors/version.js +1 -1
  975. package/_esm/index.js +2 -0
  976. package/_esm/index.js.map +1 -1
  977. package/_esm/utils/formatters/transaction.js +19 -1
  978. package/_esm/utils/formatters/transaction.js.map +1 -1
  979. package/_esm/utils/signature/hashMessage.js +2 -1
  980. package/_esm/utils/signature/hashMessage.js.map +1 -1
  981. package/_esm/utils/transaction/serializeTransaction.js +20 -6
  982. package/_esm/utils/transaction/serializeTransaction.js.map +1 -1
  983. package/_types/actions/test/dumpState.d.ts +31 -0
  984. package/_types/actions/test/dumpState.d.ts.map +1 -0
  985. package/_types/actions/test/loadState.d.ts +34 -0
  986. package/_types/actions/test/loadState.d.ts.map +1 -0
  987. package/_types/chains/celo/chainConfig.d.ts +193 -163
  988. package/_types/chains/celo/chainConfig.d.ts.map +1 -1
  989. package/_types/chains/celo/formatters.d.ts +193 -163
  990. package/_types/chains/celo/formatters.d.ts.map +1 -1
  991. package/_types/chains/celo/types.d.ts +2 -0
  992. package/_types/chains/celo/types.d.ts.map +1 -1
  993. package/_types/chains/definitions/base.d.ts +149 -131
  994. package/_types/chains/definitions/base.d.ts.map +1 -1
  995. package/_types/chains/definitions/baseGoerli.d.ts +149 -131
  996. package/_types/chains/definitions/baseGoerli.d.ts.map +1 -1
  997. package/_types/chains/definitions/baseSepolia.d.ts +149 -131
  998. package/_types/chains/definitions/baseSepolia.d.ts.map +1 -1
  999. package/_types/chains/definitions/celo.d.ts +193 -163
  1000. package/_types/chains/definitions/celo.d.ts.map +1 -1
  1001. package/_types/chains/definitions/celoAlfajores.d.ts +193 -163
  1002. package/_types/chains/definitions/celoAlfajores.d.ts.map +1 -1
  1003. package/_types/chains/definitions/celoCannoli.d.ts +193 -163
  1004. package/_types/chains/definitions/celoCannoli.d.ts.map +1 -1
  1005. package/_types/chains/definitions/chiliz.d.ts +35 -0
  1006. package/_types/chains/definitions/chiliz.d.ts.map +1 -0
  1007. package/_types/chains/definitions/lukso.d.ts +40 -0
  1008. package/_types/chains/definitions/lukso.d.ts.map +1 -0
  1009. package/_types/chains/definitions/optimism.d.ts +149 -131
  1010. package/_types/chains/definitions/optimism.d.ts.map +1 -1
  1011. package/_types/chains/definitions/optimismGoerli.d.ts +149 -131
  1012. package/_types/chains/definitions/optimismGoerli.d.ts.map +1 -1
  1013. package/_types/chains/definitions/optimismSepolia.d.ts +149 -131
  1014. package/_types/chains/definitions/optimismSepolia.d.ts.map +1 -1
  1015. package/_types/chains/definitions/spicy.d.ts +36 -0
  1016. package/_types/chains/definitions/spicy.d.ts.map +1 -0
  1017. package/_types/chains/definitions/zkSync.d.ts +11 -0
  1018. package/_types/chains/definitions/zkSync.d.ts.map +1 -1
  1019. package/_types/chains/definitions/zkSyncTestnet.d.ts +11 -0
  1020. package/_types/chains/definitions/zkSyncTestnet.d.ts.map +1 -1
  1021. package/_types/chains/definitions/zora.d.ts +149 -131
  1022. package/_types/chains/definitions/zora.d.ts.map +1 -1
  1023. package/_types/chains/definitions/zoraSepolia.d.ts +149 -131
  1024. package/_types/chains/definitions/zoraSepolia.d.ts.map +1 -1
  1025. package/_types/chains/definitions/zoraTestnet.d.ts +149 -131
  1026. package/_types/chains/definitions/zoraTestnet.d.ts.map +1 -1
  1027. package/_types/chains/index.d.ts +5 -1
  1028. package/_types/chains/index.d.ts.map +1 -1
  1029. package/_types/chains/opStack/chainConfig.d.ts +145 -127
  1030. package/_types/chains/opStack/chainConfig.d.ts.map +1 -1
  1031. package/_types/chains/opStack/decorators/public.d.ts +18 -18
  1032. package/_types/chains/opStack/decorators/public.d.ts.map +1 -1
  1033. package/_types/chains/opStack/formatters.d.ts +145 -127
  1034. package/_types/chains/opStack/formatters.d.ts.map +1 -1
  1035. package/_types/chains/opStack/index.d.ts +1 -1
  1036. package/_types/chains/opStack/index.d.ts.map +1 -1
  1037. package/_types/chains/zksync/chainConfig.d.ts +11 -0
  1038. package/_types/chains/zksync/chainConfig.d.ts.map +1 -1
  1039. package/_types/chains/zksync/formatters.d.ts +11 -0
  1040. package/_types/chains/zksync/formatters.d.ts.map +1 -1
  1041. package/_types/clients/decorators/test.d.ts +41 -0
  1042. package/_types/clients/decorators/test.d.ts.map +1 -1
  1043. package/_types/constants/bytes.d.ts +2 -0
  1044. package/_types/constants/bytes.d.ts.map +1 -0
  1045. package/_types/constants/strings.d.ts +2 -0
  1046. package/_types/constants/strings.d.ts.map +1 -0
  1047. package/_types/errors/version.d.ts +1 -1
  1048. package/_types/index.d.ts +2 -0
  1049. package/_types/index.d.ts.map +1 -1
  1050. package/_types/types/eip1193.d.ts +16 -0
  1051. package/_types/types/eip1193.d.ts.map +1 -1
  1052. package/_types/types/rpc.d.ts +2 -2
  1053. package/_types/types/rpc.d.ts.map +1 -1
  1054. package/_types/types/transaction.d.ts +10 -1
  1055. package/_types/types/transaction.d.ts.map +1 -1
  1056. package/_types/types/utils.d.ts +16 -0
  1057. package/_types/types/utils.d.ts.map +1 -1
  1058. package/_types/utils/formatters/transaction.d.ts +1 -1
  1059. package/_types/utils/formatters/transaction.d.ts.map +1 -1
  1060. package/_types/utils/formatters/transactionRequest.d.ts +1 -1
  1061. package/_types/utils/signature/hashMessage.d.ts.map +1 -1
  1062. package/_types/utils/transaction/serializeTransaction.d.ts.map +1 -1
  1063. package/actions/test/dumpState.ts +44 -0
  1064. package/actions/test/loadState.ts +47 -0
  1065. package/chains/celo/formatters.ts +0 -1
  1066. package/chains/celo/types.ts +2 -0
  1067. package/chains/definitions/chiliz.ts +23 -0
  1068. package/chains/definitions/lukso.ts +28 -0
  1069. package/chains/definitions/spicy.ts +31 -0
  1070. package/chains/index.ts +21 -3
  1071. package/chains/opStack/decorators/public.ts +19 -19
  1072. package/chains/opStack/index.ts +1 -1
  1073. package/clients/decorators/test.ts +50 -0
  1074. package/constants/bytes.ts +2 -0
  1075. package/constants/strings.ts +1 -0
  1076. package/errors/version.ts +1 -1
  1077. package/index.ts +2 -0
  1078. package/package.json +34 -11
  1079. package/types/eip1193.ts +16 -0
  1080. package/types/rpc.ts +10 -5
  1081. package/types/transaction.ts +10 -1
  1082. package/types/utils.ts +20 -0
  1083. package/utils/formatters/transaction.ts +20 -3
  1084. package/utils/signature/hashMessage.ts +2 -1
  1085. package/utils/transaction/serializeTransaction.ts +18 -12
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createEventFilter = void 0;
4
+ const encodeEventTopics_js_1 = require("../../utils/abi/encodeEventTopics.js");
5
+ const toHex_js_1 = require("../../utils/encoding/toHex.js");
6
+ const createFilterRequestScope_js_1 = require("../../utils/filters/createFilterRequestScope.js");
7
+ async function createEventFilter(client, { address, args, event, events: events_, fromBlock, strict, toBlock, } = {}) {
8
+ const events = events_ ?? (event ? [event] : undefined);
9
+ const getRequest = (0, createFilterRequestScope_js_1.createFilterRequestScope)(client, {
10
+ method: 'eth_newFilter',
11
+ });
12
+ let topics = [];
13
+ if (events) {
14
+ topics = [
15
+ events.flatMap((event) => (0, encodeEventTopics_js_1.encodeEventTopics)({
16
+ abi: [event],
17
+ eventName: event.name,
18
+ args,
19
+ })),
20
+ ];
21
+ if (event)
22
+ topics = topics[0];
23
+ }
24
+ const id = await client.request({
25
+ method: 'eth_newFilter',
26
+ params: [
27
+ {
28
+ address,
29
+ fromBlock: typeof fromBlock === 'bigint' ? (0, toHex_js_1.numberToHex)(fromBlock) : fromBlock,
30
+ toBlock: typeof toBlock === 'bigint' ? (0, toHex_js_1.numberToHex)(toBlock) : toBlock,
31
+ ...(topics.length ? { topics } : {}),
32
+ },
33
+ ],
34
+ });
35
+ return {
36
+ abi: events,
37
+ args,
38
+ eventName: event ? event.name : undefined,
39
+ fromBlock,
40
+ id,
41
+ request: getRequest(id),
42
+ strict,
43
+ toBlock,
44
+ type: 'event',
45
+ };
46
+ }
47
+ exports.createEventFilter = createEventFilter;
48
+ //# sourceMappingURL=createEventFilter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createEventFilter.js","sourceRoot":"","sources":["../../../actions/public/createEventFilter.ts"],"names":[],"mappings":";;;AAcA,+EAI6C;AAE7C,4DAGsC;AACtC,iGAA0F;AAmHnF,KAAK,UAAU,iBAAiB,CAerC,MAAiC,EACjC,EACE,OAAO,EACP,IAAI,EACJ,KAAK,EACL,MAAM,EAAE,OAAO,EACf,SAAS,EACT,MAAM,EACN,OAAO,MASL,EAAS;IAYb,MAAM,MAAM,GAAG,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAA;IAEvD,MAAM,UAAU,GAAG,IAAA,sDAAwB,EAAC,MAAM,EAAE;QAClD,MAAM,EAAE,eAAe;KACxB,CAAC,CAAA;IAEF,IAAI,MAAM,GAAe,EAAE,CAAA;IAC3B,IAAI,MAAM,EAAE;QACV,MAAM,GAAG;YACN,MAAqB,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CACvC,IAAA,wCAAiB,EAAC;gBAChB,GAAG,EAAE,CAAC,KAAK,CAAC;gBACZ,SAAS,EAAG,KAAkB,CAAC,IAAI;gBACnC,IAAI;aAC0B,CAAC,CAClC;SACF,CAAA;QACD,IAAI,KAAK;YAAE,MAAM,GAAG,MAAM,CAAC,CAAC,CAAe,CAAA;KAC5C;IAED,MAAM,EAAE,GAAQ,MAAM,MAAM,CAAC,OAAO,CAAC;QACnC,MAAM,EAAE,eAAe;QACvB,MAAM,EAAE;YACN;gBACE,OAAO;gBACP,SAAS,EACP,OAAO,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAA,sBAAW,EAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS;gBACpE,OAAO,EAAE,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAA,sBAAW,EAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO;gBACrE,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aACrC;SACF;KACF,CAAC,CAAA;IAEF,OAAO;QACL,GAAG,EAAE,MAAM;QACX,IAAI;QACJ,SAAS,EAAE,KAAK,CAAC,CAAC,CAAE,KAAkB,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;QACvD,SAAS;QACT,EAAE;QACF,OAAO,EAAE,UAAU,CAAC,EAAE,CAAC;QACvB,MAAM;QACN,OAAO;QACP,IAAI,EAAE,OAAO;KASd,CAAA;AACH,CAAC;AAhGD,8CAgGC"}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createPendingTransactionFilter = void 0;
4
+ const createFilterRequestScope_js_1 = require("../../utils/filters/createFilterRequestScope.js");
5
+ async function createPendingTransactionFilter(client) {
6
+ const getRequest = (0, createFilterRequestScope_js_1.createFilterRequestScope)(client, {
7
+ method: 'eth_newPendingTransactionFilter',
8
+ });
9
+ const id = await client.request({
10
+ method: 'eth_newPendingTransactionFilter',
11
+ });
12
+ return { id, request: getRequest(id), type: 'transaction' };
13
+ }
14
+ exports.createPendingTransactionFilter = createPendingTransactionFilter;
15
+ //# sourceMappingURL=createPendingTransactionFilter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createPendingTransactionFilter.js","sourceRoot":"","sources":["../../../actions/public/createPendingTransactionFilter.ts"],"names":[],"mappings":";;;AAMA,iGAA0F;AA6BnF,KAAK,UAAU,8BAA8B,CAIlD,MAAkC;IAElC,MAAM,UAAU,GAAG,IAAA,sDAAwB,EAAC,MAAM,EAAE;QAClD,MAAM,EAAE,iCAAiC;KAC1C,CAAC,CAAA;IACF,MAAM,EAAE,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC;QAC9B,MAAM,EAAE,iCAAiC;KAC1C,CAAC,CAAA;IACF,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,CAAA;AAC7D,CAAC;AAbD,wEAaC"}
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.estimateContractGas = void 0;
4
+ const parseAccount_js_1 = require("../../accounts/utils/parseAccount.js");
5
+ const encodeFunctionData_js_1 = require("../../utils/abi/encodeFunctionData.js");
6
+ const getContractError_js_1 = require("../../utils/errors/getContractError.js");
7
+ const getAction_js_1 = require("../../utils/getAction.js");
8
+ const estimateGas_js_1 = require("./estimateGas.js");
9
+ async function estimateContractGas(client, parameters) {
10
+ const { abi, address, args, functionName, ...request } = parameters;
11
+ const data = (0, encodeFunctionData_js_1.encodeFunctionData)({
12
+ abi,
13
+ args,
14
+ functionName,
15
+ });
16
+ try {
17
+ const gas = await (0, getAction_js_1.getAction)(client, estimateGas_js_1.estimateGas)({
18
+ data,
19
+ to: address,
20
+ ...request,
21
+ });
22
+ return gas;
23
+ }
24
+ catch (error) {
25
+ const account = request.account ? (0, parseAccount_js_1.parseAccount)(request.account) : undefined;
26
+ throw (0, getContractError_js_1.getContractError)(error, {
27
+ abi,
28
+ address,
29
+ args,
30
+ docsPath: '/docs/contract/estimateContractGas',
31
+ functionName,
32
+ sender: account?.address,
33
+ });
34
+ }
35
+ }
36
+ exports.estimateContractGas = estimateContractGas;
37
+ //# sourceMappingURL=estimateContractGas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"estimateContractGas.js","sourceRoot":"","sources":["../../../actions/public/estimateContractGas.ts"],"names":[],"mappings":";;;AAGA,0EAG6C;AAY7C,iFAI8C;AAC9C,gFAG+C;AAC/C,2DAAoD;AACpD,qDAIyB;AA+DlB,KAAK,UAAU,mBAAmB,CAOvC,MAAyC,EACzC,UAMC;IAED,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,GAAG,OAAO,EAAE,GACpD,UAA2C,CAAA;IAC7C,MAAM,IAAI,GAAG,IAAA,0CAAkB,EAAC;QAC9B,GAAG;QACH,IAAI;QACJ,YAAY;KACmB,CAAC,CAAA;IAClC,IAAI;QACF,MAAM,GAAG,GAAG,MAAM,IAAA,wBAAS,EACzB,MAAM,EACN,4BAAW,CACZ,CAAC;YACA,IAAI;YACJ,EAAE,EAAE,OAAO;YACX,GAAG,OAAO;SACyB,CAAC,CAAA;QACtC,OAAO,GAAG,CAAA;KACX;IAAC,OAAO,KAAK,EAAE;QACd,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,IAAA,8BAAY,EAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;QAC3E,MAAM,IAAA,sCAAgB,EAAC,KAAkB,EAAE;YACzC,GAAG;YACH,OAAO;YACP,IAAI;YACJ,QAAQ,EAAE,oCAAoC;YAC9C,YAAY;YACZ,MAAM,EAAE,OAAO,EAAE,OAAO;SACzB,CAAC,CAAA;KACH;AACH,CAAC;AA5CD,kDA4CC"}
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.internal_estimateFeesPerGas = exports.estimateFeesPerGas = void 0;
4
+ const fee_js_1 = require("../../errors/fee.js");
5
+ const getAction_js_1 = require("../../utils/getAction.js");
6
+ const estimateMaxPriorityFeePerGas_js_1 = require("./estimateMaxPriorityFeePerGas.js");
7
+ const getBlock_js_1 = require("./getBlock.js");
8
+ const getGasPrice_js_1 = require("./getGasPrice.js");
9
+ async function estimateFeesPerGas(client, args) {
10
+ return internal_estimateFeesPerGas(client, args);
11
+ }
12
+ exports.estimateFeesPerGas = estimateFeesPerGas;
13
+ async function internal_estimateFeesPerGas(client, args) {
14
+ const { block: block_, chain = client.chain, request, type = 'eip1559', } = args || {};
15
+ const baseFeeMultiplier = await (async () => {
16
+ if (typeof chain?.fees?.baseFeeMultiplier === 'function')
17
+ return chain.fees.baseFeeMultiplier({
18
+ block: block_,
19
+ client,
20
+ request,
21
+ });
22
+ return chain?.fees?.baseFeeMultiplier ?? 1.2;
23
+ })();
24
+ if (baseFeeMultiplier < 1)
25
+ throw new fee_js_1.BaseFeeScalarError();
26
+ const decimals = baseFeeMultiplier.toString().split('.')[1]?.length ?? 0;
27
+ const denominator = 10 ** decimals;
28
+ const multiply = (base) => (base * BigInt(Math.ceil(baseFeeMultiplier * denominator))) /
29
+ BigInt(denominator);
30
+ const block = block_ ? block_ : await (0, getAction_js_1.getAction)(client, getBlock_js_1.getBlock)({});
31
+ if (typeof chain?.fees?.estimateFeesPerGas === 'function')
32
+ return chain.fees.estimateFeesPerGas({
33
+ block: block_,
34
+ client,
35
+ multiply,
36
+ request,
37
+ type,
38
+ });
39
+ if (type === 'eip1559') {
40
+ if (typeof block.baseFeePerGas !== 'bigint')
41
+ throw new fee_js_1.Eip1559FeesNotSupportedError();
42
+ const maxPriorityFeePerGas = request?.maxPriorityFeePerGas
43
+ ? request.maxPriorityFeePerGas
44
+ : await (0, estimateMaxPriorityFeePerGas_js_1.internal_estimateMaxPriorityFeePerGas)(client, {
45
+ block,
46
+ chain,
47
+ request,
48
+ });
49
+ const baseFeePerGas = multiply(block.baseFeePerGas);
50
+ const maxFeePerGas = request?.maxFeePerGas ?? baseFeePerGas + maxPriorityFeePerGas;
51
+ return {
52
+ maxFeePerGas,
53
+ maxPriorityFeePerGas,
54
+ };
55
+ }
56
+ const gasPrice = request?.gasPrice ?? multiply(await (0, getAction_js_1.getAction)(client, getGasPrice_js_1.getGasPrice)({}));
57
+ return {
58
+ gasPrice,
59
+ };
60
+ }
61
+ exports.internal_estimateFeesPerGas = internal_estimateFeesPerGas;
62
+ //# sourceMappingURL=estimateFeesPerGas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"estimateFeesPerGas.js","sourceRoot":"","sources":["../../../actions/public/estimateFeesPerGas.ts"],"names":[],"mappings":";;;AAEA,gDAK4B;AAc5B,2DAAoD;AAEpD,uFAG0C;AAC1C,+CAAwC;AACxC,qDAAyE;AAsDlE,KAAK,UAAU,kBAAkB,CAKtC,MAAgC,EAChC,IAA+D;IAE/D,OAAO,2BAA2B,CAAC,MAAM,EAAE,IAAW,CAAC,CAAA;AACzD,CAAC;AATD,gDASC;AAEM,KAAK,UAAU,2BAA2B,CAK/C,MAAgC,EAChC,IAGC;IAED,MAAM,EACJ,KAAK,EAAE,MAAM,EACb,KAAK,GAAG,MAAM,CAAC,KAAK,EACpB,OAAO,EACP,IAAI,GAAG,SAAS,GACjB,GAAG,IAAI,IAAI,EAAE,CAAA;IAEd,MAAM,iBAAiB,GAAG,MAAM,CAAC,KAAK,IAAI,EAAE;QAC1C,IAAI,OAAO,KAAK,EAAE,IAAI,EAAE,iBAAiB,KAAK,UAAU;YACtD,OAAO,KAAK,CAAC,IAAI,CAAC,iBAAiB,CAAC;gBAClC,KAAK,EAAE,MAAe;gBACtB,MAAM;gBACN,OAAO;aACiB,CAAC,CAAA;QAC7B,OAAO,KAAK,EAAE,IAAI,EAAE,iBAAiB,IAAI,GAAG,CAAA;IAC9C,CAAC,CAAC,EAAE,CAAA;IACJ,IAAI,iBAAiB,GAAG,CAAC;QAAE,MAAM,IAAI,2BAAkB,EAAE,CAAA;IAEzD,MAAM,QAAQ,GAAG,iBAAiB,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,IAAI,CAAC,CAAA;IACxE,MAAM,WAAW,GAAG,EAAE,IAAI,QAAQ,CAAA;IAClC,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,EAAE,CAChC,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,iBAAiB,GAAG,WAAW,CAAC,CAAC,CAAC;QAC3D,MAAM,CAAC,WAAW,CAAC,CAAA;IAErB,MAAM,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,IAAA,wBAAS,EAAC,MAAM,EAAE,sBAAQ,CAAC,CAAC,EAAE,CAAC,CAAA;IAErE,IAAI,OAAO,KAAK,EAAE,IAAI,EAAE,kBAAkB,KAAK,UAAU;QACvD,OAAO,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC;YACnC,KAAK,EAAE,MAAe;YACtB,MAAM;YACN,QAAQ;YACR,OAAO;YACP,IAAI;SACkC,CAAkD,CAAA;IAE5F,IAAI,IAAI,KAAK,SAAS,EAAE;QACtB,IAAI,OAAO,KAAK,CAAC,aAAa,KAAK,QAAQ;YACzC,MAAM,IAAI,qCAA4B,EAAE,CAAA;QAE1C,MAAM,oBAAoB,GAAG,OAAO,EAAE,oBAAoB;YACxD,CAAC,CAAC,OAAO,CAAC,oBAAoB;YAC9B,CAAC,CAAC,MAAM,IAAA,uEAAqC,EACzC,MAAkC,EAClC;gBACE,KAAK;gBACL,KAAK;gBACL,OAAO;aACR,CACF,CAAA;QAEL,MAAM,aAAa,GAAG,QAAQ,CAAC,KAAK,CAAC,aAAa,CAAC,CAAA;QACnD,MAAM,YAAY,GAChB,OAAO,EAAE,YAAY,IAAI,aAAa,GAAG,oBAAoB,CAAA;QAE/D,OAAO;YACL,YAAY;YACZ,oBAAoB;SACiB,CAAA;KACxC;IAED,MAAM,QAAQ,GACZ,OAAO,EAAE,QAAQ,IAAI,QAAQ,CAAC,MAAM,IAAA,wBAAS,EAAC,MAAM,EAAE,4BAAW,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IACzE,OAAO;QACL,QAAQ;KAC6B,CAAA;AACzC,CAAC;AA5ED,kEA4EC"}
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.estimateGas = void 0;
4
+ const parseAccount_js_1 = require("../../accounts/utils/parseAccount.js");
5
+ const account_js_1 = require("../../errors/account.js");
6
+ const toHex_js_1 = require("../../utils/encoding/toHex.js");
7
+ const getEstimateGasError_js_1 = require("../../utils/errors/getEstimateGasError.js");
8
+ const extract_js_1 = require("../../utils/formatters/extract.js");
9
+ const transactionRequest_js_1 = require("../../utils/formatters/transactionRequest.js");
10
+ const assertRequest_js_1 = require("../../utils/transaction/assertRequest.js");
11
+ const prepareTransactionRequest_js_1 = require("../wallet/prepareTransactionRequest.js");
12
+ async function estimateGas(client, args) {
13
+ const account_ = args.account ?? client.account;
14
+ if (!account_)
15
+ throw new account_js_1.AccountNotFoundError({
16
+ docsPath: '/docs/actions/public/estimateGas',
17
+ });
18
+ const account = (0, parseAccount_js_1.parseAccount)(account_);
19
+ try {
20
+ const { accessList, blockNumber, blockTag, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, ...rest } = account.type === 'local'
21
+ ? (await (0, prepareTransactionRequest_js_1.prepareTransactionRequest)(client, args))
22
+ : args;
23
+ const blockNumberHex = blockNumber ? (0, toHex_js_1.numberToHex)(blockNumber) : undefined;
24
+ const block = blockNumberHex || blockTag;
25
+ (0, assertRequest_js_1.assertRequest)(args);
26
+ const chainFormat = client.chain?.formatters?.transactionRequest?.format;
27
+ const format = chainFormat || transactionRequest_js_1.formatTransactionRequest;
28
+ const request = format({
29
+ ...(0, extract_js_1.extract)(rest, { format: chainFormat }),
30
+ from: account.address,
31
+ accessList,
32
+ data,
33
+ gas,
34
+ gasPrice,
35
+ maxFeePerGas,
36
+ maxPriorityFeePerGas,
37
+ nonce,
38
+ to,
39
+ value,
40
+ });
41
+ const balance = await client.request({
42
+ method: 'eth_estimateGas',
43
+ params: block ? [request, block] : [request],
44
+ });
45
+ return BigInt(balance);
46
+ }
47
+ catch (err) {
48
+ throw (0, getEstimateGasError_js_1.getEstimateGasError)(err, {
49
+ ...args,
50
+ account,
51
+ chain: client.chain,
52
+ });
53
+ }
54
+ }
55
+ exports.estimateGas = estimateGas;
56
+ //# sourceMappingURL=estimateGas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"estimateGas.js","sourceRoot":"","sources":["../../../actions/public/estimateGas.ts"],"names":[],"mappings":";;;AACA,0EAG6C;AAG7C,wDAA8D;AAQ9D,4DAGsC;AACtC,sFAGkD;AAClD,kEAA2D;AAC3D,wFAGqD;AACrD,+EAIiD;AACjD,yFAG+C;AA6DxC,KAAK,UAAU,WAAW,CAI/B,MAA2C,EAC3C,IAA6C;IAE7C,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,CAAA;IAC/C,IAAI,CAAC,QAAQ;QACX,MAAM,IAAI,iCAAoB,CAAC;YAC7B,QAAQ,EAAE,kCAAkC;SAC7C,CAAC,CAAA;IACJ,MAAM,OAAO,GAAG,IAAA,8BAAY,EAAC,QAAQ,CAAC,CAAA;IAEtC,IAAI;QACF,MAAM,EACJ,UAAU,EACV,WAAW,EACX,QAAQ,EACR,IAAI,EACJ,GAAG,EACH,QAAQ,EACR,YAAY,EACZ,oBAAoB,EACpB,KAAK,EACL,EAAE,EACF,KAAK,EACL,GAAG,IAAI,EACR,GACC,OAAO,CAAC,IAAI,KAAK,OAAO;YACtB,CAAC,CAAE,CAAC,MAAM,IAAA,wDAAyB,EAC/B,MAAM,EACN,IAA2C,CAC5C,CAA2B;YAC9B,CAAC,CAAC,IAAI,CAAA;QAEV,MAAM,cAAc,GAAG,WAAW,CAAC,CAAC,CAAC,IAAA,sBAAW,EAAC,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;QACzE,MAAM,KAAK,GAAG,cAAc,IAAI,QAAQ,CAAA;QAExC,IAAA,gCAAa,EAAC,IAA+B,CAAC,CAAA;QAE9C,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,CAAA;QACxE,MAAM,MAAM,GAAG,WAAW,IAAI,gDAAwB,CAAA;QAEtD,MAAM,OAAO,GAAG,MAAM,CAAC;YAErB,GAAG,IAAA,oBAAO,EAAC,IAAI,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;YACzC,IAAI,EAAE,OAAO,CAAC,OAAO;YACrB,UAAU;YACV,IAAI;YACJ,GAAG;YACH,QAAQ;YACR,YAAY;YACZ,oBAAoB;YACpB,KAAK;YACL,EAAE;YACF,KAAK;SACgB,CAAC,CAAA;QAExB,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC;YACnC,MAAM,EAAE,iBAAiB;YACzB,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;SAC7C,CAAC,CAAA;QACF,OAAO,MAAM,CAAC,OAAO,CAAC,CAAA;KACvB;IAAC,OAAO,GAAG,EAAE;QACZ,MAAM,IAAA,4CAAmB,EAAC,GAAgB,EAAE;YAC1C,GAAG,IAAI;YACP,OAAO;YACP,KAAK,EAAE,MAAM,CAAC,KAAK;SACpB,CAAC,CAAA;KACH;AACH,CAAC;AAvED,kCAuEC"}
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.internal_estimateMaxPriorityFeePerGas = exports.estimateMaxPriorityFeePerGas = void 0;
4
+ const fee_js_1 = require("../../errors/fee.js");
5
+ const fromHex_js_1 = require("../../utils/encoding/fromHex.js");
6
+ const getAction_js_1 = require("../../utils/getAction.js");
7
+ const getBlock_js_1 = require("./getBlock.js");
8
+ const getGasPrice_js_1 = require("./getGasPrice.js");
9
+ async function estimateMaxPriorityFeePerGas(client, args) {
10
+ return internal_estimateMaxPriorityFeePerGas(client, args);
11
+ }
12
+ exports.estimateMaxPriorityFeePerGas = estimateMaxPriorityFeePerGas;
13
+ async function internal_estimateMaxPriorityFeePerGas(client, args) {
14
+ const { block: block_, chain = client.chain, request } = args || {};
15
+ if (typeof chain?.fees?.defaultPriorityFee === 'function') {
16
+ const block = block_ || (await (0, getAction_js_1.getAction)(client, getBlock_js_1.getBlock)({}));
17
+ return chain.fees.defaultPriorityFee({
18
+ block,
19
+ client,
20
+ request,
21
+ });
22
+ }
23
+ else if (typeof chain?.fees?.defaultPriorityFee !== 'undefined')
24
+ return chain?.fees?.defaultPriorityFee;
25
+ try {
26
+ const maxPriorityFeePerGasHex = await client.request({
27
+ method: 'eth_maxPriorityFeePerGas',
28
+ });
29
+ return (0, fromHex_js_1.hexToBigInt)(maxPriorityFeePerGasHex);
30
+ }
31
+ catch {
32
+ const [block, gasPrice] = await Promise.all([
33
+ block_ ? Promise.resolve(block_) : (0, getAction_js_1.getAction)(client, getBlock_js_1.getBlock)({}),
34
+ (0, getAction_js_1.getAction)(client, getGasPrice_js_1.getGasPrice)({}),
35
+ ]);
36
+ if (typeof block.baseFeePerGas !== 'bigint')
37
+ throw new fee_js_1.Eip1559FeesNotSupportedError();
38
+ const maxPriorityFeePerGas = gasPrice - block.baseFeePerGas;
39
+ if (maxPriorityFeePerGas < 0n)
40
+ return 0n;
41
+ return maxPriorityFeePerGas;
42
+ }
43
+ }
44
+ exports.internal_estimateMaxPriorityFeePerGas = internal_estimateMaxPriorityFeePerGas;
45
+ //# sourceMappingURL=estimateMaxPriorityFeePerGas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"estimateMaxPriorityFeePerGas.js","sourceRoot":"","sources":["../../../actions/public/estimateMaxPriorityFeePerGas.ts"],"names":[],"mappings":";;;AAEA,gDAG4B;AAO5B,gEAGwC;AACxC,2DAAoD;AAEpD,+CAAgE;AAChE,qDAAyE;AAwClE,KAAK,UAAU,4BAA4B,CAIhD,MAAgC,EAChC,IAAmE;IAEnE,OAAO,qCAAqC,CAAC,MAAM,EAAE,IAAW,CAAC,CAAA;AACnE,CAAC;AARD,oEAQC;AAEM,KAAK,UAAU,qCAAqC,CAIzD,MAAgC,EAChC,IAOC;IAED,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,GAAG,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,IAAI,IAAI,EAAE,CAAA;IACnE,IAAI,OAAO,KAAK,EAAE,IAAI,EAAE,kBAAkB,KAAK,UAAU,EAAE;QACzD,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,MAAM,IAAA,wBAAS,EAAC,MAAM,EAAE,sBAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QAC/D,OAAO,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC;YACnC,KAAK;YACL,MAAM;YACN,OAAO;SACiB,CAAC,CAAA;KAC5B;SAAM,IAAI,OAAO,KAAK,EAAE,IAAI,EAAE,kBAAkB,KAAK,WAAW;QAC/D,OAAO,KAAK,EAAE,IAAI,EAAE,kBAAkB,CAAA;IAExC,IAAI;QACF,MAAM,uBAAuB,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC;YACnD,MAAM,EAAE,0BAA0B;SACnC,CAAC,CAAA;QACF,OAAO,IAAA,wBAAW,EAAC,uBAAuB,CAAC,CAAA;KAC5C;IAAC,MAAM;QAIN,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;YAC1C,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAA,wBAAS,EAAC,MAAM,EAAE,sBAAQ,CAAC,CAAC,EAAE,CAAC;YAClE,IAAA,wBAAS,EAAC,MAAM,EAAE,4BAAW,CAAC,CAAC,EAAE,CAAC;SACnC,CAAC,CAAA;QAEF,IAAI,OAAO,KAAK,CAAC,aAAa,KAAK,QAAQ;YACzC,MAAM,IAAI,qCAA4B,EAAE,CAAA;QAE1C,MAAM,oBAAoB,GAAG,QAAQ,GAAG,KAAK,CAAC,aAAa,CAAA;QAE3D,IAAI,oBAAoB,GAAG,EAAE;YAAE,OAAO,EAAE,CAAA;QACxC,OAAO,oBAAoB,CAAA;KAC5B;AACH,CAAC;AA/CD,sFA+CC"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getBalance = void 0;
4
+ const toHex_js_1 = require("../../utils/encoding/toHex.js");
5
+ async function getBalance(client, { address, blockNumber, blockTag = 'latest' }) {
6
+ const blockNumberHex = blockNumber ? (0, toHex_js_1.numberToHex)(blockNumber) : undefined;
7
+ const balance = await client.request({
8
+ method: 'eth_getBalance',
9
+ params: [address, blockNumberHex || blockTag],
10
+ });
11
+ return BigInt(balance);
12
+ }
13
+ exports.getBalance = getBalance;
14
+ //# sourceMappingURL=getBalance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getBalance.js","sourceRoot":"","sources":["../../../actions/public/getBalance.ts"],"names":[],"mappings":";;;AAQA,4DAGsC;AA4D/B,KAAK,UAAU,UAAU,CAC9B,MAAiC,EACjC,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,GAAG,QAAQ,EAAwB;IAEnE,MAAM,cAAc,GAAG,WAAW,CAAC,CAAC,CAAC,IAAA,sBAAW,EAAC,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;IAEzE,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC;QACnC,MAAM,EAAE,gBAAgB;QACxB,MAAM,EAAE,CAAC,OAAO,EAAE,cAAc,IAAI,QAAQ,CAAC;KAC9C,CAAC,CAAA;IACF,OAAO,MAAM,CAAC,OAAO,CAAC,CAAA;AACxB,CAAC;AAXD,gCAWC"}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getBlock = void 0;
4
+ const block_js_1 = require("../../errors/block.js");
5
+ const toHex_js_1 = require("../../utils/encoding/toHex.js");
6
+ const block_js_2 = require("../../utils/formatters/block.js");
7
+ async function getBlock(client, { blockHash, blockNumber, blockTag: blockTag_, includeTransactions: includeTransactions_, } = {}) {
8
+ const blockTag = blockTag_ ?? 'latest';
9
+ const includeTransactions = includeTransactions_ ?? false;
10
+ const blockNumberHex = blockNumber !== undefined ? (0, toHex_js_1.numberToHex)(blockNumber) : undefined;
11
+ let block = null;
12
+ if (blockHash) {
13
+ block = await client.request({
14
+ method: 'eth_getBlockByHash',
15
+ params: [blockHash, includeTransactions],
16
+ });
17
+ }
18
+ else {
19
+ block = await client.request({
20
+ method: 'eth_getBlockByNumber',
21
+ params: [blockNumberHex || blockTag, includeTransactions],
22
+ });
23
+ }
24
+ if (!block)
25
+ throw new block_js_1.BlockNotFoundError({ blockHash, blockNumber });
26
+ const format = client.chain?.formatters?.block?.format || block_js_2.formatBlock;
27
+ return format(block);
28
+ }
29
+ exports.getBlock = getBlock;
30
+ //# sourceMappingURL=getBlock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getBlock.js","sourceRoot":"","sources":["../../../actions/public/getBlock.ts"],"names":[],"mappings":";;;AAGA,oDAG8B;AAO9B,4DAGsC;AACtC,8DAGwC;AAoEjC,KAAK,UAAU,QAAQ,CAM5B,MAA2C,EAC3C,EACE,SAAS,EACT,WAAW,EACX,QAAQ,EAAE,SAAS,EACnB,mBAAmB,EAAE,oBAAoB,MACc,EAAE;IAE3D,MAAM,QAAQ,GAAG,SAAS,IAAI,QAAQ,CAAA;IACtC,MAAM,mBAAmB,GAAG,oBAAoB,IAAI,KAAK,CAAA;IAEzD,MAAM,cAAc,GAClB,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,IAAA,sBAAW,EAAC,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;IAElE,IAAI,KAAK,GAAoB,IAAI,CAAA;IACjC,IAAI,SAAS,EAAE;QACb,KAAK,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC;YAC3B,MAAM,EAAE,oBAAoB;YAC5B,MAAM,EAAE,CAAC,SAAS,EAAE,mBAAmB,CAAC;SACzC,CAAC,CAAA;KACH;SAAM;QACL,KAAK,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC;YAC3B,MAAM,EAAE,sBAAsB;YAC9B,MAAM,EAAE,CAAC,cAAc,IAAI,QAAQ,EAAE,mBAAmB,CAAC;SAC1D,CAAC,CAAA;KACH;IAED,IAAI,CAAC,KAAK;QAAE,MAAM,IAAI,6BAAkB,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC,CAAA;IAEpE,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,IAAI,sBAAW,CAAA;IACrE,OAAO,MAAM,CAAC,KAAK,CAAC,CAAA;AACtB,CAAC;AArCD,4BAqCC"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getBlockNumber = exports.getBlockNumberCache = void 0;
4
+ const withCache_js_1 = require("../../utils/promise/withCache.js");
5
+ const cacheKey = (id) => `blockNumber.${id}`;
6
+ function getBlockNumberCache(id) {
7
+ return (0, withCache_js_1.getCache)(cacheKey(id));
8
+ }
9
+ exports.getBlockNumberCache = getBlockNumberCache;
10
+ async function getBlockNumber(client, { cacheTime = client.cacheTime } = {}) {
11
+ const blockNumberHex = await (0, withCache_js_1.withCache)(() => client.request({
12
+ method: 'eth_blockNumber',
13
+ }), { cacheKey: cacheKey(client.uid), cacheTime });
14
+ return BigInt(blockNumberHex);
15
+ }
16
+ exports.getBlockNumber = getBlockNumber;
17
+ //# sourceMappingURL=getBlockNumber.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getBlockNumber.js","sourceRoot":"","sources":["../../../actions/public/getBlockNumber.ts"],"names":[],"mappings":";;;AAKA,mEAAsE;AAWtE,MAAM,QAAQ,GAAG,CAAC,EAAU,EAAE,EAAE,CAAC,eAAe,EAAE,EAAE,CAAA;AAEpD,SAAgB,mBAAmB,CAAC,EAAU;IAC5C,OAAO,IAAA,uBAAQ,EAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAA;AAC/B,CAAC;AAFD,kDAEC;AAyBM,KAAK,UAAU,cAAc,CAClC,MAAiC,EACjC,EAAE,SAAS,GAAG,MAAM,CAAC,SAAS,KAA+B,EAAE;IAE/D,MAAM,cAAc,GAAG,MAAM,IAAA,wBAAS,EACpC,GAAG,EAAE,CACH,MAAM,CAAC,OAAO,CAAC;QACb,MAAM,EAAE,iBAAiB;KAC1B,CAAC,EACJ,EAAE,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,SAAS,EAAE,CAC9C,CAAA;IACD,OAAO,MAAM,CAAC,cAAc,CAAC,CAAA;AAC/B,CAAC;AAZD,wCAYC"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getBlockTransactionCount = void 0;
4
+ const fromHex_js_1 = require("../../utils/encoding/fromHex.js");
5
+ const toHex_js_1 = require("../../utils/encoding/toHex.js");
6
+ async function getBlockTransactionCount(client, { blockHash, blockNumber, blockTag = 'latest', } = {}) {
7
+ const blockNumberHex = blockNumber !== undefined ? (0, toHex_js_1.numberToHex)(blockNumber) : undefined;
8
+ let count;
9
+ if (blockHash) {
10
+ count = await client.request({
11
+ method: 'eth_getBlockTransactionCountByHash',
12
+ params: [blockHash],
13
+ });
14
+ }
15
+ else {
16
+ count = await client.request({
17
+ method: 'eth_getBlockTransactionCountByNumber',
18
+ params: [blockNumberHex || blockTag],
19
+ });
20
+ }
21
+ return (0, fromHex_js_1.hexToNumber)(count);
22
+ }
23
+ exports.getBlockTransactionCount = getBlockTransactionCount;
24
+ //# sourceMappingURL=getBlockTransactionCount.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getBlockTransactionCount.js","sourceRoot":"","sources":["../../../actions/public/getBlockTransactionCount.ts"],"names":[],"mappings":";;;AAQA,gEAGwC;AACxC,4DAGsC;AAqD/B,KAAK,UAAU,wBAAwB,CAG5C,MAAiC,EACjC,EACE,SAAS,EACT,WAAW,EACX,QAAQ,GAAG,QAAQ,MACmB,EAAE;IAE1C,MAAM,cAAc,GAClB,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,IAAA,sBAAW,EAAC,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;IAElE,IAAI,KAAe,CAAA;IACnB,IAAI,SAAS,EAAE;QACb,KAAK,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC;YAC3B,MAAM,EAAE,oCAAoC;YAC5C,MAAM,EAAE,CAAC,SAAS,CAAC;SACpB,CAAC,CAAA;KACH;SAAM;QACL,KAAK,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC;YAC3B,MAAM,EAAE,sCAAsC;YAC9C,MAAM,EAAE,CAAC,cAAc,IAAI,QAAQ,CAAC;SACrC,CAAC,CAAA;KACH;IAED,OAAO,IAAA,wBAAW,EAAC,KAAK,CAAC,CAAA;AAC3B,CAAC;AA3BD,4DA2BC"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getBytecode = void 0;
4
+ const toHex_js_1 = require("../../utils/encoding/toHex.js");
5
+ async function getBytecode(client, { address, blockNumber, blockTag = 'latest' }) {
6
+ const blockNumberHex = blockNumber !== undefined ? (0, toHex_js_1.numberToHex)(blockNumber) : undefined;
7
+ const hex = await client.request({
8
+ method: 'eth_getCode',
9
+ params: [address, blockNumberHex || blockTag],
10
+ });
11
+ if (hex === '0x')
12
+ return undefined;
13
+ return hex;
14
+ }
15
+ exports.getBytecode = getBytecode;
16
+ //# sourceMappingURL=getBytecode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getBytecode.js","sourceRoot":"","sources":["../../../actions/public/getBytecode.ts"],"names":[],"mappings":";;;AASA,4DAGsC;AA6C/B,KAAK,UAAU,WAAW,CAC/B,MAAiC,EACjC,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,GAAG,QAAQ,EAAyB;IAEpE,MAAM,cAAc,GAClB,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,IAAA,sBAAW,EAAC,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;IAClE,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC;QAC/B,MAAM,EAAE,aAAa;QACrB,MAAM,EAAE,CAAC,OAAO,EAAE,cAAc,IAAI,QAAQ,CAAC;KAC9C,CAAC,CAAA;IACF,IAAI,GAAG,KAAK,IAAI;QAAE,OAAO,SAAS,CAAA;IAClC,OAAO,GAAG,CAAA;AACZ,CAAC;AAZD,kCAYC"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getChainId = void 0;
4
+ const fromHex_js_1 = require("../../utils/encoding/fromHex.js");
5
+ async function getChainId(client) {
6
+ const chainIdHex = await client.request({
7
+ method: 'eth_chainId',
8
+ });
9
+ return (0, fromHex_js_1.hexToNumber)(chainIdHex);
10
+ }
11
+ exports.getChainId = getChainId;
12
+ //# sourceMappingURL=getChainId.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getChainId.js","sourceRoot":"","sources":["../../../actions/public/getChainId.ts"],"names":[],"mappings":";;;AAMA,gEAGwC;AA8BjC,KAAK,UAAU,UAAU,CAG9B,MAA2C;IAC3C,MAAM,UAAU,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC;QACtC,MAAM,EAAE,aAAa;KACtB,CAAC,CAAA;IACF,OAAO,IAAA,wBAAW,EAAC,UAAU,CAAC,CAAA;AAChC,CAAC;AARD,gCAQC"}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getContractEvents = void 0;
4
+ const getAbiItem_js_1 = require("../../utils/abi/getAbiItem.js");
5
+ const getAction_js_1 = require("../../utils/getAction.js");
6
+ const getLogs_js_1 = require("./getLogs.js");
7
+ async function getContractEvents(client, parameters) {
8
+ const { abi, address, args, blockHash, eventName, fromBlock, toBlock, strict, } = parameters;
9
+ const event = eventName
10
+ ? (0, getAbiItem_js_1.getAbiItem)({ abi, name: eventName })
11
+ : undefined;
12
+ const events = !event
13
+ ? abi.filter((x) => x.type === 'event')
14
+ : undefined;
15
+ return (0, getAction_js_1.getAction)(client, getLogs_js_1.getLogs)({
16
+ address,
17
+ args,
18
+ blockHash,
19
+ event,
20
+ events,
21
+ fromBlock,
22
+ toBlock,
23
+ strict,
24
+ });
25
+ }
26
+ exports.getContractEvents = getContractEvents;
27
+ //# sourceMappingURL=getContractEvents.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getContractEvents.js","sourceRoot":"","sources":["../../../actions/public/getContractEvents.ts"],"names":[],"mappings":";;;AAaA,iEAIsC;AACtC,2DAAoD;AACpD,6CAIqB;AA2Fd,KAAK,UAAU,iBAAiB,CAQrC,MAAgC,EAChC,UAMC;IAID,MAAM,EACJ,GAAG,EACH,OAAO,EACP,IAAI,EACJ,SAAS,EACT,SAAS,EACT,SAAS,EACT,OAAO,EACP,MAAM,GACP,GAAG,UAAU,CAAA;IACd,MAAM,KAAK,GAAG,SAAS;QACrB,CAAC,CAAC,IAAA,0BAAU,EAAC,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAA0B,CAAC;QAC9D,CAAC,CAAC,SAAS,CAAA;IACb,MAAM,MAAM,GAAG,CAAC,KAAK;QACnB,CAAC,CAAE,GAAW,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,OAAO,CAAC;QAChD,CAAC,CAAC,SAAS,CAAA;IACb,OAAO,IAAA,wBAAS,EACd,MAAM,EACN,oBAAO,CACR,CAAC;QACA,OAAO;QACP,IAAI;QACJ,SAAS;QACT,KAAK;QACL,MAAM;QACN,SAAS;QACT,OAAO;QACP,MAAM;KACoB,CAM3B,CAAA;AACH,CAAC;AAtDD,8CAsDC"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getFeeHistory = void 0;
4
+ const toHex_js_1 = require("../../utils/encoding/toHex.js");
5
+ const feeHistory_js_1 = require("../../utils/formatters/feeHistory.js");
6
+ async function getFeeHistory(client, { blockCount, blockNumber, blockTag = 'latest', rewardPercentiles, }) {
7
+ const blockNumberHex = blockNumber ? (0, toHex_js_1.numberToHex)(blockNumber) : undefined;
8
+ const feeHistory = await client.request({
9
+ method: 'eth_feeHistory',
10
+ params: [
11
+ (0, toHex_js_1.numberToHex)(blockCount),
12
+ blockNumberHex || blockTag,
13
+ rewardPercentiles,
14
+ ],
15
+ });
16
+ return (0, feeHistory_js_1.formatFeeHistory)(feeHistory);
17
+ }
18
+ exports.getFeeHistory = getFeeHistory;
19
+ //# sourceMappingURL=getFeeHistory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getFeeHistory.js","sourceRoot":"","sources":["../../../actions/public/getFeeHistory.ts"],"names":[],"mappings":";;;AAMA,4DAGsC;AACtC,wEAG6C;AAyDtC,KAAK,UAAU,aAAa,CACjC,MAAiC,EACjC,EACE,UAAU,EACV,WAAW,EACX,QAAQ,GAAG,QAAQ,EACnB,iBAAiB,GACO;IAE1B,MAAM,cAAc,GAAG,WAAW,CAAC,CAAC,CAAC,IAAA,sBAAW,EAAC,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;IACzE,MAAM,UAAU,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC;QACtC,MAAM,EAAE,gBAAgB;QACxB,MAAM,EAAE;YACN,IAAA,sBAAW,EAAC,UAAU,CAAC;YACvB,cAAc,IAAI,QAAQ;YAC1B,iBAAiB;SAClB;KACF,CAAC,CAAA;IACF,OAAO,IAAA,gCAAgB,EAAC,UAAU,CAAC,CAAA;AACrC,CAAC;AAnBD,sCAmBC"}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getFilterChanges = void 0;
4
+ const abi_js_1 = require("../../errors/abi.js");
5
+ const decodeEventLog_js_1 = require("../../utils/abi/decodeEventLog.js");
6
+ const log_js_1 = require("../../utils/formatters/log.js");
7
+ async function getFilterChanges(_client, { filter, }) {
8
+ const strict = 'strict' in filter && filter.strict;
9
+ const logs = await filter.request({
10
+ method: 'eth_getFilterChanges',
11
+ params: [filter.id],
12
+ });
13
+ return logs
14
+ .map((log) => {
15
+ if (typeof log === 'string')
16
+ return log;
17
+ try {
18
+ const { eventName, args } = 'abi' in filter && filter.abi
19
+ ? (0, decodeEventLog_js_1.decodeEventLog)({
20
+ abi: filter.abi,
21
+ data: log.data,
22
+ topics: log.topics,
23
+ strict,
24
+ })
25
+ : { eventName: undefined, args: undefined };
26
+ return (0, log_js_1.formatLog)(log, { args, eventName });
27
+ }
28
+ catch (err) {
29
+ let eventName;
30
+ let isUnnamed;
31
+ if (err instanceof abi_js_1.DecodeLogDataMismatch ||
32
+ err instanceof abi_js_1.DecodeLogTopicsMismatch) {
33
+ if ('strict' in filter && filter.strict)
34
+ return;
35
+ eventName = err.abiItem.name;
36
+ isUnnamed = err.abiItem.inputs?.some((x) => !('name' in x && x.name));
37
+ }
38
+ return (0, log_js_1.formatLog)(log, { args: isUnnamed ? [] : {}, eventName });
39
+ }
40
+ })
41
+ .filter(Boolean);
42
+ }
43
+ exports.getFilterChanges = getFilterChanges;
44
+ //# sourceMappingURL=getFilterChanges.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getFilterChanges.js","sourceRoot":"","sources":["../../../actions/public/getFilterChanges.ts"],"names":[],"mappings":";;;AAIA,gDAG4B;AAO5B,yEAG0C;AAE1C,0DAGsC;AAgI/B,KAAK,UAAU,gBAAgB,CAUpC,OAAmC,EACnC,EACE,MAAM,GAQP;IAWD,MAAM,MAAM,GAAG,QAAQ,IAAI,MAAM,IAAI,MAAM,CAAC,MAAM,CAAA;IAElD,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC;QAChC,MAAM,EAAE,sBAAsB;QAC9B,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC;KACpB,CAAC,CAAA;IACF,OAAO,IAAI;SACR,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;QACX,IAAI,OAAO,GAAG,KAAK,QAAQ;YAAE,OAAO,GAAG,CAAA;QACvC,IAAI;YACF,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,GACvB,KAAK,IAAI,MAAM,IAAI,MAAM,CAAC,GAAG;gBAC3B,CAAC,CAAC,IAAA,kCAAc,EAAC;oBACb,GAAG,EAAE,MAAM,CAAC,GAAG;oBACf,IAAI,EAAE,GAAG,CAAC,IAAI;oBACd,MAAM,EAAE,GAAG,CAAC,MAAa;oBACzB,MAAM;iBACP,CAAC;gBACJ,CAAC,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,CAAA;YAC/C,OAAO,IAAA,kBAAS,EAAC,GAAG,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAA;SAC3C;QAAC,OAAO,GAAG,EAAE;YACZ,IAAI,SAAS,CAAA;YACb,IAAI,SAAS,CAAA;YACb,IACE,GAAG,YAAY,8BAAqB;gBACpC,GAAG,YAAY,gCAAuB,EACtC;gBAEA,IAAI,QAAQ,IAAI,MAAM,IAAI,MAAM,CAAC,MAAM;oBAAE,OAAM;gBAC/C,SAAS,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,CAAA;gBAC5B,SAAS,GAAG,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAA;aACtE;YAGD,OAAO,IAAA,kBAAS,EAAC,GAAG,EAAE,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,SAAS,EAAE,CAAC,CAAA;SAChE;IACH,CAAC,CAAC;SACD,MAAM,CAAC,OAAO,CAOhB,CAAA;AACH,CAAC;AA5ED,4CA4EC"}
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getFilterLogs = void 0;
4
+ const abi_js_1 = require("../../errors/abi.js");
5
+ const decodeEventLog_js_1 = require("../../utils/abi/decodeEventLog.js");
6
+ const log_js_1 = require("../../utils/formatters/log.js");
7
+ async function getFilterLogs(_client, { filter, }) {
8
+ const strict = filter.strict ?? false;
9
+ const logs = await filter.request({
10
+ method: 'eth_getFilterLogs',
11
+ params: [filter.id],
12
+ });
13
+ return logs
14
+ .map((log) => {
15
+ try {
16
+ const { eventName, args } = 'abi' in filter && filter.abi
17
+ ? (0, decodeEventLog_js_1.decodeEventLog)({
18
+ abi: filter.abi,
19
+ data: log.data,
20
+ topics: log.topics,
21
+ strict,
22
+ })
23
+ : { eventName: undefined, args: undefined };
24
+ return (0, log_js_1.formatLog)(log, { args, eventName });
25
+ }
26
+ catch (err) {
27
+ let eventName;
28
+ let isUnnamed;
29
+ if (err instanceof abi_js_1.DecodeLogDataMismatch ||
30
+ err instanceof abi_js_1.DecodeLogTopicsMismatch) {
31
+ if ('strict' in filter && filter.strict)
32
+ return;
33
+ eventName = err.abiItem.name;
34
+ isUnnamed = err.abiItem.inputs?.some((x) => !('name' in x && x.name));
35
+ }
36
+ return (0, log_js_1.formatLog)(log, { args: isUnnamed ? [] : {}, eventName });
37
+ }
38
+ })
39
+ .filter(Boolean);
40
+ }
41
+ exports.getFilterLogs = getFilterLogs;
42
+ //# sourceMappingURL=getFilterLogs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getFilterLogs.js","sourceRoot":"","sources":["../../../actions/public/getFilterLogs.ts"],"names":[],"mappings":";;;AAIA,gDAG4B;AAM5B,yEAG0C;AAE1C,0DAGsC;AA4D/B,KAAK,UAAU,aAAa,CAQjC,OAAkC,EAClC,EACE,MAAM,GACmE;IAI3E,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,IAAI,KAAK,CAAA;IAErC,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC;QAChC,MAAM,EAAE,mBAAmB;QAC3B,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC;KACpB,CAAC,CAAA;IACF,OAAO,IAAI;SACR,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;QACX,IAAI;YACF,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,GACvB,KAAK,IAAI,MAAM,IAAI,MAAM,CAAC,GAAG;gBAC3B,CAAC,CAAC,IAAA,kCAAc,EAAC;oBACb,GAAG,EAAE,MAAM,CAAC,GAAG;oBACf,IAAI,EAAE,GAAG,CAAC,IAAI;oBACd,MAAM,EAAE,GAAG,CAAC,MAAa;oBACzB,MAAM;iBACP,CAAC;gBACJ,CAAC,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,CAAA;YAC/C,OAAO,IAAA,kBAAS,EAAC,GAAG,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAA;SAC3C;QAAC,OAAO,GAAG,EAAE;YACZ,IAAI,SAAS,CAAA;YACb,IAAI,SAAS,CAAA;YACb,IACE,GAAG,YAAY,8BAAqB;gBACpC,GAAG,YAAY,gCAAuB,EACtC;gBAEA,IAAI,QAAQ,IAAI,MAAM,IAAI,MAAM,CAAC,MAAM;oBAAE,OAAM;gBAC/C,SAAS,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,CAAA;gBAC5B,SAAS,GAAG,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAA;aACtE;YAGD,OAAO,IAAA,kBAAS,EAAC,GAAG,EAAE,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,SAAS,EAAE,CAAC,CAAA;SAChE;IACH,CAAC,CAAC;SACD,MAAM,CAAC,OAAO,CAMhB,CAAA;AACH,CAAC;AA1DD,sCA0DC"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getGasPrice = void 0;
4
+ async function getGasPrice(client) {
5
+ const gasPrice = await client.request({
6
+ method: 'eth_gasPrice',
7
+ });
8
+ return BigInt(gasPrice);
9
+ }
10
+ exports.getGasPrice = getGasPrice;
11
+ //# sourceMappingURL=getGasPrice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getGasPrice.js","sourceRoot":"","sources":["../../../actions/public/getGasPrice.ts"],"names":[],"mappings":";;;AA+BO,KAAK,UAAU,WAAW,CAG/B,MAA2C;IAC3C,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC;QACpC,MAAM,EAAE,cAAc;KACvB,CAAC,CAAA;IACF,OAAO,MAAM,CAAC,QAAQ,CAAC,CAAA;AACzB,CAAC;AARD,kCAQC"}