dequanto 0.2.38 → 0.2.41

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 (480) 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/$require.js.map +1 -1
  165. package/lib/cjs/utils/$traces.js +1 -1
  166. package/lib/cjs/utils/$traces.js.map +1 -1
  167. package/lib/esm/abi/$abiCoder.js.map +1 -1
  168. package/lib/esm/abi/$abiCoder.mjs +1 -1
  169. package/lib/esm/abi/Logger.mjs +1 -1
  170. package/lib/esm/abi/abi-coder-packed.mjs +3 -3
  171. package/lib/esm/abi/abi-coder.mjs +16 -16
  172. package/lib/esm/abi/coders/abstract-coder.js.map +1 -1
  173. package/lib/esm/abi/coders/abstract-coder.mjs +31 -31
  174. package/lib/esm/abi/fragments.js.map +1 -1
  175. package/lib/esm/abi/fragments.mjs +90 -90
  176. package/lib/esm/blocks/BlockDateResolver.js.map +1 -1
  177. package/lib/esm/blocks/BlockDateResolver.mjs +9 -9
  178. package/lib/esm/class/PackedRanges.js.map +1 -1
  179. package/lib/esm/class/PackedRanges.mjs +46 -46
  180. package/lib/esm/clients/ClientEventsStream.js.map +1 -1
  181. package/lib/esm/clients/ClientEventsStream.mjs +1 -1
  182. package/lib/esm/clients/ClientPool.js.map +1 -1
  183. package/lib/esm/clients/ClientPool.mjs +23 -23
  184. package/lib/esm/clients/WalletClient.js.map +1 -1
  185. package/lib/esm/clients/WalletClient.mjs +3 -3
  186. package/lib/esm/clients/Web3Client.js.map +1 -1
  187. package/lib/esm/clients/Web3Client.mjs +14 -14
  188. package/lib/esm/clients/Web3ClientFactory.js.map +1 -1
  189. package/lib/esm/clients/Web3ClientFactory.mjs +1 -1
  190. package/lib/esm/clients/compatibility/Web3.js.map +1 -1
  191. package/lib/esm/clients/compatibility/Web3.mjs +2 -2
  192. package/lib/esm/clients/handlers/RateLimitGuard.js.map +1 -1
  193. package/lib/esm/clients/handlers/RateLimitGuard.mjs +16 -16
  194. package/lib/esm/clients/model/PromiEventWrap.js.map +1 -1
  195. package/lib/esm/clients/model/PromiEventWrap.mjs +1 -1
  196. package/lib/esm/clients/utils/$web3Abi.js.map +1 -1
  197. package/lib/esm/clients/utils/$web3Abi.mjs +2 -2
  198. package/lib/esm/clients/utils/ClientErrorUtil.js.map +1 -1
  199. package/lib/esm/clients/utils/ClientErrorUtil.mjs +4 -0
  200. package/lib/esm/config/Config.js.map +1 -1
  201. package/lib/esm/contracts/Contract.js.map +1 -1
  202. package/lib/esm/contracts/Contract.mjs +1 -1
  203. package/lib/esm/contracts/ContractAbiProvider.js.map +1 -1
  204. package/lib/esm/contracts/ContractAbiProvider.mjs +6 -6
  205. package/lib/esm/contracts/ContractBase.js.map +1 -1
  206. package/lib/esm/contracts/ContractBase.mjs +10 -10
  207. package/lib/esm/contracts/ContractProvider.js.map +1 -1
  208. package/lib/esm/contracts/ContractProvider.mjs +1 -1
  209. package/lib/esm/contracts/ContractReader.js.map +1 -1
  210. package/lib/esm/contracts/ContractReader.mjs +5 -5
  211. package/lib/esm/contracts/ContractWriter.js.map +1 -1
  212. package/lib/esm/contracts/ContractWriter.mjs +4 -4
  213. package/lib/esm/contracts/deploy/ContractDeployer.js.map +1 -1
  214. package/lib/esm/contracts/deploy/ContractDeployer.mjs +4 -4
  215. package/lib/esm/contracts/deploy/Deployments.js.map +1 -1
  216. package/lib/esm/contracts/deploy/Deployments.mjs +36 -21
  217. package/lib/esm/contracts/deploy/proxy/$proxyDeploy.js.map +1 -1
  218. package/lib/esm/contracts/deploy/proxy/$proxyDeploy.mjs +13 -13
  219. package/lib/esm/contracts/deploy/proxy/ProxyDeployment.js.map +1 -1
  220. package/lib/esm/contracts/deploy/proxy/ProxyDeployment.mjs +22 -22
  221. package/lib/esm/contracts/deploy/storage/DeploymentsStorage.js.map +1 -1
  222. package/lib/esm/contracts/deploy/storage/DeploymentsStorage.mjs +15 -14
  223. package/lib/esm/contracts/utils/AbiDeserializer.js.map +1 -1
  224. package/lib/esm/contracts/utils/AbiDeserializer.mjs +4 -4
  225. package/lib/esm/contracts/utils/ContractBaseUtils.js.map +1 -1
  226. package/lib/esm/contracts/utils/ContractBaseUtils.mjs +3 -3
  227. package/lib/esm/evm/OpcodesWalker.js.map +1 -1
  228. package/lib/esm/evm/OpcodesWalker.mjs +1 -1
  229. package/lib/esm/explorer/BlockchainExplorer.js.map +1 -1
  230. package/lib/esm/explorer/BlockchainExplorer.mjs +1 -1
  231. package/lib/esm/explorer/BlockchainExplorerFactory.mjs +1 -1
  232. package/lib/esm/explorer/BlockchainExplorerStorage.js.map +1 -1
  233. package/lib/esm/explorer/BlockchainExplorerStorage.mjs +12 -12
  234. package/lib/esm/explorer/Evmscan.mjs +1 -1
  235. package/lib/esm/explorer/verifiers/FsHtmlVerifier.js.map +1 -1
  236. package/lib/esm/explorer/verifiers/FsHtmlVerifier.mjs +7 -7
  237. package/lib/esm/flashbots/FlashbotWeb3Client.js.map +1 -1
  238. package/lib/esm/flashbots/FlashbotWeb3Client.mjs +1 -1
  239. package/lib/esm/hardhat/HardhatProvider.js.map +1 -1
  240. package/lib/esm/hardhat/HardhatProvider.mjs +7 -7
  241. package/lib/esm/indexer/BlocksTxIndexer.js.map +1 -1
  242. package/lib/esm/indexer/BlocksTxIndexer.mjs +2 -2
  243. package/lib/esm/indexer/EventsIndexer.js.map +1 -1
  244. package/lib/esm/indexer/EventsIndexer.mjs +11 -11
  245. package/lib/esm/indexer/PendingTxIndexer.js.map +1 -1
  246. package/lib/esm/indexer/PendingTxIndexer.mjs +2 -2
  247. package/lib/esm/indexer/handlers/BlocksWalker.js.map +1 -1
  248. package/lib/esm/indexer/handlers/BlocksWalker.mjs +9 -9
  249. package/lib/esm/indexer/handlers/TxQueueLoader.mjs +1 -1
  250. package/lib/esm/indexer/storage/FsEventsIndexerStore.js.map +1 -1
  251. package/lib/esm/indexer/storage/FsEventsIndexerStore.mjs +3 -3
  252. package/lib/esm/indexer/storage/FsEventsStoreUtils.js.map +1 -1
  253. package/lib/esm/indexer/storage/FsEventsStoreUtils.mjs +1 -1
  254. package/lib/esm/json/JsonArrayMultiStore.js.map +1 -1
  255. package/lib/esm/json/JsonArrayMultiStore.mjs +1 -1
  256. package/lib/esm/json/JsonStoreFs.js.map +1 -1
  257. package/lib/esm/json/JsonStoreFs.mjs +1 -1
  258. package/lib/esm/rpc/$rpc.js.map +1 -1
  259. package/lib/esm/rpc/$rpc.mjs +2 -2
  260. package/lib/esm/rpc/Rpc.mjs +2 -2
  261. package/lib/esm/rpc/RpcBase.js.map +1 -1
  262. package/lib/esm/rpc/RpcBase.mjs +2 -2
  263. package/lib/esm/rpc/RpcContract.js.map +1 -1
  264. package/lib/esm/rpc/RpcContract.mjs +4 -3
  265. package/lib/esm/rpc/RpcSubscription.js.map +1 -1
  266. package/lib/esm/rpc/RpcSubscription.mjs +1 -1
  267. package/lib/esm/rpc/transports/compatibility/EIP1193Transport.js.map +1 -1
  268. package/lib/esm/rpc/transports/compatibility/EIP1193Transport.mjs +4 -4
  269. package/lib/esm/rpc/transports/compatibility/Web3Transport.js.map +1 -1
  270. package/lib/esm/rpc/transports/compatibility/Web3Transport.mjs +1 -1
  271. package/lib/esm/services/TimelockService/TimelockService.mjs +2 -2
  272. package/lib/esm/services/TimelockService/TimelockServiceFallbackSafe.mjs +2 -2
  273. package/lib/esm/solidity/SlotsDump.js.map +1 -1
  274. package/lib/esm/solidity/SlotsDump.mjs +1 -1
  275. package/lib/esm/solidity/SlotsParser/MappingSettersResolver.js.map +1 -1
  276. package/lib/esm/solidity/SlotsParser/MappingSettersResolver.mjs +3 -3
  277. package/lib/esm/solidity/SlotsParser/SourceFile.js.map +1 -1
  278. package/lib/esm/solidity/SlotsParser/SourceFile.mjs +3 -3
  279. package/lib/esm/solidity/SolidityParser.js.map +1 -1
  280. package/lib/esm/solidity/SolidityParser.mjs +1 -1
  281. package/lib/esm/solidity/SourceCodeProvider.js.map +1 -1
  282. package/lib/esm/solidity/SourceCodeProvider.mjs +1 -1
  283. package/lib/esm/solidity/storage/Accessor.js.map +1 -1
  284. package/lib/esm/solidity/storage/Accessor.mjs +1 -1
  285. package/lib/esm/solidity/storage/SlotFixedArray.js.map +1 -1
  286. package/lib/esm/solidity/storage/SlotFixedArray.mjs +1 -1
  287. package/lib/esm/solidity/storage/SlotsStorageTransport.js.map +1 -1
  288. package/lib/esm/solidity/storage/SlotsStorageTransport.mjs +3 -3
  289. package/lib/esm/solidity/storage/handlers/SlotBytesHandler.js.map +1 -1
  290. package/lib/esm/solidity/storage/handlers/SlotBytesHandler.mjs +1 -1
  291. package/lib/esm/solidity/storage/handlers/SlotDynamicArrayHandler.js.map +1 -1
  292. package/lib/esm/solidity/storage/handlers/SlotDynamicArrayHandler.mjs +1 -1
  293. package/lib/esm/solidity/storage/handlers/SlotFixedArrayHandler.js.map +1 -1
  294. package/lib/esm/solidity/storage/handlers/SlotFixedArrayHandler.mjs +1 -1
  295. package/lib/esm/solidity/storage/handlers/SlotValueConstantHandler.js.map +1 -1
  296. package/lib/esm/solidity/storage/handlers/SlotValueConstantHandler.mjs +1 -1
  297. package/lib/esm/solidity/storage/handlers/SlotValueHandler.js.map +1 -1
  298. package/lib/esm/solidity/storage/handlers/SlotValueHandler.mjs +1 -1
  299. package/lib/esm/solidity/storage/handlers/SlotValueImmutableHandler.js.map +1 -1
  300. package/lib/esm/solidity/storage/handlers/SlotValueImmutableHandler.mjs +4 -4
  301. package/lib/esm/tokens/TokenDataProvider.js.map +1 -1
  302. package/lib/esm/tokens/TokenDataProvider.mjs +2 -2
  303. package/lib/esm/tokens/TokenExchangeService.js.map +1 -1
  304. package/lib/esm/tokens/TokenExchangeService.mjs +1 -1
  305. package/lib/esm/tokens/TokenExchanges/AmmBase/V2/AmmPairV2Service.js.map +1 -1
  306. package/lib/esm/tokens/TokenExchanges/AmmBase/V2/AmmPairV2Service.mjs +2 -2
  307. package/lib/esm/tokens/TokenExchanges/AmmV2PriceQuote.js.map +1 -1
  308. package/lib/esm/tokens/TokenExchanges/AmmV2PriceQuote.mjs +2 -2
  309. package/lib/esm/tokens/TokenOracles/amm/AmmV1Oracle.js.map +1 -1
  310. package/lib/esm/tokens/TokenOracles/amm/AmmV1Oracle.mjs +2 -2
  311. package/lib/esm/tokens/TokenTransferService.js.map +1 -1
  312. package/lib/esm/tokens/TokenTransferService.mjs +2 -2
  313. package/lib/esm/tokens/TokensService.js.map +1 -1
  314. package/lib/esm/tokens/TokensService.mjs +1 -1
  315. package/lib/esm/txs/TxNonceManager.mjs +1 -1
  316. package/lib/esm/txs/TxWriter.js.map +1 -1
  317. package/lib/esm/txs/TxWriter.mjs +9 -0
  318. package/lib/esm/txs/conditional/GasWatcherTx.js.map +1 -1
  319. package/lib/esm/txs/conditional/GasWatcherTx.mjs +1 -1
  320. package/lib/esm/txs/receipt/TxLogParser.mjs +1 -1
  321. package/lib/esm/utils/$crypto.js.map +1 -1
  322. package/lib/esm/utils/$crypto.mjs +1 -1
  323. package/lib/esm/utils/$date.js.map +1 -1
  324. package/lib/esm/utils/$date.mjs +1 -1
  325. package/lib/esm/utils/$hex.mjs +1 -1
  326. package/lib/esm/utils/$logger.js.map +1 -1
  327. package/lib/esm/utils/$logger.mjs +1 -1
  328. package/lib/esm/utils/$machine.js.map +1 -1
  329. package/lib/esm/utils/$machine.mjs +2 -2
  330. package/lib/esm/utils/$require.js.map +1 -1
  331. package/lib/esm/utils/$traces.js.map +1 -1
  332. package/lib/esm/utils/$traces.mjs +1 -1
  333. package/lib/types/abi/abi-coder-packed.d.ts +1 -1
  334. package/lib/types/abi/abi-coder.d.ts +13 -13
  335. package/lib/types/abi/coders/abstract-coder.d.ts +14 -14
  336. package/lib/types/abi/fragments.d.ts +95 -95
  337. package/lib/types/blocks/BlockDateResolver.d.ts +7 -7
  338. package/lib/types/class/PackedRanges.d.ts +44 -44
  339. package/lib/types/clients/ClientPool.d.ts +10 -10
  340. package/lib/types/clients/WalletClient.d.ts +2 -2
  341. package/lib/types/clients/Web3Client.d.ts +6 -6
  342. package/lib/types/clients/Web3ClientFactory.d.ts +1 -1
  343. package/lib/types/clients/handlers/RateLimitGuard.d.ts +5 -5
  344. package/lib/types/clients/model/PromiEventWrap.d.ts +1 -1
  345. package/lib/types/clients/utils/$web3Abi.d.ts +1 -1
  346. package/lib/types/clients/utils/ClientErrorUtil.d.ts +1 -0
  347. package/lib/types/config/Config.d.ts +3 -2
  348. package/lib/types/contracts/ContractBase.d.ts +4 -4
  349. package/lib/types/contracts/ContractReader.d.ts +2 -2
  350. package/lib/types/contracts/ContractWriter.d.ts +3 -3
  351. package/lib/types/contracts/deploy/Deployments.d.ts +13 -14
  352. package/lib/types/contracts/deploy/storage/DeploymentsStorage.d.ts +2 -0
  353. package/lib/types/explorer/BlockchainExplorerFactory.d.ts +1 -1
  354. package/lib/types/explorer/Evmscan.d.ts +1 -1
  355. package/lib/types/indexer/BlocksTxIndexer.d.ts +4 -4
  356. package/lib/types/indexer/EventsIndexer.d.ts +4 -4
  357. package/lib/types/indexer/PendingTxIndexer.d.ts +1 -1
  358. package/lib/types/indexer/handlers/BlocksWalker.d.ts +2 -2
  359. package/lib/types/indexer/storage/FsEventsIndexerStore.d.ts +4 -4
  360. package/lib/types/ns/providers/INsProvider.d.ts +1 -1
  361. package/lib/types/rpc/Rpc.d.ts +2 -2
  362. package/lib/types/services/TimelockService/ITimelockService.d.ts +2 -2
  363. package/lib/types/services/TimelockService/TimelockService.d.ts +2 -2
  364. package/lib/types/services/TimelockService/TimelockServiceFallbackSafe.d.ts +2 -2
  365. package/lib/types/solidity/SlotsParser/SourceFile.d.ts +1 -1
  366. package/lib/types/solidity/storage/SlotFixedArray.d.ts +1 -1
  367. package/lib/types/tokens/TokenDataProvider.d.ts +2 -2
  368. package/lib/types/tokens/TokensService.d.ts +1 -1
  369. package/lib/types/txs/ITxBuilderOptions.d.ts +1 -1
  370. package/lib/types/txs/TxNonceManager.d.ts +1 -1
  371. package/lib/types/txs/TxWriter.d.ts +4 -4
  372. package/lib/types/txs/receipt/TxLogParser.d.ts +1 -1
  373. package/lib/types/utils/$date.d.ts +1 -1
  374. package/lib/types/utils/$hex.d.ts +1 -1
  375. package/lib/types/utils/$require.d.ts +8 -8
  376. package/package.json +1 -1
  377. package/readme.md +105 -83
  378. package/src/abi/$abiCoder.ts +1 -1
  379. package/src/abi/Logger.ts +1 -1
  380. package/src/abi/abi-coder-packed.ts +3 -3
  381. package/src/abi/abi-coder.ts +16 -16
  382. package/src/abi/coders/abstract-coder.ts +36 -36
  383. package/src/abi/fragments.ts +137 -137
  384. package/src/blocks/BlockDateResolver.ts +9 -9
  385. package/src/bridges/hop/HopBridge.ts +1 -1
  386. package/src/class/PackedRanges.ts +46 -46
  387. package/src/clients/ClientEventsStream.ts +1 -1
  388. package/src/clients/ClientPool.ts +38 -38
  389. package/src/clients/WalletClient.ts +3 -3
  390. package/src/clients/Web3BatchRequests.ts +3 -3
  391. package/src/clients/Web3Client.ts +21 -21
  392. package/src/clients/Web3ClientFactory.ts +1 -1
  393. package/src/clients/compatibility/Web3.ts +2 -2
  394. package/src/clients/handlers/RateLimitGuard.ts +16 -16
  395. package/src/clients/interfaces/IWeb3Client.ts +2 -2
  396. package/src/clients/model/PromiEventWrap.ts +1 -1
  397. package/src/clients/utils/$web3Abi.ts +2 -2
  398. package/src/clients/utils/ClientErrorUtil.ts +4 -0
  399. package/src/config/Config.ts +4 -3
  400. package/src/contracts/Contract.ts +1 -1
  401. package/src/contracts/ContractAbiProvider.ts +6 -6
  402. package/src/contracts/ContractBase.ts +14 -14
  403. package/src/contracts/ContractProvider.ts +1 -1
  404. package/src/contracts/ContractReader.ts +7 -7
  405. package/src/contracts/ContractWriter.ts +4 -4
  406. package/src/contracts/deploy/ContractDeployer.ts +4 -4
  407. package/src/contracts/deploy/ContractDeployment.ts +1 -1
  408. package/src/contracts/deploy/Deployments.ts +69 -56
  409. package/src/contracts/deploy/proxy/$proxyDeploy.ts +14 -14
  410. package/src/contracts/deploy/proxy/ProxyDeployment.ts +22 -22
  411. package/src/contracts/deploy/storage/DeploymentsStorage.ts +21 -18
  412. package/src/contracts/utils/AbiDeserializer.ts +4 -4
  413. package/src/contracts/utils/ContractBaseUtils.ts +3 -3
  414. package/src/erc4337/models/UserOperation.ts +2 -2
  415. package/src/evm/OpcodesWalker.ts +1 -1
  416. package/src/explorer/BlockchainExplorer.ts +1 -1
  417. package/src/explorer/BlockchainExplorerFactory.ts +1 -1
  418. package/src/explorer/BlockchainExplorerStorage.ts +12 -12
  419. package/src/explorer/Evmscan.ts +1 -1
  420. package/src/explorer/verifiers/FsHtmlVerifier.ts +7 -7
  421. package/src/flashbots/FlashbotWeb3Client.ts +1 -1
  422. package/src/hardhat/HardhatProvider.ts +7 -7
  423. package/src/indexer/BlocksTxIndexer.ts +6 -6
  424. package/src/indexer/EventsIndexer.ts +20 -20
  425. package/src/indexer/PendingTxIndexer.ts +3 -3
  426. package/src/indexer/handlers/BlocksWalker.ts +9 -9
  427. package/src/indexer/handlers/TxQueueLoader.ts +1 -1
  428. package/src/indexer/storage/FsEventsIndexerStore.ts +9 -9
  429. package/src/indexer/storage/FsEventsMetaStore.ts +1 -1
  430. package/src/indexer/storage/FsEventsStoreUtils.ts +1 -1
  431. package/src/json/JsonArrayMultiStore.ts +1 -1
  432. package/src/json/JsonStoreFs.ts +1 -1
  433. package/src/ns/providers/INsProvider.ts +1 -1
  434. package/src/rpc/$rpc.ts +2 -2
  435. package/src/rpc/Rpc.ts +2 -2
  436. package/src/rpc/RpcBase.ts +2 -2
  437. package/src/rpc/RpcContract.ts +6 -6
  438. package/src/rpc/RpcSubscription.ts +1 -1
  439. package/src/rpc/transports/compatibility/EIP1193Transport.ts +4 -4
  440. package/src/rpc/transports/compatibility/Web3Transport.ts +1 -1
  441. package/src/services/TimelockService/ITimelockService.ts +2 -2
  442. package/src/services/TimelockService/TimelockService.ts +2 -2
  443. package/src/services/TimelockService/TimelockServiceFallbackSafe.ts +2 -2
  444. package/src/solidity/SlotsDump.ts +1 -1
  445. package/src/solidity/SlotsParser/MappingSettersResolver.ts +3 -3
  446. package/src/solidity/SlotsParser/SourceFile.ts +3 -3
  447. package/src/solidity/SolidityParser.ts +1 -1
  448. package/src/solidity/SourceCodeProvider.ts +1 -1
  449. package/src/solidity/storage/Accessor.spec.ts +1 -1
  450. package/src/solidity/storage/Accessor.ts +1 -1
  451. package/src/solidity/storage/SlotDynamicArray.ts +1 -1
  452. package/src/solidity/storage/SlotFixedArray.ts +1 -1
  453. package/src/solidity/storage/SlotsStorageTransport.ts +3 -3
  454. package/src/solidity/storage/handlers/SlotBytesHandler.ts +1 -1
  455. package/src/solidity/storage/handlers/SlotDynamicArrayHandler.ts +1 -1
  456. package/src/solidity/storage/handlers/SlotFixedArrayHandler.ts +1 -1
  457. package/src/solidity/storage/handlers/SlotValueConstantHandler.ts +1 -1
  458. package/src/solidity/storage/handlers/SlotValueHandler.ts +1 -1
  459. package/src/solidity/storage/handlers/SlotValueImmutableHandler.ts +4 -4
  460. package/src/tokens/TokenDataProvider.ts +2 -2
  461. package/src/tokens/TokenExchangeService.ts +1 -1
  462. package/src/tokens/TokenExchanges/AmmBase/V2/AmmPairV2Service.ts +2 -2
  463. package/src/tokens/TokenExchanges/AmmV2PriceQuote.ts +2 -2
  464. package/src/tokens/TokenOracles/amm/AmmV1Oracle.ts +2 -2
  465. package/src/tokens/TokenTransferService.ts +2 -2
  466. package/src/tokens/TokensService.ts +1 -1
  467. package/src/txs/ITxBuilderOptions.ts +1 -1
  468. package/src/txs/TxNonceManager.ts +1 -1
  469. package/src/txs/TxWriter.ts +15 -4
  470. package/src/txs/agents/BatchAgent.ts +1 -1
  471. package/src/txs/conditional/GasWatcherTx.ts +1 -1
  472. package/src/txs/receipt/TxLogParser.ts +1 -1
  473. package/src/utils/$crypto.ts +1 -1
  474. package/src/utils/$date.ts +1 -1
  475. package/src/utils/$hex.ts +1 -1
  476. package/src/utils/$logger.ts +1 -1
  477. package/src/utils/$machine.ts +2 -2
  478. package/src/utils/$require.ts +10 -10
  479. package/src/utils/$traces.ts +1 -1
  480. package/src/wallets/EIP6963ProviderFactory.ts +4 -4
@@ -124,7 +124,7 @@ namespace Parse {
124
124
  return i;
125
125
  }
126
126
  }
127
- throw new Error(`Not found closing quote ${quote} in ${str}`);
127
+ throw new Error(`Closing quote ${quote} was not found in ${str}`);
128
128
  }
129
129
 
130
130
 
@@ -19,7 +19,7 @@ export abstract class ASlotDynamicArray extends ASlotsStorageHandler {
19
19
  }
20
20
 
21
21
 
22
- // /** @TODO doesnt support complex arrays */
22
+ // /** @TODO Does not support complex arrays */
23
23
  // protected async getCursorFor (idx: number): Promise<{
24
24
  // slot: number | bigint,
25
25
  // position: number,
@@ -10,7 +10,7 @@ export abstract class ASlotFixedArray extends ASlotsStorageHandler {
10
10
  return $types.isFixedArray(slot.type);
11
11
  }
12
12
 
13
- /** @TODO doesnt support complex arrays */
13
+ /** @TODO Does not support complex arrays */
14
14
  protected async getCursorFor (idx: number): Promise<{ slot: number | bigint, position: number, size: number }> {
15
15
  let { slot } = this;
16
16
  let arrLength = $abiType.array.getLength(slot.type);
@@ -106,7 +106,7 @@ export class SlotsStorageTransport implements ISlotsStorageTransport {
106
106
  }
107
107
 
108
108
  extractMappingKeys (ctx): Promise<{ keys: (string | number | bigint)[][] }> {
109
- throw new Error(`SlotMappingReader doesn't support fetchAll method, as size could be infinite`);
109
+ throw new Error(`SlotMappingReader does not support the fetchAll method, as the size could be infinite`);
110
110
  }
111
111
 
112
112
  mapToGlobalSlot (slot = 0) {
@@ -128,7 +128,7 @@ export class SlotsStorageTransportForArray implements ISlotsStorageTransport {
128
128
 
129
129
  async getStorageAt (slot: string | number | bigint, position = 0, size = 256) {
130
130
  if (typeof slot !== 'number') {
131
- throw new Error(`Array Slot reader supports only numbers for position. Slot ${slot}`);
131
+ throw new Error(`Array slot reader supports only numeric positions. Slot ${slot}`);
132
132
  }
133
133
  let location = this.mapToGlobalSlot(slot);
134
134
  let memory = await this.getUnderlyingTransport().getStorageAt(location, position, size);
@@ -172,7 +172,7 @@ export class SlotsStorageTransportForMapping implements ISlotsStorageTransport {
172
172
  async getStorageAt (slot: string | number | bigint, position: number, size: number) {
173
173
  let isValidType = typeof slot === 'number' || typeof slot === 'bigint' || $is.Hex(slot);
174
174
  if (isValidType === false) {
175
- throw new Error(`Mapping Slot reader supports only numbers for position ${slot}`);
175
+ throw new Error(`Mapping slot reader supports only numeric positions ${slot}`);
176
176
  }
177
177
  let location = this.mapToGlobalSlot(BigInt(slot));
178
178
  let memory = await this.getUnderlyingTransport().getStorageAt(location, position, size);
@@ -98,7 +98,7 @@ export class SlotBytesHandler extends ASlotsStorageHandler {
98
98
 
99
99
  protected requireNoKeys (keys: IAccessorItem[]) {
100
100
  if (keys?.length > 0) {
101
- throw new Error(`ValueTypes cann't have the nested accessors: ${ keys.map(x => x.key).join('.') }`);
101
+ throw new Error(`ValueTypes cannot have nested accessors: ${ keys.map(x => x.key).join('.') }`);
102
102
  }
103
103
  }
104
104
 
@@ -41,7 +41,7 @@ export class SlotDynamicArrayHandler extends ASlotDynamicArray {
41
41
  private async getStorageInner(key: IAccessorItem): Promise<any> {
42
42
 
43
43
  if (key.type !== 'index') {
44
- throw new Error(`Expected to get the Array index as a Key got ${key.key} as ${key.type}`);
44
+ throw new Error(`Expected to get the array index as a key, but got ${key.key} as ${key.type}`);
45
45
  }
46
46
 
47
47
  let baseType = $abiType.array.getBaseType(this.slot.type);
@@ -45,7 +45,7 @@ export class SlotFixedArrayHandler extends ASlotFixedArray {
45
45
  private async getStorageInner (key: IAccessorItem) {
46
46
 
47
47
  if (key.type !== 'index') {
48
- throw new Error(`Expected to get the Array index as a Key got ${key.key} as ${key.type}`);
48
+ throw new Error(`Expected to get the array index as a key, but got ${key.key} as ${key.type}`);
49
49
  }
50
50
  let cursor = await this.getCursorFor(key.key);
51
51
  let baseType = $abiType.array.getBaseType(this.slot.type);
@@ -24,7 +24,7 @@ export class SlotValueConstantHandler extends ASlotsStorageHandler {
24
24
 
25
25
  private requireNoKeys (keys: IAccessorItem[]) {
26
26
  if (keys?.length > 0) {
27
- throw new Error(`ValueTypes can't have the nested accessors: ${ keys.map(x => x.key).join('.') }`);
27
+ throw new Error(`ValueTypes cannot have nested accessors: ${ keys.map(x => x.key).join('.') }`);
28
28
  }
29
29
  }
30
30
  }
@@ -30,7 +30,7 @@ export class SlotValueHandler extends ASlotsStorageHandler {
30
30
 
31
31
  private requireNoKeys (keys: IAccessorItem[]) {
32
32
  if (keys?.length > 0) {
33
- throw new Error(`ValueTypes can't have the nested accessors: ${ keys.map(x => x.key).join('.') }`);
33
+ throw new Error(`ValueTypes cannot have nested accessors: ${ keys.map(x => x.key).join('.') }`);
34
34
  }
35
35
  }
36
36
  }
@@ -10,8 +10,8 @@ export class SlotValueImmutableHandler extends ASlotsStorageHandler {
10
10
  return slot.memory === 'immutable';
11
11
  }
12
12
 
13
- // We will read the public getter if any or skip for now
14
- // @TODO: implement deployment tx reader
13
+ // Read the public getter if any, or skip for now
14
+ // @TODO Implement the deployment tx reader
15
15
  async get (keys?: IAccessorItem[]){
16
16
  this.requireNoKeys(keys);
17
17
 
@@ -26,7 +26,7 @@ export class SlotValueImmutableHandler extends ASlotsStorageHandler {
26
26
  }
27
27
 
28
28
  async set(keys: IAccessorItem[], value: any): Promise<any> {
29
- throw new Error(`Can't set a immutable value ${this.slot.name}`);
29
+ throw new Error(`Cannot set an immutable value ${this.slot.name}`);
30
30
  }
31
31
 
32
32
  async fetchAll() {
@@ -35,7 +35,7 @@ export class SlotValueImmutableHandler extends ASlotsStorageHandler {
35
35
 
36
36
  private requireNoKeys (keys: IAccessorItem[]) {
37
37
  if (keys?.length > 0) {
38
- throw new Error(`ValueTypes can't have the nested accessors: ${ keys.map(x => x.key).join('.') }`);
38
+ throw new Error(`ValueTypes cannot have nested accessors: ${ keys.map(x => x.key).join('.') }`);
39
39
  }
40
40
  }
41
41
  }
@@ -84,7 +84,7 @@ export class TokenDataProvider {
84
84
  }
85
85
 
86
86
  /**
87
- * Adds and saves the token to dequanto configuration.
87
+ * Adds and saves the token to the dequanto configuration
88
88
  */
89
89
  async addKnownToken (token: IToken): Promise<any> {
90
90
  await this.config.addToken(token);
@@ -109,7 +109,7 @@ export class TokenDataProvider {
109
109
  return NativeTokens.getNative(platform);
110
110
  }
111
111
 
112
- /** Download tokens with various exchange/swap providers and merge them into one collection. */
112
+ /** Download tokens with various exchange/swap providers and merge them into one collection */
113
113
  async redownload () {
114
114
  return await alot(this.providers)
115
115
  .forEachAsync(async (x, i) => {
@@ -40,7 +40,7 @@ export class TokenExchangeService {
40
40
  this.stables = ['USDC', 'USDT', 'DAI'];
41
41
  break;
42
42
  default:
43
- throw new Error(`Unsupported Platform for exchange yet: ${platform}`);
43
+ throw new Error(`Unsupported exchange platform: ${platform}`);
44
44
  }
45
45
 
46
46
  this.client = Web3ClientFactory.get(this.platform);
@@ -97,7 +97,7 @@ export class AmmPairV2Service {
97
97
  this.targetCoins = ['USDC', 'USDT', 'DAI'];
98
98
  break;
99
99
  default:
100
- throw new Error(`Unsupported Platform for exchange yet: ${client.platform}`);
100
+ throw new Error(`Unsupported exchange platform: ${client.platform}`);
101
101
  }
102
102
 
103
103
  this.tokensService = di.resolve(TokensService, this.client.platform, this.explorer);
@@ -125,7 +125,7 @@ export class AmmPairV2Service {
125
125
 
126
126
 
127
127
  if (pool == null || pool.reserveTo < (50_000n * BigInt(pool.pair.to.decimals))) {
128
- // if NO or low-liquidity pool found, check the WETH pool
128
+ // If no pool or only a low-liquidity pool is found, check the WETH pool
129
129
  const SYMBOL = { bsc: 'WBNB', polygon: 'MATIC' }[platform] ?? 'WETH';
130
130
  const nativeTokenPool = await this.getPoolInfo(address, SYMBOL);
131
131
 
@@ -39,7 +39,7 @@ export class AmmV2PriceQuote implements IOracle {
39
39
  this.exchange = di.resolve(SushiswapPolygonExchange, this.client, this.explorer);
40
40
  break;
41
41
  default:
42
- throw new Error(`Unsupported Platform for exchange yet: ${client.platform}`);
42
+ throw new Error(`Unsupported exchange platform: ${client.platform}`);
43
43
  }
44
44
  this.tokensService = di.resolve(TokensService, this.client.platform, this.explorer)
45
45
  this.pairService = di.resolve(AmmPairV2Service, this.client, this.explorer)
@@ -371,7 +371,7 @@ namespace TokenPrice {
371
371
  fromUsd: $fromUsd,
372
372
  fromPrice: $fromPrice,
373
373
 
374
- // Optimistic assume same USD out.
374
+ // Optimistically assume the same USD output
375
375
  toUsd: $fromUsd
376
376
  };
377
377
  }
@@ -138,7 +138,7 @@ export class AmmV1Oracle implements IOracle {
138
138
 
139
139
  let mostLiquidity = alot(exchanges).sortBy(x => x?.eth ?? 0n, 'desc').first();
140
140
  if (mostLiquidity == null || mostLiquidity.eth < $bigint.toWei(2)) {
141
- throw new Error(`ETH price can't be resolved due to NO or low-liquidity pairs: ${ exchanges.map(x => `${x.token.symbol} (${x.eth}wei)`) }`);
141
+ throw new Error(`ETH price cannot be resolved due to missing or low-liquidity pairs: ${ exchanges.map(x => `${x.token.symbol} (${x.eth}wei)`) }`);
142
142
  }
143
143
  let out = await this
144
144
  .reader
@@ -178,7 +178,7 @@ export class AmmV1Oracle implements IOracle {
178
178
  opts.block = number;
179
179
  return this.getBlockData(opts);
180
180
  }
181
- throw new Error(`Unreachable reached`);
181
+ throw new Error(`Unreachable code reached`);
182
182
  }
183
183
 
184
184
  @memd.deco.memoize({
@@ -158,8 +158,8 @@ export class TokenTransferService {
158
158
  ...(this.writerConfig ?? {}),
159
159
  retries: 3,
160
160
  async onErrorRebuild (tx, error, errCount) {
161
- // In case we got `balance` value, but that one was outdated, then all our calculations where wrong.
162
- // Retry the calculation and transfer once again.
161
+ // If we got the `balance` value, but it was outdated, then all our calculations were wrong
162
+ // Retry the calculation and transfer once again
163
163
  if (/insufficient funds/.test(error.message)) {
164
164
  const ms = 6000 * errCount;
165
165
  $logger.log(`TokenTransfer Failed: insufficient funds. Waiting ${ms}ms to retry`);
@@ -52,7 +52,7 @@ export class TokensService {
52
52
  return this.provider.getNative(platform);
53
53
  }
54
54
 
55
- /** Download tokens with various exchange/swap providers and merge them into one collection. */
55
+ /** Download tokens with various exchange/swap providers and merge them into one collection */
56
56
  async redownload () {
57
57
  return this.provider.redownload();
58
58
  }
@@ -17,7 +17,7 @@ export interface ITxBuilderNonceOptions {
17
17
  * 1: Used nonce of the first pending transaction will
18
18
  * 2: second pending transaction
19
19
  * ...
20
- * In any case MAX is the count of pending transactions, so any value is safe.
20
+ * In any case, MAX is the count of pending transactions, so any value is safe
21
21
  */
22
22
  noncePending?: number
23
23
  }
@@ -34,7 +34,7 @@ export class TxNonceManager {
34
34
  }
35
35
 
36
36
  /**
37
- * Pick current nonce without incrementing. TxDataBuilder will call the incrementCursor after the tx signed.
37
+ * Pick the current nonce without incrementing. TxDataBuilder will call incrementCursor after the tx is signed
38
38
  * */
39
39
  public async pickNonce (client: Web3Client): Promise<bigint> {
40
40
  if (this.shouldUpdateNonce()) {
@@ -71,7 +71,7 @@ export interface ITxWriterOptions {
71
71
  retryDelay?: number
72
72
  safeTransport?: ISafeServiceTransport
73
73
 
74
- /** Tx Data will be saved to the store(e.g. a File), and will wait until the signature appears in the store. */
74
+ /** Tx data will be saved to the store, e.g. a file, and wait until the signature appears in the store */
75
75
  sigTransport?: string
76
76
 
77
77
  /** Optionally disable waiting for the transport response */
@@ -83,11 +83,11 @@ export interface ITxWriterOptions {
83
83
  /** Proceed the Tx up to the signature */
84
84
  signOnly?: boolean
85
85
 
86
- /** Provide a pre-signed signature for this transaction data. */
86
+ /** Provide a pre-signed signature for this transaction data */
87
87
  signature?: TEth.Hex
88
88
 
89
89
  /**
90
- * The callback is executed on error, to give the opportunity to build a new Tx to resubmit the tx.
90
+ * The callback is executed on error to allow building a new tx for resubmission
91
91
  * @param tx - current TxWriter object
92
92
  * @param error - current Error with receipt(if any)
93
93
  * @param errCount - num of errors already handled
@@ -101,7 +101,7 @@ export interface ITxWriterOptions {
101
101
 
102
102
 
103
103
  /**
104
- * Custom agent to process the transaction data.
104
+ * Custom agent to process the transaction data
105
105
  */
106
106
  agent?: ITxWriterAgent
107
107
  }
@@ -411,6 +411,17 @@ export class TxWriter extends class_EventEmitter<ITxWriterEvents> implements ITx
411
411
 
412
412
  let submitsCount = this.txs.length;
413
413
  let submitsMax = (options.retries ?? 0) + 1;
414
+
415
+ if (ClientErrorUtil.IsUnderpriced(err)) {
416
+ if (options.retries == null) {
417
+ options.retries = 1;
418
+ }
419
+ // Increase the price ratio and the
420
+ this.builder.increaseGas(1.5);
421
+ this.logger.log(`Underpriced: gas increased: retried ${submitsCount}/${options.retries ?? 0}`);
422
+ submitsMax = Math.max(2, submitsMax);
423
+ }
424
+
414
425
  if (submitsCount < submitsMax) {
415
426
  let ms = options.retryDelay ?? 3000;
416
427
  let waitMs = ms * submitsCount;
@@ -18,7 +18,7 @@ export class BatchAgent implements ITxWriterAgent {
18
18
  public transactions: MockTxWriter[] = []
19
19
 
20
20
  constructor (public options?: {
21
- // It is usefull to not batch the deployment transactions.
21
+ // It is useful not to batch deployment transactions
22
22
  ignoreContractCreation?: boolean,
23
23
  }) {
24
24
 
@@ -94,7 +94,7 @@ export class GasWatcherTx {
94
94
  // re-submitting
95
95
  let currentGas = BigInt(data.gasPrice.toString());
96
96
  if (currentGas >= gasPrice) {
97
- // we can't resubmit with less gas
97
+ // We cannot resubmit with less gas
98
98
  gasPrice = currentGas + $bigint.toWeiFromGwei(.1);
99
99
  }
100
100
  }
@@ -17,7 +17,7 @@ export class TxLogParser {
17
17
  }
18
18
 
19
19
  /**
20
- * Sparse arrays will contain NULLs for unparsed log items.
20
+ * Sparse arrays will contain NULLs for unparsed log items
21
21
  * Per default dense arrays - only with known logs - are returned
22
22
  */
23
23
  async parse (receipt: { logs: TEth.TxReceipt['logs'] }, opts?: {
@@ -111,7 +111,7 @@ namespace WebCryptoImpl {
111
111
  }
112
112
  createECDH(curve: string) {
113
113
  /** use this.crypto.subtle.importKey */
114
- throw new Error("Method not implemented.");
114
+ throw new Error("Method not implemented");
115
115
  }
116
116
  async encryptInner(buffer: Uint8Array, secret: Uint8Array): Promise<Uint8Array> {
117
117
  const key = await this._getEncryptionKey(secret);
@@ -80,7 +80,7 @@ export class DateTool {
80
80
  if (ms != null) this.date.setMilliseconds(ms);
81
81
  return this;
82
82
  }
83
- /** Sets the numeric day-of-the-month value of the Date object using local time. */
83
+ /** Sets the numeric day-of-the-month value of the Date object using local time */
84
84
  setDate(v: number) {
85
85
  this.date.setDate(v);
86
86
  return this;
package/src/utils/$hex.ts CHANGED
@@ -6,7 +6,7 @@ export namespace $hex {
6
6
  export const ZERO = '0x'
7
7
 
8
8
  /**
9
- * Adds '00' bytes to the hex string.
9
+ * Adds '00' bytes to the hex string
10
10
  * @param hex
11
11
  * @param byteSize Min bytes count in the hex string
12
12
  */
@@ -213,7 +213,7 @@ export function l(strings: TemplateStringsArray, ...values: any[]) {
213
213
  case 'bigint':
214
214
  break;
215
215
  default:
216
- // skip colorizing all non-value types.
216
+ // Skip colorizing all non-value types
217
217
  continue;
218
218
  }
219
219
  args[i - 1] = `${before}${value}${after}`;
@@ -42,8 +42,8 @@ export namespace $machine {
42
42
  freebsd: 'kenv -q smbios.system.uuid || sysctl -n kern.hostuuid'
43
43
  };
44
44
  function isWindowsProcessMixedOrNativeArchitecture(): string {
45
- // detect if the node binary is the same arch as the Windows OS.
46
- // or if this is 32 bit node on 64 bit windows.
45
+ // Detect if the node binary has the same architecture as the Windows OS
46
+ // Or if this is 32-bit Node on 64-bit Windows
47
47
  if (process.platform !== 'win32') {
48
48
  return '';
49
49
  }
@@ -5,7 +5,7 @@ import { $address } from './$address';
5
5
 
6
6
  const $Array = Array;
7
7
  export namespace $require {
8
- export function Number <T> (val: T, message: string = '', opts?: { min?: T, max?: T}): T {
8
+ export function Number <T> (val: T, message: string = '', opts?: { min?: T, max?: T}): number {
9
9
  if (typeof val !== 'number') {
10
10
  throw new Error(`Expects number type, got ${typeof val} ${val}. ${message}`);
11
11
  }
@@ -20,7 +20,7 @@ export namespace $require {
20
20
  }
21
21
  return val;
22
22
  }
23
- export function BigInt<T> (val: T, message: string = '', opts?: { min?: T, max?: T}): T {
23
+ export function BigInt<T> (val: T, message: string = '', opts?: { min?: T, max?: T}): bigint {
24
24
  if (typeof val !== 'bigint') {
25
25
  throw new Error(`Expects bigint type, got ${typeof val} (${val}). ${message}`);
26
26
  }
@@ -32,35 +32,35 @@ export namespace $require {
32
32
  }
33
33
  return val;
34
34
  }
35
- export function Numeric<T>(val: T, message: string = '', opts?: { min?: T, max?: T}): T {
35
+ export function Numeric<T>(val: T, message: string = '', opts?: { min?: T, max?: T}): NonNullable<T> {
36
36
  if (typeof val === 'number') {
37
- return Number(val, message, opts);
37
+ return Number(val, message, opts) as any;
38
38
  }
39
39
  if (typeof val === 'bigint') {
40
- return BigInt(val, message, opts);
40
+ return BigInt(val, message, opts) as any;
41
41
  }
42
42
  throw new Error(`Expects numeric type, got ${typeof val}. ${message}`);
43
43
  }
44
44
 
45
- export function Function<T>(val: T, message: string): T {
45
+ export function Function<T>(val: T, message: string): NonNullable<T> {
46
46
  if (typeof val !== 'function') {
47
47
  throw new Error(`Value is not a function ${message}`);
48
48
  }
49
49
  return val;
50
50
  }
51
- export function Array<T>(val: T, message: string): T {
51
+ export function Array<T>(val: T, message: string): NonNullable<T> {
52
52
  if ($Array.isArray(val) === false) {
53
53
  throw new Error(`Value is not a function ${message}`);
54
54
  }
55
55
  return val;
56
56
  }
57
- export function String<T>(val: T, message: string): T {
57
+ export function String<T>(val: T, message: string): NonNullable<T> {
58
58
  if (typeof val !== 'string') {
59
59
  throw new Error(`Value ${val} is not a string ${message}`);
60
60
  }
61
61
  return val;
62
62
  }
63
- export function notNull<T> (val: T, message: string, ...logs): T {
63
+ export function notNull<T> (val: T, message: string, ...logs): NonNullable<T> {
64
64
  if (val == null) {
65
65
  logs?.forEach(log => console.error(log));
66
66
  throw new Error(`Value is undefined. ${message}`);
@@ -74,7 +74,7 @@ export namespace $require {
74
74
  }
75
75
  return val;
76
76
  }
77
- export function notEmpty<T extends string | Array<any> | { length: number }> (val: T, message: string): T {
77
+ export function notEmpty<T extends string | Array<any> | { length: number }> (val: T, message: string): NonNullable<T> {
78
78
  if (val == null) {
79
79
  throw new Error(`Value is undefined. ${message}`);
80
80
  }
@@ -512,7 +512,7 @@ export namespace $traces {
512
512
  }).join(', ');
513
513
  }
514
514
  } catch {
515
- // Fall back to raw bytes if decoding fails.
515
+ // Fall back to raw bytes if decoding fails
516
516
  }
517
517
  }
518
518
  if (frame.failed) {
@@ -7,7 +7,7 @@ import { $require } from '@dequanto/utils/$require';
7
7
  import { class_EventEmitter } from 'atma-utils';
8
8
  import { IEIP6963Provider } from '@dequanto/rpc/transports/compatibility/IEIP6963Provider';
9
9
 
10
- // Interface for provider information following EIP-6963.
10
+ // Interface for provider information following EIP-6963
11
11
  interface EIP6963ProviderInfo {
12
12
  rdns?: string; // Unique identifier for the wallet e.g io.metamask, io.metamask.flask
13
13
  uuid: string; // Globally unique ID to differentiate between provider sessions for the lifetime of the page
@@ -16,16 +16,16 @@ interface EIP6963ProviderInfo {
16
16
  chainId?: number;
17
17
  }
18
18
 
19
- // Interface for Ethereum providers based on the EIP-1193 standard.
19
+ // Interface for Ethereum providers based on the EIP-1193 standard
20
20
 
21
- // Interface detailing the structure of provider information and its Ethereum provider.
21
+ // Interface detailing the structure of provider information and its Ethereum provider
22
22
  export interface EIP6963ProviderDetail {
23
23
  info: EIP6963ProviderInfo; // The provider's info
24
24
  provider: IEIP6963Provider; // The EIP-1193 compatible provider
25
25
  accounts?: TEth.Address[]; // Optional: Array of connected Ethereum accounts
26
26
  }
27
27
 
28
- // Type representing the event structure for announcing a provider based on EIP-6963.
28
+ // Type representing the event structure for announcing a provider based on EIP-6963
29
29
  type EIP6963AnnounceProviderEvent = {
30
30
  detail: EIP6963ProviderDetail
31
31
  }