viem 1.6.6 → 1.7.0

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 (651) hide show
  1. package/dist/cjs/actions/public/estimateFeesPerGas.js +59 -0
  2. package/dist/cjs/actions/public/estimateFeesPerGas.js.map +1 -0
  3. package/dist/cjs/actions/public/estimateMaxPriorityFeePerGas.js +44 -0
  4. package/dist/cjs/actions/public/estimateMaxPriorityFeePerGas.js.map +1 -0
  5. package/dist/cjs/actions/public/verifyHash.js.map +1 -1
  6. package/dist/cjs/actions/public/verifyMessage.js.map +1 -1
  7. package/dist/cjs/actions/public/verifyTypedData.js.map +1 -1
  8. package/dist/cjs/actions/wallet/deployContract.js.map +1 -1
  9. package/dist/cjs/actions/wallet/sendTransaction.js.map +1 -1
  10. package/dist/cjs/actions/wallet/writeContract.js.map +1 -1
  11. package/dist/cjs/clients/createTestClient.js.map +1 -1
  12. package/dist/cjs/clients/decorators/public.js +4 -0
  13. package/dist/cjs/clients/decorators/public.js.map +1 -1
  14. package/dist/cjs/errors/fee.js +42 -0
  15. package/dist/cjs/errors/fee.js.map +1 -0
  16. package/dist/cjs/errors/version.js +1 -1
  17. package/dist/cjs/index.js +8 -4
  18. package/dist/cjs/index.js.map +1 -1
  19. package/dist/cjs/public.js +5 -1
  20. package/dist/cjs/public.js.map +1 -1
  21. package/dist/cjs/utils/transaction/prepareRequest.js +26 -29
  22. package/dist/cjs/utils/transaction/prepareRequest.js.map +1 -1
  23. package/dist/esm/actions/public/estimateFeesPerGas.js +77 -0
  24. package/dist/esm/actions/public/estimateFeesPerGas.js.map +1 -0
  25. package/dist/esm/actions/public/estimateMaxPriorityFeePerGas.js +64 -0
  26. package/dist/esm/actions/public/estimateMaxPriorityFeePerGas.js.map +1 -0
  27. package/dist/esm/actions/public/verifyHash.js.map +1 -1
  28. package/dist/esm/actions/public/verifyMessage.js.map +1 -1
  29. package/dist/esm/actions/public/verifyTypedData.js.map +1 -1
  30. package/dist/esm/actions/wallet/deployContract.js.map +1 -1
  31. package/dist/esm/actions/wallet/sendTransaction.js.map +1 -1
  32. package/dist/esm/actions/wallet/writeContract.js.map +1 -1
  33. package/dist/esm/clients/createTestClient.js.map +1 -1
  34. package/dist/esm/clients/decorators/public.js +4 -0
  35. package/dist/esm/clients/decorators/public.js.map +1 -1
  36. package/dist/esm/errors/fee.js +36 -0
  37. package/dist/esm/errors/fee.js.map +1 -0
  38. package/dist/esm/errors/version.js +1 -1
  39. package/dist/esm/index.js +1 -0
  40. package/dist/esm/index.js.map +1 -1
  41. package/dist/esm/public.js +2 -0
  42. package/dist/esm/public.js.map +1 -1
  43. package/dist/esm/utils/transaction/prepareRequest.js +27 -31
  44. package/dist/esm/utils/transaction/prepareRequest.js.map +1 -1
  45. package/dist/types/abi.d.ts +6 -0
  46. package/dist/types/abi.d.ts.map +1 -0
  47. package/dist/types/accounts/generateMnemonic.d.ts +9 -0
  48. package/dist/types/accounts/generateMnemonic.d.ts.map +1 -0
  49. package/dist/types/accounts/generatePrivateKey.d.ts +8 -0
  50. package/dist/types/accounts/generatePrivateKey.d.ts.map +1 -0
  51. package/dist/types/accounts/hdKeyToAccount.d.ts +9 -0
  52. package/dist/types/accounts/hdKeyToAccount.d.ts.map +1 -0
  53. package/dist/types/accounts/index.d.ts +27 -0
  54. package/dist/types/accounts/index.d.ts.map +1 -0
  55. package/dist/types/accounts/mnemonicToAccount.d.ts +8 -0
  56. package/dist/types/accounts/mnemonicToAccount.d.ts.map +1 -0
  57. package/dist/types/accounts/privateKeyToAccount.d.ts +9 -0
  58. package/dist/types/accounts/privateKeyToAccount.d.ts.map +1 -0
  59. package/dist/types/accounts/toAccount.d.ts +11 -0
  60. package/dist/types/accounts/toAccount.d.ts.map +1 -0
  61. package/dist/types/accounts/types.d.ts +52 -0
  62. package/dist/types/accounts/types.d.ts.map +1 -0
  63. package/dist/types/accounts/utils/parseAccount.d.ts +4 -0
  64. package/dist/types/accounts/utils/parseAccount.d.ts.map +1 -0
  65. package/dist/types/accounts/utils/privateKeyToAddress.d.ts +11 -0
  66. package/dist/types/accounts/utils/privateKeyToAddress.d.ts.map +1 -0
  67. package/dist/types/accounts/utils/publicKeyToAddress.d.ts +11 -0
  68. package/dist/types/accounts/utils/publicKeyToAddress.d.ts.map +1 -0
  69. package/dist/types/accounts/utils/sign.d.ts +16 -0
  70. package/dist/types/accounts/utils/sign.d.ts.map +1 -0
  71. package/dist/types/accounts/utils/signMessage.d.ts +16 -0
  72. package/dist/types/accounts/utils/signMessage.d.ts.map +1 -0
  73. package/dist/types/accounts/utils/signTransaction.d.ts +12 -0
  74. package/dist/types/accounts/utils/signTransaction.d.ts.map +1 -0
  75. package/dist/types/accounts/utils/signTypedData.d.ts +20 -0
  76. package/dist/types/accounts/utils/signTypedData.d.ts.map +1 -0
  77. package/dist/types/accounts/wordlists/czech.d.ts +2 -0
  78. package/dist/types/accounts/wordlists/czech.d.ts.map +1 -0
  79. package/dist/types/accounts/wordlists/english.d.ts +2 -0
  80. package/dist/types/accounts/wordlists/english.d.ts.map +1 -0
  81. package/dist/types/accounts/wordlists/french.d.ts +2 -0
  82. package/dist/types/accounts/wordlists/french.d.ts.map +1 -0
  83. package/dist/types/accounts/wordlists/italian.d.ts +2 -0
  84. package/dist/types/accounts/wordlists/italian.d.ts.map +1 -0
  85. package/dist/types/accounts/wordlists/japanese.d.ts +2 -0
  86. package/dist/types/accounts/wordlists/japanese.d.ts.map +1 -0
  87. package/dist/types/accounts/wordlists/korean.d.ts +2 -0
  88. package/dist/types/accounts/wordlists/korean.d.ts.map +1 -0
  89. package/dist/types/accounts/wordlists/simplifiedChinese.d.ts +2 -0
  90. package/dist/types/accounts/wordlists/simplifiedChinese.d.ts.map +1 -0
  91. package/dist/types/accounts/wordlists/spanish.d.ts +2 -0
  92. package/dist/types/accounts/wordlists/spanish.d.ts.map +1 -0
  93. package/dist/types/accounts/wordlists/traditionalChinese.d.ts +2 -0
  94. package/dist/types/accounts/wordlists/traditionalChinese.d.ts.map +1 -0
  95. package/dist/types/actions/ens/getEnsAddress.d.ts +45 -0
  96. package/dist/types/actions/ens/getEnsAddress.d.ts.map +1 -0
  97. package/dist/types/actions/ens/getEnsAvatar.d.ts +41 -0
  98. package/dist/types/actions/ens/getEnsAvatar.d.ts.map +1 -0
  99. package/dist/types/actions/ens/getEnsName.d.ts +41 -0
  100. package/dist/types/actions/ens/getEnsName.d.ts.map +1 -0
  101. package/dist/types/actions/ens/getEnsResolver.d.ts +43 -0
  102. package/dist/types/actions/ens/getEnsResolver.d.ts.map +1 -0
  103. package/dist/types/actions/ens/getEnsText.d.ts +46 -0
  104. package/dist/types/actions/ens/getEnsText.d.ts.map +1 -0
  105. package/dist/types/actions/getContract.d.ts +314 -0
  106. package/dist/types/actions/getContract.d.ts.map +1 -0
  107. package/dist/types/actions/index.d.ts +80 -0
  108. package/dist/types/actions/index.d.ts.map +1 -0
  109. package/dist/types/actions/public/call.d.ts +56 -0
  110. package/dist/types/actions/public/call.d.ts.map +1 -0
  111. package/dist/types/actions/public/createBlockFilter.d.ts +28 -0
  112. package/dist/types/actions/public/createBlockFilter.d.ts.map +1 -0
  113. package/dist/types/actions/public/createContractEventFilter.d.ts +50 -0
  114. package/dist/types/actions/public/createContractEventFilter.d.ts.map +1 -0
  115. package/dist/types/actions/public/createEventFilter.d.ts +76 -0
  116. package/dist/types/actions/public/createEventFilter.d.ts.map +1 -0
  117. package/dist/types/actions/public/createPendingTransactionFilter.d.ts +28 -0
  118. package/dist/types/actions/public/createPendingTransactionFilter.d.ts.map +1 -0
  119. package/dist/types/actions/public/estimateContractGas.d.ts +39 -0
  120. package/dist/types/actions/public/estimateContractGas.d.ts.map +1 -0
  121. package/dist/types/actions/public/estimateFeesPerGas.d.ts +48 -0
  122. package/dist/types/actions/public/estimateFeesPerGas.d.ts.map +1 -0
  123. package/dist/types/actions/public/estimateGas.d.ts +49 -0
  124. package/dist/types/actions/public/estimateGas.d.ts.map +1 -0
  125. package/dist/types/actions/public/estimateMaxPriorityFeePerGas.d.ts +35 -0
  126. package/dist/types/actions/public/estimateMaxPriorityFeePerGas.d.ts.map +1 -0
  127. package/dist/types/actions/public/getBalance.d.ts +55 -0
  128. package/dist/types/actions/public/getBalance.d.ts.map +1 -0
  129. package/dist/types/actions/public/getBlock.d.ts +56 -0
  130. package/dist/types/actions/public/getBlock.d.ts.map +1 -0
  131. package/dist/types/actions/public/getBlockNumber.d.ts +57 -0
  132. package/dist/types/actions/public/getBlockNumber.d.ts.map +1 -0
  133. package/dist/types/actions/public/getBlockTransactionCount.d.ts +47 -0
  134. package/dist/types/actions/public/getBlockTransactionCount.d.ts.map +1 -0
  135. package/dist/types/actions/public/getBytecode.d.ts +41 -0
  136. package/dist/types/actions/public/getBytecode.d.ts.map +1 -0
  137. package/dist/types/actions/public/getChainId.d.ts +28 -0
  138. package/dist/types/actions/public/getChainId.d.ts.map +1 -0
  139. package/dist/types/actions/public/getFeeHistory.d.ts +53 -0
  140. package/dist/types/actions/public/getFeeHistory.d.ts.map +1 -0
  141. package/dist/types/actions/public/getFilterChanges.d.ts +96 -0
  142. package/dist/types/actions/public/getFilterChanges.d.ts.map +1 -0
  143. package/dist/types/actions/public/getFilterLogs.d.ts +40 -0
  144. package/dist/types/actions/public/getFilterLogs.d.ts.map +1 -0
  145. package/dist/types/actions/public/getGasPrice.d.ts +27 -0
  146. package/dist/types/actions/public/getGasPrice.d.ts.map +1 -0
  147. package/dist/types/actions/public/getLogs.d.ts +71 -0
  148. package/dist/types/actions/public/getLogs.d.ts.map +1 -0
  149. package/dist/types/actions/public/getStorageAt.d.ts +43 -0
  150. package/dist/types/actions/public/getStorageAt.d.ts.map +1 -0
  151. package/dist/types/actions/public/getTransaction.d.ts +65 -0
  152. package/dist/types/actions/public/getTransaction.d.ts.map +1 -0
  153. package/dist/types/actions/public/getTransactionConfirmations.d.ts +41 -0
  154. package/dist/types/actions/public/getTransactionConfirmations.d.ts.map +1 -0
  155. package/dist/types/actions/public/getTransactionCount.d.ts +44 -0
  156. package/dist/types/actions/public/getTransactionCount.d.ts.map +1 -0
  157. package/dist/types/actions/public/getTransactionReceipt.d.ts +36 -0
  158. package/dist/types/actions/public/getTransactionReceipt.d.ts.map +1 -0
  159. package/dist/types/actions/public/multicall.d.ts +56 -0
  160. package/dist/types/actions/public/multicall.d.ts.map +1 -0
  161. package/dist/types/actions/public/readContract.d.ts +41 -0
  162. package/dist/types/actions/public/readContract.d.ts.map +1 -0
  163. package/dist/types/actions/public/simulateContract.d.ts +54 -0
  164. package/dist/types/actions/public/simulateContract.d.ts.map +1 -0
  165. package/dist/types/actions/public/uninstallFilter.d.ts +34 -0
  166. package/dist/types/actions/public/uninstallFilter.d.ts.map +1 -0
  167. package/dist/types/actions/public/verifyHash.d.ts +24 -0
  168. package/dist/types/actions/public/verifyHash.d.ts.map +1 -0
  169. package/dist/types/actions/public/verifyMessage.d.ts +28 -0
  170. package/dist/types/actions/public/verifyMessage.d.ts.map +1 -0
  171. package/dist/types/actions/public/verifyTypedData.d.ts +27 -0
  172. package/dist/types/actions/public/verifyTypedData.d.ts.map +1 -0
  173. package/dist/types/actions/public/waitForTransactionReceipt.d.ts +72 -0
  174. package/dist/types/actions/public/waitForTransactionReceipt.d.ts.map +1 -0
  175. package/dist/types/actions/public/watchBlockNumber.d.ts +59 -0
  176. package/dist/types/actions/public/watchBlockNumber.d.ts.map +1 -0
  177. package/dist/types/actions/public/watchBlocks.d.ts +67 -0
  178. package/dist/types/actions/public/watchBlocks.d.ts.map +1 -0
  179. package/dist/types/actions/public/watchContractEvent.d.ts +89 -0
  180. package/dist/types/actions/public/watchContractEvent.d.ts.map +1 -0
  181. package/dist/types/actions/public/watchEvent.d.ts +104 -0
  182. package/dist/types/actions/public/watchEvent.d.ts.map +1 -0
  183. package/dist/types/actions/public/watchPendingTransactions.d.ts +74 -0
  184. package/dist/types/actions/public/watchPendingTransactions.d.ts.map +1 -0
  185. package/dist/types/actions/test/dropTransaction.d.ts +33 -0
  186. package/dist/types/actions/test/dropTransaction.d.ts.map +1 -0
  187. package/dist/types/actions/test/getAutomine.d.ts +27 -0
  188. package/dist/types/actions/test/getAutomine.d.ts.map +1 -0
  189. package/dist/types/actions/test/getTxpoolContent.d.ts +34 -0
  190. package/dist/types/actions/test/getTxpoolContent.d.ts.map +1 -0
  191. package/dist/types/actions/test/getTxpoolStatus.d.ts +30 -0
  192. package/dist/types/actions/test/getTxpoolStatus.d.ts.map +1 -0
  193. package/dist/types/actions/test/impersonateAccount.d.ts +33 -0
  194. package/dist/types/actions/test/impersonateAccount.d.ts.map +1 -0
  195. package/dist/types/actions/test/increaseTime.d.ts +32 -0
  196. package/dist/types/actions/test/increaseTime.d.ts.map +1 -0
  197. package/dist/types/actions/test/inspectTxpool.d.ts +31 -0
  198. package/dist/types/actions/test/inspectTxpool.d.ts.map +1 -0
  199. package/dist/types/actions/test/mine.d.ts +32 -0
  200. package/dist/types/actions/test/mine.d.ts.map +1 -0
  201. package/dist/types/actions/test/removeBlockTimestampInterval.d.ts +25 -0
  202. package/dist/types/actions/test/removeBlockTimestampInterval.d.ts.map +1 -0
  203. package/dist/types/actions/test/reset.d.ts +32 -0
  204. package/dist/types/actions/test/reset.d.ts.map +1 -0
  205. package/dist/types/actions/test/revert.d.ts +31 -0
  206. package/dist/types/actions/test/revert.d.ts.map +1 -0
  207. package/dist/types/actions/test/sendUnsignedTransaction.d.ts +35 -0
  208. package/dist/types/actions/test/sendUnsignedTransaction.d.ts.map +1 -0
  209. package/dist/types/actions/test/setAutomine.d.ts +25 -0
  210. package/dist/types/actions/test/setAutomine.d.ts.map +1 -0
  211. package/dist/types/actions/test/setBalance.d.ts +36 -0
  212. package/dist/types/actions/test/setBalance.d.ts.map +1 -0
  213. package/dist/types/actions/test/setBlockGasLimit.d.ts +30 -0
  214. package/dist/types/actions/test/setBlockGasLimit.d.ts.map +1 -0
  215. package/dist/types/actions/test/setBlockTimestampInterval.d.ts +30 -0
  216. package/dist/types/actions/test/setBlockTimestampInterval.d.ts.map +1 -0
  217. package/dist/types/actions/test/setCode.d.ts +37 -0
  218. package/dist/types/actions/test/setCode.d.ts.map +1 -0
  219. package/dist/types/actions/test/setCoinbase.d.ts +33 -0
  220. package/dist/types/actions/test/setCoinbase.d.ts.map +1 -0
  221. package/dist/types/actions/test/setIntervalMining.d.ts +30 -0
  222. package/dist/types/actions/test/setIntervalMining.d.ts.map +1 -0
  223. package/dist/types/actions/test/setLoggingEnabled.d.ts +25 -0
  224. package/dist/types/actions/test/setLoggingEnabled.d.ts.map +1 -0
  225. package/dist/types/actions/test/setMinGasPrice.d.ts +34 -0
  226. package/dist/types/actions/test/setMinGasPrice.d.ts.map +1 -0
  227. package/dist/types/actions/test/setNextBlockBaseFeePerGas.d.ts +32 -0
  228. package/dist/types/actions/test/setNextBlockBaseFeePerGas.d.ts.map +1 -0
  229. package/dist/types/actions/test/setNextBlockTimestamp.d.ts +30 -0
  230. package/dist/types/actions/test/setNextBlockTimestamp.d.ts.map +1 -0
  231. package/dist/types/actions/test/setNonce.d.ts +36 -0
  232. package/dist/types/actions/test/setNonce.d.ts.map +1 -0
  233. package/dist/types/actions/test/setRpcUrl.d.ts +26 -0
  234. package/dist/types/actions/test/setRpcUrl.d.ts.map +1 -0
  235. package/dist/types/actions/test/setStorageAt.d.ts +40 -0
  236. package/dist/types/actions/test/setStorageAt.d.ts.map +1 -0
  237. package/dist/types/actions/test/snapshot.d.ts +25 -0
  238. package/dist/types/actions/test/snapshot.d.ts.map +1 -0
  239. package/dist/types/actions/test/stopImpersonatingAccount.d.ts +33 -0
  240. package/dist/types/actions/test/stopImpersonatingAccount.d.ts.map +1 -0
  241. package/dist/types/actions/wallet/addChain.d.ts +29 -0
  242. package/dist/types/actions/wallet/addChain.d.ts.map +1 -0
  243. package/dist/types/actions/wallet/deployContract.d.ts +44 -0
  244. package/dist/types/actions/wallet/deployContract.d.ts.map +1 -0
  245. package/dist/types/actions/wallet/getAddresses.d.ts +28 -0
  246. package/dist/types/actions/wallet/getAddresses.d.ts.map +1 -0
  247. package/dist/types/actions/wallet/getPermissions.d.ts +28 -0
  248. package/dist/types/actions/wallet/getPermissions.d.ts.map +1 -0
  249. package/dist/types/actions/wallet/requestAddresses.d.ts +32 -0
  250. package/dist/types/actions/wallet/requestAddresses.d.ts.map +1 -0
  251. package/dist/types/actions/wallet/requestPermissions.d.ts +37 -0
  252. package/dist/types/actions/wallet/requestPermissions.d.ts.map +1 -0
  253. package/dist/types/actions/wallet/sendTransaction.d.ts +58 -0
  254. package/dist/types/actions/wallet/sendTransaction.d.ts.map +1 -0
  255. package/dist/types/actions/wallet/signMessage.d.ts +58 -0
  256. package/dist/types/actions/wallet/signMessage.d.ts.map +1 -0
  257. package/dist/types/actions/wallet/signTypedData.d.ts +114 -0
  258. package/dist/types/actions/wallet/signTypedData.d.ts.map +1 -0
  259. package/dist/types/actions/wallet/switchChain.d.ts +30 -0
  260. package/dist/types/actions/wallet/switchChain.d.ts.map +1 -0
  261. package/dist/types/actions/wallet/watchAsset.d.ts +37 -0
  262. package/dist/types/actions/wallet/watchAsset.d.ts.map +1 -0
  263. package/dist/types/actions/wallet/writeContract.d.ts +69 -0
  264. package/dist/types/actions/wallet/writeContract.d.ts.map +1 -0
  265. package/dist/types/chains/celo/formatters.d.ts +195 -0
  266. package/dist/types/chains/celo/formatters.d.ts.map +1 -0
  267. package/dist/types/chains/celo/parsers.d.ts +6 -0
  268. package/dist/types/chains/celo/parsers.d.ts.map +1 -0
  269. package/dist/types/chains/celo/serializers.d.ts +9 -0
  270. package/dist/types/chains/celo/serializers.d.ts.map +1 -0
  271. package/dist/types/chains/celo/types.d.ts +74 -0
  272. package/dist/types/chains/celo/types.d.ts.map +1 -0
  273. package/dist/types/chains/index.d.ts +5329 -0
  274. package/dist/types/chains/index.d.ts.map +1 -0
  275. package/dist/types/chains/optimism/fees.d.ts +4 -0
  276. package/dist/types/chains/optimism/fees.d.ts.map +1 -0
  277. package/dist/types/chains/optimism/formatters.d.ts +299 -0
  278. package/dist/types/chains/optimism/formatters.d.ts.map +1 -0
  279. package/dist/types/chains/optimism/types.d.ts +53 -0
  280. package/dist/types/chains/optimism/types.d.ts.map +1 -0
  281. package/dist/types/chains/utils.d.ts +7 -0
  282. package/dist/types/chains/utils.d.ts.map +1 -0
  283. package/dist/types/clients/createClient.d.ts +79 -0
  284. package/dist/types/clients/createClient.d.ts.map +1 -0
  285. package/dist/types/clients/createPublicClient.d.ts +29 -0
  286. package/dist/types/clients/createPublicClient.d.ts.map +1 -0
  287. package/dist/types/clients/createTestClient.d.ts +43 -0
  288. package/dist/types/clients/createTestClient.d.ts.map +1 -0
  289. package/dist/types/clients/createWalletClient.d.ts +49 -0
  290. package/dist/types/clients/createWalletClient.d.ts.map +1 -0
  291. package/dist/types/clients/decorators/public.d.ts +1133 -0
  292. package/dist/types/clients/decorators/public.d.ts.map +1 -0
  293. package/dist/types/clients/decorators/test.d.ts +599 -0
  294. package/dist/types/clients/decorators/test.d.ts.map +1 -0
  295. package/dist/types/clients/decorators/wallet.d.ts +449 -0
  296. package/dist/types/clients/decorators/wallet.d.ts.map +1 -0
  297. package/dist/types/clients/transports/createTransport.d.ts +34 -0
  298. package/dist/types/clients/transports/createTransport.d.ts.map +1 -0
  299. package/dist/types/clients/transports/custom.d.ts +21 -0
  300. package/dist/types/clients/transports/custom.d.ts.map +1 -0
  301. package/dist/types/clients/transports/fallback.d.ts +75 -0
  302. package/dist/types/clients/transports/fallback.d.ts.map +1 -0
  303. package/dist/types/clients/transports/http.d.ts +40 -0
  304. package/dist/types/clients/transports/http.d.ts.map +1 -0
  305. package/dist/types/clients/transports/webSocket.d.ts +46 -0
  306. package/dist/types/clients/transports/webSocket.d.ts.map +1 -0
  307. package/dist/types/constants/abis.d.ts +165 -0
  308. package/dist/types/constants/abis.d.ts.map +1 -0
  309. package/dist/types/constants/address.d.ts +2 -0
  310. package/dist/types/constants/address.d.ts.map +1 -0
  311. package/dist/types/constants/contract.d.ts +2 -0
  312. package/dist/types/constants/contract.d.ts.map +1 -0
  313. package/dist/types/constants/contracts.d.ts +2 -0
  314. package/dist/types/constants/contracts.d.ts.map +1 -0
  315. package/dist/types/constants/number.d.ts +97 -0
  316. package/dist/types/constants/number.d.ts.map +1 -0
  317. package/dist/types/constants/solidity.d.ts +15 -0
  318. package/dist/types/constants/solidity.d.ts.map +1 -0
  319. package/dist/types/constants/unit.d.ts +13 -0
  320. package/dist/types/constants/unit.d.ts.map +1 -0
  321. package/dist/types/contract.d.ts +30 -0
  322. package/dist/types/contract.d.ts.map +1 -0
  323. package/dist/types/ens.d.ts +9 -0
  324. package/dist/types/ens.d.ts.map +1 -0
  325. package/dist/types/errors/abi.d.ts +169 -0
  326. package/dist/types/errors/abi.d.ts.map +1 -0
  327. package/dist/types/errors/account.d.ts +8 -0
  328. package/dist/types/errors/account.d.ts.map +1 -0
  329. package/dist/types/errors/address.d.ts +8 -0
  330. package/dist/types/errors/address.d.ts.map +1 -0
  331. package/dist/types/errors/base.d.ts +24 -0
  332. package/dist/types/errors/base.d.ts.map +1 -0
  333. package/dist/types/errors/block.d.ts +10 -0
  334. package/dist/types/errors/block.d.ts.map +1 -0
  335. package/dist/types/errors/ccip.d.ts +29 -0
  336. package/dist/types/errors/ccip.d.ts.map +1 -0
  337. package/dist/types/errors/chain.d.ts +35 -0
  338. package/dist/types/errors/chain.d.ts.map +1 -0
  339. package/dist/types/errors/contract.d.ts +64 -0
  340. package/dist/types/errors/contract.d.ts.map +1 -0
  341. package/dist/types/errors/data.d.ts +18 -0
  342. package/dist/types/errors/data.d.ts.map +1 -0
  343. package/dist/types/errors/encoding.d.ts +53 -0
  344. package/dist/types/errors/encoding.d.ts.map +1 -0
  345. package/dist/types/errors/ens.d.ts +26 -0
  346. package/dist/types/errors/ens.d.ts.map +1 -0
  347. package/dist/types/errors/estimateGas.d.ts +14 -0
  348. package/dist/types/errors/estimateGas.d.ts.map +1 -0
  349. package/dist/types/errors/fee.d.ts +16 -0
  350. package/dist/types/errors/fee.d.ts.map +1 -0
  351. package/dist/types/errors/log.d.ts +6 -0
  352. package/dist/types/errors/log.d.ts.map +1 -0
  353. package/dist/types/errors/node.d.ts +105 -0
  354. package/dist/types/errors/node.d.ts.map +1 -0
  355. package/dist/types/errors/request.d.ts +61 -0
  356. package/dist/types/errors/request.d.ts.map +1 -0
  357. package/dist/types/errors/rpc.d.ts +221 -0
  358. package/dist/types/errors/rpc.d.ts.map +1 -0
  359. package/dist/types/errors/transaction.d.ts +79 -0
  360. package/dist/types/errors/transaction.d.ts.map +1 -0
  361. package/dist/types/errors/transport.d.ts +5 -0
  362. package/dist/types/errors/transport.d.ts.map +1 -0
  363. package/dist/types/errors/utils.d.ts +5 -0
  364. package/dist/types/errors/utils.d.ts.map +1 -0
  365. package/dist/types/errors/version.d.ts +2 -0
  366. package/dist/types/errors/version.d.ts.map +1 -0
  367. package/dist/types/index.d.ts +215 -0
  368. package/dist/types/index.d.ts.map +1 -0
  369. package/dist/types/public.d.ts +33 -0
  370. package/dist/types/public.d.ts.map +1 -0
  371. package/dist/types/test.d.ts +29 -0
  372. package/dist/types/test.d.ts.map +1 -0
  373. package/dist/types/types/account.d.ts +12 -0
  374. package/dist/types/types/account.d.ts.map +1 -0
  375. package/dist/types/types/block.d.ts +62 -0
  376. package/dist/types/types/block.d.ts.map +1 -0
  377. package/dist/types/types/chain.d.ts +115 -0
  378. package/dist/types/types/chain.d.ts.map +1 -0
  379. package/dist/types/types/contract.d.ts +138 -0
  380. package/dist/types/types/contract.d.ts.map +1 -0
  381. package/dist/types/types/eip1193.d.ts +1228 -0
  382. package/dist/types/types/eip1193.d.ts.map +1 -0
  383. package/dist/types/types/ens.d.ts +5 -0
  384. package/dist/types/types/ens.d.ts.map +1 -0
  385. package/dist/types/types/fee.d.ts +30 -0
  386. package/dist/types/types/fee.d.ts.map +1 -0
  387. package/dist/types/types/filter.d.ts +40 -0
  388. package/dist/types/types/filter.d.ts.map +1 -0
  389. package/dist/types/types/log.d.ts +55 -0
  390. package/dist/types/types/log.d.ts.map +1 -0
  391. package/dist/types/types/misc.d.ts +14 -0
  392. package/dist/types/types/misc.d.ts.map +1 -0
  393. package/dist/types/types/multicall.d.ts +48 -0
  394. package/dist/types/types/multicall.d.ts.map +1 -0
  395. package/dist/types/types/rpc.d.ts +20 -0
  396. package/dist/types/types/rpc.d.ts.map +1 -0
  397. package/dist/types/types/transaction.d.ts +147 -0
  398. package/dist/types/types/transaction.d.ts.map +1 -0
  399. package/dist/types/types/transport.d.ts +3 -0
  400. package/dist/types/types/transport.d.ts.map +1 -0
  401. package/dist/types/types/typedData.d.ts +47 -0
  402. package/dist/types/types/typedData.d.ts.map +1 -0
  403. package/dist/types/types/utils.d.ts +188 -0
  404. package/dist/types/types/utils.d.ts.map +1 -0
  405. package/dist/types/types/window.d.ts +7 -0
  406. package/dist/types/types/window.d.ts.map +1 -0
  407. package/dist/types/utils/abi/decodeAbiParameters.d.ts +5 -0
  408. package/dist/types/utils/abi/decodeAbiParameters.d.ts.map +1 -0
  409. package/dist/types/utils/abi/decodeDeployData.d.ts +13 -0
  410. package/dist/types/utils/abi/decodeDeployData.d.ts.map +1 -0
  411. package/dist/types/utils/abi/decodeErrorResult.d.ts +16 -0
  412. package/dist/types/utils/abi/decodeErrorResult.d.ts.map +1 -0
  413. package/dist/types/utils/abi/decodeEventLog.d.ts +20 -0
  414. package/dist/types/utils/abi/decodeEventLog.d.ts.map +1 -0
  415. package/dist/types/utils/abi/decodeFunctionData.d.ts +15 -0
  416. package/dist/types/utils/abi/decodeFunctionData.d.ts.map +1 -0
  417. package/dist/types/utils/abi/decodeFunctionResult.d.ts +14 -0
  418. package/dist/types/utils/abi/decodeFunctionResult.d.ts.map +1 -0
  419. package/dist/types/utils/abi/encodeAbiParameters.d.ts +9 -0
  420. package/dist/types/utils/abi/encodeAbiParameters.d.ts.map +1 -0
  421. package/dist/types/utils/abi/encodeDeployData.d.ts +9 -0
  422. package/dist/types/utils/abi/encodeDeployData.d.ts.map +1 -0
  423. package/dist/types/utils/abi/encodeErrorResult.d.ts +11 -0
  424. package/dist/types/utils/abi/encodeErrorResult.d.ts.map +1 -0
  425. package/dist/types/utils/abi/encodeEventTopics.d.ts +13 -0
  426. package/dist/types/utils/abi/encodeEventTopics.d.ts.map +1 -0
  427. package/dist/types/utils/abi/encodeFunctionData.d.ts +11 -0
  428. package/dist/types/utils/abi/encodeFunctionData.d.ts.map +1 -0
  429. package/dist/types/utils/abi/encodeFunctionResult.d.ts +13 -0
  430. package/dist/types/utils/abi/encodeFunctionResult.d.ts.map +1 -0
  431. package/dist/types/utils/abi/encodePacked.d.ts +11 -0
  432. package/dist/types/utils/abi/encodePacked.d.ts.map +1 -0
  433. package/dist/types/utils/abi/formatAbiItem.d.ts +9 -0
  434. package/dist/types/utils/abi/formatAbiItem.d.ts.map +1 -0
  435. package/dist/types/utils/abi/formatAbiItemWithArgs.d.ts +8 -0
  436. package/dist/types/utils/abi/formatAbiItemWithArgs.d.ts.map +1 -0
  437. package/dist/types/utils/abi/getAbiItem.d.ts +12 -0
  438. package/dist/types/utils/abi/getAbiItem.d.ts.map +1 -0
  439. package/dist/types/utils/accounts.d.ts +3 -0
  440. package/dist/types/utils/accounts.d.ts.map +1 -0
  441. package/dist/types/utils/address/getAddress.d.ts +4 -0
  442. package/dist/types/utils/address/getAddress.d.ts.map +1 -0
  443. package/dist/types/utils/address/getContractAddress.d.ts +20 -0
  444. package/dist/types/utils/address/getContractAddress.d.ts.map +1 -0
  445. package/dist/types/utils/address/isAddress.d.ts +3 -0
  446. package/dist/types/utils/address/isAddress.d.ts.map +1 -0
  447. package/dist/types/utils/address/isAddressEqual.d.ts +3 -0
  448. package/dist/types/utils/address/isAddressEqual.d.ts.map +1 -0
  449. package/dist/types/utils/buildRequest.d.ts +6 -0
  450. package/dist/types/utils/buildRequest.d.ts.map +1 -0
  451. package/dist/types/utils/ccip.d.ts +37 -0
  452. package/dist/types/utils/ccip.d.ts.map +1 -0
  453. package/dist/types/utils/chain.d.ts +14 -0
  454. package/dist/types/utils/chain.d.ts.map +1 -0
  455. package/dist/types/utils/contract/extractFunctionParts.d.ts +13 -0
  456. package/dist/types/utils/contract/extractFunctionParts.d.ts.map +1 -0
  457. package/dist/types/utils/data/concat.d.ts +6 -0
  458. package/dist/types/utils/data/concat.d.ts.map +1 -0
  459. package/dist/types/utils/data/isBytes.d.ts +3 -0
  460. package/dist/types/utils/data/isBytes.d.ts.map +1 -0
  461. package/dist/types/utils/data/isBytesEqual.d.ts +3 -0
  462. package/dist/types/utils/data/isBytesEqual.d.ts.map +1 -0
  463. package/dist/types/utils/data/isHex.d.ts +5 -0
  464. package/dist/types/utils/data/isHex.d.ts.map +1 -0
  465. package/dist/types/utils/data/pad.d.ts +11 -0
  466. package/dist/types/utils/data/pad.d.ts.map +1 -0
  467. package/dist/types/utils/data/size.d.ts +9 -0
  468. package/dist/types/utils/data/size.d.ts.map +1 -0
  469. package/dist/types/utils/data/slice.d.ts +33 -0
  470. package/dist/types/utils/data/slice.d.ts.map +1 -0
  471. package/dist/types/utils/data/trim.d.ts +8 -0
  472. package/dist/types/utils/data/trim.d.ts.map +1 -0
  473. package/dist/types/utils/encoding/fromBytes.d.ts +109 -0
  474. package/dist/types/utils/encoding/fromBytes.d.ts.map +1 -0
  475. package/dist/types/utils/encoding/fromHex.d.ts +138 -0
  476. package/dist/types/utils/encoding/fromHex.d.ts.map +1 -0
  477. package/dist/types/utils/encoding/fromRlp.d.ts +6 -0
  478. package/dist/types/utils/encoding/fromRlp.d.ts.map +1 -0
  479. package/dist/types/utils/encoding/toBytes.d.ts +125 -0
  480. package/dist/types/utils/encoding/toBytes.d.ts.map +1 -0
  481. package/dist/types/utils/encoding/toHex.d.ts +139 -0
  482. package/dist/types/utils/encoding/toHex.d.ts.map +1 -0
  483. package/dist/types/utils/encoding/toRlp.d.ts +8 -0
  484. package/dist/types/utils/encoding/toRlp.d.ts.map +1 -0
  485. package/dist/types/utils/ens/avatar/parseAvatarRecord.d.ts +9 -0
  486. package/dist/types/utils/ens/avatar/parseAvatarRecord.d.ts.map +1 -0
  487. package/dist/types/utils/ens/avatar/utils.d.ts +37 -0
  488. package/dist/types/utils/ens/avatar/utils.d.ts.map +1 -0
  489. package/dist/types/utils/ens/encodeLabelhash.d.ts +3 -0
  490. package/dist/types/utils/ens/encodeLabelhash.d.ts.map +1 -0
  491. package/dist/types/utils/ens/encodedLabelToLabelhash.d.ts +3 -0
  492. package/dist/types/utils/ens/encodedLabelToLabelhash.d.ts.map +1 -0
  493. package/dist/types/utils/ens/errors.d.ts +2 -0
  494. package/dist/types/utils/ens/errors.d.ts.map +1 -0
  495. package/dist/types/utils/ens/labelhash.d.ts +11 -0
  496. package/dist/types/utils/ens/labelhash.d.ts.map +1 -0
  497. package/dist/types/utils/ens/namehash.d.ts +13 -0
  498. package/dist/types/utils/ens/namehash.d.ts.map +1 -0
  499. package/dist/types/utils/ens/normalize.d.ts +12 -0
  500. package/dist/types/utils/ens/normalize.d.ts.map +1 -0
  501. package/dist/types/utils/ens/packetToBytes.d.ts +3 -0
  502. package/dist/types/utils/ens/packetToBytes.d.ts.map +1 -0
  503. package/dist/types/utils/errors/getCallError.d.ts +9 -0
  504. package/dist/types/utils/errors/getCallError.d.ts.map +1 -0
  505. package/dist/types/utils/errors/getContractError.d.ts +12 -0
  506. package/dist/types/utils/errors/getContractError.d.ts.map +1 -0
  507. package/dist/types/utils/errors/getEstimateGasError.d.ts +11 -0
  508. package/dist/types/utils/errors/getEstimateGasError.d.ts.map +1 -0
  509. package/dist/types/utils/errors/getNodeError.d.ts +7 -0
  510. package/dist/types/utils/errors/getNodeError.d.ts.map +1 -0
  511. package/dist/types/utils/errors/getTransactionError.d.ts +12 -0
  512. package/dist/types/utils/errors/getTransactionError.d.ts.map +1 -0
  513. package/dist/types/utils/filters/createFilterRequestScope.d.ts +22 -0
  514. package/dist/types/utils/filters/createFilterRequestScope.d.ts.map +1 -0
  515. package/dist/types/utils/formatters/block.d.ts +28 -0
  516. package/dist/types/utils/formatters/block.d.ts.map +1 -0
  517. package/dist/types/utils/formatters/extract.d.ts +8 -0
  518. package/dist/types/utils/formatters/extract.d.ts.map +1 -0
  519. package/dist/types/utils/formatters/feeHistory.d.ts +4 -0
  520. package/dist/types/utils/formatters/feeHistory.d.ts.map +1 -0
  521. package/dist/types/utils/formatters/formatter.d.ts +10 -0
  522. package/dist/types/utils/formatters/formatter.d.ts.map +1 -0
  523. package/dist/types/utils/formatters/log.d.ts +7 -0
  524. package/dist/types/utils/formatters/log.d.ts.map +1 -0
  525. package/dist/types/utils/formatters/transaction.d.ts +30 -0
  526. package/dist/types/utils/formatters/transaction.d.ts.map +1 -0
  527. package/dist/types/utils/formatters/transactionReceipt.d.ts +14 -0
  528. package/dist/types/utils/formatters/transactionReceipt.d.ts.map +1 -0
  529. package/dist/types/utils/formatters/transactionRequest.d.ts +14 -0
  530. package/dist/types/utils/formatters/transactionRequest.d.ts.map +1 -0
  531. package/dist/types/utils/hash/getEventSelector.d.ts +4 -0
  532. package/dist/types/utils/hash/getEventSelector.d.ts.map +1 -0
  533. package/dist/types/utils/hash/getFunctionSelector.d.ts +3 -0
  534. package/dist/types/utils/hash/getFunctionSelector.d.ts.map +1 -0
  535. package/dist/types/utils/hash/hashFunction.d.ts +4 -0
  536. package/dist/types/utils/hash/hashFunction.d.ts.map +1 -0
  537. package/dist/types/utils/hash/isHash.d.ts +3 -0
  538. package/dist/types/utils/hash/isHash.d.ts.map +1 -0
  539. package/dist/types/utils/hash/keccak256.d.ts +6 -0
  540. package/dist/types/utils/hash/keccak256.d.ts.map +1 -0
  541. package/dist/types/utils/index.d.ts +82 -0
  542. package/dist/types/utils/index.d.ts.map +1 -0
  543. package/dist/types/utils/observe.d.ts +17 -0
  544. package/dist/types/utils/observe.d.ts.map +1 -0
  545. package/dist/types/utils/poll.d.ts +13 -0
  546. package/dist/types/utils/poll.d.ts.map +1 -0
  547. package/dist/types/utils/promise/createBatchScheduler.d.ts +17 -0
  548. package/dist/types/utils/promise/createBatchScheduler.d.ts.map +1 -0
  549. package/dist/types/utils/promise/withCache.d.ts +36 -0
  550. package/dist/types/utils/promise/withCache.d.ts.map +1 -0
  551. package/dist/types/utils/promise/withRetry.d.ts +12 -0
  552. package/dist/types/utils/promise/withRetry.d.ts.map +1 -0
  553. package/dist/types/utils/promise/withTimeout.d.ts +8 -0
  554. package/dist/types/utils/promise/withTimeout.d.ts.map +1 -0
  555. package/dist/types/utils/regex.d.ts +4 -0
  556. package/dist/types/utils/regex.d.ts.map +1 -0
  557. package/dist/types/utils/rpc.d.ts +72 -0
  558. package/dist/types/utils/rpc.d.ts.map +1 -0
  559. package/dist/types/utils/signature/hashMessage.d.ts +6 -0
  560. package/dist/types/utils/signature/hashMessage.d.ts.map +1 -0
  561. package/dist/types/utils/signature/hashTypedData.d.ts +11 -0
  562. package/dist/types/utils/signature/hashTypedData.d.ts.map +1 -0
  563. package/dist/types/utils/signature/hexToSignature.d.ts +13 -0
  564. package/dist/types/utils/signature/hexToSignature.d.ts.map +1 -0
  565. package/dist/types/utils/signature/recoverAddress.d.ts +9 -0
  566. package/dist/types/utils/signature/recoverAddress.d.ts.map +1 -0
  567. package/dist/types/utils/signature/recoverMessageAddress.d.ts +9 -0
  568. package/dist/types/utils/signature/recoverMessageAddress.d.ts.map +1 -0
  569. package/dist/types/utils/signature/recoverPublicKey.d.ts +8 -0
  570. package/dist/types/utils/signature/recoverPublicKey.d.ts.map +1 -0
  571. package/dist/types/utils/signature/recoverTypedDataAddress.d.ts +13 -0
  572. package/dist/types/utils/signature/recoverTypedDataAddress.d.ts.map +1 -0
  573. package/dist/types/utils/signature/signatureToHex.d.ts +17 -0
  574. package/dist/types/utils/signature/signatureToHex.d.ts.map +1 -0
  575. package/dist/types/utils/signature/verifyMessage.d.ts +25 -0
  576. package/dist/types/utils/signature/verifyMessage.d.ts.map +1 -0
  577. package/dist/types/utils/signature/verifyTypedData.d.ts +28 -0
  578. package/dist/types/utils/signature/verifyTypedData.d.ts.map +1 -0
  579. package/dist/types/utils/stringify.d.ts +2 -0
  580. package/dist/types/utils/stringify.d.ts.map +1 -0
  581. package/dist/types/utils/transaction/assertRequest.d.ts +5 -0
  582. package/dist/types/utils/transaction/assertRequest.d.ts.map +1 -0
  583. package/dist/types/utils/transaction/assertTransaction.d.ts +5 -0
  584. package/dist/types/utils/transaction/assertTransaction.d.ts.map +1 -0
  585. package/dist/types/utils/transaction/getSerializedTransactionType.d.ts +4 -0
  586. package/dist/types/utils/transaction/getSerializedTransactionType.d.ts.map +1 -0
  587. package/dist/types/utils/transaction/getTransactionType.d.ts +4 -0
  588. package/dist/types/utils/transaction/getTransactionType.d.ts.map +1 -0
  589. package/dist/types/utils/transaction/parseTransaction.d.ts +9 -0
  590. package/dist/types/utils/transaction/parseTransaction.d.ts.map +1 -0
  591. package/dist/types/utils/transaction/prepareRequest.d.ts +21 -0
  592. package/dist/types/utils/transaction/prepareRequest.d.ts.map +1 -0
  593. package/dist/types/utils/transaction/serializeAccessList.d.ts +5 -0
  594. package/dist/types/utils/transaction/serializeAccessList.d.ts.map +1 -0
  595. package/dist/types/utils/transaction/serializeTransaction.d.ts +7 -0
  596. package/dist/types/utils/transaction/serializeTransaction.d.ts.map +1 -0
  597. package/dist/types/utils/typedData.d.ts +6 -0
  598. package/dist/types/utils/typedData.d.ts.map +1 -0
  599. package/dist/types/utils/uid.d.ts +2 -0
  600. package/dist/types/utils/uid.d.ts.map +1 -0
  601. package/dist/types/utils/unit/formatEther.d.ts +2 -0
  602. package/dist/types/utils/unit/formatEther.d.ts.map +1 -0
  603. package/dist/types/utils/unit/formatGwei.d.ts +2 -0
  604. package/dist/types/utils/unit/formatGwei.d.ts.map +1 -0
  605. package/dist/types/utils/unit/formatUnits.d.ts +2 -0
  606. package/dist/types/utils/unit/formatUnits.d.ts.map +1 -0
  607. package/dist/types/utils/unit/parseEther.d.ts +2 -0
  608. package/dist/types/utils/unit/parseEther.d.ts.map +1 -0
  609. package/dist/types/utils/unit/parseGwei.d.ts +2 -0
  610. package/dist/types/utils/unit/parseGwei.d.ts.map +1 -0
  611. package/dist/types/utils/unit/parseUnits.d.ts +2 -0
  612. package/dist/types/utils/unit/parseUnits.d.ts.map +1 -0
  613. package/dist/types/utils/wait.d.ts +2 -0
  614. package/dist/types/utils/wait.d.ts.map +1 -0
  615. package/dist/types/wallet.d.ts +11 -0
  616. package/dist/types/wallet.d.ts.map +1 -0
  617. package/dist/types/window.d.ts +2 -0
  618. package/dist/types/window.d.ts.map +1 -0
  619. package/package.json +1 -1
  620. package/src/actions/public/estimateFeesPerGas.ts +152 -0
  621. package/src/actions/public/estimateMaxPriorityFeePerGas.ts +96 -0
  622. package/src/actions/public/verifyHash.ts +1 -1
  623. package/src/actions/public/verifyMessage.ts +3 -2
  624. package/src/actions/public/verifyTypedData.ts +3 -2
  625. package/src/actions/wallet/deployContract.ts +2 -1
  626. package/src/actions/wallet/sendTransaction.ts +2 -1
  627. package/src/actions/wallet/writeContract.ts +2 -1
  628. package/src/clients/createTestClient.ts +2 -1
  629. package/src/clients/decorators/public.ts +64 -0
  630. package/src/errors/fee.ts +27 -0
  631. package/src/errors/version.ts +1 -1
  632. package/src/index.ts +38 -24
  633. package/src/public.ts +10 -0
  634. package/src/types/chain.ts +80 -12
  635. package/src/types/eip1193.ts +12 -0
  636. package/src/types/fee.ts +2 -0
  637. package/src/utils/transaction/prepareRequest.ts +37 -45
  638. package/chains/dist/cjs/celo/formatters.js.map +0 -1
  639. package/chains/dist/cjs/celo/parsers.js.map +0 -1
  640. package/chains/dist/cjs/celo/serializers.js.map +0 -1
  641. package/chains/dist/cjs/celo/types.js.map +0 -1
  642. package/chains/dist/cjs/index.js.map +0 -1
  643. package/chains/dist/cjs/optimism/fees.js.map +0 -1
  644. package/chains/dist/cjs/optimism/formatters.js.map +0 -1
  645. package/chains/dist/cjs/optimism/types.js.map +0 -1
  646. package/chains/dist/cjs/types.js.map +0 -1
  647. package/chains/dist/cjs/utils.js.map +0 -1
  648. package/chains/dist/tsconfig.build.tsbuildinfo +0 -1
  649. package/chains/node_modules/.bin/tsc +0 -17
  650. package/chains/node_modules/.bin/tsserver +0 -17
  651. package/chains/tsconfig.tsbuildinfo +0 -1
@@ -53,11 +53,21 @@ import {
53
53
  type EstimateContractGasReturnType,
54
54
  estimateContractGas,
55
55
  } from '../../actions/public/estimateContractGas.js'
56
+ import {
57
+ type EstimateFeesPerGasParameters,
58
+ type EstimateFeesPerGasReturnType,
59
+ estimateFeesPerGas,
60
+ } from '../../actions/public/estimateFeesPerGas.js'
56
61
  import {
57
62
  type EstimateGasParameters,
58
63
  type EstimateGasReturnType,
59
64
  estimateGas,
60
65
  } from '../../actions/public/estimateGas.js'
66
+ import {
67
+ type EstimateMaxPriorityFeePerGasParameters,
68
+ type EstimateMaxPriorityFeePerGasReturnType,
69
+ estimateMaxPriorityFeePerGas,
70
+ } from '../../actions/public/estimateMaxPriorityFeePerGas.js'
61
71
  import {
62
72
  type GetBalanceParameters,
63
73
  type GetBalanceReturnType,
@@ -204,6 +214,7 @@ import type {
204
214
  MaybeAbiEventName,
205
215
  MaybeExtractEventArgsFromAbi,
206
216
  } from '../../types/contract.js'
217
+ import type { FeeValuesType } from '../../types/fee.js'
207
218
  import type { FilterType } from '../../types/filter.js'
208
219
  import type { Client } from '../createClient.js'
209
220
  import type { Transport } from '../transports/createTransport.js'
@@ -764,6 +775,33 @@ export type PublicActions<
764
775
  getFeeHistory: (
765
776
  args: GetFeeHistoryParameters,
766
777
  ) => Promise<GetFeeHistoryReturnType>
778
+ /**
779
+ * Returns an estimate for the fees per gas for a transaction to be included
780
+ * in the next block.
781
+ *
782
+ * - Docs: https://viem.sh/docs/actions/public/estimateFeesPerGas.html
783
+ *
784
+ * @param client - Client to use
785
+ * @param parameters - {@link EstimateFeesPerGasParameters}
786
+ * @returns An estimate (in wei) for the fees per gas. {@link EstimateFeesPerGasReturnType}
787
+ *
788
+ * @example
789
+ * import { createPublicClient, http } from 'viem'
790
+ * import { mainnet } from 'viem/chains'
791
+ *
792
+ * const client = createPublicClient({
793
+ * chain: mainnet,
794
+ * transport: http(),
795
+ * })
796
+ * const maxPriorityFeePerGas = await client.estimateFeesPerGas()
797
+ * // { maxFeePerGas: ..., maxPriorityFeePerGas: ... }
798
+ */
799
+ estimateFeesPerGas: <
800
+ TChainOverride extends Chain | undefined,
801
+ TType extends FeeValuesType = 'eip1559',
802
+ >(
803
+ args?: EstimateFeesPerGasParameters<TChain, TChainOverride, TType>,
804
+ ) => Promise<EstimateFeesPerGasReturnType>
767
805
  /**
768
806
  * Returns a list of logs or hashes based on a [Filter](/docs/glossary/terms#filter) since the last time it was called.
769
807
  *
@@ -970,6 +1008,29 @@ export type PublicActions<
970
1008
  ) => Promise<
971
1009
  GetLogsReturnType<TAbiEvent, TAbiEvents, TStrict, TFromBlock, TToBlock>
972
1010
  >
1011
+ /**
1012
+ * Returns an estimate for the max priority fee per gas (in wei) for a transaction
1013
+ * to be included in the next block.
1014
+ *
1015
+ * - Docs: https://viem.sh/docs/actions/public/estimateMaxPriorityFeePerGas.html
1016
+ *
1017
+ * @param client - Client to use
1018
+ * @returns An estimate (in wei) for the max priority fee per gas. {@link EstimateMaxPriorityFeePerGasReturnType}
1019
+ *
1020
+ * @example
1021
+ * import { createPublicClient, http } from 'viem'
1022
+ * import { mainnet } from 'viem/chains'
1023
+ *
1024
+ * const client = createPublicClient({
1025
+ * chain: mainnet,
1026
+ * transport: http(),
1027
+ * })
1028
+ * const maxPriorityFeePerGas = await client.estimateMaxPriorityFeePerGas()
1029
+ * // 10000000n
1030
+ */
1031
+ estimateMaxPriorityFeePerGas: <TChainOverride extends Chain | undefined,>(
1032
+ args?: EstimateMaxPriorityFeePerGasParameters<TChain, TChainOverride>,
1033
+ ) => Promise<EstimateMaxPriorityFeePerGasReturnType>
973
1034
  /**
974
1035
  * Returns the value from a storage slot at a given address.
975
1036
  *
@@ -1492,10 +1553,13 @@ export function publicActions<
1492
1553
  getEnsResolver: (args) => getEnsResolver(client, args),
1493
1554
  getEnsText: (args) => getEnsText(client, args),
1494
1555
  getFeeHistory: (args) => getFeeHistory(client, args),
1556
+ estimateFeesPerGas: (args) => estimateFeesPerGas(client, args),
1495
1557
  getFilterChanges: (args) => getFilterChanges(client, args),
1496
1558
  getFilterLogs: (args) => getFilterLogs(client, args),
1497
1559
  getGasPrice: () => getGasPrice(client),
1498
1560
  getLogs: (args) => getLogs(client, args as any),
1561
+ estimateMaxPriorityFeePerGas: (args) =>
1562
+ estimateMaxPriorityFeePerGas(client, args),
1499
1563
  getStorageAt: (args) => getStorageAt(client, args),
1500
1564
  getTransaction: (args) => getTransaction(client, args),
1501
1565
  getTransactionConfirmations: (args) =>
@@ -0,0 +1,27 @@
1
+ import { formatGwei } from '../utils/unit/formatGwei.js'
2
+ import { BaseError } from './base.js'
3
+
4
+ export class BaseFeeScalarError extends BaseError {
5
+ override name = 'BaseFeeScalarError'
6
+ constructor() {
7
+ super('`baseFeeMultiplier` must be greater than 1.')
8
+ }
9
+ }
10
+
11
+ export class Eip1559FeesNotSupportedError extends BaseError {
12
+ override name = 'Eip1559FeesNotSupportedError'
13
+ constructor() {
14
+ super('Chain does not support EIP-1559 fees.')
15
+ }
16
+ }
17
+
18
+ export class MaxFeePerGasTooLowError extends BaseError {
19
+ override name = 'MaxFeePerGasTooLowError'
20
+ constructor({ maxPriorityFeePerGas }: { maxPriorityFeePerGas: bigint }) {
21
+ super(
22
+ `\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${formatGwei(
23
+ maxPriorityFeePerGas,
24
+ )} gwei).`,
25
+ )
26
+ }
27
+ }
@@ -1 +1 @@
1
- export const version = '1.6.6'
1
+ export const version = '1.7.0'
package/src/index.ts CHANGED
@@ -64,6 +64,14 @@ export type {
64
64
  EstimateGasParameters,
65
65
  EstimateGasReturnType,
66
66
  } from './actions/public/estimateGas.js'
67
+ export type {
68
+ EstimateFeesPerGasParameters,
69
+ EstimateFeesPerGasReturnType,
70
+ } from './actions/public/estimateFeesPerGas.js'
71
+ export type {
72
+ EstimateMaxPriorityFeePerGasParameters,
73
+ EstimateMaxPriorityFeePerGasReturnType,
74
+ } from './actions/public/estimateMaxPriorityFeePerGas.js'
67
75
  export type { GetAddressesReturnType } from './actions/wallet/getAddresses.js'
68
76
  export type {
69
77
  GetBalanceParameters,
@@ -245,6 +253,29 @@ export type {
245
253
  WriteContractParameters,
246
254
  WriteContractReturnType,
247
255
  } from './actions/wallet/writeContract.js'
256
+ export type {
257
+ Chain,
258
+ ChainContract,
259
+ ChainFees,
260
+ ChainFormatter,
261
+ /** @deprecated use `ChainFormatter` instead. */
262
+ ChainFormatter as Formatter,
263
+ ChainFormatters,
264
+ /** @deprecated use `ChainFormatters` instead. */
265
+ ChainFormatters as Formatters,
266
+ ChainSerializers,
267
+ /** @deprecated use `ChainSerializers` instead. */
268
+ ChainSerializers as Serializers,
269
+ ExtractChainFormatterExclude,
270
+ /** @deprecated use `ExtractChainFormatterExclude` instead. */
271
+ ExtractChainFormatterExclude as ExtractFormatterExclude,
272
+ ExtractChainFormatterParameters,
273
+ /** @deprecated use `ExtractChainFormatterParameters` instead. */
274
+ ExtractChainFormatterParameters as ExtractFormatterParameters,
275
+ ExtractChainFormatterReturnType,
276
+ /** @deprecated use `ExtractChainFormatterReturnType` instead. */
277
+ ExtractChainFormatterReturnType as ExtractFormatterReturnType,
278
+ } from './types/chain.js'
248
279
  export {
249
280
  type Client,
250
281
  type ClientConfig,
@@ -435,6 +466,11 @@ export {
435
466
  ContractFunctionZeroDataError,
436
467
  RawContractError,
437
468
  } from './errors/contract.js'
469
+ export {
470
+ BaseFeeScalarError,
471
+ Eip1559FeesNotSupportedError,
472
+ MaxFeePerGasTooLowError,
473
+ } from './errors/fee.js'
438
474
  export {
439
475
  ChainDisconnectedError,
440
476
  InternalRpcError,
@@ -571,30 +607,7 @@ export type {
571
607
  Signature,
572
608
  SignableMessage,
573
609
  } from './types/misc.js'
574
- export type {
575
- Chain,
576
- ChainContract,
577
- ChainFees,
578
- ChainFormatter,
579
- /** @deprecated use `ChainFormatter` instead. */
580
- ChainFormatter as Formatter,
581
- ChainFormatters,
582
- /** @deprecated use `ChainFormatters` instead. */
583
- ChainFormatters as Formatters,
584
- ChainSerializers,
585
- /** @deprecated use `ChainSerializers` instead. */
586
- ChainSerializers as Serializers,
587
- ExtractChainFormatterExclude,
588
- /** @deprecated use `ExtractChainFormatterExclude` instead. */
589
- ExtractChainFormatterExclude as ExtractFormatterExclude,
590
- ExtractChainFormatterParameters,
591
- /** @deprecated use `ExtractChainFormatterParameters` instead. */
592
- ExtractChainFormatterParameters as ExtractFormatterParameters,
593
- ExtractChainFormatterReturnType,
594
- /** @deprecated use `ExtractChainFormatterReturnType` instead. */
595
- ExtractChainFormatterReturnType as ExtractFormatterReturnType,
596
- GetChain,
597
- } from './types/chain.js'
610
+ export type { GetChain } from './types/chain.js'
598
611
  export type {
599
612
  AddEthereumChainParameter,
600
613
  EIP1193EventMap,
@@ -621,6 +634,7 @@ export type {
621
634
  FeeValues,
622
635
  FeeValuesEIP1559,
623
636
  FeeValuesLegacy,
637
+ FeeValuesType,
624
638
  } from './types/fee.js'
625
639
  export type { Filter } from './types/filter.js'
626
640
  export type {
package/src/public.ts CHANGED
@@ -53,6 +53,11 @@ export {
53
53
  type GetFeeHistoryParameters,
54
54
  type GetFeeHistoryReturnType,
55
55
  } from './actions/public/getFeeHistory.js'
56
+ export {
57
+ estimateFeesPerGas,
58
+ type EstimateFeesPerGasParameters,
59
+ type EstimateFeesPerGasReturnType,
60
+ } from './actions/public/estimateFeesPerGas.js'
56
61
  export {
57
62
  getFilterChanges,
58
63
  type GetFilterChangesParameters,
@@ -68,6 +73,11 @@ export {
68
73
  getGasPrice,
69
74
  type GetGasPriceReturnType,
70
75
  } from './actions/public/getGasPrice.js'
76
+ export {
77
+ estimateMaxPriorityFeePerGas,
78
+ type EstimateMaxPriorityFeePerGasParameters,
79
+ type EstimateMaxPriorityFeePerGasReturnType,
80
+ } from './actions/public/estimateMaxPriorityFeePerGas.js'
71
81
  export {
72
82
  getTransaction,
73
83
  type GetTransactionParameters,
@@ -1,13 +1,18 @@
1
1
  import type { Address } from 'abitype'
2
2
 
3
- import type { FormattedBlock } from '../utils/formatters/block.js'
4
- import type { PrepareRequestParameters } from '../utils/transaction/prepareRequest.js'
5
- import type { SerializeTransactionFn } from '../utils/transaction/serializeTransaction.js'
3
+ import type { EstimateFeesPerGasReturnType } from '../actions/public/estimateFeesPerGas.js'
4
+ import type { Client } from '../clients/createClient.js'
5
+ import type { Transport } from '../clients/transports/createTransport.js'
6
+ import type { Account } from '../types/account.js'
7
+ import type { FeeValuesType } from '../types/fee.js'
6
8
  import type {
7
9
  TransactionSerializable,
8
10
  TransactionSerializableGeneric,
9
- } from './transaction.js'
10
- import type { IsUndefined, Prettify } from './utils.js'
11
+ } from '../types/transaction.js'
12
+ import type { IsUndefined, Prettify } from '../types/utils.js'
13
+ import type { FormattedBlock } from '../utils/formatters/block.js'
14
+ import type { PrepareRequestParameters } from '../utils/transaction/prepareRequest.js'
15
+ import type { SerializeTransactionFn } from '../utils/transaction/serializeTransaction.js'
11
16
 
12
17
  export type Chain<
13
18
  formatters extends ChainFormatters | undefined = ChainFormatters | undefined,
@@ -16,8 +21,14 @@ export type Chain<
16
21
  export type ChainConfig<
17
22
  formatters extends ChainFormatters | undefined = ChainFormatters | undefined,
18
23
  > = {
24
+ /**
25
+ * Modifies how chain data structures (ie. Blocks, Transactions, etc)
26
+ * are formatted & typed.
27
+ */
19
28
  formatters?: formatters | undefined
29
+ /** Modifies how data (ie. Transactions) is serialized. */
20
30
  serializers?: ChainSerializers<formatters> | undefined
31
+ /** Modifies how fees are derived. */
21
32
  fees?: ChainFees<formatters> | undefined
22
33
  }
23
34
 
@@ -29,20 +40,42 @@ export type ChainContract = {
29
40
  export type ChainFees<
30
41
  formatters extends ChainFormatters | undefined = ChainFormatters | undefined,
31
42
  > = {
32
- defaultPriorityFee:
43
+ /**
44
+ * The fee multiplier to use to account for fee fluctuations.
45
+ * Used in the [`estimateFeesPerGas` Action](/docs/actions/public/estimateFeesPerGas).
46
+ *
47
+ * @default 1.2
48
+ */
49
+ baseFeeMultiplier?:
50
+ | number
51
+ | ((args: ChainFeesFnParameters<formatters>) => Promise<number> | number)
52
+ /**
53
+ * The default `maxPriorityFeePerGas` to use when a priority
54
+ * fee is not defined upon sending a transaction.
55
+ *
56
+ * Overrides the return value in the [`estimateMaxPriorityFeePerGas` Action](/docs/actions/public/estimateMaxPriorityFeePerGas).
57
+ */
58
+ defaultPriorityFee?:
33
59
  | bigint
34
- | ((args: {
35
- block: Prettify<FormattedBlock<{ formatters: formatters }>>
36
- request: PrepareRequestParameters<
37
- Omit<Chain, 'formatters'> & { formatters: formatters }
38
- >
39
- }) => Promise<bigint> | bigint)
60
+ | ((args: ChainFeesFnParameters<formatters>) => Promise<bigint> | bigint)
61
+ /**
62
+ * Allows customization of fee per gas values (e.g. `maxFeePerGas`/`maxPriorityFeePerGas`).
63
+ *
64
+ * Overrides the return value in the [`estimateFeesPerGas` Action](/docs/actions/public/estimateFeesPerGas).
65
+ */
66
+ estimateFeesPerGas?: (
67
+ args: ChainEstimateFeesPerGasFnParameters<formatters>,
68
+ ) => Promise<EstimateFeesPerGasReturnType> | bigint
40
69
  }
41
70
 
42
71
  export type ChainFormatters = {
72
+ /** Modifies how the Block structure is formatted & typed. */
43
73
  block?: ChainFormatter<'block'>
74
+ /** Modifies how the Transaction structure is formatted & typed. */
44
75
  transaction?: ChainFormatter<'transaction'>
76
+ /** Modifies how the TransactionReceipt structure is formatted & typed. */
45
77
  transactionReceipt?: ChainFormatter<'transactionReceipt'>
78
+ /** Modifies how the TransactionRequest structure is formatted & typed. */
46
79
  transactionRequest?: ChainFormatter<'transactionRequest'>
47
80
  }
48
81
 
@@ -54,6 +87,7 @@ export type ChainFormatter<type extends string = string> = {
54
87
  export type ChainSerializers<
55
88
  formatters extends ChainFormatters | undefined = undefined,
56
89
  > = {
90
+ /** Modifies how Transactions are serialized. */
57
91
  transaction?: SerializeTransactionFn<
58
92
  formatters extends ChainFormatters
59
93
  ? formatters['transactionRequest'] extends ChainFormatter
@@ -64,6 +98,40 @@ export type ChainSerializers<
64
98
  >
65
99
  }
66
100
 
101
+ /////////////////////////////////////////////////////////////////////
102
+ // Parameters
103
+
104
+ export type ChainFeesFnParameters<
105
+ formatters extends ChainFormatters | undefined = ChainFormatters | undefined,
106
+ > = {
107
+ /** The latest block. */
108
+ block: Prettify<FormattedBlock<{ formatters: formatters }>>
109
+ client: Client<Transport, Chain>
110
+ /**
111
+ * A transaction request. This value will be undefined if the caller
112
+ * is outside of a transaction request context (e.g. a direct call to
113
+ * the `estimateFeesPerGas` Action).
114
+ */
115
+ request?: PrepareRequestParameters<
116
+ Omit<Chain, 'formatters'> & { formatters: formatters },
117
+ Account | undefined,
118
+ undefined
119
+ >
120
+ }
121
+
122
+ export type ChainEstimateFeesPerGasFnParameters<
123
+ formatters extends ChainFormatters | undefined = ChainFormatters | undefined,
124
+ > = {
125
+ /**
126
+ * A function to multiply the base fee based on the `baseFeeMultiplier` value.
127
+ */
128
+ multiply(x: bigint): bigint
129
+ /**
130
+ * The type of fees to return.
131
+ */
132
+ type: FeeValuesType
133
+ } & ChainFeesFnParameters<formatters>
134
+
67
135
  /////////////////////////////////////////////////////////////////////
68
136
  // Utils
69
137
 
@@ -571,6 +571,18 @@ export type PublicRpcSchema = [
571
571
  Parameters: [block: BlockNumber | BlockTag]
572
572
  ReturnType: Quantity
573
573
  },
574
+ /**
575
+ * @description Returns the current maxPriorityFeePerGas in wei.
576
+ * @link https://ethereum.github.io/execution-apis/api-documentation/
577
+ * @example
578
+ * provider.request({ method: 'eth_maxPriorityFeePerGas' })
579
+ * // => '0x5f5e100'
580
+ */
581
+ {
582
+ Method: 'eth_maxPriorityFeePerGas'
583
+ Parameters?: undefined
584
+ ReturnType: Quantity
585
+ },
574
586
  /**
575
587
  * @description Creates a filter to listen for new blocks that can be used with `eth_getFilterChanges`
576
588
  * @link https://eips.ethereum.org/EIPS/eip-1474
package/src/types/fee.ts CHANGED
@@ -31,3 +31,5 @@ export type FeeValuesEIP1559<TQuantity = bigint> = {
31
31
  export type FeeValues<TQuantity = bigint> =
32
32
  | FeeValuesLegacy<TQuantity>
33
33
  | FeeValuesEIP1559<TQuantity>
34
+
35
+ export type FeeValuesType = 'legacy' | 'eip1559'
@@ -2,22 +2,26 @@ import type { Address } from 'abitype'
2
2
 
3
3
  import type { Account } from '../../accounts/types.js'
4
4
  import { parseAccount } from '../../accounts/utils/parseAccount.js'
5
+ import { internal_estimateFeesPerGas } from '../../actions/public/estimateFeesPerGas.js'
5
6
  import {
6
7
  type EstimateGasParameters,
7
8
  estimateGas,
8
9
  } from '../../actions/public/estimateGas.js'
9
10
  import { getBlock } from '../../actions/public/getBlock.js'
10
- import { getGasPrice } from '../../actions/public/getGasPrice.js'
11
11
  import { getTransactionCount } from '../../actions/public/getTransactionCount.js'
12
12
  import type { SendTransactionParameters } from '../../actions/wallet/sendTransaction.js'
13
13
  import type { Client } from '../../clients/createClient.js'
14
14
  import type { Transport } from '../../clients/transports/createTransport.js'
15
15
  import { AccountNotFoundError } from '../../errors/account.js'
16
- import { BaseError } from '../../errors/base.js'
16
+ import {
17
+ Eip1559FeesNotSupportedError,
18
+ MaxFeePerGasTooLowError,
19
+ } from '../../errors/fee.js'
17
20
  import type { GetAccountParameter } from '../../types/account.js'
18
- import type { Chain, GetChain } from '../../types/chain.js'
21
+ import type { Chain } from '../../types/chain.js'
22
+ import type { GetChain } from '../../types/chain.js'
19
23
  import type { UnionOmit } from '../../types/utils.js'
20
- import type { FormattedTransactionRequest } from '../index.js'
24
+ import { type FormattedTransactionRequest } from '../index.js'
21
25
  import { type AssertRequestParameters, assertRequest } from './assertRequest.js'
22
26
 
23
27
  export type PrepareRequestParameters<
@@ -60,15 +64,7 @@ export async function prepareRequest<
60
64
  client: Client<Transport, TChain, TAccount>,
61
65
  args: TArgs,
62
66
  ): Promise<PrepareRequestReturnType<TChain, TAccount, TChainOverride, TArgs>> {
63
- const {
64
- account: account_,
65
- chain = client.chain,
66
- gas,
67
- gasPrice,
68
- maxFeePerGas,
69
- maxPriorityFeePerGas,
70
- nonce,
71
- } = args
67
+ const { account: account_, chain, gas, gasPrice, nonce } = args
72
68
  if (!account_) throw new AccountNotFoundError()
73
69
  const account = parseAccount(account_)
74
70
 
@@ -86,44 +82,40 @@ export async function prepareRequest<
86
82
  typeof block.baseFeePerGas === 'bigint' &&
87
83
  typeof gasPrice === 'undefined'
88
84
  ) {
89
- let defaultPriorityFee = 1_500_000_000n // 1.5 gwei
90
- if (typeof chain?.fees?.defaultPriorityFee !== 'undefined') {
91
- defaultPriorityFee =
92
- typeof chain.fees.defaultPriorityFee === 'bigint'
93
- ? chain.fees.defaultPriorityFee
94
- : await chain.fees.defaultPriorityFee({
95
- block,
96
- request: request as PrepareRequestParameters,
97
- })
98
- }
99
-
100
85
  // EIP-1559 fees
101
- if (typeof maxFeePerGas === 'undefined') {
102
- // Set a buffer of 1.2x on top of the base fee to account for fluctuations.
103
- request.maxPriorityFeePerGas = maxPriorityFeePerGas ?? defaultPriorityFee
104
- request.maxFeePerGas =
105
- (block.baseFeePerGas * 120n) / 100n + request.maxPriorityFeePerGas
106
- } else {
107
- if (
108
- typeof maxPriorityFeePerGas === 'undefined' &&
109
- maxFeePerGas < defaultPriorityFee
110
- )
111
- throw new BaseError(
112
- '`maxFeePerGas` cannot be less than the default `maxPriorityFeePerGas` (1.5 gwei).',
113
- )
114
- request.maxFeePerGas = maxFeePerGas
115
- request.maxPriorityFeePerGas = maxPriorityFeePerGas ?? defaultPriorityFee
116
- }
86
+ const { maxFeePerGas, maxPriorityFeePerGas } =
87
+ await internal_estimateFeesPerGas(client, {
88
+ block,
89
+ chain,
90
+ request: request as PrepareRequestParameters,
91
+ })
92
+
93
+ if (
94
+ typeof args.maxPriorityFeePerGas === 'undefined' &&
95
+ args.maxFeePerGas &&
96
+ args.maxFeePerGas < maxPriorityFeePerGas
97
+ )
98
+ throw new MaxFeePerGasTooLowError({
99
+ maxPriorityFeePerGas,
100
+ })
101
+
102
+ request.maxPriorityFeePerGas = maxPriorityFeePerGas
103
+ request.maxFeePerGas = args.maxFeePerGas ?? maxFeePerGas
117
104
  } else if (typeof gasPrice === 'undefined') {
118
105
  // Legacy fees
119
106
  if (
120
- typeof maxFeePerGas !== 'undefined' ||
121
- typeof maxPriorityFeePerGas !== 'undefined'
107
+ typeof args.maxFeePerGas !== 'undefined' ||
108
+ typeof args.maxPriorityFeePerGas !== 'undefined'
122
109
  )
123
- throw new BaseError('Chain does not support EIP-1559 fees.')
110
+ throw new Eip1559FeesNotSupportedError()
124
111
 
125
- // Set a buffer of 1.2x on top of the base fee to account for fluctuations.
126
- request.gasPrice = ((await getGasPrice(client)) * 120n) / 100n
112
+ const { gasPrice: gasPrice_ } = await internal_estimateFeesPerGas(client, {
113
+ block,
114
+ chain,
115
+ request: request as PrepareRequestParameters,
116
+ type: 'legacy',
117
+ })
118
+ request.gasPrice = gasPrice_
127
119
  }
128
120
 
129
121
  if (typeof gas === 'undefined')
@@ -1 +0,0 @@
1
- {"version":3,"file":"formatters.js","sourceRoot":"","sources":["../../../src/celo/formatters.ts"],"names":[],"mappings":";;;AAAA,+BAA6E;AAG7E,0CAKoB;AAaP,QAAA,cAAc,GAAG;IAC5B,KAAK,EAAgB,IAAA,sBAAW,EAAC;QAC/B,OAAO,EAAE,CAAC,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,CAAC;QACjE,MAAM,CACJ,IAEC;YAID,MAAM,YAAY,GAAG,IAAI,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE;gBAC1D,IAAI,OAAO,WAAW,KAAK,QAAQ;oBAAE,OAAO,WAAW,CAAA;gBACvD,OAAO;oBACL,GAAG,IAAA,wBAAiB,EAAC,WAAW,CAAC;oBACjC,WAAW,EAAE,WAAW,CAAC,WAAW;oBACpC,UAAU,EAAE,WAAW,CAAC,UAAU;wBAChC,CAAC,C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+0,0 @@
1
- {"version":3,"file":"parsers.js","sourceRoot":"","sources":["../../../src/celo/parsers.ts"],"names":[],"mappings":";;;AAAA,+BAaa;AAEb,qDAAyD;AAezD,SAAgB,oBAAoB,CAGlC,qBAAkC;IAElC,MAAM,cAAc,GAAG,IAAA,eAAQ,EAAC,qBAAqB,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;IAE5D,IAAI,cAAc,KAAK,MAAM;QAC3B,OAAO,qBAAqB,CAC1B,qBAAmD,CACL,CAAA;IAElD,OAAO,IAAA,uBAAgB,EACrB,qBAAqB,CACyB,CAAA;AAClD,CAAC;AAfD,oDAeC;AAED,SAAS,qBAAqB,CAC5B,qBAAiD;IAEjD,MAAM,gBAAgB,GAAG,IAAA,yBAAkB,EAAC,qBAAqB,CAAC,CAAA;IAElE,MAAM,CACJ,OAAO,EACP,KAAK,EACL,oBAAoB,EACpB,YAAY,EACZ,GAAG,EACH,WAAW,EACX,mBAAmB,EACnB,UAAU,EACV,EAAE,EACF,KAAK,EACL,IAAI,EACJ,UAAU,EACV,CAAC,EACD,CAAC,EACD,CAAC,EACF,GAAG,gBAAgB,CAAA;IAEpB,IAAI,gBAAgB,CAAC,MAAM,KAAK,EAAE,IAAI,gBAAgB,CAAC,MAAM,KAAK,EAAE,EAAE;QACpE,MAAM,IAAI,wCAAiC,CAAC;YAC1C,UAAU,EAAE;gBACV,OAAO;gBACP,KAAK;gBACL,oBAAoB;gBACpB,YAAY;gBACZ,GAAG;gBACH,WAAW;gBACX,EAAE;gBACF,mBAAmB;gBACnB,UAAU;gBACV,KAAK;gBACL,IAAI;gBACJ,UAAU;gBACV,GAAG,CAAC,gBAAgB,CAAC,MAAM,GAAG,EAAE;oBAC9B,CAAC,CAAC;wBACE,CAAC;wBACD,CAAC;wBACD,CAAC;qBACF;oBACH,CAAC,CAAC,EAAE,CAAC;aACR;YACD,qBAAqB;YACrB,IAAI,EAAE,OAAO;SACd,CAAC,CAAA;KACH;IAED,MAAM,WAAW,GAA0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,EACJ,OAAO,EACP,oBAAoB,EACpB,QAAQ,EACR,YAAY,EACZ,EAAE,EACF,WAAW,EACX,UAAU,EACV,mBAAmB,GACpB,GAAG,WAAW,CAAA;IACf,IAAI,OAAO,IAAI,CAAC;QAAE,MAAM,IAAI,0BAAmB,CAAC,EAAE,OAAO,EAAE,CAAC,CAAA;IAC5D,IAAI,EAAE,IAAI,CAAC,IAAA,gBAAS,EAAC,EAAE,CAAC;QAAE,MAAM,IAAI,0BAAmB,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAA;IACxE,IAAI,QAAQ;QACV,MAAM,IAAI,gBAAS,CACjB,yDAAyD,CAC1D,CAAA;IAEH,IAAI,YAAY,IAAI,YAAY,GAAG,mBAAmB;QACpD,MAAM,IAAI,yBAAkB,CAAC,EAAE,YAAY,EAAE,CAAC,CAAA;IAEhD,IACE,oBAAoB;QACpB,YAAY;QACZ,oBAAoB,GAAG,YAAY;QAEnC,MAAM,IAAI,0BAAmB,CAAC,EAAE,YAAY,EAAE,oBAAoB,EAAE,CAAC,CAAA;IAEvE,IACE,CAAC,UAAU,IAAI,CAAC,mBAAmB,CAAC;QACpC,CAAC,mBAAmB,IAAI,CAAC,UAAU,CAAC,EACpC;QACA,MAAM,IAAI,gBAAS,CACjB,mEAAmE,CACpE,CAAA;KACF;IAED,IAAI,WAAW,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,IAAI,CAAC,EAAE;QACjD,MAAM,IAAI,gBAAS,CACjB,gEAAgE,CACjE,CAAA;KACF;IAED,IAAI,CAAC,WAAW,IAAI,CAAC,mBAAmB,EAAE;QACxC,MAAM,IAAI,gBAAS,CACjB,yFAAyF,CAC1F,CAAA;KACF;AACH,CAAC;AAlDD,wDAkDC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/celo/types.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.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nE,QAAA,GAAG,GAAiB,IAAA,sBAAW,EAAC,MAAM,CAAC,GAAG,CAAC,CAAA;AAC3C,QAAA,UAAU,GAAiB,IAAA,sBAAW,EAAC,MAAM,CAAC,UAAU,CAAC,CAAA;AACzD,QAAA,QAAQ,GAAiB,IAAA,sBAAW,EAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;AACrD,QAAA,MAAM,GAAiB,IAAA,sBAAW,EAAC,MAAM,CAAC,MAAM,CAAC,CAAA;AACjD,QAAA,aAAa,GAAiB,IAAA,sBAAW,EAAC,MAAM,CAAC,aAAa,CAAC,CAAA;AAC/D,QAAA,IAAI,GAAiB,IAAA,sBAAW,EAAC,MAAM,CAAC,IAAI,EAAE;IACzD,IAAI,EAAE,sBAAY;IAClB,UAAU,EAAE,kCAAkB;CAC/B,CAAC,CAAA;AACW,QAAA,WAAW,GAAiB,IAAA,sBAAW,EAAC,MAAM,CAAC,WAAW,EAAE;IACvE,IAAI,EAAE,sBAAY;IAClB,UAAU,EAAE,kCAAkB;CAC/B,CAAC,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"fees.js","sourceRoot":"","sources":["../../../src/optimism/fees.ts"],"names":[],"mappings":";;;AAEa,QAAA,YAAY,GAAG;IAC1B,kBAAkB,EAAE,QAAU;CACF,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"formatters.js","sourceRoot":"","sources":["../../../src/optimism/formatters.ts"],"names":[],"mappings":";;;AAAA,+BAKa;AAGb,0CAIoB;AAUP,QAAA,kBAAkB,GAAG;IAChC,KAAK,EAAgB,IAAA,sBAAW,EAAC;QAC/B,MAAM,CACJ,IAEC;YAID,MAAM,YAAY,GAAG,IAAI,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE;gBAC1D,IAAI,OAAO,WAAW,KAAK,QAAQ;oBAAE,OAAO,WAAW,CAAA;gBACvD,MAAM,SAAS,GAAG,IAAA,wBAAiB,EACjC,WAA6B,CACP,CAAA;g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C,SAAS,CAAC,CAAC,CAAC,IAAA,kBAAW,EAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI;gBAC9D,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAA,kBAAW,EAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI;gBAClD,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI;aAChE,CAAA;QACH,CAAC;KACF,CAAC;CACgC,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/optimism/types.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":";;;AAAA,+BAKa;AAKb,SAAgB,WAAW,CAIzB,KAAY,EACZ,SAAkC,EAAE;IAEpC,MAAM,EACJ,IAAI,GAAG,KAAK,CAAC,IAAI,EACjB,UAAU,GAAG,KAAK,CAAC,UAAU,EAC7B,WAAW,GAAG,KAAK,CAAC,WAAW,GAChC,GAAG,MAAM,CAAA;IACV,OAAO;QACL,GAAG,KAAK;QACR,IAAI;QACJ,UAAU;QACV,WAAW;KACyC,CAAA;AACxD,CAAC;AAlBD,kCAkBC;AAED,SAAgB,eAAe,CAC7B,IAAW,EACX,MAAuC;IAEvC,OAAO,CAIL,EACA,OAAO,EACP,MAAM,EAAE,SAAS,GAIlB,EAAE,EAAE;QACH,OAAO;YACL,OAAO;YACP,MAAM,EAAE,CAAC,IAA8C,EAAE,EAAE;gBACzD,MAAM,SAAS,GAAG,MAAM,CAAC,IAAW,CAAC,CAAA;gBACrC,IAAI,OAAO,EAAE;oBACX,KAAK,MAAM,GAAG,IAA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