dequanto 0.2.38 → 0.2.40

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 (476) hide show
  1. package/lib/cjs/abi/$abiCoder.js +1 -1
  2. package/lib/cjs/abi/$abiCoder.js.map +1 -1
  3. package/lib/cjs/abi/Logger.js +1 -1
  4. package/lib/cjs/abi/abi-coder-packed.js +3 -3
  5. package/lib/cjs/abi/abi-coder.js +16 -16
  6. package/lib/cjs/abi/coders/abstract-coder.js +31 -31
  7. package/lib/cjs/abi/coders/abstract-coder.js.map +1 -1
  8. package/lib/cjs/abi/fragments.js +90 -90
  9. package/lib/cjs/abi/fragments.js.map +1 -1
  10. package/lib/cjs/blocks/BlockDateResolver.js +9 -9
  11. package/lib/cjs/blocks/BlockDateResolver.js.map +1 -1
  12. package/lib/cjs/class/PackedRanges.js +46 -46
  13. package/lib/cjs/class/PackedRanges.js.map +1 -1
  14. package/lib/cjs/clients/ClientEventsStream.js +1 -1
  15. package/lib/cjs/clients/ClientEventsStream.js.map +1 -1
  16. package/lib/cjs/clients/ClientPool.js +23 -23
  17. package/lib/cjs/clients/ClientPool.js.map +1 -1
  18. package/lib/cjs/clients/WalletClient.js +3 -3
  19. package/lib/cjs/clients/WalletClient.js.map +1 -1
  20. package/lib/cjs/clients/Web3Client.js +14 -14
  21. package/lib/cjs/clients/Web3Client.js.map +1 -1
  22. package/lib/cjs/clients/Web3ClientFactory.js +1 -1
  23. package/lib/cjs/clients/Web3ClientFactory.js.map +1 -1
  24. package/lib/cjs/clients/compatibility/Web3.js +2 -2
  25. package/lib/cjs/clients/compatibility/Web3.js.map +1 -1
  26. package/lib/cjs/clients/handlers/RateLimitGuard.js +16 -16
  27. package/lib/cjs/clients/handlers/RateLimitGuard.js.map +1 -1
  28. package/lib/cjs/clients/model/PromiEventWrap.js +1 -1
  29. package/lib/cjs/clients/model/PromiEventWrap.js.map +1 -1
  30. package/lib/cjs/clients/utils/$web3Abi.js +2 -2
  31. package/lib/cjs/clients/utils/$web3Abi.js.map +1 -1
  32. package/lib/cjs/clients/utils/ClientErrorUtil.js +4 -0
  33. package/lib/cjs/clients/utils/ClientErrorUtil.js.map +1 -1
  34. package/lib/cjs/config/Config.js.map +1 -1
  35. package/lib/cjs/contracts/Contract.js +1 -1
  36. package/lib/cjs/contracts/Contract.js.map +1 -1
  37. package/lib/cjs/contracts/ContractAbiProvider.js +6 -6
  38. package/lib/cjs/contracts/ContractAbiProvider.js.map +1 -1
  39. package/lib/cjs/contracts/ContractBase.js +10 -10
  40. package/lib/cjs/contracts/ContractBase.js.map +1 -1
  41. package/lib/cjs/contracts/ContractProvider.js +1 -1
  42. package/lib/cjs/contracts/ContractProvider.js.map +1 -1
  43. package/lib/cjs/contracts/ContractReader.js +5 -5
  44. package/lib/cjs/contracts/ContractReader.js.map +1 -1
  45. package/lib/cjs/contracts/ContractWriter.js +4 -4
  46. package/lib/cjs/contracts/ContractWriter.js.map +1 -1
  47. package/lib/cjs/contracts/deploy/ContractDeployer.js +4 -4
  48. package/lib/cjs/contracts/deploy/ContractDeployer.js.map +1 -1
  49. package/lib/cjs/contracts/deploy/Deployments.js +36 -21
  50. package/lib/cjs/contracts/deploy/Deployments.js.map +1 -1
  51. package/lib/cjs/contracts/deploy/proxy/$proxyDeploy.js +13 -13
  52. package/lib/cjs/contracts/deploy/proxy/$proxyDeploy.js.map +1 -1
  53. package/lib/cjs/contracts/deploy/proxy/ProxyDeployment.js +22 -22
  54. package/lib/cjs/contracts/deploy/proxy/ProxyDeployment.js.map +1 -1
  55. package/lib/cjs/contracts/deploy/storage/DeploymentsStorage.js +15 -14
  56. package/lib/cjs/contracts/deploy/storage/DeploymentsStorage.js.map +1 -1
  57. package/lib/cjs/contracts/utils/AbiDeserializer.js +4 -4
  58. package/lib/cjs/contracts/utils/AbiDeserializer.js.map +1 -1
  59. package/lib/cjs/contracts/utils/ContractBaseUtils.js +3 -3
  60. package/lib/cjs/contracts/utils/ContractBaseUtils.js.map +1 -1
  61. package/lib/cjs/evm/OpcodesWalker.js +1 -1
  62. package/lib/cjs/evm/OpcodesWalker.js.map +1 -1
  63. package/lib/cjs/explorer/BlockchainExplorer.js +1 -1
  64. package/lib/cjs/explorer/BlockchainExplorer.js.map +1 -1
  65. package/lib/cjs/explorer/BlockchainExplorerFactory.js +1 -1
  66. package/lib/cjs/explorer/BlockchainExplorerStorage.js +12 -12
  67. package/lib/cjs/explorer/BlockchainExplorerStorage.js.map +1 -1
  68. package/lib/cjs/explorer/Evmscan.js +1 -1
  69. package/lib/cjs/explorer/verifiers/FsHtmlVerifier.js +7 -7
  70. package/lib/cjs/explorer/verifiers/FsHtmlVerifier.js.map +1 -1
  71. package/lib/cjs/flashbots/FlashbotWeb3Client.js +1 -1
  72. package/lib/cjs/flashbots/FlashbotWeb3Client.js.map +1 -1
  73. package/lib/cjs/hardhat/HardhatProvider.js +7 -7
  74. package/lib/cjs/hardhat/HardhatProvider.js.map +1 -1
  75. package/lib/cjs/indexer/BlocksTxIndexer.js +2 -2
  76. package/lib/cjs/indexer/BlocksTxIndexer.js.map +1 -1
  77. package/lib/cjs/indexer/EventsIndexer.js +11 -11
  78. package/lib/cjs/indexer/EventsIndexer.js.map +1 -1
  79. package/lib/cjs/indexer/PendingTxIndexer.js +2 -2
  80. package/lib/cjs/indexer/PendingTxIndexer.js.map +1 -1
  81. package/lib/cjs/indexer/handlers/BlocksWalker.js +9 -9
  82. package/lib/cjs/indexer/handlers/BlocksWalker.js.map +1 -1
  83. package/lib/cjs/indexer/handlers/TxQueueLoader.js +1 -1
  84. package/lib/cjs/indexer/storage/FsEventsIndexerStore.js +3 -3
  85. package/lib/cjs/indexer/storage/FsEventsIndexerStore.js.map +1 -1
  86. package/lib/cjs/indexer/storage/FsEventsStoreUtils.js +1 -1
  87. package/lib/cjs/indexer/storage/FsEventsStoreUtils.js.map +1 -1
  88. package/lib/cjs/json/JsonArrayMultiStore.js +1 -1
  89. package/lib/cjs/json/JsonArrayMultiStore.js.map +1 -1
  90. package/lib/cjs/json/JsonStoreFs.js +1 -1
  91. package/lib/cjs/json/JsonStoreFs.js.map +1 -1
  92. package/lib/cjs/rpc/$rpc.js +2 -2
  93. package/lib/cjs/rpc/$rpc.js.map +1 -1
  94. package/lib/cjs/rpc/Rpc.js +2 -2
  95. package/lib/cjs/rpc/RpcBase.js +2 -2
  96. package/lib/cjs/rpc/RpcBase.js.map +1 -1
  97. package/lib/cjs/rpc/RpcContract.js +4 -3
  98. package/lib/cjs/rpc/RpcContract.js.map +1 -1
  99. package/lib/cjs/rpc/RpcSubscription.js +1 -1
  100. package/lib/cjs/rpc/RpcSubscription.js.map +1 -1
  101. package/lib/cjs/rpc/transports/compatibility/EIP1193Transport.js +4 -4
  102. package/lib/cjs/rpc/transports/compatibility/EIP1193Transport.js.map +1 -1
  103. package/lib/cjs/rpc/transports/compatibility/Web3Transport.js +1 -1
  104. package/lib/cjs/rpc/transports/compatibility/Web3Transport.js.map +1 -1
  105. package/lib/cjs/services/TimelockService/TimelockService.js +2 -2
  106. package/lib/cjs/services/TimelockService/TimelockServiceFallbackSafe.js +2 -2
  107. package/lib/cjs/solidity/SlotsDump.js +1 -1
  108. package/lib/cjs/solidity/SlotsDump.js.map +1 -1
  109. package/lib/cjs/solidity/SlotsParser/MappingSettersResolver.js +3 -3
  110. package/lib/cjs/solidity/SlotsParser/MappingSettersResolver.js.map +1 -1
  111. package/lib/cjs/solidity/SlotsParser/SourceFile.js +3 -3
  112. package/lib/cjs/solidity/SlotsParser/SourceFile.js.map +1 -1
  113. package/lib/cjs/solidity/SolidityParser.js +1 -1
  114. package/lib/cjs/solidity/SolidityParser.js.map +1 -1
  115. package/lib/cjs/solidity/SourceCodeProvider.js +1 -1
  116. package/lib/cjs/solidity/SourceCodeProvider.js.map +1 -1
  117. package/lib/cjs/solidity/storage/Accessor.js +1 -1
  118. package/lib/cjs/solidity/storage/Accessor.js.map +1 -1
  119. package/lib/cjs/solidity/storage/SlotFixedArray.js +1 -1
  120. package/lib/cjs/solidity/storage/SlotFixedArray.js.map +1 -1
  121. package/lib/cjs/solidity/storage/SlotsStorageTransport.js +3 -3
  122. package/lib/cjs/solidity/storage/SlotsStorageTransport.js.map +1 -1
  123. package/lib/cjs/solidity/storage/handlers/SlotBytesHandler.js +1 -1
  124. package/lib/cjs/solidity/storage/handlers/SlotBytesHandler.js.map +1 -1
  125. package/lib/cjs/solidity/storage/handlers/SlotDynamicArrayHandler.js +1 -1
  126. package/lib/cjs/solidity/storage/handlers/SlotDynamicArrayHandler.js.map +1 -1
  127. package/lib/cjs/solidity/storage/handlers/SlotFixedArrayHandler.js +1 -1
  128. package/lib/cjs/solidity/storage/handlers/SlotFixedArrayHandler.js.map +1 -1
  129. package/lib/cjs/solidity/storage/handlers/SlotValueConstantHandler.js +1 -1
  130. package/lib/cjs/solidity/storage/handlers/SlotValueConstantHandler.js.map +1 -1
  131. package/lib/cjs/solidity/storage/handlers/SlotValueHandler.js +1 -1
  132. package/lib/cjs/solidity/storage/handlers/SlotValueHandler.js.map +1 -1
  133. package/lib/cjs/solidity/storage/handlers/SlotValueImmutableHandler.js +4 -4
  134. package/lib/cjs/solidity/storage/handlers/SlotValueImmutableHandler.js.map +1 -1
  135. package/lib/cjs/tokens/TokenDataProvider.js +2 -2
  136. package/lib/cjs/tokens/TokenDataProvider.js.map +1 -1
  137. package/lib/cjs/tokens/TokenExchangeService.js +1 -1
  138. package/lib/cjs/tokens/TokenExchangeService.js.map +1 -1
  139. package/lib/cjs/tokens/TokenExchanges/AmmBase/V2/AmmPairV2Service.js +2 -2
  140. package/lib/cjs/tokens/TokenExchanges/AmmBase/V2/AmmPairV2Service.js.map +1 -1
  141. package/lib/cjs/tokens/TokenExchanges/AmmV2PriceQuote.js +2 -2
  142. package/lib/cjs/tokens/TokenExchanges/AmmV2PriceQuote.js.map +1 -1
  143. package/lib/cjs/tokens/TokenOracles/amm/AmmV1Oracle.js +2 -2
  144. package/lib/cjs/tokens/TokenOracles/amm/AmmV1Oracle.js.map +1 -1
  145. package/lib/cjs/tokens/TokenTransferService.js +2 -2
  146. package/lib/cjs/tokens/TokenTransferService.js.map +1 -1
  147. package/lib/cjs/tokens/TokensService.js +1 -1
  148. package/lib/cjs/tokens/TokensService.js.map +1 -1
  149. package/lib/cjs/txs/TxNonceManager.js +1 -1
  150. package/lib/cjs/txs/TxWriter.js +9 -0
  151. package/lib/cjs/txs/TxWriter.js.map +1 -1
  152. package/lib/cjs/txs/conditional/GasWatcherTx.js +1 -1
  153. package/lib/cjs/txs/conditional/GasWatcherTx.js.map +1 -1
  154. package/lib/cjs/txs/receipt/TxLogParser.js +1 -1
  155. package/lib/cjs/utils/$crypto.js +1 -1
  156. package/lib/cjs/utils/$crypto.js.map +1 -1
  157. package/lib/cjs/utils/$date.js +1 -1
  158. package/lib/cjs/utils/$date.js.map +1 -1
  159. package/lib/cjs/utils/$hex.js +1 -1
  160. package/lib/cjs/utils/$logger.js +1 -1
  161. package/lib/cjs/utils/$logger.js.map +1 -1
  162. package/lib/cjs/utils/$machine.js +2 -2
  163. package/lib/cjs/utils/$machine.js.map +1 -1
  164. package/lib/cjs/utils/$traces.js +1 -1
  165. package/lib/cjs/utils/$traces.js.map +1 -1
  166. package/lib/esm/abi/$abiCoder.js.map +1 -1
  167. package/lib/esm/abi/$abiCoder.mjs +1 -1
  168. package/lib/esm/abi/Logger.mjs +1 -1
  169. package/lib/esm/abi/abi-coder-packed.mjs +3 -3
  170. package/lib/esm/abi/abi-coder.mjs +16 -16
  171. package/lib/esm/abi/coders/abstract-coder.js.map +1 -1
  172. package/lib/esm/abi/coders/abstract-coder.mjs +31 -31
  173. package/lib/esm/abi/fragments.js.map +1 -1
  174. package/lib/esm/abi/fragments.mjs +90 -90
  175. package/lib/esm/blocks/BlockDateResolver.js.map +1 -1
  176. package/lib/esm/blocks/BlockDateResolver.mjs +9 -9
  177. package/lib/esm/class/PackedRanges.js.map +1 -1
  178. package/lib/esm/class/PackedRanges.mjs +46 -46
  179. package/lib/esm/clients/ClientEventsStream.js.map +1 -1
  180. package/lib/esm/clients/ClientEventsStream.mjs +1 -1
  181. package/lib/esm/clients/ClientPool.js.map +1 -1
  182. package/lib/esm/clients/ClientPool.mjs +23 -23
  183. package/lib/esm/clients/WalletClient.js.map +1 -1
  184. package/lib/esm/clients/WalletClient.mjs +3 -3
  185. package/lib/esm/clients/Web3Client.js.map +1 -1
  186. package/lib/esm/clients/Web3Client.mjs +14 -14
  187. package/lib/esm/clients/Web3ClientFactory.js.map +1 -1
  188. package/lib/esm/clients/Web3ClientFactory.mjs +1 -1
  189. package/lib/esm/clients/compatibility/Web3.js.map +1 -1
  190. package/lib/esm/clients/compatibility/Web3.mjs +2 -2
  191. package/lib/esm/clients/handlers/RateLimitGuard.js.map +1 -1
  192. package/lib/esm/clients/handlers/RateLimitGuard.mjs +16 -16
  193. package/lib/esm/clients/model/PromiEventWrap.js.map +1 -1
  194. package/lib/esm/clients/model/PromiEventWrap.mjs +1 -1
  195. package/lib/esm/clients/utils/$web3Abi.js.map +1 -1
  196. package/lib/esm/clients/utils/$web3Abi.mjs +2 -2
  197. package/lib/esm/clients/utils/ClientErrorUtil.js.map +1 -1
  198. package/lib/esm/clients/utils/ClientErrorUtil.mjs +4 -0
  199. package/lib/esm/config/Config.js.map +1 -1
  200. package/lib/esm/contracts/Contract.js.map +1 -1
  201. package/lib/esm/contracts/Contract.mjs +1 -1
  202. package/lib/esm/contracts/ContractAbiProvider.js.map +1 -1
  203. package/lib/esm/contracts/ContractAbiProvider.mjs +6 -6
  204. package/lib/esm/contracts/ContractBase.js.map +1 -1
  205. package/lib/esm/contracts/ContractBase.mjs +10 -10
  206. package/lib/esm/contracts/ContractProvider.js.map +1 -1
  207. package/lib/esm/contracts/ContractProvider.mjs +1 -1
  208. package/lib/esm/contracts/ContractReader.js.map +1 -1
  209. package/lib/esm/contracts/ContractReader.mjs +5 -5
  210. package/lib/esm/contracts/ContractWriter.js.map +1 -1
  211. package/lib/esm/contracts/ContractWriter.mjs +4 -4
  212. package/lib/esm/contracts/deploy/ContractDeployer.js.map +1 -1
  213. package/lib/esm/contracts/deploy/ContractDeployer.mjs +4 -4
  214. package/lib/esm/contracts/deploy/Deployments.js.map +1 -1
  215. package/lib/esm/contracts/deploy/Deployments.mjs +36 -21
  216. package/lib/esm/contracts/deploy/proxy/$proxyDeploy.js.map +1 -1
  217. package/lib/esm/contracts/deploy/proxy/$proxyDeploy.mjs +13 -13
  218. package/lib/esm/contracts/deploy/proxy/ProxyDeployment.js.map +1 -1
  219. package/lib/esm/contracts/deploy/proxy/ProxyDeployment.mjs +22 -22
  220. package/lib/esm/contracts/deploy/storage/DeploymentsStorage.js.map +1 -1
  221. package/lib/esm/contracts/deploy/storage/DeploymentsStorage.mjs +15 -14
  222. package/lib/esm/contracts/utils/AbiDeserializer.js.map +1 -1
  223. package/lib/esm/contracts/utils/AbiDeserializer.mjs +4 -4
  224. package/lib/esm/contracts/utils/ContractBaseUtils.js.map +1 -1
  225. package/lib/esm/contracts/utils/ContractBaseUtils.mjs +3 -3
  226. package/lib/esm/evm/OpcodesWalker.js.map +1 -1
  227. package/lib/esm/evm/OpcodesWalker.mjs +1 -1
  228. package/lib/esm/explorer/BlockchainExplorer.js.map +1 -1
  229. package/lib/esm/explorer/BlockchainExplorer.mjs +1 -1
  230. package/lib/esm/explorer/BlockchainExplorerFactory.mjs +1 -1
  231. package/lib/esm/explorer/BlockchainExplorerStorage.js.map +1 -1
  232. package/lib/esm/explorer/BlockchainExplorerStorage.mjs +12 -12
  233. package/lib/esm/explorer/Evmscan.mjs +1 -1
  234. package/lib/esm/explorer/verifiers/FsHtmlVerifier.js.map +1 -1
  235. package/lib/esm/explorer/verifiers/FsHtmlVerifier.mjs +7 -7
  236. package/lib/esm/flashbots/FlashbotWeb3Client.js.map +1 -1
  237. package/lib/esm/flashbots/FlashbotWeb3Client.mjs +1 -1
  238. package/lib/esm/hardhat/HardhatProvider.js.map +1 -1
  239. package/lib/esm/hardhat/HardhatProvider.mjs +7 -7
  240. package/lib/esm/indexer/BlocksTxIndexer.js.map +1 -1
  241. package/lib/esm/indexer/BlocksTxIndexer.mjs +2 -2
  242. package/lib/esm/indexer/EventsIndexer.js.map +1 -1
  243. package/lib/esm/indexer/EventsIndexer.mjs +11 -11
  244. package/lib/esm/indexer/PendingTxIndexer.js.map +1 -1
  245. package/lib/esm/indexer/PendingTxIndexer.mjs +2 -2
  246. package/lib/esm/indexer/handlers/BlocksWalker.js.map +1 -1
  247. package/lib/esm/indexer/handlers/BlocksWalker.mjs +9 -9
  248. package/lib/esm/indexer/handlers/TxQueueLoader.mjs +1 -1
  249. package/lib/esm/indexer/storage/FsEventsIndexerStore.js.map +1 -1
  250. package/lib/esm/indexer/storage/FsEventsIndexerStore.mjs +3 -3
  251. package/lib/esm/indexer/storage/FsEventsStoreUtils.js.map +1 -1
  252. package/lib/esm/indexer/storage/FsEventsStoreUtils.mjs +1 -1
  253. package/lib/esm/json/JsonArrayMultiStore.js.map +1 -1
  254. package/lib/esm/json/JsonArrayMultiStore.mjs +1 -1
  255. package/lib/esm/json/JsonStoreFs.js.map +1 -1
  256. package/lib/esm/json/JsonStoreFs.mjs +1 -1
  257. package/lib/esm/rpc/$rpc.js.map +1 -1
  258. package/lib/esm/rpc/$rpc.mjs +2 -2
  259. package/lib/esm/rpc/Rpc.mjs +2 -2
  260. package/lib/esm/rpc/RpcBase.js.map +1 -1
  261. package/lib/esm/rpc/RpcBase.mjs +2 -2
  262. package/lib/esm/rpc/RpcContract.js.map +1 -1
  263. package/lib/esm/rpc/RpcContract.mjs +4 -3
  264. package/lib/esm/rpc/RpcSubscription.js.map +1 -1
  265. package/lib/esm/rpc/RpcSubscription.mjs +1 -1
  266. package/lib/esm/rpc/transports/compatibility/EIP1193Transport.js.map +1 -1
  267. package/lib/esm/rpc/transports/compatibility/EIP1193Transport.mjs +4 -4
  268. package/lib/esm/rpc/transports/compatibility/Web3Transport.js.map +1 -1
  269. package/lib/esm/rpc/transports/compatibility/Web3Transport.mjs +1 -1
  270. package/lib/esm/services/TimelockService/TimelockService.mjs +2 -2
  271. package/lib/esm/services/TimelockService/TimelockServiceFallbackSafe.mjs +2 -2
  272. package/lib/esm/solidity/SlotsDump.js.map +1 -1
  273. package/lib/esm/solidity/SlotsDump.mjs +1 -1
  274. package/lib/esm/solidity/SlotsParser/MappingSettersResolver.js.map +1 -1
  275. package/lib/esm/solidity/SlotsParser/MappingSettersResolver.mjs +3 -3
  276. package/lib/esm/solidity/SlotsParser/SourceFile.js.map +1 -1
  277. package/lib/esm/solidity/SlotsParser/SourceFile.mjs +3 -3
  278. package/lib/esm/solidity/SolidityParser.js.map +1 -1
  279. package/lib/esm/solidity/SolidityParser.mjs +1 -1
  280. package/lib/esm/solidity/SourceCodeProvider.js.map +1 -1
  281. package/lib/esm/solidity/SourceCodeProvider.mjs +1 -1
  282. package/lib/esm/solidity/storage/Accessor.js.map +1 -1
  283. package/lib/esm/solidity/storage/Accessor.mjs +1 -1
  284. package/lib/esm/solidity/storage/SlotFixedArray.js.map +1 -1
  285. package/lib/esm/solidity/storage/SlotFixedArray.mjs +1 -1
  286. package/lib/esm/solidity/storage/SlotsStorageTransport.js.map +1 -1
  287. package/lib/esm/solidity/storage/SlotsStorageTransport.mjs +3 -3
  288. package/lib/esm/solidity/storage/handlers/SlotBytesHandler.js.map +1 -1
  289. package/lib/esm/solidity/storage/handlers/SlotBytesHandler.mjs +1 -1
  290. package/lib/esm/solidity/storage/handlers/SlotDynamicArrayHandler.js.map +1 -1
  291. package/lib/esm/solidity/storage/handlers/SlotDynamicArrayHandler.mjs +1 -1
  292. package/lib/esm/solidity/storage/handlers/SlotFixedArrayHandler.js.map +1 -1
  293. package/lib/esm/solidity/storage/handlers/SlotFixedArrayHandler.mjs +1 -1
  294. package/lib/esm/solidity/storage/handlers/SlotValueConstantHandler.js.map +1 -1
  295. package/lib/esm/solidity/storage/handlers/SlotValueConstantHandler.mjs +1 -1
  296. package/lib/esm/solidity/storage/handlers/SlotValueHandler.js.map +1 -1
  297. package/lib/esm/solidity/storage/handlers/SlotValueHandler.mjs +1 -1
  298. package/lib/esm/solidity/storage/handlers/SlotValueImmutableHandler.js.map +1 -1
  299. package/lib/esm/solidity/storage/handlers/SlotValueImmutableHandler.mjs +4 -4
  300. package/lib/esm/tokens/TokenDataProvider.js.map +1 -1
  301. package/lib/esm/tokens/TokenDataProvider.mjs +2 -2
  302. package/lib/esm/tokens/TokenExchangeService.js.map +1 -1
  303. package/lib/esm/tokens/TokenExchangeService.mjs +1 -1
  304. package/lib/esm/tokens/TokenExchanges/AmmBase/V2/AmmPairV2Service.js.map +1 -1
  305. package/lib/esm/tokens/TokenExchanges/AmmBase/V2/AmmPairV2Service.mjs +2 -2
  306. package/lib/esm/tokens/TokenExchanges/AmmV2PriceQuote.js.map +1 -1
  307. package/lib/esm/tokens/TokenExchanges/AmmV2PriceQuote.mjs +2 -2
  308. package/lib/esm/tokens/TokenOracles/amm/AmmV1Oracle.js.map +1 -1
  309. package/lib/esm/tokens/TokenOracles/amm/AmmV1Oracle.mjs +2 -2
  310. package/lib/esm/tokens/TokenTransferService.js.map +1 -1
  311. package/lib/esm/tokens/TokenTransferService.mjs +2 -2
  312. package/lib/esm/tokens/TokensService.js.map +1 -1
  313. package/lib/esm/tokens/TokensService.mjs +1 -1
  314. package/lib/esm/txs/TxNonceManager.mjs +1 -1
  315. package/lib/esm/txs/TxWriter.js.map +1 -1
  316. package/lib/esm/txs/TxWriter.mjs +9 -0
  317. package/lib/esm/txs/conditional/GasWatcherTx.js.map +1 -1
  318. package/lib/esm/txs/conditional/GasWatcherTx.mjs +1 -1
  319. package/lib/esm/txs/receipt/TxLogParser.mjs +1 -1
  320. package/lib/esm/utils/$crypto.js.map +1 -1
  321. package/lib/esm/utils/$crypto.mjs +1 -1
  322. package/lib/esm/utils/$date.js.map +1 -1
  323. package/lib/esm/utils/$date.mjs +1 -1
  324. package/lib/esm/utils/$hex.mjs +1 -1
  325. package/lib/esm/utils/$logger.js.map +1 -1
  326. package/lib/esm/utils/$logger.mjs +1 -1
  327. package/lib/esm/utils/$machine.js.map +1 -1
  328. package/lib/esm/utils/$machine.mjs +2 -2
  329. package/lib/esm/utils/$traces.js.map +1 -1
  330. package/lib/esm/utils/$traces.mjs +1 -1
  331. package/lib/types/abi/abi-coder-packed.d.ts +1 -1
  332. package/lib/types/abi/abi-coder.d.ts +13 -13
  333. package/lib/types/abi/coders/abstract-coder.d.ts +14 -14
  334. package/lib/types/abi/fragments.d.ts +95 -95
  335. package/lib/types/blocks/BlockDateResolver.d.ts +7 -7
  336. package/lib/types/class/PackedRanges.d.ts +44 -44
  337. package/lib/types/clients/ClientPool.d.ts +10 -10
  338. package/lib/types/clients/WalletClient.d.ts +2 -2
  339. package/lib/types/clients/Web3Client.d.ts +6 -6
  340. package/lib/types/clients/Web3ClientFactory.d.ts +1 -1
  341. package/lib/types/clients/handlers/RateLimitGuard.d.ts +5 -5
  342. package/lib/types/clients/model/PromiEventWrap.d.ts +1 -1
  343. package/lib/types/clients/utils/$web3Abi.d.ts +1 -1
  344. package/lib/types/clients/utils/ClientErrorUtil.d.ts +1 -0
  345. package/lib/types/config/Config.d.ts +3 -2
  346. package/lib/types/contracts/ContractBase.d.ts +4 -4
  347. package/lib/types/contracts/ContractReader.d.ts +2 -2
  348. package/lib/types/contracts/ContractWriter.d.ts +3 -3
  349. package/lib/types/contracts/deploy/Deployments.d.ts +13 -14
  350. package/lib/types/contracts/deploy/storage/DeploymentsStorage.d.ts +2 -0
  351. package/lib/types/explorer/BlockchainExplorerFactory.d.ts +1 -1
  352. package/lib/types/explorer/Evmscan.d.ts +1 -1
  353. package/lib/types/indexer/BlocksTxIndexer.d.ts +4 -4
  354. package/lib/types/indexer/EventsIndexer.d.ts +4 -4
  355. package/lib/types/indexer/PendingTxIndexer.d.ts +1 -1
  356. package/lib/types/indexer/handlers/BlocksWalker.d.ts +2 -2
  357. package/lib/types/indexer/storage/FsEventsIndexerStore.d.ts +4 -4
  358. package/lib/types/ns/providers/INsProvider.d.ts +1 -1
  359. package/lib/types/rpc/Rpc.d.ts +2 -2
  360. package/lib/types/services/TimelockService/ITimelockService.d.ts +2 -2
  361. package/lib/types/services/TimelockService/TimelockService.d.ts +2 -2
  362. package/lib/types/services/TimelockService/TimelockServiceFallbackSafe.d.ts +2 -2
  363. package/lib/types/solidity/SlotsParser/SourceFile.d.ts +1 -1
  364. package/lib/types/solidity/storage/SlotFixedArray.d.ts +1 -1
  365. package/lib/types/tokens/TokenDataProvider.d.ts +2 -2
  366. package/lib/types/tokens/TokensService.d.ts +1 -1
  367. package/lib/types/txs/ITxBuilderOptions.d.ts +1 -1
  368. package/lib/types/txs/TxNonceManager.d.ts +1 -1
  369. package/lib/types/txs/TxWriter.d.ts +4 -4
  370. package/lib/types/txs/receipt/TxLogParser.d.ts +1 -1
  371. package/lib/types/utils/$date.d.ts +1 -1
  372. package/lib/types/utils/$hex.d.ts +1 -1
  373. package/package.json +1 -1
  374. package/readme.md +105 -83
  375. package/src/abi/$abiCoder.ts +1 -1
  376. package/src/abi/Logger.ts +1 -1
  377. package/src/abi/abi-coder-packed.ts +3 -3
  378. package/src/abi/abi-coder.ts +16 -16
  379. package/src/abi/coders/abstract-coder.ts +36 -36
  380. package/src/abi/fragments.ts +137 -137
  381. package/src/blocks/BlockDateResolver.ts +9 -9
  382. package/src/bridges/hop/HopBridge.ts +1 -1
  383. package/src/class/PackedRanges.ts +46 -46
  384. package/src/clients/ClientEventsStream.ts +1 -1
  385. package/src/clients/ClientPool.ts +38 -38
  386. package/src/clients/WalletClient.ts +3 -3
  387. package/src/clients/Web3BatchRequests.ts +3 -3
  388. package/src/clients/Web3Client.ts +21 -21
  389. package/src/clients/Web3ClientFactory.ts +1 -1
  390. package/src/clients/compatibility/Web3.ts +2 -2
  391. package/src/clients/handlers/RateLimitGuard.ts +16 -16
  392. package/src/clients/interfaces/IWeb3Client.ts +2 -2
  393. package/src/clients/model/PromiEventWrap.ts +1 -1
  394. package/src/clients/utils/$web3Abi.ts +2 -2
  395. package/src/clients/utils/ClientErrorUtil.ts +4 -0
  396. package/src/config/Config.ts +4 -3
  397. package/src/contracts/Contract.ts +1 -1
  398. package/src/contracts/ContractAbiProvider.ts +6 -6
  399. package/src/contracts/ContractBase.ts +14 -14
  400. package/src/contracts/ContractProvider.ts +1 -1
  401. package/src/contracts/ContractReader.ts +7 -7
  402. package/src/contracts/ContractWriter.ts +4 -4
  403. package/src/contracts/deploy/ContractDeployer.ts +4 -4
  404. package/src/contracts/deploy/ContractDeployment.ts +1 -1
  405. package/src/contracts/deploy/Deployments.ts +69 -56
  406. package/src/contracts/deploy/proxy/$proxyDeploy.ts +14 -14
  407. package/src/contracts/deploy/proxy/ProxyDeployment.ts +22 -22
  408. package/src/contracts/deploy/storage/DeploymentsStorage.ts +21 -18
  409. package/src/contracts/utils/AbiDeserializer.ts +4 -4
  410. package/src/contracts/utils/ContractBaseUtils.ts +3 -3
  411. package/src/erc4337/models/UserOperation.ts +2 -2
  412. package/src/evm/OpcodesWalker.ts +1 -1
  413. package/src/explorer/BlockchainExplorer.ts +1 -1
  414. package/src/explorer/BlockchainExplorerFactory.ts +1 -1
  415. package/src/explorer/BlockchainExplorerStorage.ts +12 -12
  416. package/src/explorer/Evmscan.ts +1 -1
  417. package/src/explorer/verifiers/FsHtmlVerifier.ts +7 -7
  418. package/src/flashbots/FlashbotWeb3Client.ts +1 -1
  419. package/src/hardhat/HardhatProvider.ts +7 -7
  420. package/src/indexer/BlocksTxIndexer.ts +6 -6
  421. package/src/indexer/EventsIndexer.ts +20 -20
  422. package/src/indexer/PendingTxIndexer.ts +3 -3
  423. package/src/indexer/handlers/BlocksWalker.ts +9 -9
  424. package/src/indexer/handlers/TxQueueLoader.ts +1 -1
  425. package/src/indexer/storage/FsEventsIndexerStore.ts +9 -9
  426. package/src/indexer/storage/FsEventsMetaStore.ts +1 -1
  427. package/src/indexer/storage/FsEventsStoreUtils.ts +1 -1
  428. package/src/json/JsonArrayMultiStore.ts +1 -1
  429. package/src/json/JsonStoreFs.ts +1 -1
  430. package/src/ns/providers/INsProvider.ts +1 -1
  431. package/src/rpc/$rpc.ts +2 -2
  432. package/src/rpc/Rpc.ts +2 -2
  433. package/src/rpc/RpcBase.ts +2 -2
  434. package/src/rpc/RpcContract.ts +6 -6
  435. package/src/rpc/RpcSubscription.ts +1 -1
  436. package/src/rpc/transports/compatibility/EIP1193Transport.ts +4 -4
  437. package/src/rpc/transports/compatibility/Web3Transport.ts +1 -1
  438. package/src/services/TimelockService/ITimelockService.ts +2 -2
  439. package/src/services/TimelockService/TimelockService.ts +2 -2
  440. package/src/services/TimelockService/TimelockServiceFallbackSafe.ts +2 -2
  441. package/src/solidity/SlotsDump.ts +1 -1
  442. package/src/solidity/SlotsParser/MappingSettersResolver.ts +3 -3
  443. package/src/solidity/SlotsParser/SourceFile.ts +3 -3
  444. package/src/solidity/SolidityParser.ts +1 -1
  445. package/src/solidity/SourceCodeProvider.ts +1 -1
  446. package/src/solidity/storage/Accessor.spec.ts +1 -1
  447. package/src/solidity/storage/Accessor.ts +1 -1
  448. package/src/solidity/storage/SlotDynamicArray.ts +1 -1
  449. package/src/solidity/storage/SlotFixedArray.ts +1 -1
  450. package/src/solidity/storage/SlotsStorageTransport.ts +3 -3
  451. package/src/solidity/storage/handlers/SlotBytesHandler.ts +1 -1
  452. package/src/solidity/storage/handlers/SlotDynamicArrayHandler.ts +1 -1
  453. package/src/solidity/storage/handlers/SlotFixedArrayHandler.ts +1 -1
  454. package/src/solidity/storage/handlers/SlotValueConstantHandler.ts +1 -1
  455. package/src/solidity/storage/handlers/SlotValueHandler.ts +1 -1
  456. package/src/solidity/storage/handlers/SlotValueImmutableHandler.ts +4 -4
  457. package/src/tokens/TokenDataProvider.ts +2 -2
  458. package/src/tokens/TokenExchangeService.ts +1 -1
  459. package/src/tokens/TokenExchanges/AmmBase/V2/AmmPairV2Service.ts +2 -2
  460. package/src/tokens/TokenExchanges/AmmV2PriceQuote.ts +2 -2
  461. package/src/tokens/TokenOracles/amm/AmmV1Oracle.ts +2 -2
  462. package/src/tokens/TokenTransferService.ts +2 -2
  463. package/src/tokens/TokensService.ts +1 -1
  464. package/src/txs/ITxBuilderOptions.ts +1 -1
  465. package/src/txs/TxNonceManager.ts +1 -1
  466. package/src/txs/TxWriter.ts +15 -4
  467. package/src/txs/agents/BatchAgent.ts +1 -1
  468. package/src/txs/conditional/GasWatcherTx.ts +1 -1
  469. package/src/txs/receipt/TxLogParser.ts +1 -1
  470. package/src/utils/$crypto.ts +1 -1
  471. package/src/utils/$date.ts +1 -1
  472. package/src/utils/$hex.ts +1 -1
  473. package/src/utils/$logger.ts +1 -1
  474. package/src/utils/$machine.ts +2 -2
  475. package/src/utils/$traces.ts +1 -1
  476. package/src/wallets/EIP6963ProviderFactory.ts +4 -4
@@ -102,7 +102,7 @@ export class BlockDateResolver {
102
102
  }
103
103
 
104
104
  /**
105
- * Returns index of the first known block, which is most near to specified block (it can be before or after the specified date).
105
+ * Returns the index of the known block nearest to the specified date. It can be before or after the specified date
106
106
  */
107
107
  private getClosest (date: Date) {
108
108
  let entry = alot(this._known).map(x => [
@@ -120,7 +120,7 @@ export class BlockDateResolver {
120
120
  }
121
121
  let blockNumber = anchor.blockNumber + diffCount;
122
122
  if (blockNumber < 0) {
123
- throw new Error(`Date Out of range: ${ this._requestedDate.toISOString() }. Based on the AVG block time, the blockchain was not active on that date`);
123
+ throw new Error(`Date out of range: ${ this._requestedDate.toISOString() }. Based on the average block time, the blockchain was not active on that date`);
124
124
  }
125
125
  let date = await this.getBlockDate(blockNumber);
126
126
  let info = {
@@ -132,7 +132,7 @@ export class BlockDateResolver {
132
132
  return info;
133
133
  }
134
134
 
135
- /** Add a know block to set */
135
+ /** Adds a known block to the set */
136
136
  private push(info: IKnownBlock) {
137
137
  for (let i = 0; i < this._known.length; i++) {
138
138
  let x = this._known[i];
@@ -143,29 +143,29 @@ export class BlockDateResolver {
143
143
  }
144
144
  this._known.push(info);
145
145
  }
146
- /** Loads the block and gets the Date of the block */
146
+ /** Loads the block and returns its date */
147
147
  private async getBlockDate (blockNumber: number) {
148
148
  let block = await this.getBlock(blockNumber);
149
149
  if (block == null) {
150
- throw new Error(`Block not loaded: ${blockNumber}`);
150
+ throw new Error(`Block was not loaded: ${blockNumber}`);
151
151
  }
152
152
  let date = $block.getDate(block);
153
153
  return date;
154
154
  }
155
- /** Returns SIGNED time in milliseconds between two dates. Negative values when t2 < t1 */
155
+ /** Returns the signed time in milliseconds between two dates. Values are negative when t2 < t1 */
156
156
  private diffTime (t1: Date, t2: Date) {
157
157
  return (t2.getTime() - t1.getTime());
158
158
  }
159
- /** Returns ABSOLUTE time in milliseconds between two dates. */
159
+ /** Returns the absolute time in milliseconds between two dates */
160
160
  private diffTimeAbs (t1: Date, t2: Date) {
161
161
  return Math.abs(this.diffTime(t1, t2));
162
162
  }
163
- /** Returns AVG block count between two dates */
163
+ /** Returns the average block count between two dates */
164
164
  private getAvgBlockCountBetween (b1: IKnownBlock, b2: IKnownBlock) {
165
165
  let diff = this.diffTimeAbs(b1.date, b2.date);
166
166
  return Math.round(diff / Math.abs(b2.blockNumber - b1.blockNumber));
167
167
  }
168
- /** With N>1 blocks we can better find out the AVG block time */
168
+ /** With N > 1 blocks, we can better estimate the average block time */
169
169
  private refineAvg () {
170
170
  for (let i = 1; i < this._known.length; i++) {
171
171
  let info = this._known[i];
@@ -140,7 +140,7 @@ export class HopBridge implements IBridge {
140
140
  const url = await chainFrom.client.getNodeURL({ ws: false });
141
141
  const provider = new providers.JsonRpcProvider(url, Utils.getChainId(fromPlatform));
142
142
 
143
- // WORKAROUND: make hop sdk to use our RPC.
143
+ // WORKAROUND: make the Hop SDK use our RPC
144
144
  networks[fromPlatform].publicRpcUrl = url;
145
145
 
146
146
  const signer = new Wallet(account.key, provider);
@@ -3,7 +3,7 @@ import alot from 'alot';
3
3
  /**
4
4
  * Defines a RANGE: [FROM_NUMBER, TO_NUMBER | Infinity)
5
5
  *
6
- * - Walking/Iterating/Visiting through the range marks the visited number as ADD.
6
+ * - Walking/Iterating/Visiting through the range marks the visited number as ADD
7
7
  *
8
8
  * - Possible to ADD the number manually, for example for persistence/restore properties
9
9
  *
@@ -49,8 +49,8 @@ export class PackedRanges {
49
49
  }
50
50
 
51
51
  /**
52
- * Calculates the number of elements remaining to be visited/added in the range.
53
- * This is the difference between the total capacity and the number of elements already tracked.
52
+ * Calculates the number of elements remaining to be visited/added in the range
53
+ * This is the difference between the total capacity and the number of elements already tracked
54
54
  */
55
55
  totalLeft() {
56
56
  return this.total() - this.totalAdded();
@@ -58,11 +58,11 @@ export class PackedRanges {
58
58
 
59
59
 
60
60
  /**
61
- * Gets the next unvisited number in the range and marks it as visited.
61
+ * Gets the next unvisited number in the range and marks it as visited
62
62
  *
63
63
  * This method finds the next number that hasn't been added to the tracked ranges yet,
64
64
  * automatically adds it to the ranges, and returns it. It respects the boundaries
65
- * defined by `from` and `to` properties.
65
+ * defined by `from` and `to` properties
66
66
  *
67
67
  * The method works by:
68
68
  * - Starting from `this.from` if no ranges exist
@@ -112,10 +112,10 @@ export class PackedRanges {
112
112
  }
113
113
 
114
114
  /**
115
- * Gets the maximum (upper bound) value from all tracked ranges.
115
+ * Gets the maximum (upper bound) value from all tracked ranges
116
116
  *
117
- * This method returns the highest number that has been visited/added to the ranges.
118
- * It retrieves the upper bound of the last range in the sorted ranges array.
117
+ * This method returns the highest number that has been visited/added to the ranges
118
+ * It retrieves the upper bound of the last range in the sorted ranges array
119
119
  *
120
120
  * @returns The maximum value in the tracked ranges, or `null` if no ranges have been added yet
121
121
  */
@@ -128,11 +128,11 @@ export class PackedRanges {
128
128
  }
129
129
 
130
130
  /**
131
- * Checks if a specific number has been visited/added to the tracked ranges.
131
+ * Checks if a specific number has been visited/added to the tracked ranges
132
132
  *
133
133
  * This method searches through all tracked ranges to determine if the given number
134
134
  * falls within any of them. It performs a linear search through the ranges array,
135
- * checking if the number is within the bounds (inclusive) of any range.
135
+ * checking if the number is within the bounds (inclusive) of any range
136
136
  *
137
137
  * @param nr - The number to check for inclusion in the tracked ranges
138
138
  * @returns `true` if the number exists within any of the tracked ranges, `false` otherwise
@@ -148,7 +148,7 @@ export class PackedRanges {
148
148
  }
149
149
 
150
150
  /**
151
- * Adds a number to the tracked ranges, marking it as visited.
151
+ * Adds a number to the tracked ranges, marking it as visited
152
152
  *
153
153
  * This method intelligently adds a number to the ranges by either:
154
154
  * - Extending an existing range if the number is adjacent to it
@@ -156,7 +156,7 @@ export class PackedRanges {
156
156
  * - Doing nothing if the number is already included in an existing range
157
157
  *
158
158
  * The method maintains the sorted order of ranges and automatically merges
159
- * adjacent numbers into contiguous ranges for efficient storage.
159
+ * adjacent numbers into contiguous ranges for efficient storage
160
160
  *
161
161
  * @param nr - The number to add to the tracked ranges
162
162
  * @returns `true` if the number was successfully added (new or extended a range),
@@ -200,16 +200,16 @@ export class PackedRanges {
200
200
  }
201
201
 
202
202
  /**
203
- * Adds a complete range to the tracked ranges and compacts the result.
203
+ * Adds a complete range to the tracked ranges and compacts the result
204
204
  *
205
205
  * This method adds an entire range [min, max] to the tracked ranges array,
206
206
  * then automatically compacts the ranges to merge any overlapping or adjacent
207
207
  * ranges. This is useful for bulk operations where you want to mark multiple
208
- * consecutive numbers as visited at once.
208
+ * consecutive numbers as visited at once
209
209
  *
210
210
  * Unlike the `add()` method which adds individual numbers, this method adds
211
211
  * a complete range tuple and ensures the internal ranges array remains optimized
212
- * by calling `compact()` after insertion.
212
+ * by calling `compact()` after insertion
213
213
  *
214
214
  * @param range - A tuple [min, max] representing the range to add, where both bounds are inclusive
215
215
  */
@@ -219,7 +219,7 @@ export class PackedRanges {
219
219
  }
220
220
 
221
221
  /**
222
- * Removes a specific number from the tracked ranges, marking it as unvisited.
222
+ * Removes a specific number from the tracked ranges, marking it as unvisited
223
223
  *
224
224
  * This method searches for the number within the tracked ranges and removes it by either:
225
225
  * - Removing the entire range if it contains only the target number
@@ -228,7 +228,7 @@ export class PackedRanges {
228
228
  * - Splitting the range into two separate ranges if the number is in the middle
229
229
  *
230
230
  * The method maintains the sorted order of ranges and ensures efficient storage
231
- * by handling all edge cases appropriately.
231
+ * by handling all edge cases appropriately
232
232
  *
233
233
  * @param nr - The number to remove from the tracked ranges
234
234
  * @returns `true` if the number was found and successfully removed from the ranges,
@@ -262,14 +262,14 @@ export class PackedRanges {
262
262
  }
263
263
 
264
264
  /**
265
- * Removes a range of numbers from the tracked ranges, marking them as unvisited.
265
+ * Removes a range of numbers from the tracked ranges, marking them as unvisited
266
266
  *
267
267
  * This method subtracts the specified range from all tracked ranges, effectively
268
268
  * removing all numbers within the given range from the visited/added set. It handles
269
- * overlapping ranges by splitting or trimming existing ranges as needed.
269
+ * overlapping ranges by splitting or trimming existing ranges as needed
270
270
  *
271
271
  * The method maintains the sorted order of ranges and ensures efficient storage
272
- * by delegating to the `Ranges.subtract()` utility function.
272
+ * by delegating to the `Ranges.subtract()` utility function
273
273
  *
274
274
  * @param range - A tuple [min, max] representing the range to remove, where both bounds are inclusive
275
275
  * @returns The current `PackedRanges` instance for method chaining
@@ -280,15 +280,15 @@ export class PackedRanges {
280
280
  }
281
281
 
282
282
  /**
283
- * Removes multiple ranges of numbers from the tracked ranges, marking them as unvisited.
283
+ * Removes multiple ranges of numbers from the tracked ranges, marking them as unvisited
284
284
  *
285
285
  * This method subtracts all specified ranges from the tracked ranges, effectively
286
286
  * removing all numbers within the given ranges from the visited/added set. It handles
287
287
  * overlapping ranges by splitting or trimming existing ranges as needed for each
288
- * range in the input array.
288
+ * range in the input array
289
289
  *
290
290
  * The method maintains the sorted order of ranges and ensures efficient storage
291
- * by delegating to the `Ranges.subtractMany()` utility function.
291
+ * by delegating to the `Ranges.subtractMany()` utility function
292
292
  *
293
293
  * @param ranges - An array of tuples [min, max] representing the ranges to remove, where both bounds are inclusive
294
294
  * @returns The current `PackedRanges` instance for method chaining
@@ -299,7 +299,7 @@ export class PackedRanges {
299
299
  }
300
300
 
301
301
  /**
302
- * Compacts the tracked ranges by merging overlapping and adjacent ranges.
302
+ * Compacts the tracked ranges by merging overlapping and adjacent ranges
303
303
  *
304
304
  * This method optimizes the internal ranges array by:
305
305
  * - Merging overlapping ranges into single contiguous ranges
@@ -308,21 +308,21 @@ export class PackedRanges {
308
308
  * - Removing redundant range entries
309
309
  *
310
310
  * This operation is useful after bulk modifications to ensure the ranges
311
- * array remains in its most efficient form for storage and querying.
311
+ * array remains in its most efficient form for storage and querying
312
312
  */
313
313
  compact() {
314
314
  this.ranges = Ranges.compact(this.ranges);
315
315
  }
316
316
 
317
317
  /**
318
- * Sets the tracked ranges to a new array of ranges and compacts them.
318
+ * Sets the tracked ranges to a new array of ranges and compacts them
319
319
  *
320
320
  * This method replaces the entire internal ranges array with the provided ranges,
321
- * then automatically compacts them to merge any overlapping or adjacent ranges.
322
- * This is useful for bulk initialization or restoration of ranges from a saved state.
321
+ * then automatically compacts them to merge any overlapping or adjacent ranges
322
+ * This is useful for bulk initialization or restoration of ranges from a saved state
323
323
  *
324
324
  * After setting the ranges, the method ensures the internal ranges array is optimized
325
- * by calling `compact()`, which merges overlapping ranges and joins adjacent ones.
325
+ * by calling `compact()`, which merges overlapping ranges and joins adjacent ones
326
326
  *
327
327
  * @param ranges - An array of tuples [min, max] representing the ranges to set, where both bounds are inclusive
328
328
  */
@@ -332,12 +332,12 @@ export class PackedRanges {
332
332
  }
333
333
 
334
334
  /**
335
- * Serializes the tracked ranges to a JSON string representation.
335
+ * Serializes the tracked ranges to a JSON string representation
336
336
  *
337
337
  * This method converts the internal ranges array into a JSON string format,
338
- * which can be used for persistence, transmission, or storage purposes.
338
+ * which can be used for persistence, transmission, or storage purposes
339
339
  * The serialized string can later be parsed and used to restore the ranges
340
- * via the constructor's `ranges` option.
340
+ * via the constructor's `ranges` option
341
341
  *
342
342
  * @returns A JSON string representation of the tracked ranges array
343
343
  */
@@ -346,14 +346,14 @@ export class PackedRanges {
346
346
  }
347
347
 
348
348
  /**
349
- * Creates a new PackedRanges instance containing only the ranges starting from a specified number.
349
+ * Creates a new PackedRanges instance containing only the ranges starting from a specified number
350
350
  *
351
351
  * This method filters the tracked ranges to include only those that contain or come after
352
352
  * the specified `from` value. If a range overlaps with the `from` value, it is trimmed
353
- * to start at `from`. All ranges before `from` are excluded from the result.
353
+ * to start at `from`. All ranges before `from` are excluded from the result
354
354
  *
355
355
  * The original PackedRanges instance remains unchanged; a new instance is returned with
356
- * the filtered ranges.
356
+ * the filtered ranges
357
357
  *
358
358
  * @param from - The starting number from which to pick ranges (inclusive)
359
359
  * @returns A new PackedRanges instance containing only the ranges from the specified number onwards
@@ -364,14 +364,14 @@ export class PackedRanges {
364
364
  }
365
365
 
366
366
  /**
367
- * Creates a new PackedRanges instance containing only the ranges up to a specified number.
367
+ * Creates a new PackedRanges instance containing only the ranges up to a specified number
368
368
  *
369
369
  * This method filters the tracked ranges to include only those that contain or come before
370
370
  * the specified `to` value. If a range overlaps with the `to` value, it is trimmed
371
- * to end at `to`. All ranges after `to` are excluded from the result.
371
+ * to end at `to`. All ranges after `to` are excluded from the result
372
372
  *
373
373
  * The original PackedRanges instance remains unchanged; a new instance is returned with
374
- * the filtered ranges.
374
+ * the filtered ranges
375
375
  *
376
376
  * @param to - The ending number up to which to pick ranges (inclusive)
377
377
  * @returns A new PackedRanges instance containing only the ranges up to the specified number
@@ -383,11 +383,11 @@ export class PackedRanges {
383
383
 
384
384
 
385
385
  /**
386
- * Computes the intersection of multiple range arrays, returning only the ranges that are common to all inputs.
386
+ * Computes the intersection of multiple range arrays, returning only the ranges that are common to all inputs
387
387
  *
388
388
  * This method performs a set intersection operation across multiple arrays of ranges,
389
389
  * finding only those number ranges that appear in every input array. The result is
390
- * compacted to merge any overlapping or adjacent ranges for efficient storage.
390
+ * compacted to merge any overlapping or adjacent ranges for efficient storage
391
391
  *
392
392
  * For example:
393
393
  * - Input: [[[1,5], [10,15]], [[3,7], [12,20]]]
@@ -408,11 +408,11 @@ export class PackedRanges {
408
408
  }
409
409
 
410
410
  /**
411
- * Computes the union of multiple range arrays, returning all ranges that appear in any of the inputs.
411
+ * Computes the union of multiple range arrays, returning all ranges that appear in any of the inputs
412
412
  *
413
413
  * This method performs a set union operation across multiple arrays of ranges,
414
414
  * combining all number ranges from every input array. The result is compacted to
415
- * merge any overlapping or adjacent ranges for efficient storage.
415
+ * merge any overlapping or adjacent ranges for efficient storage
416
416
  *
417
417
  * For example:
418
418
  * - Input: [[[1,5], [10,15]], [[3,7], [12,20]]]
@@ -429,12 +429,12 @@ export class PackedRanges {
429
429
  }
430
430
 
431
431
  /**
432
- * Computes the difference between two range arrays, removing all ranges in B from ranges in A.
432
+ * Computes the difference between two range arrays, removing all ranges in B from ranges in A
433
433
  *
434
434
  * This method performs a set difference operation (A − B), subtracting all number ranges
435
435
  * in `rangesB` from `rangesA`. The result contains only those portions of `rangesA` that
436
436
  * do not overlap with any range in `rangesB`. The result is compacted to merge any
437
- * overlapping or adjacent ranges for efficient storage.
437
+ * overlapping or adjacent ranges for efficient storage
438
438
  *
439
439
  * For example:
440
440
  * - Input: rangesA = [[1,10], [20,30]], rangesB = [[5,15], [25,35]]
@@ -533,7 +533,7 @@ namespace Ranges {
533
533
  .sortBy(([x]) => x)
534
534
  .toArray();
535
535
 
536
- // Join non overlapping ranges: [1,4],[5, 6] -> [1,6]
536
+ // Join non-overlapping ranges: [1,4],[5, 6] -> [1,6]
537
537
  for (let i = 0; i < ranges.length - 1; i++) {
538
538
  let A = ranges[i];
539
539
  let B = ranges[i + 1];
@@ -624,7 +624,7 @@ namespace Ranges {
624
624
  // No overlapping, pick full range
625
625
  arr.push([aFirst, aLast]);
626
626
  } else {
627
- // Overlapps
627
+ // Overlaps
628
628
  arr.push([aFirst, to]);
629
629
  }
630
630
  }
@@ -75,7 +75,7 @@ export class ClientEventsStream<T extends TClientEventsStreamData<unknown[]> = a
75
75
  let eventTopic = event.topics[0];
76
76
  let abi = eventsAbi.find(x => $abiUtils.getMethodHash(x) === eventTopic);
77
77
  if (abi == null) {
78
- stream.error(new Error(`ABI for the topic ${eventTopic} not found. Supports: ${ eventsAbi.map(x => x.name).join(', ') }`));
78
+ stream.error(new Error(`ABI for topic ${eventTopic} was not found. Supported events: ${ eventsAbi.map(x => x.name).join(', ') }`));
79
79
  return;
80
80
  }
81
81
 
@@ -32,7 +32,7 @@ export interface IRpcConfig {
32
32
  url?: string
33
33
  options?: TTransport.Options.Http | TTransport.Options.Ws
34
34
 
35
- /** Will be a preferred node for submitting transactions */
35
+ /** Preferred node for submitting transactions */
36
36
  safe?: boolean
37
37
  distinct?: boolean
38
38
  wallet?: boolean
@@ -40,25 +40,25 @@ export interface IRpcConfig {
40
40
  web3?: TTransport.Transport | Promise<TTransport.Transport>
41
41
 
42
42
  name?: string
43
- /** Will be used only if manually requested with .getWeb3, or .getNodeUrl */
43
+ /** Used only when manually requested with .getWeb3 or .getNodeUrl */
44
44
  manual?: boolean
45
45
 
46
- /** max block range per request when getting for example the past logs*/
46
+ /** Max block range per request, for example when fetching past logs */
47
47
  fetchableBlockRange?: number
48
48
 
49
49
  /** True if the node supports traceTransaction calls */
50
50
  traceable?: boolean
51
51
 
52
- // requestCount/timeSpan: e.g. 100/1min
52
+ // requestCount/timeSpan, e.g. 100/1min
53
53
  rateLimit?: string
54
54
 
55
- // the max block range to fetch per single request when getting Logs
55
+ // Max block range to fetch per single request when getting logs
56
56
  blockRangeLimit?: string | number
57
57
 
58
- // maximum of requests to be batched, otherwise batches will be paginated
58
+ // Maximum number of requests to batch; otherwise, batches will be paginated
59
59
  batchLimit?: number
60
60
 
61
- // Will be used only for the specified methods
61
+ // Used only for the specified methods
62
62
  methods?: {
63
63
  exclude?: string[]
64
64
  only?: string[]
@@ -68,7 +68,7 @@ export interface IPoolWeb3Request {
68
68
  ws?: boolean
69
69
  preferSafe?: boolean
70
70
 
71
- /** Request wallet node to submit unsigned transactions */
71
+ /** Request a wallet node to submit unsigned transactions */
72
72
  wallet?: boolean
73
73
  distinct?: boolean
74
74
  name?: string
@@ -78,20 +78,20 @@ export interface IPoolWeb3Request {
78
78
 
79
79
  /** Supported node features */
80
80
  node?: {
81
- // For specific url
81
+ // For a specific URL
82
82
  url?: string
83
83
 
84
84
  /** Supports traceTransaction */
85
85
  traceable?: boolean
86
86
  }
87
87
 
88
- /** RPC method - will find the node that has the configuration */
88
+ /** RPC method; finds the node that has the configuration */
89
89
  method?: string
90
90
 
91
- // Amount of batch requests to be performed, sothat we can choose the appropriate wClient and handle the rate limits correctly
91
+ // Number of batch requests to perform, so we can choose the appropriate wClient and handle rate limits correctly
92
92
  batchRequestCount?: number
93
93
 
94
- // By fetching logs, specifies the desired block range to query
94
+ // When fetching logs, specifies the desired block range to query
95
95
  blockRangeCount?: number
96
96
  }
97
97
 
@@ -113,7 +113,7 @@ export class ClientPool {
113
113
  this.clients = [new WClient({ web3: config.web3 ?? config.provider })];
114
114
  } else {
115
115
  console.dir(config, { depth: null });
116
- throw new Error(`Neither Node endpoints nor Web3 instance`)
116
+ throw new Error(`Neither node endpoints nor a Web3 instance were provided`)
117
117
  }
118
118
  if (this.clients.length < 2) {
119
119
  this.discoveredPartial = true;
@@ -145,7 +145,7 @@ export class ClientPool {
145
145
  ...(opts ?? {}),
146
146
 
147
147
  /**
148
- * web3@1.6.0 has a bug with batch request via websockets, as the callback can stuck if a single response contains multiple IDs, as only the first one will be taken
148
+ * web3@1.6.0 has a bug with batch requests via WebSockets, as the callback can get stuck if a single response contains multiple IDs because only the first one is taken
149
149
  * https://github.com/web3/web3.js/blob/9238e106294784b4a6a20af020765973f0437022/packages/web3-providers-ws/src/index.js#L128
150
150
  */
151
151
  ws: false
@@ -167,7 +167,7 @@ export class ClientPool {
167
167
  .map(x => ` ${x.config.url}`)
168
168
  .join('\n');
169
169
 
170
- error = new Error(`Live clients not found in \n${urls}`);
170
+ error = new Error(`Live clients were not found in \n${urls}`);
171
171
  }
172
172
  throw ClientPoolTraceError.create(error, opts?.trace, ErrorCode.NO_LIVE_CLIENT);
173
173
  }
@@ -184,10 +184,10 @@ export class ClientPool {
184
184
 
185
185
 
186
186
  if (wClientUsage == null) {
187
- // per default NO_RETRIES
187
+ // By default, NO_RETRIES
188
188
  used.set(wClient, 0);
189
189
  } else {
190
- // decrease retry count
190
+ // Decrease the retry count
191
191
  used.set(wClient, wClientUsage - 1);
192
192
  }
193
193
 
@@ -208,7 +208,7 @@ export class ClientPool {
208
208
  return result;
209
209
  }
210
210
 
211
- // if not the CallError, process the while loop to check another NodeProvider
211
+ // If this is not a CallError, continue the loop to check another NodeProvider
212
212
  }
213
213
  }
214
214
  async getRpc(options?: IPoolWeb3Request) {
@@ -218,7 +218,7 @@ export class ClientPool {
218
218
  async getWrappedWeb3(options?: IPoolWeb3Request) {
219
219
  let wClient = await this.next(null, options, { manual: true });
220
220
  if (wClient == null) {
221
- throw new Error(`No client found in ${this.clients.length} Clients with options: ${JSON.stringify(options)}`);
221
+ throw new Error(`No client was found in ${this.clients.length} clients with options: ${JSON.stringify(options)}`);
222
222
  }
223
223
  return wClient;
224
224
  }
@@ -228,7 +228,7 @@ export class ClientPool {
228
228
  let stats = await this.getNodeStats();
229
229
  let info = stats.map(x => ` ${x.url}. ERR: ${x.fail}; OK: ${x.success}; Ping: ${x.ping}`).join('\n');
230
230
  let requirements = JSON.stringify(options);
231
- throw new Error(`No alive node for ${requirements} found. \n ${info}`);
231
+ throw new Error(`No live node was found for ${requirements}. \n ${info}`);
232
232
  }
233
233
  return wClient?.config.url;
234
234
  }
@@ -291,7 +291,7 @@ export class ClientPool {
291
291
  .map(x => ` ${x.config.url}`)
292
292
  .join('\n');
293
293
 
294
- let error = new Error(`Live clients not found in \n${urls}`);
294
+ let error = new Error(`Live clients were not found in \n${urls}`);
295
295
  root.emit('error', error);
296
296
  root.reject(error);
297
297
  });
@@ -371,7 +371,7 @@ export class ClientPool {
371
371
  }): Promise<IWeb3ClientStatus[]> {
372
372
  const Calls = {
373
373
  async net_peerCount(wClient: WClient) {
374
- /** @TODO Public nodes smt. do not allow net_peerCount methods. Allow to switch this on/off on node-url-config level */
374
+ /** @TODO Public nodes sometimes do not allow net_peerCount methods. Allow this to be switched on/off at the node URL config level */
375
375
  try {
376
376
  return await wClient.rpc.net_peerCount();
377
377
  } catch (error) {
@@ -476,7 +476,7 @@ export class ClientPool {
476
476
  return true;
477
477
  });
478
478
  if (clientsWithSupportedMethod.length > 0) {
479
- // if there are no clients with manually specified method, use all clients
479
+ // If there are no clients with the manually specified method, use all clients
480
480
  clients = clientsWithSupportedMethod;
481
481
  }
482
482
  } else {
@@ -495,7 +495,7 @@ export class ClientPool {
495
495
  }
496
496
 
497
497
  if (opts?.ws === false) {
498
- // filter out all WS providers (important for batched requests, as web3js has issues submitting multiple batch requests and handle response IDs)
498
+ // Filter out all WS providers. This is important for batched requests, as web3.js has issues submitting multiple batch requests and handling response IDs
499
499
  clients = clients.filter(x => x.config.url?.startsWith('http') || x.config.url == null);
500
500
  }
501
501
  if (opts?.node?.traceable === true) {
@@ -510,10 +510,10 @@ export class ClientPool {
510
510
  this.discoveredPartial = true;
511
511
  }
512
512
 
513
- // we check OK clients first
513
+ // Check OK clients first
514
514
  let okClients = clients.filter(x => x.status === 'ok');
515
515
  if (okClients.length === 0) {
516
- // then switch to at least not off
516
+ // Then switch to clients that are at least not off
517
517
  let notOffClients = clients.filter(x => x.status !== 'off');
518
518
  if (notOffClients) {
519
519
  clients = notOffClients;
@@ -562,14 +562,14 @@ export class ClientPool {
562
562
  arr = arr.filter(x => {
563
563
  let blocks = x.blockRangeLimits.blocks;
564
564
  if (blocks == null) {
565
- // Block limit is unknown yet
565
+ // The block limit is not known yet
566
566
  return true;
567
567
  }
568
568
  if (blocks < this.MINIMUM_BLOCK_RANGE) {
569
- // Was not possible to load a minimum amount of blocks
569
+ // Could not load the minimum number of blocks
570
570
  return false;
571
571
  }
572
- // Get if higher than 50% of max supported limit
572
+ // Use clients higher than 50% of the max supported limit
573
573
  return x.blockRangeLimits.blocks >= upperThreshold
574
574
  });
575
575
  }
@@ -600,16 +600,16 @@ export class ClientPool {
600
600
 
601
601
  const MAX_WAIT = 60_000;
602
602
  if (minWait > MAX_WAIT) {
603
- throw new Error(`rate limit overflows. Waiting ${minWait}ms`);
603
+ throw new Error(`Rate limit overflow. Waiting ${minWait}ms`);
604
604
  }
605
605
  return minClient;
606
606
  }
607
607
 
608
608
  /**
609
- * We may have tens of Nodes to communicate with. Discover LIVE and operating nodes.
610
- * Resolves when first 3 active nodes are discovered, to prevent waiting for all of them.
609
+ * We may have tens of nodes to communicate with. Discover live and operating nodes
610
+ * Resolves when the first 3 active nodes are discovered to avoid waiting for all of them
611
611
  * @returns
612
- * - Ready Promise - in case 3 clients look good
612
+ * - Ready Promise - when 3 clients look good
613
613
  * - Complete Promise - when all clients are resolved
614
614
  */
615
615
  @memd.deco.memoize({ perInstance: true })
@@ -749,13 +749,13 @@ export class WClient {
749
749
  config: IRpcConfig
750
750
  rateLimitGuard: RateLimitGuard
751
751
 
752
- /** For getLogs method, as some providers limit the range request or page result value */
752
+ /** For the getLogs method, as some providers limit the range request or paged result size */
753
753
  blockRangeLimits: {
754
754
  blocks?: number
755
755
  results?: number
756
756
  }
757
757
 
758
- // Max requests per single Web3 Batch request
758
+ // Max requests per single Web3 batch request
759
759
  batchLimit?: number
760
760
 
761
761
  healthy() {
@@ -929,7 +929,7 @@ export class WClient {
929
929
  let batch = new Web3BatchRequests.BatchRequest(client.rpc, page);
930
930
  let results = await batch.execute(options);
931
931
  return results;
932
- });
932
+ }, { batchRequestCount: total });
933
933
  if (status === ClientStatus.Ok) {
934
934
  output.push(...pageResult);
935
935
  continue;
@@ -947,7 +947,7 @@ export class WClient {
947
947
  }
948
948
 
949
949
  async call<TResult extends PromiseLike<any>>(fn: (wClient: WClient) => TResult, options?: {
950
- // For the rate limit guard, to make sure we wait enough time to proceed with batch request for example
950
+ // For the rate limit guard, to make sure we wait long enough to proceed with a batch request, for example
951
951
  batchRequestCount?: number
952
952
  }): Promise<{ status: ClientStatus, error?, result?: Awaited<TResult>, time: number }> {
953
953
  let now = Date.now();
@@ -1091,7 +1091,7 @@ export class WClient {
1091
1091
  }
1092
1092
 
1093
1093
  /**
1094
- * Checks the rate limit wait time, so that the POOL can select the wClient with shortest wait time
1094
+ * Checks the rate limit wait time so the pool can select the wClient with the shortest wait time
1095
1095
  **/
1096
1096
  getRateLimitGuardTime() {
1097
1097
  return this.rateLimitGuard?.checkWaitTime() ?? 0;