viem 0.0.1-alpha.2 → 0.0.1-alpha.20

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 (483) hide show
  1. package/chains/package.json +1 -1
  2. package/clients/package.json +1 -1
  3. package/dist/{rpc-655c0ba4.d.ts → chain-32f56cfa.d.ts} +78 -17
  4. package/dist/chain-f12cdc7f.d.ts +5 -0
  5. package/dist/chains.d.ts +1291 -74
  6. package/dist/chains.js +125 -129
  7. package/dist/chains.js.map +1 -0
  8. package/dist/chains.mjs +129 -0
  9. package/dist/chains.mjs.map +1 -0
  10. package/dist/{chunk-3EOU525X.js → chunk-5Q6FSUU2.mjs} +1199 -562
  11. package/dist/chunk-5Q6FSUU2.mjs.map +1 -0
  12. package/dist/chunk-FHXXG7I6.js +259 -0
  13. package/dist/chunk-FHXXG7I6.js.map +1 -0
  14. package/dist/chunk-IAQPMSGJ.js +176 -0
  15. package/dist/chunk-IAQPMSGJ.js.map +1 -0
  16. package/dist/{chunk-4HNVS7AM.js → chunk-MYQNZSWD.mjs} +330 -539
  17. package/dist/chunk-MYQNZSWD.mjs.map +1 -0
  18. package/dist/chunk-NHAKUPTF.js +889 -0
  19. package/dist/chunk-NHAKUPTF.js.map +1 -0
  20. package/dist/chunk-SF4I2NKC.js +2683 -0
  21. package/dist/chunk-SF4I2NKC.js.map +1 -0
  22. package/dist/chunk-T7CBAKLI.mjs +176 -0
  23. package/dist/chunk-T7CBAKLI.mjs.map +1 -0
  24. package/dist/chunk-YFKR74XG.js +256 -0
  25. package/dist/chunk-YFKR74XG.js.map +1 -0
  26. package/dist/chunk-YODUQCHJ.mjs +256 -0
  27. package/dist/chunk-YODUQCHJ.mjs.map +1 -0
  28. package/dist/{chunk-YQRTXQ2G.js → chunk-ZVGTYLKU.mjs} +3 -15
  29. package/dist/chunk-ZVGTYLKU.mjs.map +1 -0
  30. package/dist/clients/index.d.ts +8 -7
  31. package/dist/clients/index.js +24 -25
  32. package/dist/clients/index.js.map +1 -0
  33. package/dist/clients/index.mjs +24 -0
  34. package/dist/clients/index.mjs.map +1 -0
  35. package/dist/contract-9af4608b.d.ts +142 -0
  36. package/dist/createClient-5d316c7e.d.ts +62 -0
  37. package/dist/createPublicClient-9d2b42e1.d.ts +19 -0
  38. package/dist/createTestClient-79498dab.d.ts +34 -0
  39. package/dist/createWalletClient-f69a5230.d.ts +30 -0
  40. package/dist/{eip1193-8f7c22ce.d.ts → eip1193-6c485d63.d.ts} +13 -10
  41. package/dist/index.d.ts +424 -11
  42. package/dist/index.js +395 -292
  43. package/dist/index.js.map +1 -0
  44. package/dist/index.mjs +395 -0
  45. package/dist/index.mjs.map +1 -0
  46. package/dist/{parseGwei-fd7a0f7d.d.ts → parseGwei-4308ad80.d.ts} +82 -139
  47. package/dist/public.d.ts +11 -0
  48. package/dist/public.js +59 -0
  49. package/dist/public.js.map +1 -0
  50. package/dist/public.mjs +59 -0
  51. package/dist/public.mjs.map +1 -0
  52. package/dist/{rpc-3c0e3985.d.ts → rpc-26932bae.d.ts} +1 -38
  53. package/dist/sendTransaction-1c8290a9.d.ts +12 -0
  54. package/dist/stopImpersonatingAccount-7781842a.d.ts +156 -0
  55. package/dist/test.d.ts +6 -0
  56. package/dist/test.js +60 -0
  57. package/dist/test.js.map +1 -0
  58. package/dist/test.mjs +60 -0
  59. package/dist/test.mjs.map +1 -0
  60. package/dist/transactionRequest-341b6ed2.d.ts +15 -0
  61. package/dist/utils/index.d.ts +51 -8
  62. package/dist/utils/index.js +171 -156
  63. package/dist/utils/index.js.map +1 -0
  64. package/dist/utils/index.mjs +171 -0
  65. package/dist/utils/index.mjs.map +1 -0
  66. package/dist/wallet.d.ts +8 -0
  67. package/dist/wallet.js +24 -0
  68. package/dist/wallet.js.map +1 -0
  69. package/dist/wallet.mjs +24 -0
  70. package/dist/wallet.mjs.map +1 -0
  71. package/dist/watchAsset-afaad3c7.d.ts +38 -0
  72. package/dist/{watchAsset-04ab8db5.d.ts → watchPendingTransactions-3b722547.d.ts} +67 -217
  73. package/dist/{webSocket-c6e0d26f.d.ts → webSocket-b180e679.d.ts} +4 -9
  74. package/dist/window.d.ts +3 -2
  75. package/dist/window.js +1 -0
  76. package/dist/window.js.map +1 -0
  77. package/dist/window.mjs +1 -0
  78. package/dist/window.mjs.map +1 -0
  79. package/package.json +30 -66
  80. package/src/_test/abis.ts +1413 -0
  81. package/src/_test/bench.ts +15 -0
  82. package/src/_test/constants.ts +60 -0
  83. package/src/_test/globalSetup.ts +11 -0
  84. package/src/_test/index.ts +23 -0
  85. package/src/_test/setup.ts +8 -0
  86. package/src/_test/utils.ts +112 -0
  87. package/src/actions/index.test.ts +78 -0
  88. package/src/actions/index.ts +174 -0
  89. package/src/actions/public/call.bench.ts +48 -0
  90. package/src/actions/public/call.test.ts +99 -0
  91. package/src/actions/public/call.ts +97 -0
  92. package/src/actions/public/createBlockFilter.bench.ts +11 -0
  93. package/src/actions/public/createBlockFilter.test.ts +9 -0
  94. package/src/actions/public/createBlockFilter.ts +14 -0
  95. package/src/actions/public/createContractEventFilter.test.ts +119 -0
  96. package/src/actions/public/createContractEventFilter.ts +69 -0
  97. package/src/actions/public/createEventFilter.test.ts +245 -0
  98. package/src/actions/public/createEventFilter.ts +76 -0
  99. package/src/actions/public/createPendingTransactionFilter.bench.ts +11 -0
  100. package/src/actions/public/createPendingTransactionFilter.test.ts +9 -0
  101. package/src/actions/public/createPendingTransactionFilter.ts +14 -0
  102. package/src/actions/public/deployContract.test.ts +56 -0
  103. package/src/actions/public/deployContract.ts +38 -0
  104. package/src/actions/public/estimateGas.bench.ts +46 -0
  105. package/src/actions/public/estimateGas.test.ts +92 -0
  106. package/src/actions/public/estimateGas.ts +61 -0
  107. package/src/actions/public/getBalance.test.ts +83 -0
  108. package/src/actions/public/getBalance.ts +37 -0
  109. package/src/actions/public/getBlock.bench.ts +28 -0
  110. package/src/actions/public/getBlock.test.ts +575 -0
  111. package/src/actions/public/getBlock.ts +65 -0
  112. package/src/actions/public/getBlockNumber.bench.ts +28 -0
  113. package/src/actions/public/getBlockNumber.test.ts +27 -0
  114. package/src/actions/public/getBlockNumber.ts +32 -0
  115. package/src/actions/public/getBlockTransactionCount.bench.ts +15 -0
  116. package/src/actions/public/getBlockTransactionCount.test.ts +57 -0
  117. package/src/actions/public/getBlockTransactionCount.ts +52 -0
  118. package/src/actions/public/getBytecode.test.ts +27 -0
  119. package/src/actions/public/getBytecode.ts +32 -0
  120. package/src/actions/public/getChainId.bench.ts +15 -0
  121. package/src/actions/public/getChainId.test.ts +8 -0
  122. package/src/actions/public/getChainId.ts +7 -0
  123. package/src/actions/public/getFeeHistory.bench.ts +18 -0
  124. package/src/actions/public/getFeeHistory.test.ts +137 -0
  125. package/src/actions/public/getFeeHistory.ts +44 -0
  126. package/src/actions/public/getFilterChanges.bench.ts +13 -0
  127. package/src/actions/public/getFilterChanges.test.ts +189 -0
  128. package/src/actions/public/getFilterChanges.ts +23 -0
  129. package/src/actions/public/getFilterLogs.test.ts +104 -0
  130. package/src/actions/public/getFilterLogs.ts +20 -0
  131. package/src/actions/public/getGasPrice.bench.ts +28 -0
  132. package/src/actions/public/getGasPrice.test.ts +8 -0
  133. package/src/actions/public/getGasPrice.ts +15 -0
  134. package/src/actions/public/getLogs.test.ts +107 -0
  135. package/src/actions/public/getLogs.ts +84 -0
  136. package/src/actions/public/getStorageAt.test.ts +34 -0
  137. package/src/actions/public/getStorageAt.ts +32 -0
  138. package/src/actions/public/getTransaction.bench.ts +33 -0
  139. package/src/actions/public/getTransaction.test.ts +311 -0
  140. package/src/actions/public/getTransaction.ts +95 -0
  141. package/src/actions/public/getTransactionConfirmations.test.ts +69 -0
  142. package/src/actions/public/getTransactionConfirmations.ts +38 -0
  143. package/src/actions/public/getTransactionCount.test.ts +56 -0
  144. package/src/actions/public/getTransactionCount.ts +34 -0
  145. package/src/actions/public/getTransactionReceipt.bench.ts +33 -0
  146. package/src/actions/public/getTransactionReceipt.test.ts +179 -0
  147. package/src/actions/public/getTransactionReceipt.ts +34 -0
  148. package/src/actions/public/index.test.ts +43 -0
  149. package/src/actions/public/index.ts +149 -0
  150. package/src/actions/public/readContract.test.ts +128 -0
  151. package/src/actions/public/readContract.ts +87 -0
  152. package/src/actions/public/simulateContract.bench.ts +31 -0
  153. package/src/actions/public/simulateContract.test.ts +238 -0
  154. package/src/actions/public/simulateContract.ts +98 -0
  155. package/src/actions/public/uninstallFilter.bench.ts +13 -0
  156. package/src/actions/public/uninstallFilter.test.ts +65 -0
  157. package/src/actions/public/uninstallFilter.ts +17 -0
  158. package/src/actions/public/waitForTransactionReceipt.test.ts +322 -0
  159. package/src/actions/public/waitForTransactionReceipt.ts +170 -0
  160. package/src/actions/public/watchBlockNumber.test.ts +166 -0
  161. package/src/actions/public/watchBlockNumber.ts +79 -0
  162. package/src/actions/public/watchBlocks.test.ts +210 -0
  163. package/src/actions/public/watchBlocks.ts +114 -0
  164. package/src/actions/public/watchContractEvent.test.ts +301 -0
  165. package/src/actions/public/watchContractEvent.ts +108 -0
  166. package/src/actions/public/watchEvent.test.ts +190 -0
  167. package/src/actions/public/watchEvent.ts +95 -0
  168. package/src/actions/public/watchPendingTransactions.test.ts +116 -0
  169. package/src/actions/public/watchPendingTransactions.ts +74 -0
  170. package/src/actions/test/dropTransaction.test.ts +34 -0
  171. package/src/actions/test/dropTransaction.ts +17 -0
  172. package/src/actions/test/getAutomine.test.ts +14 -0
  173. package/src/actions/test/getAutomine.ts +11 -0
  174. package/src/actions/test/getTxpoolContent.test.ts +45 -0
  175. package/src/actions/test/getTxpoolContent.ts +7 -0
  176. package/src/actions/test/getTxpoolStatus.test.ts +41 -0
  177. package/src/actions/test/getTxpoolStatus.ts +12 -0
  178. package/src/actions/test/impersonateAccount.test.ts +28 -0
  179. package/src/actions/test/impersonateAccount.ts +17 -0
  180. package/src/actions/test/increaseTime.test.ts +18 -0
  181. package/src/actions/test/increaseTime.ts +17 -0
  182. package/src/actions/test/index.test.ts +38 -0
  183. package/src/actions/test/index.ts +77 -0
  184. package/src/actions/test/inspectTxpool.test.ts +50 -0
  185. package/src/actions/test/inspectTxpool.ts +7 -0
  186. package/src/actions/test/mine.test.ts +20 -0
  187. package/src/actions/test/mine.ts +16 -0
  188. package/src/actions/test/removeBlockTimestampInterval.test.ts +23 -0
  189. package/src/actions/test/removeBlockTimestampInterval.ts +7 -0
  190. package/src/actions/test/reset.test.ts +19 -0
  191. package/src/actions/test/reset.ts +18 -0
  192. package/src/actions/test/revert.test.ts +39 -0
  193. package/src/actions/test/revert.ts +14 -0
  194. package/src/actions/test/sendUnsignedTransaction.test.ts +52 -0
  195. package/src/actions/test/sendUnsignedTransaction.ts +19 -0
  196. package/src/actions/test/setAutomine.test.ts +14 -0
  197. package/src/actions/test/setAutomine.ts +8 -0
  198. package/src/actions/test/setBalance.test.ts +29 -0
  199. package/src/actions/test/setBalance.ts +20 -0
  200. package/src/actions/test/setBlockGasLimit.test.ts +21 -0
  201. package/src/actions/test/setBlockGasLimit.ts +17 -0
  202. package/src/actions/test/setBlockTimestampInterval.test.ts +23 -0
  203. package/src/actions/test/setBlockTimestampInterval.ts +16 -0
  204. package/src/actions/test/setCode.test.ts +26 -0
  205. package/src/actions/test/setCode.ts +19 -0
  206. package/src/actions/test/setCoinbase.test.ts +11 -0
  207. package/src/actions/test/setCoinbase.ts +17 -0
  208. package/src/actions/test/setIntervalMining.test.ts +30 -0
  209. package/src/actions/test/setIntervalMining.ts +16 -0
  210. package/src/actions/test/setLoggingEnabled.test.ts +10 -0
  211. package/src/actions/test/setLoggingEnabled.ts +8 -0
  212. package/src/actions/test/setMinGasPrice.test.ts +22 -0
  213. package/src/actions/test/setMinGasPrice.ts +17 -0
  214. package/src/actions/test/setNextBlockBaseFeePerGas.test.ts +23 -0
  215. package/src/actions/test/setNextBlockBaseFeePerGas.ts +17 -0
  216. package/src/actions/test/setNextBlockTimestamp.test.ts +19 -0
  217. package/src/actions/test/setNextBlockTimestamp.ts +17 -0
  218. package/src/actions/test/setNonce.test.ts +28 -0
  219. package/src/actions/test/setNonce.ts +20 -0
  220. package/src/actions/test/setRpcUrl.test.ts +9 -0
  221. package/src/actions/test/setRpcUrl.ts +8 -0
  222. package/src/actions/test/setStorageAt.test.ts +36 -0
  223. package/src/actions/test/setStorageAt.ts +26 -0
  224. package/src/actions/test/snapshot.test.ts +18 -0
  225. package/src/actions/test/snapshot.ts +7 -0
  226. package/src/actions/test/stopImpersonatingAccount.test.ts +31 -0
  227. package/src/actions/test/stopImpersonatingAccount.ts +17 -0
  228. package/src/actions/wallet/addChain.test.ts +14 -0
  229. package/src/actions/wallet/addChain.ts +21 -0
  230. package/src/actions/wallet/getAccounts.test.ts +22 -0
  231. package/src/actions/wallet/getAccounts.ts +7 -0
  232. package/src/actions/wallet/getPermissions.test.ts +24 -0
  233. package/src/actions/wallet/getPermissions.ts +9 -0
  234. package/src/actions/wallet/index.test.ts +20 -0
  235. package/src/actions/wallet/index.ts +30 -0
  236. package/src/actions/wallet/requestAccounts.test.ts +13 -0
  237. package/src/actions/wallet/requestAccounts.ts +7 -0
  238. package/src/actions/wallet/requestPermissions.test.ts +26 -0
  239. package/src/actions/wallet/requestPermissions.ts +19 -0
  240. package/src/actions/wallet/sendTransaction.bench.ts +57 -0
  241. package/src/actions/wallet/sendTransaction.test.ts +440 -0
  242. package/src/actions/wallet/sendTransaction.ts +77 -0
  243. package/src/actions/wallet/signMessage.test.ts +62 -0
  244. package/src/actions/wallet/signMessage.ts +35 -0
  245. package/src/actions/wallet/switchChain.test.ts +22 -0
  246. package/src/actions/wallet/switchChain.ts +19 -0
  247. package/src/actions/wallet/watchAsset.test.ts +41 -0
  248. package/src/actions/wallet/watchAsset.ts +16 -0
  249. package/src/actions/wallet/writeContract.test.ts +54 -0
  250. package/src/actions/wallet/writeContract.ts +56 -0
  251. package/src/chains.test.ts +1912 -0
  252. package/src/chains.ts +99 -0
  253. package/src/clients/createClient.test.ts +295 -0
  254. package/src/clients/createClient.ts +81 -0
  255. package/src/clients/createPublicClient.test.ts +165 -0
  256. package/src/clients/createPublicClient.ts +49 -0
  257. package/src/clients/createTestClient.test.ts +145 -0
  258. package/src/clients/createTestClient.ts +72 -0
  259. package/src/clients/createWalletClient.test.ts +121 -0
  260. package/src/clients/createWalletClient.ts +54 -0
  261. package/src/clients/index.test.ts +19 -0
  262. package/src/clients/index.ts +31 -0
  263. package/src/clients/transports/createTransport.test.ts +58 -0
  264. package/src/clients/transports/createTransport.ts +48 -0
  265. package/src/clients/transports/custom.test.ts +98 -0
  266. package/src/clients/transports/custom.ts +34 -0
  267. package/src/clients/transports/fallback.test.ts +223 -0
  268. package/src/clients/transports/fallback.ts +48 -0
  269. package/src/clients/transports/http.test.ts +110 -0
  270. package/src/clients/transports/http.ts +51 -0
  271. package/src/clients/transports/index.test.ts +15 -0
  272. package/src/clients/transports/index.ts +17 -0
  273. package/src/clients/transports/webSocket.test.ts +164 -0
  274. package/src/clients/transports/webSocket.ts +117 -0
  275. package/src/errors/abi.test.ts +83 -0
  276. package/src/errors/abi.ts +238 -0
  277. package/src/errors/address.test.ts +14 -0
  278. package/src/errors/address.ts +9 -0
  279. package/src/errors/base.test.ts +72 -0
  280. package/src/errors/base.ts +57 -0
  281. package/src/errors/block.test.ts +24 -0
  282. package/src/errors/block.ts +18 -0
  283. package/src/errors/contract.ts +125 -0
  284. package/src/errors/data.ts +20 -0
  285. package/src/errors/encoding.ts +60 -0
  286. package/src/errors/index.ts +77 -0
  287. package/src/errors/log.ts +8 -0
  288. package/src/errors/request.test.ts +331 -0
  289. package/src/errors/request.ts +163 -0
  290. package/src/errors/rpc.test.ts +88 -0
  291. package/src/errors/rpc.ts +113 -0
  292. package/src/errors/transaction.test.ts +83 -0
  293. package/src/errors/transaction.ts +54 -0
  294. package/src/errors/transport.test.ts +12 -0
  295. package/src/errors/transport.ts +12 -0
  296. package/src/index.test.ts +214 -0
  297. package/src/index.ts +373 -0
  298. package/src/public.ts +80 -0
  299. package/src/test.ts +51 -0
  300. package/src/types/block.ts +71 -0
  301. package/src/types/chain.ts +6 -0
  302. package/src/types/contract.ts +342 -0
  303. package/src/types/eip1193.ts +1041 -0
  304. package/src/types/fee.ts +47 -0
  305. package/src/types/filter.ts +8 -0
  306. package/src/types/formatter.ts +23 -0
  307. package/src/types/index.ts +78 -0
  308. package/src/types/log.ts +22 -0
  309. package/src/types/misc.ts +5 -0
  310. package/src/types/rpc.ts +35 -0
  311. package/src/types/transaction.ts +145 -0
  312. package/src/types/utils.ts +67 -0
  313. package/src/types/window.ts +9 -0
  314. package/src/utils/abi/decodeAbi.bench.ts +135 -0
  315. package/src/utils/abi/decodeAbi.test.ts +1615 -0
  316. package/src/utils/abi/decodeAbi.ts +296 -0
  317. package/src/utils/abi/decodeDeployData.test.ts +159 -0
  318. package/src/utils/abi/decodeDeployData.ts +41 -0
  319. package/src/utils/abi/decodeErrorResult.test.ts +130 -0
  320. package/src/utils/abi/decodeErrorResult.ts +28 -0
  321. package/src/utils/abi/decodeFunctionData.test.ts +140 -0
  322. package/src/utils/abi/decodeFunctionData.ts +29 -0
  323. package/src/utils/abi/decodeFunctionResult.test.ts +262 -0
  324. package/src/utils/abi/decodeFunctionResult.ts +53 -0
  325. package/src/utils/abi/encodeAbi.bench.ts +163 -0
  326. package/src/utils/abi/encodeAbi.test.ts +1414 -0
  327. package/src/utils/abi/encodeAbi.ts +258 -0
  328. package/src/utils/abi/encodeDeployData.test.ts +131 -0
  329. package/src/utils/abi/encodeDeployData.ts +37 -0
  330. package/src/utils/abi/encodeErrorResult.test.ts +197 -0
  331. package/src/utils/abi/encodeErrorResult.ts +40 -0
  332. package/src/utils/abi/encodeEventTopics.test.ts +348 -0
  333. package/src/utils/abi/encodeEventTopics.ts +69 -0
  334. package/src/utils/abi/encodeFunctionData.test.ts +140 -0
  335. package/src/utils/abi/encodeFunctionData.ts +38 -0
  336. package/src/utils/abi/encodeFunctionResult.test.ts +284 -0
  337. package/src/utils/abi/encodeFunctionResult.ts +39 -0
  338. package/src/utils/abi/formatAbiItem.test.ts +335 -0
  339. package/src/utils/abi/formatAbiItem.ts +41 -0
  340. package/src/utils/abi/formatAbiItemWithArgs.test.ts +291 -0
  341. package/src/utils/abi/formatAbiItemWithArgs.ts +27 -0
  342. package/src/utils/abi/getAbiItem.ts +5 -0
  343. package/src/utils/abi/index.test.ts +23 -0
  344. package/src/utils/abi/index.ts +38 -0
  345. package/src/utils/address/getAddress.bench.ts +22 -0
  346. package/src/utils/address/getAddress.test.ts +46 -0
  347. package/src/utils/address/getAddress.ts +28 -0
  348. package/src/utils/address/getContractAddress.bench.ts +20 -0
  349. package/src/utils/address/getContractAddress.test.ts +78 -0
  350. package/src/utils/address/getContractAddress.ts +59 -0
  351. package/src/utils/address/index.test.ts +17 -0
  352. package/src/utils/address/index.ts +16 -0
  353. package/src/utils/address/isAddress.test.ts +10 -0
  354. package/src/utils/address/isAddress.ts +10 -0
  355. package/src/utils/address/isAddressEqual.test.ts +55 -0
  356. package/src/utils/address/isAddressEqual.ts +6 -0
  357. package/src/utils/buildRequest.test.ts +365 -0
  358. package/src/utils/buildRequest.ts +45 -0
  359. package/src/utils/chain.test.ts +43 -0
  360. package/src/utils/chain.ts +8 -0
  361. package/src/utils/contract/extractFunctionParts.test.ts +109 -0
  362. package/src/utils/contract/extractFunctionParts.ts +27 -0
  363. package/src/utils/contract/getContractError.test.ts +97 -0
  364. package/src/utils/contract/getContractError.ts +66 -0
  365. package/src/utils/contract/index.test.ts +15 -0
  366. package/src/utils/contract/index.ts +8 -0
  367. package/src/utils/data/concat.test.ts +35 -0
  368. package/src/utils/data/concat.ts +34 -0
  369. package/src/utils/data/index.test.ts +23 -0
  370. package/src/utils/data/index.ts +13 -0
  371. package/src/utils/data/isBytes.test.ts +9 -0
  372. package/src/utils/data/isBytes.ts +7 -0
  373. package/src/utils/data/isHex.test.ts +13 -0
  374. package/src/utils/data/isHex.ts +5 -0
  375. package/src/utils/data/pad.bench.ts +39 -0
  376. package/src/utils/data/pad.test.ts +367 -0
  377. package/src/utils/data/pad.ts +53 -0
  378. package/src/utils/data/size.test.ts +18 -0
  379. package/src/utils/data/size.ts +13 -0
  380. package/src/utils/data/slice.test.ts +203 -0
  381. package/src/utils/data/slice.ts +60 -0
  382. package/src/utils/data/trim.bench.ts +50 -0
  383. package/src/utils/data/trim.test.ts +175 -0
  384. package/src/utils/data/trim.ts +33 -0
  385. package/src/utils/encoding/decodeBytes.bench.ts +40 -0
  386. package/src/utils/encoding/decodeBytes.test.ts +144 -0
  387. package/src/utils/encoding/decodeBytes.ts +63 -0
  388. package/src/utils/encoding/decodeHex.bench.ts +24 -0
  389. package/src/utils/encoding/decodeHex.test.ts +167 -0
  390. package/src/utils/encoding/decodeHex.ts +76 -0
  391. package/src/utils/encoding/decodeRlp.bench.ts +34 -0
  392. package/src/utils/encoding/decodeRlp.test.ts +350 -0
  393. package/src/utils/encoding/decodeRlp.ts +121 -0
  394. package/src/utils/encoding/encodeBytes.bench.ts +41 -0
  395. package/src/utils/encoding/encodeBytes.test.ts +676 -0
  396. package/src/utils/encoding/encodeBytes.ts +59 -0
  397. package/src/utils/encoding/encodeHex.bench.ts +60 -0
  398. package/src/utils/encoding/encodeHex.test.ts +232 -0
  399. package/src/utils/encoding/encodeHex.ts +104 -0
  400. package/src/utils/encoding/encodeRlp.bench.ts +54 -0
  401. package/src/utils/encoding/encodeRlp.test.ts +254 -0
  402. package/src/utils/encoding/encodeRlp.ts +48 -0
  403. package/src/utils/encoding/index.test.ts +32 -0
  404. package/src/utils/encoding/index.ts +36 -0
  405. package/src/utils/formatters/block.bench.ts +51 -0
  406. package/src/utils/formatters/block.test.ts +115 -0
  407. package/src/utils/formatters/block.ts +37 -0
  408. package/src/utils/formatters/extract.test.ts +14 -0
  409. package/src/utils/formatters/extract.ts +18 -0
  410. package/src/utils/formatters/feeHistory.test.ts +66 -0
  411. package/src/utils/formatters/feeHistory.ts +12 -0
  412. package/src/utils/formatters/format.test.ts +93 -0
  413. package/src/utils/formatters/format.ts +90 -0
  414. package/src/utils/formatters/index.test.ts +27 -0
  415. package/src/utils/formatters/index.ts +34 -0
  416. package/src/utils/formatters/log.test.ts +79 -0
  417. package/src/utils/formatters/log.ts +12 -0
  418. package/src/utils/formatters/transaction.test.ts +271 -0
  419. package/src/utils/formatters/transaction.ts +63 -0
  420. package/src/utils/formatters/transactionReceipt.bench.ts +73 -0
  421. package/src/utils/formatters/transactionReceipt.test.ts +151 -0
  422. package/src/utils/formatters/transactionReceipt.ts +63 -0
  423. package/src/utils/formatters/transactionRequest.bench.ts +29 -0
  424. package/src/utils/formatters/transactionRequest.test.ts +237 -0
  425. package/src/utils/formatters/transactionRequest.ts +56 -0
  426. package/src/utils/hash/getEventSignature.test.ts +61 -0
  427. package/src/utils/hash/getEventSignature.ts +4 -0
  428. package/src/utils/hash/getFunctionSignature.test.ts +22 -0
  429. package/src/utils/hash/getFunctionSignature.ts +5 -0
  430. package/src/utils/hash/hashFunction.test.ts +65 -0
  431. package/src/utils/hash/hashFunction.ts +12 -0
  432. package/src/utils/hash/index.test.ts +13 -0
  433. package/src/utils/hash/index.ts +5 -0
  434. package/src/utils/hash/keccak256.test.ts +59 -0
  435. package/src/utils/hash/keccak256.ts +23 -0
  436. package/src/utils/index.test.ts +110 -0
  437. package/src/utils/index.ts +137 -0
  438. package/src/utils/observe.test.ts +176 -0
  439. package/src/utils/observe.ts +66 -0
  440. package/src/utils/poll.test.ts +127 -0
  441. package/src/utils/poll.ts +42 -0
  442. package/src/utils/promise/index.test.ts +14 -0
  443. package/src/utils/promise/index.ts +3 -0
  444. package/src/utils/promise/withCache.test.ts +97 -0
  445. package/src/utils/promise/withCache.ts +73 -0
  446. package/src/utils/promise/withRetry.test.ts +231 -0
  447. package/src/utils/promise/withRetry.ts +61 -0
  448. package/src/utils/promise/withTimeout.test.ts +37 -0
  449. package/src/utils/promise/withTimeout.ts +39 -0
  450. package/src/utils/rpc.test.ts +992 -0
  451. package/src/utils/rpc.ts +292 -0
  452. package/src/utils/stringify.test.ts +13 -0
  453. package/src/utils/stringify.ts +5 -0
  454. package/src/utils/uid.ts +14 -0
  455. package/src/utils/unit/constants.test.ts +22 -0
  456. package/src/utils/unit/constants.ts +12 -0
  457. package/src/utils/unit/formatEther.test.ts +75 -0
  458. package/src/utils/unit/formatEther.ts +6 -0
  459. package/src/utils/unit/formatGwei.test.ts +32 -0
  460. package/src/utils/unit/formatGwei.ts +6 -0
  461. package/src/utils/unit/formatUnit.bench.ts +26 -0
  462. package/src/utils/unit/formatUnit.test.ts +40 -0
  463. package/src/utils/unit/formatUnit.ts +16 -0
  464. package/src/utils/unit/index.test.ts +28 -0
  465. package/src/utils/unit/index.ts +7 -0
  466. package/src/utils/unit/parseEther.test.ts +126 -0
  467. package/src/utils/unit/parseEther.ts +6 -0
  468. package/src/utils/unit/parseGwei.test.ts +50 -0
  469. package/src/utils/unit/parseGwei.ts +6 -0
  470. package/src/utils/unit/parseUnit.bench.ts +26 -0
  471. package/src/utils/unit/parseUnit.test.ts +54 -0
  472. package/src/utils/unit/parseUnit.ts +27 -0
  473. package/src/utils/wait.ts +3 -0
  474. package/src/wallet.ts +23 -0
  475. package/src/window.ts +1 -0
  476. package/utils/package.json +1 -1
  477. package/window/package.json +1 -1
  478. package/actions/package.json +0 -4
  479. package/dist/BaseError-7688f84e.d.ts +0 -18
  480. package/dist/actions/index.d.ts +0 -8
  481. package/dist/actions/index.js +0 -123
  482. package/dist/createWalletClient-915223f3.d.ts +0 -130
  483. package/dist/transactionRequest-ade896ac.d.ts +0 -44
@@ -0,0 +1,1912 @@
1
+ import { describe, expect, test } from 'vitest'
2
+
3
+ import * as chains from './chains'
4
+
5
+ test('exports chains', () => {
6
+ expect(chains).toMatchInlineSnapshot(`
7
+ {
8
+ "arbitrum": {
9
+ "blockExplorers": {
10
+ "default": {
11
+ "name": "Arbiscan",
12
+ "url": "https://arbiscan.io",
13
+ },
14
+ "etherscan": {
15
+ "name": "Arbiscan",
16
+ "url": "https://arbiscan.io",
17
+ },
18
+ },
19
+ "contracts": {
20
+ "multicall3": {
21
+ "address": "0xca11bde05977b3631167028862be2a173976ca11",
22
+ "blockCreated": 7654707,
23
+ },
24
+ },
25
+ "id": 42161,
26
+ "name": "Arbitrum One",
27
+ "nativeCurrency": {
28
+ "decimals": 18,
29
+ "name": "Ether",
30
+ "symbol": "ETH",
31
+ },
32
+ "network": "arbitrum",
33
+ "rpcUrls": {
34
+ "alchemy": {
35
+ "http": [
36
+ "https://arb-mainnet.g.alchemy.com/v2",
37
+ ],
38
+ "webSocket": [
39
+ "wss://arb-mainnet.g.alchemy.com/v2",
40
+ ],
41
+ },
42
+ "default": {
43
+ "http": [
44
+ "https://arb1.arbitrum.io/rpc",
45
+ ],
46
+ },
47
+ "infura": {
48
+ "http": [
49
+ "https://arbitrum-mainnet.infura.io/v3",
50
+ ],
51
+ "webSocket": [
52
+ "wss://arbitrum-mainnet.infura.io/ws/v3",
53
+ ],
54
+ },
55
+ "public": {
56
+ "http": [
57
+ "https://arb1.arbitrum.io/rpc",
58
+ ],
59
+ },
60
+ },
61
+ },
62
+ "arbitrumGoerli": {
63
+ "blockExplorers": {
64
+ "default": {
65
+ "name": "Arbiscan",
66
+ "url": "https://goerli.arbiscan.io/",
67
+ },
68
+ "etherscan": {
69
+ "name": "Arbiscan",
70
+ "url": "https://goerli.arbiscan.io/",
71
+ },
72
+ },
73
+ "contracts": {
74
+ "multicall3": {
75
+ "address": "0xca11bde05977b3631167028862be2a173976ca11",
76
+ "blockCreated": 88114,
77
+ },
78
+ },
79
+ "id": 421613,
80
+ "name": "Arbitrum Goerli",
81
+ "nativeCurrency": {
82
+ "decimals": 18,
83
+ "name": "Arbitrum Goerli Ether",
84
+ "symbol": "ETH",
85
+ },
86
+ "network": "arbitrum-goerli",
87
+ "rpcUrls": {
88
+ "alchemy": {
89
+ "http": [
90
+ "https://arb-goerli.g.alchemy.com/v2",
91
+ ],
92
+ "webSocket": [
93
+ "wss://arb-goerli.g.alchemy.com/v2",
94
+ ],
95
+ },
96
+ "default": {
97
+ "http": [
98
+ "https://goerli-rollup.arbitrum.io/rpc",
99
+ ],
100
+ },
101
+ "infura": {
102
+ "http": [
103
+ "https://arbitrum-goerli.infura.io/v3",
104
+ ],
105
+ "webSocket": [
106
+ "wss://arbitrum-goerli.infura.io/ws/v3",
107
+ ],
108
+ },
109
+ "public": {
110
+ "http": [
111
+ "https://goerli-rollup.arbitrum.io/rpc",
112
+ ],
113
+ },
114
+ },
115
+ "testnet": true,
116
+ },
117
+ "aurora": {
118
+ "blockExplorers": {
119
+ "default": {
120
+ "name": "Aurorascan",
121
+ "url": "https://aurorascan.dev",
122
+ },
123
+ "etherscan": {
124
+ "name": "Aurorascan",
125
+ "url": "https://aurorascan.dev",
126
+ },
127
+ },
128
+ "id": 1313161554,
129
+ "name": "Aurora",
130
+ "nativeCurrency": {
131
+ "decimals": 18,
132
+ "name": "Ether",
133
+ "symbol": "ETH",
134
+ },
135
+ "network": "aurora",
136
+ "rpcUrls": {
137
+ "default": {
138
+ "http": [
139
+ "https://mainnet.aurora.dev",
140
+ ],
141
+ },
142
+ "infura": {
143
+ "http": [
144
+ "https://aurora-mainnet.infura.io/v3",
145
+ ],
146
+ },
147
+ "public": {
148
+ "http": [
149
+ "https://mainnet.aurora.dev",
150
+ ],
151
+ },
152
+ },
153
+ },
154
+ "auroraGoerli": {
155
+ "blockExplorers": {
156
+ "default": {
157
+ "name": "Aurorascan",
158
+ "url": "https://testnet.aurorascan.dev",
159
+ },
160
+ "etherscan": {
161
+ "name": "Aurorascan",
162
+ "url": "https://testnet.aurorascan.dev",
163
+ },
164
+ },
165
+ "id": 1313161555,
166
+ "name": "Aurora Testnet",
167
+ "nativeCurrency": {
168
+ "decimals": 18,
169
+ "name": "Ether",
170
+ "symbol": "ETH",
171
+ },
172
+ "network": "aurora-testnet",
173
+ "rpcUrls": {
174
+ "default": {
175
+ "http": [
176
+ "https://testnet.aurora.dev",
177
+ ],
178
+ },
179
+ "infura": {
180
+ "http": [
181
+ "https://aurora-testnet.infura.io/v3",
182
+ ],
183
+ },
184
+ "public": {
185
+ "http": [
186
+ "https://testnet.aurora.dev",
187
+ ],
188
+ },
189
+ },
190
+ "testnet": true,
191
+ },
192
+ "avalanche": {
193
+ "blockExplorers": {
194
+ "default": {
195
+ "name": "SnowTrace",
196
+ "url": "https://snowtrace.io",
197
+ },
198
+ "etherscan": {
199
+ "name": "SnowTrace",
200
+ "url": "https://snowtrace.io",
201
+ },
202
+ },
203
+ "contracts": {
204
+ "multicall3": {
205
+ "address": "0xca11bde05977b3631167028862be2a173976ca11",
206
+ "blockCreated": 11907934,
207
+ },
208
+ },
209
+ "id": 43114,
210
+ "name": "Avalanche",
211
+ "nativeCurrency": {
212
+ "decimals": 18,
213
+ "name": "Avalanche",
214
+ "symbol": "AVAX",
215
+ },
216
+ "network": "avalanche",
217
+ "rpcUrls": {
218
+ "default": {
219
+ "http": [
220
+ "https://api.avax.network/ext/bc/C/rpc",
221
+ ],
222
+ },
223
+ "public": {
224
+ "http": [
225
+ "https://api.avax.network/ext/bc/C/rpc",
226
+ ],
227
+ },
228
+ },
229
+ },
230
+ "avalancheFuji": {
231
+ "blockExplorers": {
232
+ "default": {
233
+ "name": "SnowTrace",
234
+ "url": "https://testnet.snowtrace.io",
235
+ },
236
+ "etherscan": {
237
+ "name": "SnowTrace",
238
+ "url": "https://testnet.snowtrace.io",
239
+ },
240
+ },
241
+ "contracts": {
242
+ "multicall3": {
243
+ "address": "0xca11bde05977b3631167028862be2a173976ca11",
244
+ "blockCreated": 7096959,
245
+ },
246
+ },
247
+ "id": 43113,
248
+ "name": "Avalanche Fuji",
249
+ "nativeCurrency": {
250
+ "decimals": 18,
251
+ "name": "Avalanche Fuji",
252
+ "symbol": "AVAX",
253
+ },
254
+ "network": "avalanche-fuji",
255
+ "rpcUrls": {
256
+ "default": {
257
+ "http": [
258
+ "https://api.avax-test.network/ext/bc/C/rpc",
259
+ ],
260
+ },
261
+ "public": {
262
+ "http": [
263
+ "https://api.avax-test.network/ext/bc/C/rpc",
264
+ ],
265
+ },
266
+ },
267
+ "testnet": true,
268
+ },
269
+ "bronos": {
270
+ "blockExplorers": {
271
+ "default": {
272
+ "name": "BronoScan",
273
+ "url": "https://broscan.bronos.org",
274
+ },
275
+ },
276
+ "id": 1039,
277
+ "name": "Bronos",
278
+ "nativeCurrency": {
279
+ "decimals": 18,
280
+ "name": "BRO",
281
+ "symbol": "BRO",
282
+ },
283
+ "network": "bronos",
284
+ "rpcUrls": {
285
+ "default": {
286
+ "http": [
287
+ "https://evm.bronos.org",
288
+ ],
289
+ },
290
+ "public": {
291
+ "http": [
292
+ "https://evm.bronos.org",
293
+ ],
294
+ },
295
+ },
296
+ },
297
+ "bronosTestnet": {
298
+ "blockExplorers": {
299
+ "default": {
300
+ "name": "BronoScan",
301
+ "url": "https://tbroscan.bronos.org",
302
+ },
303
+ },
304
+ "id": 1038,
305
+ "name": "Bronos Testnet",
306
+ "nativeCurrency": {
307
+ "decimals": 18,
308
+ "name": "Bronos Coin",
309
+ "symbol": "tBRO",
310
+ },
311
+ "network": "bronos-testnet",
312
+ "rpcUrls": {
313
+ "default": {
314
+ "http": [
315
+ "https://evm-testnet.bronos.org",
316
+ ],
317
+ },
318
+ "public": {
319
+ "http": [
320
+ "https://evm-testnet.bronos.org",
321
+ ],
322
+ },
323
+ },
324
+ "testnet": true,
325
+ },
326
+ "bsc": {
327
+ "blockExplorers": {
328
+ "default": {
329
+ "name": "BscScan",
330
+ "url": "https://bscscan.com",
331
+ },
332
+ "etherscan": {
333
+ "name": "BscScan",
334
+ "url": "https://bscscan.com",
335
+ },
336
+ },
337
+ "contracts": {
338
+ "multicall3": {
339
+ "address": "0xca11bde05977b3631167028862be2a173976ca11",
340
+ "blockCreated": 15921452,
341
+ },
342
+ },
343
+ "id": 56,
344
+ "name": "BNB Smart Chain",
345
+ "nativeCurrency": {
346
+ "decimals": 18,
347
+ "name": "BNB",
348
+ "symbol": "BNB",
349
+ },
350
+ "network": "bsc",
351
+ "rpcUrls": {
352
+ "default": {
353
+ "http": [
354
+ "https://rpc.ankr.com/bsc",
355
+ ],
356
+ },
357
+ "public": {
358
+ "http": [
359
+ "https://rpc.ankr.com/bsc",
360
+ ],
361
+ },
362
+ },
363
+ },
364
+ "bscTestnet": {
365
+ "blockExplorers": {
366
+ "default": {
367
+ "name": "BscScan",
368
+ "url": "https://testnet.bscscan.com",
369
+ },
370
+ "etherscan": {
371
+ "name": "BscScan",
372
+ "url": "https://testnet.bscscan.com",
373
+ },
374
+ },
375
+ "contracts": {
376
+ "multicall3": {
377
+ "address": "0xca11bde05977b3631167028862be2a173976ca11",
378
+ "blockCreated": 17422483,
379
+ },
380
+ },
381
+ "id": 97,
382
+ "name": "Binance Smart Chain Testnet",
383
+ "nativeCurrency": {
384
+ "decimals": 18,
385
+ "name": "BNB",
386
+ "symbol": "tBNB",
387
+ },
388
+ "network": "bsc-testnet",
389
+ "rpcUrls": {
390
+ "default": {
391
+ "http": [
392
+ "https://bsc-testnet.public.blastapi.io",
393
+ ],
394
+ },
395
+ "public": {
396
+ "http": [
397
+ "https://bsc-testnet.public.blastapi.io",
398
+ ],
399
+ },
400
+ },
401
+ "testnet": true,
402
+ },
403
+ "canto": {
404
+ "blockExplorers": {
405
+ "default": {
406
+ "name": "Canto EVM Explorer (Blockscout)",
407
+ "url": "https://evm.explorer.canto.io",
408
+ },
409
+ },
410
+ "id": 7700,
411
+ "name": "Canto",
412
+ "nativeCurrency": {
413
+ "decimals": 18,
414
+ "name": "Canto",
415
+ "symbol": "CANTO",
416
+ },
417
+ "network": "canto",
418
+ "rpcUrls": {
419
+ "default": {
420
+ "http": [
421
+ "https://canto.slingshot.finance",
422
+ ],
423
+ },
424
+ "public": {
425
+ "http": [
426
+ "https://canto.slingshot.finance",
427
+ ],
428
+ },
429
+ },
430
+ },
431
+ "celo": {
432
+ "blockExplorers": {
433
+ "default": {
434
+ "name": "Celo Explorer",
435
+ "url": "https://explorer.celo.org/mainnet",
436
+ },
437
+ "etherscan": {
438
+ "name": "CeloScan",
439
+ "url": "https://celoscan.io",
440
+ },
441
+ },
442
+ "contracts": {
443
+ "multicall3": {
444
+ "address": "0xcA11bde05977b3631167028862bE2a173976CA11",
445
+ "blockCreated": 13112599,
446
+ },
447
+ },
448
+ "formatters": {
449
+ "block": [Function],
450
+ "transaction": [Function],
451
+ "transactionReceipt": [Function],
452
+ "transactionRequest": [Function],
453
+ },
454
+ "id": 42220,
455
+ "name": "Celo",
456
+ "nativeCurrency": {
457
+ "decimals": 18,
458
+ "name": "CELO",
459
+ "symbol": "CELO",
460
+ },
461
+ "network": "celo",
462
+ "rpcUrls": {
463
+ "default": {
464
+ "http": [
465
+ "https://forno.celo.org",
466
+ ],
467
+ },
468
+ "infura": {
469
+ "http": [
470
+ "https://celo-mainnet.infura.io/v3",
471
+ ],
472
+ },
473
+ "public": {
474
+ "http": [
475
+ "https://forno.celo.org",
476
+ ],
477
+ },
478
+ },
479
+ "testnet": false,
480
+ },
481
+ "celoAlfajores": {
482
+ "blockExplorers": {
483
+ "default": {
484
+ "name": "Celo Explorer",
485
+ "url": "https://explorer.celo.org/alfajores",
486
+ },
487
+ "etherscan": {
488
+ "name": "CeloScan",
489
+ "url": "https://alfajores.celoscan.io/",
490
+ },
491
+ },
492
+ "contracts": {
493
+ "multicall3": {
494
+ "address": "0xcA11bde05977b3631167028862bE2a173976CA11",
495
+ "blockCreated": 14569001,
496
+ },
497
+ },
498
+ "formatters": {
499
+ "block": [Function],
500
+ "transaction": [Function],
501
+ "transactionReceipt": [Function],
502
+ "transactionRequest": [Function],
503
+ },
504
+ "id": 44787,
505
+ "name": "Alfajores",
506
+ "nativeCurrency": {
507
+ "decimals": 18,
508
+ "name": "CELO",
509
+ "symbol": "A-CELO",
510
+ },
511
+ "network": "celo-alfajores",
512
+ "rpcUrls": {
513
+ "default": {
514
+ "http": [
515
+ "https://alfajores-forno.celo-testnet.org",
516
+ ],
517
+ },
518
+ "infura": {
519
+ "http": [
520
+ "https://celo-alfajores.infura.io/v3",
521
+ ],
522
+ },
523
+ "public": {
524
+ "http": [
525
+ "https://alfajores-forno.celo-testnet.org",
526
+ ],
527
+ },
528
+ },
529
+ "testnet": true,
530
+ },
531
+ "crossbell": {
532
+ "blockExplorers": {
533
+ "default": {
534
+ "name": "CrossScan",
535
+ "url": "https://scan.crossbell.io",
536
+ },
537
+ },
538
+ "contracts": {
539
+ "multicall3": {
540
+ "address": "0xBB9759009cDaC82774EfC84D94cD9F7440f75Fcf",
541
+ "blockCreated": 23499787,
542
+ },
543
+ },
544
+ "id": 3737,
545
+ "name": "Crossbell",
546
+ "nativeCurrency": {
547
+ "decimals": 18,
548
+ "name": "CSB",
549
+ "symbol": "CSB",
550
+ },
551
+ "network": "crossbell",
552
+ "rpcUrls": {
553
+ "default": {
554
+ "http": [
555
+ "https://rpc.crossbell.io",
556
+ ],
557
+ },
558
+ "public": {
559
+ "http": [
560
+ "https://rpc.crossbell.io",
561
+ ],
562
+ },
563
+ },
564
+ },
565
+ "defineChain": [Function],
566
+ "evmos": {
567
+ "blockExplorers": {
568
+ "default": {
569
+ "name": "Evmos Block Explorer",
570
+ "url": "https://escan.live/",
571
+ },
572
+ },
573
+ "id": 9001,
574
+ "name": "Evmos",
575
+ "nativeCurrency": {
576
+ "decimals": 18,
577
+ "name": "Evmos",
578
+ "symbol": "EVMOS",
579
+ },
580
+ "network": "evmos",
581
+ "rpcUrls": {
582
+ "default": {
583
+ "http": [
584
+ "https://eth.bd.evmos.org:8545",
585
+ ],
586
+ },
587
+ "public": {
588
+ "http": [
589
+ "https://eth.bd.evmos.org:8545",
590
+ ],
591
+ },
592
+ },
593
+ },
594
+ "evmosTestnet": {
595
+ "blockExplorers": {
596
+ "default": {
597
+ "name": "Evmos Testnet Block Explorer",
598
+ "url": "https://evm.evmos.dev/",
599
+ },
600
+ },
601
+ "id": 9000,
602
+ "name": "Evmos Testnet",
603
+ "nativeCurrency": {
604
+ "decimals": 18,
605
+ "name": "Evmos",
606
+ "symbol": "EVMOS",
607
+ },
608
+ "network": "evmos-testnet",
609
+ "rpcUrls": {
610
+ "default": {
611
+ "http": [
612
+ "https://eth.bd.evmos.dev:8545",
613
+ ],
614
+ },
615
+ "public": {
616
+ "http": [
617
+ "https://eth.bd.evmos.dev:8545",
618
+ ],
619
+ },
620
+ },
621
+ },
622
+ "fantom": {
623
+ "blockExplorers": {
624
+ "default": {
625
+ "name": "FTMScan",
626
+ "url": "https://ftmscan.com",
627
+ },
628
+ "etherscan": {
629
+ "name": "FTMScan",
630
+ "url": "https://ftmscan.com",
631
+ },
632
+ },
633
+ "contracts": {
634
+ "multicall3": {
635
+ "address": "0xca11bde05977b3631167028862be2a173976ca11",
636
+ "blockCreated": 33001987,
637
+ },
638
+ },
639
+ "id": 250,
640
+ "name": "Fantom",
641
+ "nativeCurrency": {
642
+ "decimals": 18,
643
+ "name": "Fantom",
644
+ "symbol": "FTM",
645
+ },
646
+ "network": "fantom",
647
+ "rpcUrls": {
648
+ "default": {
649
+ "http": [
650
+ "https://rpc.ankr.com/fantom",
651
+ ],
652
+ },
653
+ "public": {
654
+ "http": [
655
+ "https://rpc.ankr.com/fantom",
656
+ ],
657
+ },
658
+ },
659
+ },
660
+ "fantomTestnet": {
661
+ "blockExplorers": {
662
+ "default": {
663
+ "name": "FTMScan",
664
+ "url": "https://testnet.ftmscan.com",
665
+ },
666
+ "etherscan": {
667
+ "name": "FTMScan",
668
+ "url": "https://testnet.ftmscan.com",
669
+ },
670
+ },
671
+ "contracts": {
672
+ "multicall3": {
673
+ "address": "0xca11bde05977b3631167028862be2a173976ca11",
674
+ "blockCreated": 8328688,
675
+ },
676
+ },
677
+ "id": 4002,
678
+ "name": "Fantom Testnet",
679
+ "nativeCurrency": {
680
+ "decimals": 18,
681
+ "name": "Fantom",
682
+ "symbol": "FTM",
683
+ },
684
+ "network": "fantom-testnet",
685
+ "rpcUrls": {
686
+ "default": {
687
+ "http": [
688
+ "https://rpc.testnet.fantom.network",
689
+ ],
690
+ },
691
+ "public": {
692
+ "http": [
693
+ "https://rpc.testnet.fantom.network",
694
+ ],
695
+ },
696
+ },
697
+ },
698
+ "filecoin": {
699
+ "blockExplorers": {
700
+ "default": {
701
+ "name": "Filfox",
702
+ "url": "https://filfox.info/en",
703
+ },
704
+ "filscan": {
705
+ "name": "Filscan",
706
+ "url": "https://filscan.io",
707
+ },
708
+ "filscout": {
709
+ "name": "Filscout",
710
+ "url": "https://filscout.io/en",
711
+ },
712
+ },
713
+ "id": 314,
714
+ "name": "Filecoin Mainnet",
715
+ "nativeCurrency": {
716
+ "decimals": 18,
717
+ "name": "filecoin",
718
+ "symbol": "FIL",
719
+ },
720
+ "network": "filecoin-mainnet",
721
+ "rpcUrls": {
722
+ "default": {
723
+ "http": [
724
+ "https://api.node.glif.io",
725
+ ],
726
+ },
727
+ "public": {
728
+ "http": [
729
+ "https://api.node.glif.io",
730
+ ],
731
+ },
732
+ },
733
+ },
734
+ "filecoinTestnet": {
735
+ "blockExplorers": {
736
+ "default": {
737
+ "name": "Filfox",
738
+ "url": "https://hyperspace.filfox.info/en",
739
+ },
740
+ "gilf": {
741
+ "name": "Glif",
742
+ "url": "https://explorer.glif.io/?network=hyperspace",
743
+ },
744
+ },
745
+ "id": 3141,
746
+ "name": "Filecoin Hyperspace",
747
+ "nativeCurrency": {
748
+ "decimals": 18,
749
+ "name": "testnet filecoin",
750
+ "symbol": "tFIL",
751
+ },
752
+ "network": "filecoin-hyperspace",
753
+ "rpcUrls": {
754
+ "default": {
755
+ "http": [
756
+ "https://api.hyperspace.node.glif.io/rpc/v1",
757
+ ],
758
+ },
759
+ "public": {
760
+ "http": [
761
+ "https://api.hyperspace.node.glif.io/rpc/v1",
762
+ ],
763
+ },
764
+ },
765
+ },
766
+ "foundry": {
767
+ "id": 31337,
768
+ "name": "Foundry",
769
+ "nativeCurrency": {
770
+ "decimals": 18,
771
+ "name": "Ether",
772
+ "symbol": "ETH",
773
+ },
774
+ "network": "foundry",
775
+ "rpcUrls": {
776
+ "default": {
777
+ "http": [
778
+ "http://127.0.0.1:8545",
779
+ ],
780
+ },
781
+ "public": {
782
+ "http": [
783
+ "http://127.0.0.1:8545",
784
+ ],
785
+ },
786
+ },
787
+ },
788
+ "gnosis": {
789
+ "blockExplorers": {
790
+ "default": {
791
+ "name": "Gnosis Chain Explorer",
792
+ "url": "https://blockscout.com/xdai/mainnet/",
793
+ },
794
+ "etherscan": {
795
+ "name": "Gnosisscan",
796
+ "url": "https://gnosisscan.io/",
797
+ },
798
+ },
799
+ "id": 100,
800
+ "name": "Gnosis",
801
+ "nativeCurrency": {
802
+ "decimals": 18,
803
+ "name": "Gnosis",
804
+ "symbol": "xDAI",
805
+ },
806
+ "network": "gnosis",
807
+ "rpcUrls": {
808
+ "default": {
809
+ "http": [
810
+ "https://rpc.gnosischain.com",
811
+ ],
812
+ },
813
+ "public": {
814
+ "http": [
815
+ "https://rpc.gnosischain.com",
816
+ ],
817
+ },
818
+ },
819
+ },
820
+ "gnosisChiado": {
821
+ "blockExplorers": {
822
+ "default": {
823
+ "name": "Blockscout",
824
+ "url": "https://blockscout.chiadochain.net",
825
+ },
826
+ },
827
+ "id": 10200,
828
+ "name": "Gnosis Chiado",
829
+ "nativeCurrency": {
830
+ "decimals": 18,
831
+ "name": "Gnosis",
832
+ "symbol": "xDAI",
833
+ },
834
+ "network": "chiado",
835
+ "rpcUrls": {
836
+ "default": {
837
+ "http": [
838
+ "https://rpc.chiadochain.net",
839
+ ],
840
+ },
841
+ "public": {
842
+ "http": [
843
+ "https://rpc.chiadochain.net",
844
+ ],
845
+ },
846
+ },
847
+ },
848
+ "goerli": {
849
+ "blockExplorers": {
850
+ "default": {
851
+ "name": "Etherscan",
852
+ "url": "https://goerli.etherscan.io",
853
+ },
854
+ "etherscan": {
855
+ "name": "Etherscan",
856
+ "url": "https://goerli.etherscan.io",
857
+ },
858
+ },
859
+ "contracts": {
860
+ "ensRegistry": {
861
+ "address": "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",
862
+ },
863
+ "multicall3": {
864
+ "address": "0xca11bde05977b3631167028862be2a173976ca11",
865
+ "blockCreated": 6507670,
866
+ },
867
+ },
868
+ "id": 5,
869
+ "name": "Goerli",
870
+ "nativeCurrency": {
871
+ "decimals": 18,
872
+ "name": "Goerli Ether",
873
+ "symbol": "ETH",
874
+ },
875
+ "network": "goerli",
876
+ "rpcUrls": {
877
+ "alchemy": {
878
+ "http": [
879
+ "https://eth-goerli.g.alchemy.com/v2",
880
+ ],
881
+ "webSocket": [
882
+ "wss://eth-goerli.g.alchemy.com/v2",
883
+ ],
884
+ },
885
+ "default": {
886
+ "http": [
887
+ "https://rpc.ankr.com/eth_goerli",
888
+ ],
889
+ },
890
+ "infura": {
891
+ "http": [
892
+ "https://goerli.infura.io/v3",
893
+ ],
894
+ "webSocket": [
895
+ "wss://goerli.infura.io/ws/v3",
896
+ ],
897
+ },
898
+ "public": {
899
+ "http": [
900
+ "https://rpc.ankr.com/eth_goerli",
901
+ ],
902
+ },
903
+ },
904
+ "testnet": true,
905
+ },
906
+ "hardhat": {
907
+ "id": 31337,
908
+ "name": "Hardhat",
909
+ "nativeCurrency": {
910
+ "decimals": 18,
911
+ "name": "Ether",
912
+ "symbol": "ETH",
913
+ },
914
+ "network": "hardhat",
915
+ "rpcUrls": {
916
+ "default": {
917
+ "http": [
918
+ "http://127.0.0.1:8545",
919
+ ],
920
+ },
921
+ "public": {
922
+ "http": [
923
+ "http://127.0.0.1:8545",
924
+ ],
925
+ },
926
+ },
927
+ },
928
+ "iotex": {
929
+ "blockExplorers": {
930
+ "default": {
931
+ "name": "IoTeXScan",
932
+ "url": "https://iotexscan.io",
933
+ },
934
+ },
935
+ "id": 4689,
936
+ "name": "IoTeX",
937
+ "nativeCurrency": {
938
+ "decimals": 18,
939
+ "name": "IoTeX",
940
+ "symbol": "IOTX",
941
+ },
942
+ "network": "iotex",
943
+ "rpcUrls": {
944
+ "default": {
945
+ "http": [
946
+ "https://babel-api.mainnet.iotex.io",
947
+ ],
948
+ "webSocket": [
949
+ "wss://babel-api.mainnet.iotex.io",
950
+ ],
951
+ },
952
+ "public": {
953
+ "http": [
954
+ "https://babel-api.mainnet.iotex.io",
955
+ ],
956
+ "webSocket": [
957
+ "wss://babel-api.mainnet.iotex.io",
958
+ ],
959
+ },
960
+ },
961
+ },
962
+ "iotexTestnet": {
963
+ "blockExplorers": {
964
+ "default": {
965
+ "name": "IoTeXScan",
966
+ "url": "https://testnet.iotexscan.io",
967
+ },
968
+ },
969
+ "id": 4690,
970
+ "name": "IoTeX Testnet",
971
+ "nativeCurrency": {
972
+ "decimals": 18,
973
+ "name": "IoTeX",
974
+ "symbol": "IOTX",
975
+ },
976
+ "network": "iotex-testnet",
977
+ "rpcUrls": {
978
+ "default": {
979
+ "http": [
980
+ "https://babel-api.testnet.iotex.io",
981
+ ],
982
+ "webSocket": [
983
+ "wss://babel-api.testnet.iotex.io",
984
+ ],
985
+ },
986
+ "public": {
987
+ "http": [
988
+ "https://babel-api.testnet.iotex.io",
989
+ ],
990
+ "webSocket": [
991
+ "wss://babel-api.testnet.iotex.io",
992
+ ],
993
+ },
994
+ },
995
+ },
996
+ "localhost": {
997
+ "id": 1337,
998
+ "name": "Localhost",
999
+ "nativeCurrency": {
1000
+ "decimals": 18,
1001
+ "name": "Ether",
1002
+ "symbol": "ETH",
1003
+ },
1004
+ "network": "localhost",
1005
+ "rpcUrls": {
1006
+ "default": {
1007
+ "http": [
1008
+ "http://127.0.0.1:8545",
1009
+ ],
1010
+ },
1011
+ "public": {
1012
+ "http": [
1013
+ "http://127.0.0.1:8545",
1014
+ ],
1015
+ },
1016
+ },
1017
+ },
1018
+ "mainnet": {
1019
+ "blockExplorers": {
1020
+ "default": {
1021
+ "name": "Etherscan",
1022
+ "url": "https://etherscan.io",
1023
+ },
1024
+ "etherscan": {
1025
+ "name": "Etherscan",
1026
+ "url": "https://etherscan.io",
1027
+ },
1028
+ },
1029
+ "contracts": {
1030
+ "ensRegistry": {
1031
+ "address": "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",
1032
+ },
1033
+ "multicall3": {
1034
+ "address": "0xca11bde05977b3631167028862be2a173976ca11",
1035
+ "blockCreated": 14353601,
1036
+ },
1037
+ },
1038
+ "id": 1,
1039
+ "name": "Ethereum",
1040
+ "nativeCurrency": {
1041
+ "decimals": 18,
1042
+ "name": "Ether",
1043
+ "symbol": "ETH",
1044
+ },
1045
+ "network": "homestead",
1046
+ "rpcUrls": {
1047
+ "alchemy": {
1048
+ "http": [
1049
+ "https://eth-mainnet.g.alchemy.com/v2",
1050
+ ],
1051
+ "webSocket": [
1052
+ "wss://eth-mainnet.g.alchemy.com/v2",
1053
+ ],
1054
+ },
1055
+ "default": {
1056
+ "http": [
1057
+ "https://cloudflare-eth.com",
1058
+ ],
1059
+ },
1060
+ "infura": {
1061
+ "http": [
1062
+ "https://mainnet.infura.io/v3",
1063
+ ],
1064
+ "webSocket": [
1065
+ "wss://mainnet.infura.io/ws/v3",
1066
+ ],
1067
+ },
1068
+ "public": {
1069
+ "http": [
1070
+ "https://cloudflare-eth.com",
1071
+ ],
1072
+ },
1073
+ },
1074
+ },
1075
+ "metis": {
1076
+ "blockExplorers": {
1077
+ "default": {
1078
+ "name": "Andromeda Explorer",
1079
+ "url": "https://andromeda-explorer.metis.io",
1080
+ },
1081
+ },
1082
+ "id": 1088,
1083
+ "name": "Metis",
1084
+ "nativeCurrency": {
1085
+ "decimals": 18,
1086
+ "name": "Metis",
1087
+ "symbol": "METIS",
1088
+ },
1089
+ "network": "andromeda",
1090
+ "rpcUrls": {
1091
+ "default": {
1092
+ "http": [
1093
+ "https://andromeda.metis.io/?owner=1088",
1094
+ ],
1095
+ },
1096
+ "public": {
1097
+ "http": [
1098
+ "https://andromeda.metis.io/?owner=1088",
1099
+ ],
1100
+ },
1101
+ },
1102
+ },
1103
+ "metisGoerli": {
1104
+ "blockExplorers": {
1105
+ "default": {
1106
+ "name": "Metis Goerli Explorer",
1107
+ "url": "https://goerli.explorer.metisdevops.link",
1108
+ },
1109
+ },
1110
+ "id": 599,
1111
+ "name": "Metis Goerli",
1112
+ "nativeCurrency": {
1113
+ "decimals": 18,
1114
+ "name": "Metis Goerli",
1115
+ "symbol": "METIS",
1116
+ },
1117
+ "network": "metis-goerli",
1118
+ "rpcUrls": {
1119
+ "default": {
1120
+ "http": [
1121
+ "https://goerli.gateway.metisdevops.link",
1122
+ ],
1123
+ },
1124
+ "public": {
1125
+ "http": [
1126
+ "https://goerli.gateway.metisdevops.link",
1127
+ ],
1128
+ },
1129
+ },
1130
+ },
1131
+ "optimism": {
1132
+ "blockExplorers": {
1133
+ "default": {
1134
+ "name": "Optimism Explorer",
1135
+ "url": "https://explorer.optimism.io",
1136
+ },
1137
+ "etherscan": {
1138
+ "name": "Etherscan",
1139
+ "url": "https://optimistic.etherscan.io",
1140
+ },
1141
+ },
1142
+ "contracts": {
1143
+ "multicall3": {
1144
+ "address": "0xca11bde05977b3631167028862be2a173976ca11",
1145
+ "blockCreated": 4286263,
1146
+ },
1147
+ },
1148
+ "id": 10,
1149
+ "name": "Optimism",
1150
+ "nativeCurrency": {
1151
+ "decimals": 18,
1152
+ "name": "Ether",
1153
+ "symbol": "ETH",
1154
+ },
1155
+ "network": "optimism",
1156
+ "rpcUrls": {
1157
+ "alchemy": {
1158
+ "http": [
1159
+ "https://opt-mainnet.g.alchemy.com/v2",
1160
+ ],
1161
+ "webSocket": [
1162
+ "wss://opt-mainnet.g.alchemy.com/v2",
1163
+ ],
1164
+ },
1165
+ "default": {
1166
+ "http": [
1167
+ "https://mainnet.optimism.io",
1168
+ ],
1169
+ },
1170
+ "infura": {
1171
+ "http": [
1172
+ "https://optimism-mainnet.infura.io/v3",
1173
+ ],
1174
+ "webSocket": [
1175
+ "wss://optimism-mainnet.infura.io/ws/v3",
1176
+ ],
1177
+ },
1178
+ "public": {
1179
+ "http": [
1180
+ "https://mainnet.optimism.io",
1181
+ ],
1182
+ },
1183
+ },
1184
+ },
1185
+ "optimismGoerli": {
1186
+ "blockExplorers": {
1187
+ "default": {
1188
+ "name": "Etherscan",
1189
+ "url": "https://goerli-optimism.etherscan.io",
1190
+ },
1191
+ "etherscan": {
1192
+ "name": "Etherscan",
1193
+ "url": "https://goerli-optimism.etherscan.io",
1194
+ },
1195
+ },
1196
+ "contracts": {
1197
+ "multicall3": {
1198
+ "address": "0xca11bde05977b3631167028862be2a173976ca11",
1199
+ "blockCreated": 49461,
1200
+ },
1201
+ },
1202
+ "id": 420,
1203
+ "name": "Optimism Goerli",
1204
+ "nativeCurrency": {
1205
+ "decimals": 18,
1206
+ "name": "Goerli Ether",
1207
+ "symbol": "ETH",
1208
+ },
1209
+ "network": "optimism-goerli",
1210
+ "rpcUrls": {
1211
+ "alchemy": {
1212
+ "http": [
1213
+ "https://opt-goerli.g.alchemy.com/v2",
1214
+ ],
1215
+ "webSocket": [
1216
+ "wss://opt-goerli.g.alchemy.com/v2",
1217
+ ],
1218
+ },
1219
+ "default": {
1220
+ "http": [
1221
+ "https://goerli.optimism.io",
1222
+ ],
1223
+ },
1224
+ "infura": {
1225
+ "http": [
1226
+ "https://optimism-goerli.infura.io/v3",
1227
+ ],
1228
+ "webSocket": [
1229
+ "wss://optimism-goerli.infura.io/ws/v3",
1230
+ ],
1231
+ },
1232
+ "public": {
1233
+ "http": [
1234
+ "https://goerli.optimism.io",
1235
+ ],
1236
+ },
1237
+ },
1238
+ "testnet": true,
1239
+ },
1240
+ "polygon": {
1241
+ "blockExplorers": {
1242
+ "default": {
1243
+ "name": "PolygonScan",
1244
+ "url": "https://polygonscan.com",
1245
+ },
1246
+ "etherscan": {
1247
+ "name": "PolygonScan",
1248
+ "url": "https://polygonscan.com",
1249
+ },
1250
+ },
1251
+ "contracts": {
1252
+ "multicall3": {
1253
+ "address": "0xca11bde05977b3631167028862be2a173976ca11",
1254
+ "blockCreated": 25770160,
1255
+ },
1256
+ },
1257
+ "id": 137,
1258
+ "name": "Polygon",
1259
+ "nativeCurrency": {
1260
+ "decimals": 18,
1261
+ "name": "MATIC",
1262
+ "symbol": "MATIC",
1263
+ },
1264
+ "network": "matic",
1265
+ "rpcUrls": {
1266
+ "alchemy": {
1267
+ "http": [
1268
+ "https://polygon-mainnet.g.alchemy.com/v2",
1269
+ ],
1270
+ "webSocket": [
1271
+ "wss://polygon-mainnet.g.alchemy.com/v2",
1272
+ ],
1273
+ },
1274
+ "default": {
1275
+ "http": [
1276
+ "https://polygon-rpc.com",
1277
+ ],
1278
+ },
1279
+ "infura": {
1280
+ "http": [
1281
+ "https://polygon-mainnet.infura.io/v3",
1282
+ ],
1283
+ "webSocket": [
1284
+ "wss://polygon-mainnet.infura.io/ws/v3",
1285
+ ],
1286
+ },
1287
+ "public": {
1288
+ "http": [
1289
+ "https://polygon-rpc.com",
1290
+ ],
1291
+ },
1292
+ },
1293
+ },
1294
+ "polygonMumbai": {
1295
+ "blockExplorers": {
1296
+ "default": {
1297
+ "name": "PolygonScan",
1298
+ "url": "https://mumbai.polygonscan.com",
1299
+ },
1300
+ "etherscan": {
1301
+ "name": "PolygonScan",
1302
+ "url": "https://mumbai.polygonscan.com",
1303
+ },
1304
+ },
1305
+ "contracts": {
1306
+ "multicall3": {
1307
+ "address": "0xca11bde05977b3631167028862be2a173976ca11",
1308
+ "blockCreated": 25770160,
1309
+ },
1310
+ },
1311
+ "id": 80001,
1312
+ "name": "Polygon Mumbai",
1313
+ "nativeCurrency": {
1314
+ "decimals": 18,
1315
+ "name": "MATIC",
1316
+ "symbol": "MATIC",
1317
+ },
1318
+ "network": "maticmum",
1319
+ "rpcUrls": {
1320
+ "alchemy": {
1321
+ "http": [
1322
+ "https://polygon-mumbai.g.alchemy.com/v2",
1323
+ ],
1324
+ "webSocket": [
1325
+ "wss://polygon-mumbai.g.alchemy.com/v2",
1326
+ ],
1327
+ },
1328
+ "default": {
1329
+ "http": [
1330
+ "https://matic-mumbai.chainstacklabs.com",
1331
+ ],
1332
+ },
1333
+ "infura": {
1334
+ "http": [
1335
+ "https://polygon-mumbai.infura.io/v3",
1336
+ ],
1337
+ "webSocket": [
1338
+ "wss://polygon-mumbai.infura.io/ws/v3",
1339
+ ],
1340
+ },
1341
+ "public": {
1342
+ "http": [
1343
+ "https://matic-mumbai.chainstacklabs.com",
1344
+ ],
1345
+ },
1346
+ },
1347
+ "testnet": true,
1348
+ },
1349
+ "sepolia": {
1350
+ "blockExplorers": {
1351
+ "default": {
1352
+ "name": "Etherscan",
1353
+ "url": "https://sepolia.etherscan.io",
1354
+ },
1355
+ "etherscan": {
1356
+ "name": "Etherscan",
1357
+ "url": "https://sepolia.etherscan.io",
1358
+ },
1359
+ },
1360
+ "contracts": {
1361
+ "multicall3": {
1362
+ "address": "0xca11bde05977b3631167028862be2a173976ca11",
1363
+ "blockCreated": 6507670,
1364
+ },
1365
+ },
1366
+ "id": 11155111,
1367
+ "name": "Sepolia",
1368
+ "nativeCurrency": {
1369
+ "decimals": 18,
1370
+ "name": "Sepolia Ether",
1371
+ "symbol": "SEP",
1372
+ },
1373
+ "network": "sepolia",
1374
+ "rpcUrls": {
1375
+ "default": {
1376
+ "http": [
1377
+ "https://rpc.sepolia.org",
1378
+ ],
1379
+ },
1380
+ "infura": {
1381
+ "http": [
1382
+ "https://sepolia.infura.io/v3",
1383
+ ],
1384
+ "webSocket": [
1385
+ "wss://sepolia.infura.io/ws/v3",
1386
+ ],
1387
+ },
1388
+ "public": {
1389
+ "http": [
1390
+ "https://rpc.sepolia.org",
1391
+ ],
1392
+ },
1393
+ },
1394
+ "testnet": true,
1395
+ },
1396
+ "taraxa": {
1397
+ "blockExplorers": {
1398
+ "default": {
1399
+ "name": "Taraxa Explorer",
1400
+ "url": "https://explorer.mainnet.taraxa.io",
1401
+ },
1402
+ },
1403
+ "id": 841,
1404
+ "name": "Taraxa Mainnet",
1405
+ "nativeCurrency": {
1406
+ "decimals": 18,
1407
+ "name": "Tara",
1408
+ "symbol": "TARA",
1409
+ },
1410
+ "network": "taraxa",
1411
+ "rpcUrls": {
1412
+ "default": {
1413
+ "http": [
1414
+ "https://rpc.mainnet.taraxa.io",
1415
+ ],
1416
+ },
1417
+ "public": {
1418
+ "http": [
1419
+ "https://rpc.mainnet.taraxa.io",
1420
+ ],
1421
+ },
1422
+ },
1423
+ },
1424
+ "taraxaTestnet": {
1425
+ "blockExplorers": {
1426
+ "default": {
1427
+ "name": "Taraxa Explorer",
1428
+ "url": "https://explorer.testnet.taraxa.io",
1429
+ },
1430
+ },
1431
+ "id": 842,
1432
+ "name": "Taraxa Testnet",
1433
+ "nativeCurrency": {
1434
+ "decimals": 18,
1435
+ "name": "Tara",
1436
+ "symbol": "TARA",
1437
+ },
1438
+ "network": "taraxa-testnet",
1439
+ "rpcUrls": {
1440
+ "default": {
1441
+ "http": [
1442
+ "https://rpc.testnet.taraxa.io",
1443
+ ],
1444
+ },
1445
+ "public": {
1446
+ "http": [
1447
+ "https://rpc.testnet.taraxa.io",
1448
+ ],
1449
+ },
1450
+ },
1451
+ "testnet": true,
1452
+ },
1453
+ "zkSync": {
1454
+ "blockExplorers": {
1455
+ "default": {
1456
+ "name": "zkExplorer",
1457
+ "url": "https://explorer.zksync.io",
1458
+ },
1459
+ },
1460
+ "id": 324,
1461
+ "name": "zkSync",
1462
+ "nativeCurrency": {
1463
+ "decimals": 18,
1464
+ "name": "Ether",
1465
+ "symbol": "ETH",
1466
+ },
1467
+ "network": "zksync",
1468
+ "rpcUrls": {
1469
+ "default": {
1470
+ "http": [
1471
+ "https://zksync2-mainnet.zksync.io",
1472
+ ],
1473
+ "webSocket": [
1474
+ "wss://zksync2-mainnet.zksync.io/ws",
1475
+ ],
1476
+ },
1477
+ "public": {
1478
+ "http": [
1479
+ "https://zksync2-mainnet.zksync.io",
1480
+ ],
1481
+ "webSocket": [
1482
+ "wss://zksync2-mainnet.zksync.io/ws",
1483
+ ],
1484
+ },
1485
+ },
1486
+ },
1487
+ "zkSyncTestnet": {
1488
+ "blockExplorers": {
1489
+ "default": {
1490
+ "name": "zkExplorer",
1491
+ "url": "https://goerli.explorer.zksync.io",
1492
+ },
1493
+ },
1494
+ "id": 280,
1495
+ "name": "zkSync Testnet",
1496
+ "nativeCurrency": {
1497
+ "decimals": 18,
1498
+ "name": "Ether",
1499
+ "symbol": "ETH",
1500
+ },
1501
+ "network": "zksync-testnet",
1502
+ "rpcUrls": {
1503
+ "default": {
1504
+ "http": [
1505
+ "https://zksync2-testnet.zksync.dev",
1506
+ ],
1507
+ "webSocket": [
1508
+ "wss://zksync2-testnet.zksync.dev/ws",
1509
+ ],
1510
+ },
1511
+ "public": {
1512
+ "http": [
1513
+ "https://zksync2-testnet.zksync.dev",
1514
+ ],
1515
+ "webSocket": [
1516
+ "wss://zksync2-testnet.zksync.dev/ws",
1517
+ ],
1518
+ },
1519
+ },
1520
+ "testnet": true,
1521
+ },
1522
+ }
1523
+ `)
1524
+ })
1525
+
1526
+ describe('formatters', () => {
1527
+ test('celo', () => {
1528
+ const { block, transaction, transactionReceipt, transactionRequest } =
1529
+ chains.celo.formatters!
1530
+
1531
+ expect(
1532
+ block({
1533
+ baseFeePerGas: '0x0',
1534
+ extraData:
1535
+ '0xd983010700846765746889676f312e31372e3133856c696e7578000000000000f8ccc0c080b84169807e4d7934803decfde330167e444ec323431e1ff4cd70f40f2e79f24ce91f60340b99f97e3562ee57389e2c72343a74379e0b8b7ca5237ec141e84278bb3e00f8418e3e8af95497b7f6ffe7d3c4cbfbbdb06b26f6f3e913ca2cb7dff23532eaf3eb9f3b06ae75498c88353d279cf58fb0570736e2aa20cf53381722b6485f0f3c8180f8418e3fffffffffffffffffffffffffffb0005d23be939b9f8135e6b1ff283baff985c1b6ccacf2b6aa7fbd8939c4b6178b1d242b574a614b6347182a3b3195258080',
1536
+ gasUsed: '0x1',
1537
+ hash: '0xac8c9bc3b84e103dc321bbe83b670e425ff68bfc9a333a4f1b1b204ad11c583d',
1538
+ logsBloom:
1539
+ '0x02004000004200000000000000800020000000000000400002040000002020000000802000000000000180000001000020800000000000000000000000000000000000000022000260000008000800000000000000000000000000000000000000000008000410002100000140000800000044c00200000000400010000800008800000080000000000010000040000000000000000000000000000000800020028000000100000000000000000000002002881000000000000800020000040020900402020000180000000000000040000800000011020090002000400000200010002000001000000000000080000000000000000000000000000004000000',
1540
+ miner: '0xe267d978037b89db06c6a5fcf82fad8297e290ff',
1541
+ number: '0x2',
1542
+ parentHash:
1543
+ '0xf6e57c99be5a81167bcb7bdf8d55572235384182c71635857ace2c04d25294ed',
1544
+ randomness: {
1545
+ committed:
1546
+ '0x339714505ecf55eacc2d2568ea53a7424bd0aa40fd710fd6892464d0716da711',
1547
+ revealed:
1548
+ '0xe10b5f01b0376fdc9151f66992f8c1b990083acabc14ec1b04f6a53ad804db88',
1549
+ },
1550
+ receiptsRoot:
1551
+ '0xca8aabc507534e45c982aa43e38118fc6f9cf222800e3d703a6e299a2e661f2a',
1552
+ size: '0x3',
1553
+ stateRoot:
1554
+ '0x051c8e40ed3d8afabbad5321a4bb6b9d686a8a62d9b696b3e5a5c769c3623d48',
1555
+ timestamp: '0x4',
1556
+ totalDifficulty: '0x5',
1557
+ transactions: [
1558
+ '0x487efb864b308ee85afd7ed5954e968457cfe84e71726114b0a44f31fb876e85',
1559
+ '0x3aa054b868fb0ce99388d74165b6128a5aca0992a785eb73a84fb7532f02a6a3',
1560
+ '0x7273f2bf436b14621094de5694d5aced028666389c7a89f4a863ac33d653cf52',
1561
+ '0xe5240102364623faf753498c52102de4a5f9641ceb6f99d9c92b032716e2f8f9',
1562
+ '0x92c31e9e4397e08a5abcccd8cc466e73d554be16da1ca7cac6a01b643f806524',
1563
+ '0x0acc190dfc0bbc6c9823dc17ff815c94e1494b60f9be9b6e045cbad572fdbdb1',
1564
+ '0x27c8cff64388e80b279407758d6801fe0dfe3410bacc7051deddf6c49c16710c',
1565
+ '0x6d4e4a0a01b1ebbb8be5cddede5de036779bd230ffc22e465eaa6128bd552ecb',
1566
+ '0xa80107ba2f636428883a71b7ce8a23171faf5076bae51e3a68e046c143434ed9',
1567
+ '0xcdadac0ee4a8901992ee365b7d251ff567134b007d2ad2d6a2285f7091998d60',
1568
+ '0xdff49ec96503acbd0110a8200f0f18b9924978bc5db32ae5c47a0986bcb58b58',
1569
+ '0xb0591b97ed1f7779e5cd548a9acfdad535d9073a3879d5bd4e3ff053bce31c5f',
1570
+ '0xa58e9da5702648d3f3f81e44952d5072b07b10eb13477a877cf3d957443b5605',
1571
+ '0x00d3bf8dc0ed9b62a786ce2fe1bec7de9d0ba286421acd3c4942b055b0741c0c',
1572
+ '0xf02343c58c6ef8007e86840e8ac9f8c2a6c52c7877b7554e87711efaab49d50a',
1573
+ '0x063f62e3c507eb0102f9dbe887520db4a1d3d34c4279f646bc3fc2c76e074369',
1574
+ '0xbeb28f46cc143db996e14fa35591cb5de4dcc92a569422f68f87f3f6a72a0e64',
1575
+ '0x9a38f385833a2c1ea159031f12c3e1af4033860c389afb69d77d1b897f37c452',
1576
+ '0xae6dbf3554a531e0ad6c51ec1e2201b41859f466dbb0ca3364fa7237fb0c60f3',
1577
+ '0x789aca8285c9e0ce2deb306f2c2f0f53df9b3601e295bdc0838a8622bd697be6',
1578
+ '0x230ebdcd6c3282992c8793f23eb847f955220f2a6c14bb82b38bc48ccf0cf1c4',
1579
+ '0xad7f4b13ac995055b681cb64f90bfe2863582e49d1179b837ebde353117ab2b4',
1580
+ '0xe40fc6bbacf5cfc1f6c41f06737d7df6274aef89a9c46bbe4fb8cb8484ffa54b',
1581
+ '0xa78f1aa9b1a0a2130477c0ed9df303c033c5c852240689a9ec34347333defa42',
1582
+ '0x3b10b4297066dbac52031920159034ef43544b77fc82c5fcc561df7208064b2f',
1583
+ '0x5d73e6bb86089544825ca8c8ca2091744b7fd25bdd36a8b4d9941968be76a845',
1584
+ '0x2f5d0deb26329807564b18ecbf24d9cb9d802d92369ea48c78fb973e1ea78994',
1585
+ '0x086a6ff358bce56bcbc022978b1b84448143ae66de7f9e0c3f7a68bce7664135',
1586
+ '0x8f36d90a6da392b377162caa1f81a5f0e3882c48794bea979bf79f119bb9284d',
1587
+ '0xe0a475e8a6f9495b00a55d8472b108171bf11a51cb8db131c98c25a17d0ac78c',
1588
+ '0x8ba00695bd7b524ff55fbbda3f17c6e93056e6895089de2ee29d58541e11b88f',
1589
+ '0xf971ed0462249050dbeaa4a812c2b881957d4225587dcd10c88581ca6b096a36',
1590
+ '0x229ab6e46f4be57cb81f8c7b2070f19827e55d4162c72b4abf26e618521eaaee',
1591
+ '0x99601bf74f39ef88dabd853b40e86bc9653899a93af85518fe73ecf372578588',
1592
+ '0x5deaa0abfd7689d3c33543a3d3b1bebc3dba46acd72246775fabb0bb5561e410',
1593
+ '0x413bada477356cdf02680950e2d0368ce3614eccc4a6c245fabd54ee07253f60',
1594
+ ],
1595
+ transactionsRoot:
1596
+ '0xb293e2c4ce20a9eac253241e750a5592c9d3c1b27bf090d0fc2fa4756a038866',
1597
+ }),
1598
+ ).toMatchInlineSnapshot(`
1599
+ {
1600
+ "baseFeePerGas": 0n,
1601
+ "extraData": "0xd983010700846765746889676f312e31372e3133856c696e7578000000000000f8ccc0c080b84169807e4d7934803decfde330167e444ec323431e1ff4cd70f40f2e79f24ce91f60340b99f97e3562ee57389e2c72343a74379e0b8b7ca5237ec141e84278bb3e00f8418e3e8af95497b7f6ffe7d3c4cbfbbdb06b26f6f3e913ca2cb7dff23532eaf3eb9f3b06ae75498c88353d279cf58fb0570736e2aa20cf53381722b6485f0f3c8180f8418e3fffffffffffffffffffffffffffb0005d23be939b9f8135e6b1ff283baff985c1b6ccacf2b6aa7fbd8939c4b6178b1d242b574a614b6347182a3b3195258080",
1602
+ "gasUsed": 1n,
1603
+ "hash": "0xac8c9bc3b84e103dc321bbe83b670e425ff68bfc9a333a4f1b1b204ad11c583d",
1604
+ "logsBloom": "0x02004000004200000000000000800020000000000000400002040000002020000000802000000000000180000001000020800000000000000000000000000000000000000022000260000008000800000000000000000000000000000000000000000008000410002100000140000800000044c00200000000400010000800008800000080000000000010000040000000000000000000000000000000800020028000000100000000000000000000002002881000000000000800020000040020900402020000180000000000000040000800000011020090002000400000200010002000001000000000000080000000000000000000000000000004000000",
1605
+ "miner": "0xe267d978037b89db06c6a5fcf82fad8297e290ff",
1606
+ "number": 2n,
1607
+ "parentHash": "0xf6e57c99be5a81167bcb7bdf8d55572235384182c71635857ace2c04d25294ed",
1608
+ "randomness": {
1609
+ "committed": "0x339714505ecf55eacc2d2568ea53a7424bd0aa40fd710fd6892464d0716da711",
1610
+ "revealed": "0xe10b5f01b0376fdc9151f66992f8c1b990083acabc14ec1b04f6a53ad804db88",
1611
+ },
1612
+ "receiptsRoot": "0xca8aabc507534e45c982aa43e38118fc6f9cf222800e3d703a6e299a2e661f2a",
1613
+ "size": 3n,
1614
+ "stateRoot": "0x051c8e40ed3d8afabbad5321a4bb6b9d686a8a62d9b696b3e5a5c769c3623d48",
1615
+ "timestamp": 4n,
1616
+ "totalDifficulty": 5n,
1617
+ "transactions": [
1618
+ "0x487efb864b308ee85afd7ed5954e968457cfe84e71726114b0a44f31fb876e85",
1619
+ "0x3aa054b868fb0ce99388d74165b6128a5aca0992a785eb73a84fb7532f02a6a3",
1620
+ "0x7273f2bf436b14621094de5694d5aced028666389c7a89f4a863ac33d653cf52",
1621
+ "0xe5240102364623faf753498c52102de4a5f9641ceb6f99d9c92b032716e2f8f9",
1622
+ "0x92c31e9e4397e08a5abcccd8cc466e73d554be16da1ca7cac6a01b643f806524",
1623
+ "0x0acc190dfc0bbc6c9823dc17ff815c94e1494b60f9be9b6e045cbad572fdbdb1",
1624
+ "0x27c8cff64388e80b279407758d6801fe0dfe3410bacc7051deddf6c49c16710c",
1625
+ "0x6d4e4a0a01b1ebbb8be5cddede5de036779bd230ffc22e465eaa6128bd552ecb",
1626
+ "0xa80107ba2f636428883a71b7ce8a23171faf5076bae51e3a68e046c143434ed9",
1627
+ "0xcdadac0ee4a8901992ee365b7d251ff567134b007d2ad2d6a2285f7091998d60",
1628
+ "0xdff49ec96503acbd0110a8200f0f18b9924978bc5db32ae5c47a0986bcb58b58",
1629
+ "0xb0591b97ed1f7779e5cd548a9acfdad535d9073a3879d5bd4e3ff053bce31c5f",
1630
+ "0xa58e9da5702648d3f3f81e44952d5072b07b10eb13477a877cf3d957443b5605",
1631
+ "0x00d3bf8dc0ed9b62a786ce2fe1bec7de9d0ba286421acd3c4942b055b0741c0c",
1632
+ "0xf02343c58c6ef8007e86840e8ac9f8c2a6c52c7877b7554e87711efaab49d50a",
1633
+ "0x063f62e3c507eb0102f9dbe887520db4a1d3d34c4279f646bc3fc2c76e074369",
1634
+ "0xbeb28f46cc143db996e14fa35591cb5de4dcc92a569422f68f87f3f6a72a0e64",
1635
+ "0x9a38f385833a2c1ea159031f12c3e1af4033860c389afb69d77d1b897f37c452",
1636
+ "0xae6dbf3554a531e0ad6c51ec1e2201b41859f466dbb0ca3364fa7237fb0c60f3",
1637
+ "0x789aca8285c9e0ce2deb306f2c2f0f53df9b3601e295bdc0838a8622bd697be6",
1638
+ "0x230ebdcd6c3282992c8793f23eb847f955220f2a6c14bb82b38bc48ccf0cf1c4",
1639
+ "0xad7f4b13ac995055b681cb64f90bfe2863582e49d1179b837ebde353117ab2b4",
1640
+ "0xe40fc6bbacf5cfc1f6c41f06737d7df6274aef89a9c46bbe4fb8cb8484ffa54b",
1641
+ "0xa78f1aa9b1a0a2130477c0ed9df303c033c5c852240689a9ec34347333defa42",
1642
+ "0x3b10b4297066dbac52031920159034ef43544b77fc82c5fcc561df7208064b2f",
1643
+ "0x5d73e6bb86089544825ca8c8ca2091744b7fd25bdd36a8b4d9941968be76a845",
1644
+ "0x2f5d0deb26329807564b18ecbf24d9cb9d802d92369ea48c78fb973e1ea78994",
1645
+ "0x086a6ff358bce56bcbc022978b1b84448143ae66de7f9e0c3f7a68bce7664135",
1646
+ "0x8f36d90a6da392b377162caa1f81a5f0e3882c48794bea979bf79f119bb9284d",
1647
+ "0xe0a475e8a6f9495b00a55d8472b108171bf11a51cb8db131c98c25a17d0ac78c",
1648
+ "0x8ba00695bd7b524ff55fbbda3f17c6e93056e6895089de2ee29d58541e11b88f",
1649
+ "0xf971ed0462249050dbeaa4a812c2b881957d4225587dcd10c88581ca6b096a36",
1650
+ "0x229ab6e46f4be57cb81f8c7b2070f19827e55d4162c72b4abf26e618521eaaee",
1651
+ "0x99601bf74f39ef88dabd853b40e86bc9653899a93af85518fe73ecf372578588",
1652
+ "0x5deaa0abfd7689d3c33543a3d3b1bebc3dba46acd72246775fabb0bb5561e410",
1653
+ "0x413bada477356cdf02680950e2d0368ce3614eccc4a6c245fabd54ee07253f60",
1654
+ ],
1655
+ "transactionsRoot": "0xb293e2c4ce20a9eac253241e750a5592c9d3c1b27bf090d0fc2fa4756a038866",
1656
+ }
1657
+ `)
1658
+
1659
+ expect(
1660
+ transaction({
1661
+ accessList: [],
1662
+ blockHash:
1663
+ '0x89644bbd5c8d682a2e9611170e6c1f02573d866d286f006cbf517eec7254ec2d',
1664
+ blockNumber: '0x1',
1665
+ chainId: '0x1',
1666
+ feeCurrency: null,
1667
+ from: '0xa152f8bb749c55e9943a3a0a3111d18ee2b3f94e',
1668
+ gas: '0x2',
1669
+ gasPrice: undefined,
1670
+ gatewayFee: '0x3',
1671
+ gatewayFeeRecipient: null,
1672
+ hash: '0xa4b1f606b66105fa45cb5db23d2f6597075701e7f0e2367f4e6a39d17a8cf98b',
1673
+ input:
1674
+ '0x23b872dd000000000000000000000000a00f99bc38b1ecda1fd70eaa1cd31d576a9f46b0000000000000000000000000f16e9b0d03470827a95cdfd0cb8a8a3b46969b910000000000000000000000000000000000000000000000000000002b3b6fb3d0',
1675
+ maxFeePerGas: '0x4',
1676
+ maxPriorityFeePerGas: '0x5',
1677
+ nonce: '0x6',
1678
+ r: '0x5e49a7bd0534c6b6d3bbe581659424d3747f920d40ce56e48d26e5d94aac32ca',
1679
+ s: '0x1746abe27b7c4f00bda1ec714ac1f7083e9025b6ca3b2248e439a173e4ab55e0',
1680
+ to: '0x15d4c048f83bd7e37d49ea4c83a07267ec4203da',
1681
+ transactionIndex: '0x7',
1682
+ type: '0x2',
1683
+ v: '0x1',
1684
+ value: '0x0',
1685
+ }),
1686
+ ).toMatchInlineSnapshot(`
1687
+ {
1688
+ "accessList": [],
1689
+ "blockHash": "0x89644bbd5c8d682a2e9611170e6c1f02573d866d286f006cbf517eec7254ec2d",
1690
+ "blockNumber": 1n,
1691
+ "chainId": "0x1",
1692
+ "feeCurrency": null,
1693
+ "from": "0xa152f8bb749c55e9943a3a0a3111d18ee2b3f94e",
1694
+ "gas": 2n,
1695
+ "gasPrice": undefined,
1696
+ "gatewayFee": 3n,
1697
+ "gatewayFeeRecipient": null,
1698
+ "hash": "0xa4b1f606b66105fa45cb5db23d2f6597075701e7f0e2367f4e6a39d17a8cf98b",
1699
+ "input": "0x23b872dd000000000000000000000000a00f99bc38b1ecda1fd70eaa1cd31d576a9f46b0000000000000000000000000f16e9b0d03470827a95cdfd0cb8a8a3b46969b910000000000000000000000000000000000000000000000000000002b3b6fb3d0",
1700
+ "maxFeePerGas": 4n,
1701
+ "maxPriorityFeePerGas": 5n,
1702
+ "nonce": 6,
1703
+ "r": "0x5e49a7bd0534c6b6d3bbe581659424d3747f920d40ce56e48d26e5d94aac32ca",
1704
+ "s": "0x1746abe27b7c4f00bda1ec714ac1f7083e9025b6ca3b2248e439a173e4ab55e0",
1705
+ "to": "0x15d4c048f83bd7e37d49ea4c83a07267ec4203da",
1706
+ "transactionIndex": 7,
1707
+ "type": "eip1559",
1708
+ "v": 1n,
1709
+ "value": 0n,
1710
+ }
1711
+ `)
1712
+
1713
+ expect(
1714
+ transaction({
1715
+ accessList: [],
1716
+ blockHash:
1717
+ '0x89644bbd5c8d682a2e9611170e6c1f02573d866d286f006cbf517eec7254ec2d',
1718
+ blockNumber: '0x1',
1719
+ chainId: '0x1',
1720
+ feeCurrency: null,
1721
+ from: '0xa152f8bb749c55e9943a3a0a3111d18ee2b3f94e',
1722
+ gas: '0x2',
1723
+ gasPrice: undefined,
1724
+ gatewayFee: null,
1725
+ gatewayFeeRecipient: null,
1726
+ hash: '0xa4b1f606b66105fa45cb5db23d2f6597075701e7f0e2367f4e6a39d17a8cf98b',
1727
+ input:
1728
+ '0x23b872dd000000000000000000000000a00f99bc38b1ecda1fd70eaa1cd31d576a9f46b0000000000000000000000000f16e9b0d03470827a95cdfd0cb8a8a3b46969b910000000000000000000000000000000000000000000000000000002b3b6fb3d0',
1729
+ maxFeePerGas: '0x4',
1730
+ maxPriorityFeePerGas: '0x5',
1731
+ nonce: '0x6',
1732
+ r: '0x5e49a7bd0534c6b6d3bbe581659424d3747f920d40ce56e48d26e5d94aac32ca',
1733
+ s: '0x1746abe27b7c4f00bda1ec714ac1f7083e9025b6ca3b2248e439a173e4ab55e0',
1734
+ to: '0x15d4c048f83bd7e37d49ea4c83a07267ec4203da',
1735
+ transactionIndex: '0x7',
1736
+ type: '0x2',
1737
+ v: '0x1',
1738
+ value: '0x0',
1739
+ }),
1740
+ ).toMatchInlineSnapshot(`
1741
+ {
1742
+ "accessList": [],
1743
+ "blockHash": "0x89644bbd5c8d682a2e9611170e6c1f02573d866d286f006cbf517eec7254ec2d",
1744
+ "blockNumber": 1n,
1745
+ "chainId": "0x1",
1746
+ "feeCurrency": null,
1747
+ "from": "0xa152f8bb749c55e9943a3a0a3111d18ee2b3f94e",
1748
+ "gas": 2n,
1749
+ "gasPrice": undefined,
1750
+ "gatewayFee": null,
1751
+ "gatewayFeeRecipient": null,
1752
+ "hash": "0xa4b1f606b66105fa45cb5db23d2f6597075701e7f0e2367f4e6a39d17a8cf98b",
1753
+ "input": "0x23b872dd000000000000000000000000a00f99bc38b1ecda1fd70eaa1cd31d576a9f46b0000000000000000000000000f16e9b0d03470827a95cdfd0cb8a8a3b46969b910000000000000000000000000000000000000000000000000000002b3b6fb3d0",
1754
+ "maxFeePerGas": 4n,
1755
+ "maxPriorityFeePerGas": 5n,
1756
+ "nonce": 6,
1757
+ "r": "0x5e49a7bd0534c6b6d3bbe581659424d3747f920d40ce56e48d26e5d94aac32ca",
1758
+ "s": "0x1746abe27b7c4f00bda1ec714ac1f7083e9025b6ca3b2248e439a173e4ab55e0",
1759
+ "to": "0x15d4c048f83bd7e37d49ea4c83a07267ec4203da",
1760
+ "transactionIndex": 7,
1761
+ "type": "eip1559",
1762
+ "v": 1n,
1763
+ "value": 0n,
1764
+ }
1765
+ `)
1766
+
1767
+ expect(
1768
+ transactionReceipt({
1769
+ accessList: [],
1770
+ blockHash:
1771
+ '0x89644bbd5c8d682a2e9611170e6c1f02573d866d286f006cbf517eec7254ec2d',
1772
+ blockNumber: '0x1',
1773
+ chainId: '0x1',
1774
+ feeCurrency: null,
1775
+ from: '0xa152f8bb749c55e9943a3a0a3111d18ee2b3f94e',
1776
+ gas: '0x2',
1777
+ gasPrice: undefined,
1778
+ gatewayFee: null,
1779
+ gatewayFeeRecipient: null,
1780
+ hash: '0xa4b1f606b66105fa45cb5db23d2f6597075701e7f0e2367f4e6a39d17a8cf98b',
1781
+ input:
1782
+ '0x23b872dd000000000000000000000000a00f99bc38b1ecda1fd70eaa1cd31d576a9f46b0000000000000000000000000f16e9b0d03470827a95cdfd0cb8a8a3b46969b910000000000000000000000000000000000000000000000000000002b3b6fb3d0',
1783
+ maxFeePerGas: '0x4',
1784
+ maxPriorityFeePerGas: '0x5',
1785
+ nonce: '0x6',
1786
+ r: '0x5e49a7bd0534c6b6d3bbe581659424d3747f920d40ce56e48d26e5d94aac32ca',
1787
+ s: '0x1746abe27b7c4f00bda1ec714ac1f7083e9025b6ca3b2248e439a173e4ab55e0',
1788
+ to: '0x15d4c048f83bd7e37d49ea4c83a07267ec4203da',
1789
+ transactionIndex: '0x7',
1790
+ type: '0x2',
1791
+ v: '0x1',
1792
+ value: '0x0',
1793
+ }),
1794
+ ).toMatchInlineSnapshot(`
1795
+ {
1796
+ "accessList": [],
1797
+ "blockHash": "0x89644bbd5c8d682a2e9611170e6c1f02573d866d286f006cbf517eec7254ec2d",
1798
+ "blockNumber": 1n,
1799
+ "chainId": "0x1",
1800
+ "cumulativeGasUsed": null,
1801
+ "effectiveGasPrice": null,
1802
+ "feeCurrency": null,
1803
+ "from": "0xa152f8bb749c55e9943a3a0a3111d18ee2b3f94e",
1804
+ "gas": "0x2",
1805
+ "gasPrice": undefined,
1806
+ "gasUsed": null,
1807
+ "gatewayFee": null,
1808
+ "gatewayFeeRecipient": null,
1809
+ "hash": "0xa4b1f606b66105fa45cb5db23d2f6597075701e7f0e2367f4e6a39d17a8cf98b",
1810
+ "input": "0x23b872dd000000000000000000000000a00f99bc38b1ecda1fd70eaa1cd31d576a9f46b0000000000000000000000000f16e9b0d03470827a95cdfd0cb8a8a3b46969b910000000000000000000000000000000000000000000000000000002b3b6fb3d0",
1811
+ "logs": null,
1812
+ "maxFeePerGas": "0x4",
1813
+ "maxPriorityFeePerGas": "0x5",
1814
+ "nonce": "0x6",
1815
+ "r": "0x5e49a7bd0534c6b6d3bbe581659424d3747f920d40ce56e48d26e5d94aac32ca",
1816
+ "s": "0x1746abe27b7c4f00bda1ec714ac1f7083e9025b6ca3b2248e439a173e4ab55e0",
1817
+ "status": null,
1818
+ "to": "0x15d4c048f83bd7e37d49ea4c83a07267ec4203da",
1819
+ "transactionIndex": 7,
1820
+ "type": "eip1559",
1821
+ "v": "0x1",
1822
+ "value": "0x0",
1823
+ }
1824
+ `)
1825
+
1826
+ expect(
1827
+ transactionReceipt({
1828
+ accessList: [],
1829
+ blockHash:
1830
+ '0x89644bbd5c8d682a2e9611170e6c1f02573d866d286f006cbf517eec7254ec2d',
1831
+ blockNumber: '0x1',
1832
+ chainId: '0x1',
1833
+ feeCurrency: null,
1834
+ from: '0xa152f8bb749c55e9943a3a0a3111d18ee2b3f94e',
1835
+ gas: '0x2',
1836
+ gasPrice: undefined,
1837
+ gatewayFee: '0x1',
1838
+ gatewayFeeRecipient: null,
1839
+ hash: '0xa4b1f606b66105fa45cb5db23d2f6597075701e7f0e2367f4e6a39d17a8cf98b',
1840
+ input:
1841
+ '0x23b872dd000000000000000000000000a00f99bc38b1ecda1fd70eaa1cd31d576a9f46b0000000000000000000000000f16e9b0d03470827a95cdfd0cb8a8a3b46969b910000000000000000000000000000000000000000000000000000002b3b6fb3d0',
1842
+ maxFeePerGas: '0x4',
1843
+ maxPriorityFeePerGas: '0x5',
1844
+ nonce: '0x6',
1845
+ r: '0x5e49a7bd0534c6b6d3bbe581659424d3747f920d40ce56e48d26e5d94aac32ca',
1846
+ s: '0x1746abe27b7c4f00bda1ec714ac1f7083e9025b6ca3b2248e439a173e4ab55e0',
1847
+ to: '0x15d4c048f83bd7e37d49ea4c83a07267ec4203da',
1848
+ transactionIndex: '0x7',
1849
+ type: '0x2',
1850
+ v: '0x1',
1851
+ value: '0x0',
1852
+ }),
1853
+ ).toMatchInlineSnapshot(`
1854
+ {
1855
+ "accessList": [],
1856
+ "blockHash": "0x89644bbd5c8d682a2e9611170e6c1f02573d866d286f006cbf517eec7254ec2d",
1857
+ "blockNumber": 1n,
1858
+ "chainId": "0x1",
1859
+ "cumulativeGasUsed": null,
1860
+ "effectiveGasPrice": null,
1861
+ "feeCurrency": null,
1862
+ "from": "0xa152f8bb749c55e9943a3a0a3111d18ee2b3f94e",
1863
+ "gas": "0x2",
1864
+ "gasPrice": undefined,
1865
+ "gasUsed": null,
1866
+ "gatewayFee": 1n,
1867
+ "gatewayFeeRecipient": null,
1868
+ "hash": "0xa4b1f606b66105fa45cb5db23d2f6597075701e7f0e2367f4e6a39d17a8cf98b",
1869
+ "input": "0x23b872dd000000000000000000000000a00f99bc38b1ecda1fd70eaa1cd31d576a9f46b0000000000000000000000000f16e9b0d03470827a95cdfd0cb8a8a3b46969b910000000000000000000000000000000000000000000000000000002b3b6fb3d0",
1870
+ "logs": null,
1871
+ "maxFeePerGas": "0x4",
1872
+ "maxPriorityFeePerGas": "0x5",
1873
+ "nonce": "0x6",
1874
+ "r": "0x5e49a7bd0534c6b6d3bbe581659424d3747f920d40ce56e48d26e5d94aac32ca",
1875
+ "s": "0x1746abe27b7c4f00bda1ec714ac1f7083e9025b6ca3b2248e439a173e4ab55e0",
1876
+ "status": null,
1877
+ "to": "0x15d4c048f83bd7e37d49ea4c83a07267ec4203da",
1878
+ "transactionIndex": 7,
1879
+ "type": "eip1559",
1880
+ "v": "0x1",
1881
+ "value": "0x0",
1882
+ }
1883
+ `)
1884
+
1885
+ expect(
1886
+ transactionRequest({
1887
+ feeCurrency: '0x0f16e9b0d03470827a95cdfd0cb8a8a3b46969b9',
1888
+ from: '0x0f16e9b0d03470827a95cdfd0cb8a8a3b46969b9',
1889
+ gas: 1n,
1890
+ gatewayFee: '0x4',
1891
+ gatewayFeeRecipient: '0x0f16e9b0d03470827a95cdfd0cb8a8a3b46969b9',
1892
+ maxFeePerGas: 2n,
1893
+ maxPriorityFeePerGas: 1n,
1894
+ nonce: 1,
1895
+ value: 1n,
1896
+ }),
1897
+ ).toMatchInlineSnapshot(`
1898
+ {
1899
+ "feeCurrency": "0x0f16e9b0d03470827a95cdfd0cb8a8a3b46969b9",
1900
+ "from": "0x0f16e9b0d03470827a95cdfd0cb8a8a3b46969b9",
1901
+ "gas": "0x1",
1902
+ "gasPrice": undefined,
1903
+ "gatewayFee": "0x4",
1904
+ "gatewayFeeRecipient": "0x0f16e9b0d03470827a95cdfd0cb8a8a3b46969b9",
1905
+ "maxFeePerGas": "0x2",
1906
+ "maxPriorityFeePerGas": "0x1",
1907
+ "nonce": "0x1",
1908
+ "value": "0x1",
1909
+ }
1910
+ `)
1911
+ })
1912
+ })