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.
- package/lib/cjs/abi/$abiCoder.js +1 -1
- package/lib/cjs/abi/$abiCoder.js.map +1 -1
- package/lib/cjs/abi/Logger.js +1 -1
- package/lib/cjs/abi/abi-coder-packed.js +3 -3
- package/lib/cjs/abi/abi-coder.js +16 -16
- package/lib/cjs/abi/coders/abstract-coder.js +31 -31
- package/lib/cjs/abi/coders/abstract-coder.js.map +1 -1
- package/lib/cjs/abi/fragments.js +90 -90
- package/lib/cjs/abi/fragments.js.map +1 -1
- package/lib/cjs/blocks/BlockDateResolver.js +9 -9
- package/lib/cjs/blocks/BlockDateResolver.js.map +1 -1
- package/lib/cjs/class/PackedRanges.js +46 -46
- package/lib/cjs/class/PackedRanges.js.map +1 -1
- package/lib/cjs/clients/ClientEventsStream.js +1 -1
- package/lib/cjs/clients/ClientEventsStream.js.map +1 -1
- package/lib/cjs/clients/ClientPool.js +23 -23
- package/lib/cjs/clients/ClientPool.js.map +1 -1
- package/lib/cjs/clients/WalletClient.js +3 -3
- package/lib/cjs/clients/WalletClient.js.map +1 -1
- package/lib/cjs/clients/Web3Client.js +14 -14
- package/lib/cjs/clients/Web3Client.js.map +1 -1
- package/lib/cjs/clients/Web3ClientFactory.js +1 -1
- package/lib/cjs/clients/Web3ClientFactory.js.map +1 -1
- package/lib/cjs/clients/compatibility/Web3.js +2 -2
- package/lib/cjs/clients/compatibility/Web3.js.map +1 -1
- package/lib/cjs/clients/handlers/RateLimitGuard.js +16 -16
- package/lib/cjs/clients/handlers/RateLimitGuard.js.map +1 -1
- package/lib/cjs/clients/model/PromiEventWrap.js +1 -1
- package/lib/cjs/clients/model/PromiEventWrap.js.map +1 -1
- package/lib/cjs/clients/utils/$web3Abi.js +2 -2
- package/lib/cjs/clients/utils/$web3Abi.js.map +1 -1
- package/lib/cjs/clients/utils/ClientErrorUtil.js +4 -0
- package/lib/cjs/clients/utils/ClientErrorUtil.js.map +1 -1
- package/lib/cjs/config/Config.js.map +1 -1
- package/lib/cjs/contracts/Contract.js +1 -1
- package/lib/cjs/contracts/Contract.js.map +1 -1
- package/lib/cjs/contracts/ContractAbiProvider.js +6 -6
- package/lib/cjs/contracts/ContractAbiProvider.js.map +1 -1
- package/lib/cjs/contracts/ContractBase.js +10 -10
- package/lib/cjs/contracts/ContractBase.js.map +1 -1
- package/lib/cjs/contracts/ContractProvider.js +1 -1
- package/lib/cjs/contracts/ContractProvider.js.map +1 -1
- package/lib/cjs/contracts/ContractReader.js +5 -5
- package/lib/cjs/contracts/ContractReader.js.map +1 -1
- package/lib/cjs/contracts/ContractWriter.js +4 -4
- package/lib/cjs/contracts/ContractWriter.js.map +1 -1
- package/lib/cjs/contracts/deploy/ContractDeployer.js +4 -4
- package/lib/cjs/contracts/deploy/ContractDeployer.js.map +1 -1
- package/lib/cjs/contracts/deploy/Deployments.js +36 -21
- package/lib/cjs/contracts/deploy/Deployments.js.map +1 -1
- package/lib/cjs/contracts/deploy/proxy/$proxyDeploy.js +13 -13
- package/lib/cjs/contracts/deploy/proxy/$proxyDeploy.js.map +1 -1
- package/lib/cjs/contracts/deploy/proxy/ProxyDeployment.js +22 -22
- package/lib/cjs/contracts/deploy/proxy/ProxyDeployment.js.map +1 -1
- package/lib/cjs/contracts/deploy/storage/DeploymentsStorage.js +15 -14
- package/lib/cjs/contracts/deploy/storage/DeploymentsStorage.js.map +1 -1
- package/lib/cjs/contracts/utils/AbiDeserializer.js +4 -4
- package/lib/cjs/contracts/utils/AbiDeserializer.js.map +1 -1
- package/lib/cjs/contracts/utils/ContractBaseUtils.js +3 -3
- package/lib/cjs/contracts/utils/ContractBaseUtils.js.map +1 -1
- package/lib/cjs/evm/OpcodesWalker.js +1 -1
- package/lib/cjs/evm/OpcodesWalker.js.map +1 -1
- package/lib/cjs/explorer/BlockchainExplorer.js +1 -1
- package/lib/cjs/explorer/BlockchainExplorer.js.map +1 -1
- package/lib/cjs/explorer/BlockchainExplorerFactory.js +1 -1
- package/lib/cjs/explorer/BlockchainExplorerStorage.js +12 -12
- package/lib/cjs/explorer/BlockchainExplorerStorage.js.map +1 -1
- package/lib/cjs/explorer/Evmscan.js +1 -1
- package/lib/cjs/explorer/verifiers/FsHtmlVerifier.js +7 -7
- package/lib/cjs/explorer/verifiers/FsHtmlVerifier.js.map +1 -1
- package/lib/cjs/flashbots/FlashbotWeb3Client.js +1 -1
- package/lib/cjs/flashbots/FlashbotWeb3Client.js.map +1 -1
- package/lib/cjs/hardhat/HardhatProvider.js +7 -7
- package/lib/cjs/hardhat/HardhatProvider.js.map +1 -1
- package/lib/cjs/indexer/BlocksTxIndexer.js +2 -2
- package/lib/cjs/indexer/BlocksTxIndexer.js.map +1 -1
- package/lib/cjs/indexer/EventsIndexer.js +11 -11
- package/lib/cjs/indexer/EventsIndexer.js.map +1 -1
- package/lib/cjs/indexer/PendingTxIndexer.js +2 -2
- package/lib/cjs/indexer/PendingTxIndexer.js.map +1 -1
- package/lib/cjs/indexer/handlers/BlocksWalker.js +9 -9
- package/lib/cjs/indexer/handlers/BlocksWalker.js.map +1 -1
- package/lib/cjs/indexer/handlers/TxQueueLoader.js +1 -1
- package/lib/cjs/indexer/storage/FsEventsIndexerStore.js +3 -3
- package/lib/cjs/indexer/storage/FsEventsIndexerStore.js.map +1 -1
- package/lib/cjs/indexer/storage/FsEventsStoreUtils.js +1 -1
- package/lib/cjs/indexer/storage/FsEventsStoreUtils.js.map +1 -1
- package/lib/cjs/json/JsonArrayMultiStore.js +1 -1
- package/lib/cjs/json/JsonArrayMultiStore.js.map +1 -1
- package/lib/cjs/json/JsonStoreFs.js +1 -1
- package/lib/cjs/json/JsonStoreFs.js.map +1 -1
- package/lib/cjs/rpc/$rpc.js +2 -2
- package/lib/cjs/rpc/$rpc.js.map +1 -1
- package/lib/cjs/rpc/Rpc.js +2 -2
- package/lib/cjs/rpc/RpcBase.js +2 -2
- package/lib/cjs/rpc/RpcBase.js.map +1 -1
- package/lib/cjs/rpc/RpcContract.js +4 -3
- package/lib/cjs/rpc/RpcContract.js.map +1 -1
- package/lib/cjs/rpc/RpcSubscription.js +1 -1
- package/lib/cjs/rpc/RpcSubscription.js.map +1 -1
- package/lib/cjs/rpc/transports/compatibility/EIP1193Transport.js +4 -4
- package/lib/cjs/rpc/transports/compatibility/EIP1193Transport.js.map +1 -1
- package/lib/cjs/rpc/transports/compatibility/Web3Transport.js +1 -1
- package/lib/cjs/rpc/transports/compatibility/Web3Transport.js.map +1 -1
- package/lib/cjs/services/TimelockService/TimelockService.js +2 -2
- package/lib/cjs/services/TimelockService/TimelockServiceFallbackSafe.js +2 -2
- package/lib/cjs/solidity/SlotsDump.js +1 -1
- package/lib/cjs/solidity/SlotsDump.js.map +1 -1
- package/lib/cjs/solidity/SlotsParser/MappingSettersResolver.js +3 -3
- package/lib/cjs/solidity/SlotsParser/MappingSettersResolver.js.map +1 -1
- package/lib/cjs/solidity/SlotsParser/SourceFile.js +3 -3
- package/lib/cjs/solidity/SlotsParser/SourceFile.js.map +1 -1
- package/lib/cjs/solidity/SolidityParser.js +1 -1
- package/lib/cjs/solidity/SolidityParser.js.map +1 -1
- package/lib/cjs/solidity/SourceCodeProvider.js +1 -1
- package/lib/cjs/solidity/SourceCodeProvider.js.map +1 -1
- package/lib/cjs/solidity/storage/Accessor.js +1 -1
- package/lib/cjs/solidity/storage/Accessor.js.map +1 -1
- package/lib/cjs/solidity/storage/SlotFixedArray.js +1 -1
- package/lib/cjs/solidity/storage/SlotFixedArray.js.map +1 -1
- package/lib/cjs/solidity/storage/SlotsStorageTransport.js +3 -3
- package/lib/cjs/solidity/storage/SlotsStorageTransport.js.map +1 -1
- package/lib/cjs/solidity/storage/handlers/SlotBytesHandler.js +1 -1
- package/lib/cjs/solidity/storage/handlers/SlotBytesHandler.js.map +1 -1
- package/lib/cjs/solidity/storage/handlers/SlotDynamicArrayHandler.js +1 -1
- package/lib/cjs/solidity/storage/handlers/SlotDynamicArrayHandler.js.map +1 -1
- package/lib/cjs/solidity/storage/handlers/SlotFixedArrayHandler.js +1 -1
- package/lib/cjs/solidity/storage/handlers/SlotFixedArrayHandler.js.map +1 -1
- package/lib/cjs/solidity/storage/handlers/SlotValueConstantHandler.js +1 -1
- package/lib/cjs/solidity/storage/handlers/SlotValueConstantHandler.js.map +1 -1
- package/lib/cjs/solidity/storage/handlers/SlotValueHandler.js +1 -1
- package/lib/cjs/solidity/storage/handlers/SlotValueHandler.js.map +1 -1
- package/lib/cjs/solidity/storage/handlers/SlotValueImmutableHandler.js +4 -4
- package/lib/cjs/solidity/storage/handlers/SlotValueImmutableHandler.js.map +1 -1
- package/lib/cjs/tokens/TokenDataProvider.js +2 -2
- package/lib/cjs/tokens/TokenDataProvider.js.map +1 -1
- package/lib/cjs/tokens/TokenExchangeService.js +1 -1
- package/lib/cjs/tokens/TokenExchangeService.js.map +1 -1
- package/lib/cjs/tokens/TokenExchanges/AmmBase/V2/AmmPairV2Service.js +2 -2
- package/lib/cjs/tokens/TokenExchanges/AmmBase/V2/AmmPairV2Service.js.map +1 -1
- package/lib/cjs/tokens/TokenExchanges/AmmV2PriceQuote.js +2 -2
- package/lib/cjs/tokens/TokenExchanges/AmmV2PriceQuote.js.map +1 -1
- package/lib/cjs/tokens/TokenOracles/amm/AmmV1Oracle.js +2 -2
- package/lib/cjs/tokens/TokenOracles/amm/AmmV1Oracle.js.map +1 -1
- package/lib/cjs/tokens/TokenTransferService.js +2 -2
- package/lib/cjs/tokens/TokenTransferService.js.map +1 -1
- package/lib/cjs/tokens/TokensService.js +1 -1
- package/lib/cjs/tokens/TokensService.js.map +1 -1
- package/lib/cjs/txs/TxNonceManager.js +1 -1
- package/lib/cjs/txs/TxWriter.js +9 -0
- package/lib/cjs/txs/TxWriter.js.map +1 -1
- package/lib/cjs/txs/conditional/GasWatcherTx.js +1 -1
- package/lib/cjs/txs/conditional/GasWatcherTx.js.map +1 -1
- package/lib/cjs/txs/receipt/TxLogParser.js +1 -1
- package/lib/cjs/utils/$crypto.js +1 -1
- package/lib/cjs/utils/$crypto.js.map +1 -1
- package/lib/cjs/utils/$date.js +1 -1
- package/lib/cjs/utils/$date.js.map +1 -1
- package/lib/cjs/utils/$hex.js +1 -1
- package/lib/cjs/utils/$logger.js +1 -1
- package/lib/cjs/utils/$logger.js.map +1 -1
- package/lib/cjs/utils/$machine.js +2 -2
- package/lib/cjs/utils/$machine.js.map +1 -1
- package/lib/cjs/utils/$require.js.map +1 -1
- package/lib/cjs/utils/$traces.js +1 -1
- package/lib/cjs/utils/$traces.js.map +1 -1
- package/lib/esm/abi/$abiCoder.js.map +1 -1
- package/lib/esm/abi/$abiCoder.mjs +1 -1
- package/lib/esm/abi/Logger.mjs +1 -1
- package/lib/esm/abi/abi-coder-packed.mjs +3 -3
- package/lib/esm/abi/abi-coder.mjs +16 -16
- package/lib/esm/abi/coders/abstract-coder.js.map +1 -1
- package/lib/esm/abi/coders/abstract-coder.mjs +31 -31
- package/lib/esm/abi/fragments.js.map +1 -1
- package/lib/esm/abi/fragments.mjs +90 -90
- package/lib/esm/blocks/BlockDateResolver.js.map +1 -1
- package/lib/esm/blocks/BlockDateResolver.mjs +9 -9
- package/lib/esm/class/PackedRanges.js.map +1 -1
- package/lib/esm/class/PackedRanges.mjs +46 -46
- package/lib/esm/clients/ClientEventsStream.js.map +1 -1
- package/lib/esm/clients/ClientEventsStream.mjs +1 -1
- package/lib/esm/clients/ClientPool.js.map +1 -1
- package/lib/esm/clients/ClientPool.mjs +23 -23
- package/lib/esm/clients/WalletClient.js.map +1 -1
- package/lib/esm/clients/WalletClient.mjs +3 -3
- package/lib/esm/clients/Web3Client.js.map +1 -1
- package/lib/esm/clients/Web3Client.mjs +14 -14
- package/lib/esm/clients/Web3ClientFactory.js.map +1 -1
- package/lib/esm/clients/Web3ClientFactory.mjs +1 -1
- package/lib/esm/clients/compatibility/Web3.js.map +1 -1
- package/lib/esm/clients/compatibility/Web3.mjs +2 -2
- package/lib/esm/clients/handlers/RateLimitGuard.js.map +1 -1
- package/lib/esm/clients/handlers/RateLimitGuard.mjs +16 -16
- package/lib/esm/clients/model/PromiEventWrap.js.map +1 -1
- package/lib/esm/clients/model/PromiEventWrap.mjs +1 -1
- package/lib/esm/clients/utils/$web3Abi.js.map +1 -1
- package/lib/esm/clients/utils/$web3Abi.mjs +2 -2
- package/lib/esm/clients/utils/ClientErrorUtil.js.map +1 -1
- package/lib/esm/clients/utils/ClientErrorUtil.mjs +4 -0
- package/lib/esm/config/Config.js.map +1 -1
- package/lib/esm/contracts/Contract.js.map +1 -1
- package/lib/esm/contracts/Contract.mjs +1 -1
- package/lib/esm/contracts/ContractAbiProvider.js.map +1 -1
- package/lib/esm/contracts/ContractAbiProvider.mjs +6 -6
- package/lib/esm/contracts/ContractBase.js.map +1 -1
- package/lib/esm/contracts/ContractBase.mjs +10 -10
- package/lib/esm/contracts/ContractProvider.js.map +1 -1
- package/lib/esm/contracts/ContractProvider.mjs +1 -1
- package/lib/esm/contracts/ContractReader.js.map +1 -1
- package/lib/esm/contracts/ContractReader.mjs +5 -5
- package/lib/esm/contracts/ContractWriter.js.map +1 -1
- package/lib/esm/contracts/ContractWriter.mjs +4 -4
- package/lib/esm/contracts/deploy/ContractDeployer.js.map +1 -1
- package/lib/esm/contracts/deploy/ContractDeployer.mjs +4 -4
- package/lib/esm/contracts/deploy/Deployments.js.map +1 -1
- package/lib/esm/contracts/deploy/Deployments.mjs +36 -21
- package/lib/esm/contracts/deploy/proxy/$proxyDeploy.js.map +1 -1
- package/lib/esm/contracts/deploy/proxy/$proxyDeploy.mjs +13 -13
- package/lib/esm/contracts/deploy/proxy/ProxyDeployment.js.map +1 -1
- package/lib/esm/contracts/deploy/proxy/ProxyDeployment.mjs +22 -22
- package/lib/esm/contracts/deploy/storage/DeploymentsStorage.js.map +1 -1
- package/lib/esm/contracts/deploy/storage/DeploymentsStorage.mjs +15 -14
- package/lib/esm/contracts/utils/AbiDeserializer.js.map +1 -1
- package/lib/esm/contracts/utils/AbiDeserializer.mjs +4 -4
- package/lib/esm/contracts/utils/ContractBaseUtils.js.map +1 -1
- package/lib/esm/contracts/utils/ContractBaseUtils.mjs +3 -3
- package/lib/esm/evm/OpcodesWalker.js.map +1 -1
- package/lib/esm/evm/OpcodesWalker.mjs +1 -1
- package/lib/esm/explorer/BlockchainExplorer.js.map +1 -1
- package/lib/esm/explorer/BlockchainExplorer.mjs +1 -1
- package/lib/esm/explorer/BlockchainExplorerFactory.mjs +1 -1
- package/lib/esm/explorer/BlockchainExplorerStorage.js.map +1 -1
- package/lib/esm/explorer/BlockchainExplorerStorage.mjs +12 -12
- package/lib/esm/explorer/Evmscan.mjs +1 -1
- package/lib/esm/explorer/verifiers/FsHtmlVerifier.js.map +1 -1
- package/lib/esm/explorer/verifiers/FsHtmlVerifier.mjs +7 -7
- package/lib/esm/flashbots/FlashbotWeb3Client.js.map +1 -1
- package/lib/esm/flashbots/FlashbotWeb3Client.mjs +1 -1
- package/lib/esm/hardhat/HardhatProvider.js.map +1 -1
- package/lib/esm/hardhat/HardhatProvider.mjs +7 -7
- package/lib/esm/indexer/BlocksTxIndexer.js.map +1 -1
- package/lib/esm/indexer/BlocksTxIndexer.mjs +2 -2
- package/lib/esm/indexer/EventsIndexer.js.map +1 -1
- package/lib/esm/indexer/EventsIndexer.mjs +11 -11
- package/lib/esm/indexer/PendingTxIndexer.js.map +1 -1
- package/lib/esm/indexer/PendingTxIndexer.mjs +2 -2
- package/lib/esm/indexer/handlers/BlocksWalker.js.map +1 -1
- package/lib/esm/indexer/handlers/BlocksWalker.mjs +9 -9
- package/lib/esm/indexer/handlers/TxQueueLoader.mjs +1 -1
- package/lib/esm/indexer/storage/FsEventsIndexerStore.js.map +1 -1
- package/lib/esm/indexer/storage/FsEventsIndexerStore.mjs +3 -3
- package/lib/esm/indexer/storage/FsEventsStoreUtils.js.map +1 -1
- package/lib/esm/indexer/storage/FsEventsStoreUtils.mjs +1 -1
- package/lib/esm/json/JsonArrayMultiStore.js.map +1 -1
- package/lib/esm/json/JsonArrayMultiStore.mjs +1 -1
- package/lib/esm/json/JsonStoreFs.js.map +1 -1
- package/lib/esm/json/JsonStoreFs.mjs +1 -1
- package/lib/esm/rpc/$rpc.js.map +1 -1
- package/lib/esm/rpc/$rpc.mjs +2 -2
- package/lib/esm/rpc/Rpc.mjs +2 -2
- package/lib/esm/rpc/RpcBase.js.map +1 -1
- package/lib/esm/rpc/RpcBase.mjs +2 -2
- package/lib/esm/rpc/RpcContract.js.map +1 -1
- package/lib/esm/rpc/RpcContract.mjs +4 -3
- package/lib/esm/rpc/RpcSubscription.js.map +1 -1
- package/lib/esm/rpc/RpcSubscription.mjs +1 -1
- package/lib/esm/rpc/transports/compatibility/EIP1193Transport.js.map +1 -1
- package/lib/esm/rpc/transports/compatibility/EIP1193Transport.mjs +4 -4
- package/lib/esm/rpc/transports/compatibility/Web3Transport.js.map +1 -1
- package/lib/esm/rpc/transports/compatibility/Web3Transport.mjs +1 -1
- package/lib/esm/services/TimelockService/TimelockService.mjs +2 -2
- package/lib/esm/services/TimelockService/TimelockServiceFallbackSafe.mjs +2 -2
- package/lib/esm/solidity/SlotsDump.js.map +1 -1
- package/lib/esm/solidity/SlotsDump.mjs +1 -1
- package/lib/esm/solidity/SlotsParser/MappingSettersResolver.js.map +1 -1
- package/lib/esm/solidity/SlotsParser/MappingSettersResolver.mjs +3 -3
- package/lib/esm/solidity/SlotsParser/SourceFile.js.map +1 -1
- package/lib/esm/solidity/SlotsParser/SourceFile.mjs +3 -3
- package/lib/esm/solidity/SolidityParser.js.map +1 -1
- package/lib/esm/solidity/SolidityParser.mjs +1 -1
- package/lib/esm/solidity/SourceCodeProvider.js.map +1 -1
- package/lib/esm/solidity/SourceCodeProvider.mjs +1 -1
- package/lib/esm/solidity/storage/Accessor.js.map +1 -1
- package/lib/esm/solidity/storage/Accessor.mjs +1 -1
- package/lib/esm/solidity/storage/SlotFixedArray.js.map +1 -1
- package/lib/esm/solidity/storage/SlotFixedArray.mjs +1 -1
- package/lib/esm/solidity/storage/SlotsStorageTransport.js.map +1 -1
- package/lib/esm/solidity/storage/SlotsStorageTransport.mjs +3 -3
- package/lib/esm/solidity/storage/handlers/SlotBytesHandler.js.map +1 -1
- package/lib/esm/solidity/storage/handlers/SlotBytesHandler.mjs +1 -1
- package/lib/esm/solidity/storage/handlers/SlotDynamicArrayHandler.js.map +1 -1
- package/lib/esm/solidity/storage/handlers/SlotDynamicArrayHandler.mjs +1 -1
- package/lib/esm/solidity/storage/handlers/SlotFixedArrayHandler.js.map +1 -1
- package/lib/esm/solidity/storage/handlers/SlotFixedArrayHandler.mjs +1 -1
- package/lib/esm/solidity/storage/handlers/SlotValueConstantHandler.js.map +1 -1
- package/lib/esm/solidity/storage/handlers/SlotValueConstantHandler.mjs +1 -1
- package/lib/esm/solidity/storage/handlers/SlotValueHandler.js.map +1 -1
- package/lib/esm/solidity/storage/handlers/SlotValueHandler.mjs +1 -1
- package/lib/esm/solidity/storage/handlers/SlotValueImmutableHandler.js.map +1 -1
- package/lib/esm/solidity/storage/handlers/SlotValueImmutableHandler.mjs +4 -4
- package/lib/esm/tokens/TokenDataProvider.js.map +1 -1
- package/lib/esm/tokens/TokenDataProvider.mjs +2 -2
- package/lib/esm/tokens/TokenExchangeService.js.map +1 -1
- package/lib/esm/tokens/TokenExchangeService.mjs +1 -1
- package/lib/esm/tokens/TokenExchanges/AmmBase/V2/AmmPairV2Service.js.map +1 -1
- package/lib/esm/tokens/TokenExchanges/AmmBase/V2/AmmPairV2Service.mjs +2 -2
- package/lib/esm/tokens/TokenExchanges/AmmV2PriceQuote.js.map +1 -1
- package/lib/esm/tokens/TokenExchanges/AmmV2PriceQuote.mjs +2 -2
- package/lib/esm/tokens/TokenOracles/amm/AmmV1Oracle.js.map +1 -1
- package/lib/esm/tokens/TokenOracles/amm/AmmV1Oracle.mjs +2 -2
- package/lib/esm/tokens/TokenTransferService.js.map +1 -1
- package/lib/esm/tokens/TokenTransferService.mjs +2 -2
- package/lib/esm/tokens/TokensService.js.map +1 -1
- package/lib/esm/tokens/TokensService.mjs +1 -1
- package/lib/esm/txs/TxNonceManager.mjs +1 -1
- package/lib/esm/txs/TxWriter.js.map +1 -1
- package/lib/esm/txs/TxWriter.mjs +9 -0
- package/lib/esm/txs/conditional/GasWatcherTx.js.map +1 -1
- package/lib/esm/txs/conditional/GasWatcherTx.mjs +1 -1
- package/lib/esm/txs/receipt/TxLogParser.mjs +1 -1
- package/lib/esm/utils/$crypto.js.map +1 -1
- package/lib/esm/utils/$crypto.mjs +1 -1
- package/lib/esm/utils/$date.js.map +1 -1
- package/lib/esm/utils/$date.mjs +1 -1
- package/lib/esm/utils/$hex.mjs +1 -1
- package/lib/esm/utils/$logger.js.map +1 -1
- package/lib/esm/utils/$logger.mjs +1 -1
- package/lib/esm/utils/$machine.js.map +1 -1
- package/lib/esm/utils/$machine.mjs +2 -2
- package/lib/esm/utils/$require.js.map +1 -1
- package/lib/esm/utils/$traces.js.map +1 -1
- package/lib/esm/utils/$traces.mjs +1 -1
- package/lib/types/abi/abi-coder-packed.d.ts +1 -1
- package/lib/types/abi/abi-coder.d.ts +13 -13
- package/lib/types/abi/coders/abstract-coder.d.ts +14 -14
- package/lib/types/abi/fragments.d.ts +95 -95
- package/lib/types/blocks/BlockDateResolver.d.ts +7 -7
- package/lib/types/class/PackedRanges.d.ts +44 -44
- package/lib/types/clients/ClientPool.d.ts +10 -10
- package/lib/types/clients/WalletClient.d.ts +2 -2
- package/lib/types/clients/Web3Client.d.ts +6 -6
- package/lib/types/clients/Web3ClientFactory.d.ts +1 -1
- package/lib/types/clients/handlers/RateLimitGuard.d.ts +5 -5
- package/lib/types/clients/model/PromiEventWrap.d.ts +1 -1
- package/lib/types/clients/utils/$web3Abi.d.ts +1 -1
- package/lib/types/clients/utils/ClientErrorUtil.d.ts +1 -0
- package/lib/types/config/Config.d.ts +3 -2
- package/lib/types/contracts/ContractBase.d.ts +4 -4
- package/lib/types/contracts/ContractReader.d.ts +2 -2
- package/lib/types/contracts/ContractWriter.d.ts +3 -3
- package/lib/types/contracts/deploy/Deployments.d.ts +13 -14
- package/lib/types/contracts/deploy/storage/DeploymentsStorage.d.ts +2 -0
- package/lib/types/explorer/BlockchainExplorerFactory.d.ts +1 -1
- package/lib/types/explorer/Evmscan.d.ts +1 -1
- package/lib/types/indexer/BlocksTxIndexer.d.ts +4 -4
- package/lib/types/indexer/EventsIndexer.d.ts +4 -4
- package/lib/types/indexer/PendingTxIndexer.d.ts +1 -1
- package/lib/types/indexer/handlers/BlocksWalker.d.ts +2 -2
- package/lib/types/indexer/storage/FsEventsIndexerStore.d.ts +4 -4
- package/lib/types/ns/providers/INsProvider.d.ts +1 -1
- package/lib/types/rpc/Rpc.d.ts +2 -2
- package/lib/types/services/TimelockService/ITimelockService.d.ts +2 -2
- package/lib/types/services/TimelockService/TimelockService.d.ts +2 -2
- package/lib/types/services/TimelockService/TimelockServiceFallbackSafe.d.ts +2 -2
- package/lib/types/solidity/SlotsParser/SourceFile.d.ts +1 -1
- package/lib/types/solidity/storage/SlotFixedArray.d.ts +1 -1
- package/lib/types/tokens/TokenDataProvider.d.ts +2 -2
- package/lib/types/tokens/TokensService.d.ts +1 -1
- package/lib/types/txs/ITxBuilderOptions.d.ts +1 -1
- package/lib/types/txs/TxNonceManager.d.ts +1 -1
- package/lib/types/txs/TxWriter.d.ts +4 -4
- package/lib/types/txs/receipt/TxLogParser.d.ts +1 -1
- package/lib/types/utils/$date.d.ts +1 -1
- package/lib/types/utils/$hex.d.ts +1 -1
- package/lib/types/utils/$require.d.ts +8 -8
- package/package.json +1 -1
- package/readme.md +105 -83
- package/src/abi/$abiCoder.ts +1 -1
- package/src/abi/Logger.ts +1 -1
- package/src/abi/abi-coder-packed.ts +3 -3
- package/src/abi/abi-coder.ts +16 -16
- package/src/abi/coders/abstract-coder.ts +36 -36
- package/src/abi/fragments.ts +137 -137
- package/src/blocks/BlockDateResolver.ts +9 -9
- package/src/bridges/hop/HopBridge.ts +1 -1
- package/src/class/PackedRanges.ts +46 -46
- package/src/clients/ClientEventsStream.ts +1 -1
- package/src/clients/ClientPool.ts +38 -38
- package/src/clients/WalletClient.ts +3 -3
- package/src/clients/Web3BatchRequests.ts +3 -3
- package/src/clients/Web3Client.ts +21 -21
- package/src/clients/Web3ClientFactory.ts +1 -1
- package/src/clients/compatibility/Web3.ts +2 -2
- package/src/clients/handlers/RateLimitGuard.ts +16 -16
- package/src/clients/interfaces/IWeb3Client.ts +2 -2
- package/src/clients/model/PromiEventWrap.ts +1 -1
- package/src/clients/utils/$web3Abi.ts +2 -2
- package/src/clients/utils/ClientErrorUtil.ts +4 -0
- package/src/config/Config.ts +4 -3
- package/src/contracts/Contract.ts +1 -1
- package/src/contracts/ContractAbiProvider.ts +6 -6
- package/src/contracts/ContractBase.ts +14 -14
- package/src/contracts/ContractProvider.ts +1 -1
- package/src/contracts/ContractReader.ts +7 -7
- package/src/contracts/ContractWriter.ts +4 -4
- package/src/contracts/deploy/ContractDeployer.ts +4 -4
- package/src/contracts/deploy/ContractDeployment.ts +1 -1
- package/src/contracts/deploy/Deployments.ts +69 -56
- package/src/contracts/deploy/proxy/$proxyDeploy.ts +14 -14
- package/src/contracts/deploy/proxy/ProxyDeployment.ts +22 -22
- package/src/contracts/deploy/storage/DeploymentsStorage.ts +21 -18
- package/src/contracts/utils/AbiDeserializer.ts +4 -4
- package/src/contracts/utils/ContractBaseUtils.ts +3 -3
- package/src/erc4337/models/UserOperation.ts +2 -2
- package/src/evm/OpcodesWalker.ts +1 -1
- package/src/explorer/BlockchainExplorer.ts +1 -1
- package/src/explorer/BlockchainExplorerFactory.ts +1 -1
- package/src/explorer/BlockchainExplorerStorage.ts +12 -12
- package/src/explorer/Evmscan.ts +1 -1
- package/src/explorer/verifiers/FsHtmlVerifier.ts +7 -7
- package/src/flashbots/FlashbotWeb3Client.ts +1 -1
- package/src/hardhat/HardhatProvider.ts +7 -7
- package/src/indexer/BlocksTxIndexer.ts +6 -6
- package/src/indexer/EventsIndexer.ts +20 -20
- package/src/indexer/PendingTxIndexer.ts +3 -3
- package/src/indexer/handlers/BlocksWalker.ts +9 -9
- package/src/indexer/handlers/TxQueueLoader.ts +1 -1
- package/src/indexer/storage/FsEventsIndexerStore.ts +9 -9
- package/src/indexer/storage/FsEventsMetaStore.ts +1 -1
- package/src/indexer/storage/FsEventsStoreUtils.ts +1 -1
- package/src/json/JsonArrayMultiStore.ts +1 -1
- package/src/json/JsonStoreFs.ts +1 -1
- package/src/ns/providers/INsProvider.ts +1 -1
- package/src/rpc/$rpc.ts +2 -2
- package/src/rpc/Rpc.ts +2 -2
- package/src/rpc/RpcBase.ts +2 -2
- package/src/rpc/RpcContract.ts +6 -6
- package/src/rpc/RpcSubscription.ts +1 -1
- package/src/rpc/transports/compatibility/EIP1193Transport.ts +4 -4
- package/src/rpc/transports/compatibility/Web3Transport.ts +1 -1
- package/src/services/TimelockService/ITimelockService.ts +2 -2
- package/src/services/TimelockService/TimelockService.ts +2 -2
- package/src/services/TimelockService/TimelockServiceFallbackSafe.ts +2 -2
- package/src/solidity/SlotsDump.ts +1 -1
- package/src/solidity/SlotsParser/MappingSettersResolver.ts +3 -3
- package/src/solidity/SlotsParser/SourceFile.ts +3 -3
- package/src/solidity/SolidityParser.ts +1 -1
- package/src/solidity/SourceCodeProvider.ts +1 -1
- package/src/solidity/storage/Accessor.spec.ts +1 -1
- package/src/solidity/storage/Accessor.ts +1 -1
- package/src/solidity/storage/SlotDynamicArray.ts +1 -1
- package/src/solidity/storage/SlotFixedArray.ts +1 -1
- package/src/solidity/storage/SlotsStorageTransport.ts +3 -3
- package/src/solidity/storage/handlers/SlotBytesHandler.ts +1 -1
- package/src/solidity/storage/handlers/SlotDynamicArrayHandler.ts +1 -1
- package/src/solidity/storage/handlers/SlotFixedArrayHandler.ts +1 -1
- package/src/solidity/storage/handlers/SlotValueConstantHandler.ts +1 -1
- package/src/solidity/storage/handlers/SlotValueHandler.ts +1 -1
- package/src/solidity/storage/handlers/SlotValueImmutableHandler.ts +4 -4
- package/src/tokens/TokenDataProvider.ts +2 -2
- package/src/tokens/TokenExchangeService.ts +1 -1
- package/src/tokens/TokenExchanges/AmmBase/V2/AmmPairV2Service.ts +2 -2
- package/src/tokens/TokenExchanges/AmmV2PriceQuote.ts +2 -2
- package/src/tokens/TokenOracles/amm/AmmV1Oracle.ts +2 -2
- package/src/tokens/TokenTransferService.ts +2 -2
- package/src/tokens/TokensService.ts +1 -1
- package/src/txs/ITxBuilderOptions.ts +1 -1
- package/src/txs/TxNonceManager.ts +1 -1
- package/src/txs/TxWriter.ts +15 -4
- package/src/txs/agents/BatchAgent.ts +1 -1
- package/src/txs/conditional/GasWatcherTx.ts +1 -1
- package/src/txs/receipt/TxLogParser.ts +1 -1
- package/src/utils/$crypto.ts +1 -1
- package/src/utils/$date.ts +1 -1
- package/src/utils/$hex.ts +1 -1
- package/src/utils/$logger.ts +1 -1
- package/src/utils/$machine.ts +2 -2
- package/src/utils/$require.ts +10 -10
- package/src/utils/$traces.ts +1 -1
- package/src/wallets/EIP6963ProviderFactory.ts +4 -4
|
@@ -24,20 +24,20 @@ export class EventsIndexer <TContract extends ContractBase> {
|
|
|
24
24
|
public storeMeta: IEventsIndexerMetaStore
|
|
25
25
|
|
|
26
26
|
constructor(public contract: TContract, public options: {
|
|
27
|
-
// Load events from
|
|
27
|
+
// Load events from a contract deployed to multiple addresses
|
|
28
28
|
addresses?: TAddress[]
|
|
29
29
|
name?: string
|
|
30
30
|
initialBlockNumber?: number
|
|
31
31
|
store?: IEventsIndexerStore
|
|
32
32
|
storeMeta?: IEventsIndexerMetaStore
|
|
33
33
|
fs?: {
|
|
34
|
-
/**
|
|
34
|
+
/** Used as the base directory. Later, the contract name and address hash are appended */
|
|
35
35
|
directory?: string
|
|
36
36
|
|
|
37
|
-
/**
|
|
37
|
+
/** Events are split into multiple files by block range */
|
|
38
38
|
// @default ~1week
|
|
39
39
|
rangeSeconds?: number
|
|
40
|
-
// @default
|
|
40
|
+
// @default Taken from Web3Client
|
|
41
41
|
blockTimeAvg?: number
|
|
42
42
|
}
|
|
43
43
|
}) {
|
|
@@ -116,9 +116,9 @@ export class EventsIndexer <TContract extends ContractBase> {
|
|
|
116
116
|
> (
|
|
117
117
|
event: TLogName | TLogName[] | '*',
|
|
118
118
|
options?: {
|
|
119
|
-
//
|
|
119
|
+
// Includes block
|
|
120
120
|
fromBlock?: number
|
|
121
|
-
//
|
|
121
|
+
// Includes block
|
|
122
122
|
toBlock?: number
|
|
123
123
|
blockRangeLimits?: WClient['blockRangeLimits']
|
|
124
124
|
params?: Partial<TContract['Types']['Events'][TLogName]['outputParams']>
|
|
@@ -126,9 +126,9 @@ export class EventsIndexer <TContract extends ContractBase> {
|
|
|
126
126
|
): AsyncGenerator<
|
|
127
127
|
TLogsRangeProgress<
|
|
128
128
|
ITxLogItem<GetTypes<TContract>['Events'][TLogName]['outputParams'], string>
|
|
129
|
-
> //
|
|
130
|
-
, void // void
|
|
131
|
-
, void // next
|
|
129
|
+
> // Next result
|
|
130
|
+
, void // Returns void
|
|
131
|
+
, void // next does not receive any parameters
|
|
132
132
|
> {
|
|
133
133
|
let contract = this.contract;
|
|
134
134
|
let client = contract.client;
|
|
@@ -184,10 +184,10 @@ export class EventsIndexer <TContract extends ContractBase> {
|
|
|
184
184
|
let metas = await this.storeMeta.fetch();
|
|
185
185
|
let lastBlock = (params?.fromBlock ?? 0) - 1;
|
|
186
186
|
if (lastBlock < 0) {
|
|
187
|
-
//
|
|
187
|
+
// Remove all metadata
|
|
188
188
|
await this.storeMeta.removeMany(metas)
|
|
189
189
|
} else {
|
|
190
|
-
//
|
|
190
|
+
// Adjust lastBlock and ranges
|
|
191
191
|
metas.forEach(x => {
|
|
192
192
|
x.lastBlock = Math.min(x.lastBlock, lastBlock);
|
|
193
193
|
x.ranges = PackedRanges.pickTo(x.ranges, x.lastBlock);
|
|
@@ -264,11 +264,11 @@ export class EventsIndexer <TContract extends ContractBase> {
|
|
|
264
264
|
params: options?.params,
|
|
265
265
|
});
|
|
266
266
|
infos.cached = cachedStreamedBuffer.length;
|
|
267
|
-
// Note: we
|
|
267
|
+
// Note: we do not emit progress right away to preserve order in the progress callback
|
|
268
268
|
// Consider: we have blocks [100-150] in cache
|
|
269
269
|
// Requesting range: [50-200]
|
|
270
270
|
// Later we fetch [50-100) and (150-200]
|
|
271
|
-
// The cached response will be inserted after block
|
|
271
|
+
// The cached response will be inserted after block 100 to keep a consistent order
|
|
272
272
|
// if (arr?.length > 0) {
|
|
273
273
|
// let lastBlock = arr[arr.length - 1].blockNumber;
|
|
274
274
|
// await options.onProgress({
|
|
@@ -342,12 +342,12 @@ export class EventsIndexer <TContract extends ContractBase> {
|
|
|
342
342
|
}
|
|
343
343
|
|
|
344
344
|
if (options?.onProgress) {
|
|
345
|
-
// completed must be set to true only when the last
|
|
345
|
+
// completed must be set to true only when the last range completes
|
|
346
346
|
chunk.completed = isCompleted;
|
|
347
347
|
if (cachedStreamedBuffer.length > 0) {
|
|
348
348
|
if (chunk.logs.length > 0) {
|
|
349
|
-
// Preserve
|
|
350
|
-
//
|
|
349
|
+
// Preserve log order in the progress callback:
|
|
350
|
+
// Insert cached.blockNumber < fetched.blockNumber first
|
|
351
351
|
let [ first ] = chunk.logs;
|
|
352
352
|
let i = 0;
|
|
353
353
|
for (; i < cachedStreamedBuffer.length; i++) {
|
|
@@ -362,7 +362,7 @@ export class EventsIndexer <TContract extends ContractBase> {
|
|
|
362
362
|
}
|
|
363
363
|
}
|
|
364
364
|
if (isCompleted) {
|
|
365
|
-
//
|
|
365
|
+
// Insert everything left from cache
|
|
366
366
|
chunk.logs = chunk.logs.concat(cachedStreamedBuffer);
|
|
367
367
|
cachedStreamedBuffer = [];
|
|
368
368
|
}
|
|
@@ -380,11 +380,11 @@ export class EventsIndexer <TContract extends ContractBase> {
|
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
382
|
|
|
383
|
-
// Upsert final
|
|
383
|
+
// Upsert final state. If the buffer is empty, we still persist the "toBlock" value and ranges
|
|
384
384
|
await this.upsert(buffer, events, ranges, fromBlock, toBlock, options);
|
|
385
385
|
|
|
386
386
|
if (isStreamed && typeof options?.onProgress === 'function' && (cachedStreamedBuffer.length > 0 || ranges.load.length === 0)) {
|
|
387
|
-
// When streaming, we MUST call onProgress, even if there are no ranges to load
|
|
387
|
+
// When streaming, we MUST call onProgress, even if there are no ranges to load
|
|
388
388
|
let lastBlock = cachedStreamedBuffer.length > 0
|
|
389
389
|
? cachedStreamedBuffer[cachedStreamedBuffer.length - 1].blockNumber
|
|
390
390
|
: toBlock;
|
|
@@ -453,7 +453,7 @@ export class EventsIndexer <TContract extends ContractBase> {
|
|
|
453
453
|
let explorer = await BlockchainExplorerFactory.get(this.contract.client.platform);
|
|
454
454
|
let deployment = new ContractCreationResolver(client, explorer);
|
|
455
455
|
let contractInfo = await deployment.getInfo(this.contract.address);
|
|
456
|
-
return $require.Number(contractInfo.block, `Contract deployment not resolved from the blockchain explorer`);
|
|
456
|
+
return $require.Number(contractInfo.block, `Contract deployment was not resolved from the blockchain explorer`);
|
|
457
457
|
}
|
|
458
458
|
return 0;
|
|
459
459
|
}
|
|
@@ -9,7 +9,7 @@ import { TEth } from '@dequanto/models/TEth';
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
export interface IPendingTxIndexerOptions {
|
|
12
|
-
/**
|
|
12
|
+
/** Indexer name */
|
|
13
13
|
name?: string
|
|
14
14
|
}
|
|
15
15
|
export type TPendingTxListener = (client: Web3Client, tx: TEth.Tx) => Promise<void>
|
|
@@ -33,7 +33,7 @@ export class PendingTxIndexer {
|
|
|
33
33
|
txCount: 0,
|
|
34
34
|
txNulls: 0,
|
|
35
35
|
|
|
36
|
-
//
|
|
36
|
+
// Transaction not seen in the mempool
|
|
37
37
|
txPrivateCount: 0,
|
|
38
38
|
}
|
|
39
39
|
|
|
@@ -112,7 +112,7 @@ export class PendingTxIndexer {
|
|
|
112
112
|
delete this.mempoolHash[hash];
|
|
113
113
|
continue;
|
|
114
114
|
}
|
|
115
|
-
//Not seen in memhash
|
|
115
|
+
// Not seen in memhash
|
|
116
116
|
this.status.txPrivateCount++;
|
|
117
117
|
this.status.txCount++;
|
|
118
118
|
this.mempoolHash[hash] = 1;
|
|
@@ -76,7 +76,7 @@ export class BlocksWalker {
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
if (to != null && from == null) {
|
|
79
|
-
throw new Error(`
|
|
79
|
+
throw new Error(`fromBlock must be set when toBlock (${to}) is present`);
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
this.walker.setFrom(
|
|
@@ -86,8 +86,8 @@ export class BlocksWalker {
|
|
|
86
86
|
await this.getBlockNumber(to)
|
|
87
87
|
);
|
|
88
88
|
|
|
89
|
-
$require.Number(this.ranges.from, '
|
|
90
|
-
$require.Number(this.ranges.to, '
|
|
89
|
+
$require.Number(this.ranges.from, 'from must be a number');
|
|
90
|
+
$require.Number(this.ranges.to, 'to must be a number');
|
|
91
91
|
|
|
92
92
|
this.walker.process();
|
|
93
93
|
if (this.params.logProgress !== false) {
|
|
@@ -97,8 +97,8 @@ export class BlocksWalker {
|
|
|
97
97
|
|
|
98
98
|
|
|
99
99
|
/**
|
|
100
|
-
* Can be called each time we get a new block from blockchain,
|
|
101
|
-
* the walker will process its current blocks
|
|
100
|
+
* Can be called each time we get a new block from the blockchain,
|
|
101
|
+
* the walker will process its current blocks up to the specified number
|
|
102
102
|
* @param nr Number is not included: [from, end)
|
|
103
103
|
*/
|
|
104
104
|
async processUntil (nr: number) {
|
|
@@ -180,7 +180,7 @@ export class BlocksWalker {
|
|
|
180
180
|
|
|
181
181
|
private async processBlocks (nrs: number[]) {
|
|
182
182
|
|
|
183
|
-
//
|
|
183
|
+
// Read blocks and transactions
|
|
184
184
|
let start = Date.now();
|
|
185
185
|
let blocks = await this.client.getBlocks(nrs);
|
|
186
186
|
|
|
@@ -245,7 +245,7 @@ class RangeWalker {
|
|
|
245
245
|
threads: 1,
|
|
246
246
|
batch: 1,
|
|
247
247
|
timeout: 20000,
|
|
248
|
-
//
|
|
248
|
+
// Log every N ms
|
|
249
249
|
logTimeWindow: 5000,
|
|
250
250
|
};
|
|
251
251
|
|
|
@@ -317,7 +317,7 @@ class RangeWalker {
|
|
|
317
317
|
|
|
318
318
|
let { from } = this.range;
|
|
319
319
|
if (from != null && from > nr) {
|
|
320
|
-
throw new Error(`
|
|
320
|
+
throw new Error(`to (${nr}) must be greater than from (${from})`);
|
|
321
321
|
}
|
|
322
322
|
this.range.to = nr;
|
|
323
323
|
}
|
|
@@ -327,7 +327,7 @@ class RangeWalker {
|
|
|
327
327
|
this.range.to = to;
|
|
328
328
|
|
|
329
329
|
if (this.range.from == null) {
|
|
330
|
-
//
|
|
330
|
+
// If the walker was started by listening to incoming mined blocks
|
|
331
331
|
this.range.from = to;
|
|
332
332
|
}
|
|
333
333
|
}
|
|
@@ -22,21 +22,21 @@ export class FsEventsIndexerStore <T extends ContractBase> implements IEventsInd
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
constructor(public contract: T, public options: {
|
|
25
|
-
// Load events from
|
|
25
|
+
// Load events from a contract deployed to multiple addresses
|
|
26
26
|
addresses?: TAddress[]
|
|
27
27
|
name?: string
|
|
28
28
|
initialBlockNumber?: number
|
|
29
29
|
fs?: {
|
|
30
|
-
/** Base directory
|
|
30
|
+
/** Base directory when the path is calculated from chain, name, and addresses */
|
|
31
31
|
directory?: string
|
|
32
32
|
|
|
33
|
-
/** Relative final directory path to
|
|
33
|
+
/** Relative final directory path to use as is for store files */
|
|
34
34
|
path?: string
|
|
35
35
|
|
|
36
|
-
//
|
|
37
|
-
//
|
|
36
|
+
// Events are split into multiple files by block range
|
|
37
|
+
// Default ~1week
|
|
38
38
|
rangeSeconds?: number
|
|
39
|
-
//
|
|
39
|
+
// Default is taken from Web3Client
|
|
40
40
|
blockTimeAvg?: number
|
|
41
41
|
|
|
42
42
|
// Use a single file. Deprecated, used for migration only
|
|
@@ -109,7 +109,7 @@ export class FsEventsIndexerStore <T extends ContractBase> implements IEventsInd
|
|
|
109
109
|
private map (x): ITxLogItem<any> {
|
|
110
110
|
|
|
111
111
|
let abi = this.abi[x.event];
|
|
112
|
-
$require.notNull(abi, `
|
|
112
|
+
$require.notNull(abi, `ABI for ${x.event} was not found`)
|
|
113
113
|
|
|
114
114
|
let blockNumber = Math.floor(x.id / 100000);
|
|
115
115
|
let logIndex = x.id % 100000;
|
|
@@ -126,7 +126,7 @@ export class FsEventsIndexerStore <T extends ContractBase> implements IEventsInd
|
|
|
126
126
|
private serialize (x: ITxLogItem<any>) {
|
|
127
127
|
return {
|
|
128
128
|
...x,
|
|
129
|
-
//
|
|
129
|
+
// Remove redundant data
|
|
130
130
|
arguments: void 0,
|
|
131
131
|
blockNumber: void 0,
|
|
132
132
|
logIndex: void 0,
|
|
@@ -139,7 +139,7 @@ export class FsEventsIndexerStore <T extends ContractBase> implements IEventsInd
|
|
|
139
139
|
|
|
140
140
|
|
|
141
141
|
namespace EventAbiInputs {
|
|
142
|
-
//
|
|
142
|
+
// Mainly converts BigInt from JSON
|
|
143
143
|
|
|
144
144
|
export function deserialize (params: Record<string, any>, abi: TAbiItem): Record<string, any> {
|
|
145
145
|
let inputs = alot(abi.inputs).toDictionary(x => x.name, x => x);
|
|
@@ -14,7 +14,7 @@ export class FsEventsMetaStore <T extends ContractBase> implements IEventsIndexe
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
constructor(private contract: T, private options: {
|
|
17
|
-
// Load events from
|
|
17
|
+
// Load events from a contract deployed to multiple addresses
|
|
18
18
|
addresses?: TAddress[]
|
|
19
19
|
name?: string
|
|
20
20
|
fs?: {
|
|
@@ -15,7 +15,7 @@ export namespace FsEventsStoreUtils {
|
|
|
15
15
|
addresses?: TAddress[]
|
|
16
16
|
}): string {
|
|
17
17
|
if (options?.path) {
|
|
18
|
-
$require.True(options.path.endsWith('/'), `Path for the events store
|
|
18
|
+
$require.True(options.path.endsWith('/'), `Path for the events store must end with '/'`);
|
|
19
19
|
return options.path;
|
|
20
20
|
}
|
|
21
21
|
|
|
@@ -22,7 +22,7 @@ export class JsonArrayMultiStore<T> {
|
|
|
22
22
|
constructor (public options: IMultiStoreOptions<T>) {
|
|
23
23
|
$require.Function(this.options.groupKey, `Expect a method to get the group key for an entry`);
|
|
24
24
|
$require.Number(this.options.groupSize, `Expect a size for the group`);
|
|
25
|
-
$require.True(this.options.path.endsWith('/'),
|
|
25
|
+
$require.True(this.options.path.endsWith('/'), `${this.options.path} must end with a slash, as it will be used as a folder`);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
async query(filter?: {
|
package/src/json/JsonStoreFs.ts
CHANGED
|
@@ -263,7 +263,7 @@ class LocalStorageTransport implements ITransport {
|
|
|
263
263
|
this.global.localStorage.removeItem(this.path);
|
|
264
264
|
}
|
|
265
265
|
async exists (): Promise<boolean> {
|
|
266
|
-
// To prevent
|
|
266
|
+
// To prevent duplicate loads with "getItem", assume the item exists; later in readAsync the NULL will be handled
|
|
267
267
|
return true;
|
|
268
268
|
}
|
|
269
269
|
async watch (watcherFn: (path?: string) => any) {
|
package/src/rpc/$rpc.ts
CHANGED
|
@@ -29,7 +29,7 @@ export namespace $rpc {
|
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
//
|
|
32
|
+
// Wait for a receipt
|
|
33
33
|
export async function waitForReceipt (rpc: Rpc, hash: TEth.Hex): Promise<TEth.TxReceipt> {
|
|
34
34
|
let knownTx = false;
|
|
35
35
|
let startedAt = Date.now();
|
|
@@ -41,7 +41,7 @@ export namespace $rpc {
|
|
|
41
41
|
if (tx == null) {
|
|
42
42
|
let ms = Date.now() - startedAt;
|
|
43
43
|
if (ms > MEM_POOL_TIMEOUT) {
|
|
44
|
-
return [ new Error(`Transaction [${hash}] not found in mempool after ${MEM_POOL_TIMEOUT}ms`) ];
|
|
44
|
+
return [ new Error(`Transaction [${hash}] was not found in the mempool after ${MEM_POOL_TIMEOUT}ms`) ];
|
|
45
45
|
}
|
|
46
46
|
return [ null ];
|
|
47
47
|
}
|
package/src/rpc/Rpc.ts
CHANGED
|
@@ -146,7 +146,7 @@ eth_accounts(): Promise<TEth.Address[]> {
|
|
|
146
146
|
|
|
147
147
|
/**
|
|
148
148
|
* Presents a structured data message for the user to sign. <metamask>
|
|
149
|
-
* Presents a data message for the user to sign in a structured and readable format and returns the signed response. Introduced
|
|
149
|
+
* Presents a data message for the user to sign in a structured and readable format and returns the signed response. Introduced by [EIP-712](https://eips.ethereum.org/EIPS/eip-712)
|
|
150
150
|
* @param address - The address of the requested signing account.
|
|
151
151
|
* @param typedData -
|
|
152
152
|
* @returns Signature -
|
|
@@ -239,7 +239,7 @@ eth_estimateGas(transaction: DataLike<RpcTypes.GenericTransaction>, block?: Data
|
|
|
239
239
|
* Returns transaction base fee per gas and effective priority fee per gas for the requested/supported block range.
|
|
240
240
|
* @param blockCount - Requested range of blocks. Clients will return less than the requested range if not all blocks are available.
|
|
241
241
|
* @param newestBlock - Highest block of the requested range.
|
|
242
|
-
* @param rewardPercentiles - A monotonically increasing list of percentile values. For each block in the requested range, the transactions will be sorted in ascending order by effective tip per gas and the
|
|
242
|
+
* @param rewardPercentiles - A monotonically increasing list of percentile values. For each block in the requested range, the transactions will be sorted in ascending order by effective tip per gas and the corresponding effective tip for the percentile will be determined, accounting for gas consumed
|
|
243
243
|
* @returns feeHistoryResult - Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.
|
|
244
244
|
*/
|
|
245
245
|
eth_feeHistory(blockCount: bigint, newestBlock: DataLike<RpcTypes.BlockNumberOrTag>, rewardPercentiles: number[]): Promise<{
|
package/src/rpc/RpcBase.ts
CHANGED
|
@@ -45,7 +45,7 @@ export abstract class RpcBase {
|
|
|
45
45
|
let body = arr.map(req => this._wrapBody(req));
|
|
46
46
|
let resp = await this._transport.request(body);
|
|
47
47
|
if (Array.isArray(resp) === false && arr.length === 1 && 'error' in resp === false && 'result' in resp === true) {
|
|
48
|
-
// Some RPCs return a single response instead of an array for
|
|
48
|
+
// Some RPCs return a single response instead of an array for one RpcAction in a batch
|
|
49
49
|
resp = [ resp ];
|
|
50
50
|
}
|
|
51
51
|
if (Array.isArray(resp) === false) {
|
|
@@ -53,7 +53,7 @@ export abstract class RpcBase {
|
|
|
53
53
|
let error = (resp as any).error;
|
|
54
54
|
throw new RpcError(error);
|
|
55
55
|
}
|
|
56
|
-
throw new Error(`RpcBatch: invalid response, array
|
|
56
|
+
throw new Error(`RpcBatch: invalid response, expected an array: ${ JSON.stringify(resp) }`);
|
|
57
57
|
}
|
|
58
58
|
return resp.map((resp, i) => {
|
|
59
59
|
let req = arr[i];
|
package/src/rpc/RpcContract.ts
CHANGED
|
@@ -70,7 +70,7 @@ export class RpcContract {
|
|
|
70
70
|
let requests = await this.getCallRequestsRaw(req);
|
|
71
71
|
try {
|
|
72
72
|
let responseArr = await this.client.batch(requests.map(x => x.methodRequest), options);
|
|
73
|
-
|
|
73
|
+
$require.eq(requests.length, responseArr.length, `Invalid response count`);
|
|
74
74
|
return responseArr.map((resp, i) => {
|
|
75
75
|
let abi = requests[i].methodAbi;
|
|
76
76
|
if (abi == null) {
|
|
@@ -137,12 +137,12 @@ export class RpcContract {
|
|
|
137
137
|
}
|
|
138
138
|
|
|
139
139
|
if (data == null) {
|
|
140
|
-
$require.notNull(abiItem, `Method ${method} not found. Available methods: ${abiArr?.map(x => x.name) }`);
|
|
140
|
+
$require.notNull(abiItem, `Method ${method} was not found. Available methods: ${abiArr?.map(x => x.name) }`);
|
|
141
141
|
data = $abiUtils.serializeMethodCallData(abiItem, params ?? []);
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
if (blockNumber instanceof Date) {
|
|
145
|
-
let client = $require.notNull(options?.client, `
|
|
145
|
+
let client = $require.notNull(options?.client, `Block number is a Date: ${blockNumber}, client is required`);
|
|
146
146
|
let resolver = di.resolve(BlockDateResolver, client);
|
|
147
147
|
blockNumber = await resolver.getBlockNumberFor(blockNumber);
|
|
148
148
|
}
|
|
@@ -162,7 +162,7 @@ export class RpcContract {
|
|
|
162
162
|
// async submit (contract: TRpcContract, req: TRpcContractCallReq) {
|
|
163
163
|
// let abis = contract.abi;
|
|
164
164
|
// let abi = abis.find(x => x.name === req.method);
|
|
165
|
-
// $require.notNull(abi, `Method ${req.method} not found. Available methods: ${abis.map(x => x.name).join(', ')}`);
|
|
165
|
+
// $require.notNull(abi, `Method ${req.method} was not found. Available methods: ${abis.map(x => x.name).join(', ')}`);
|
|
166
166
|
|
|
167
167
|
// let sig = $abiUtils.getMethodSignature(abi);
|
|
168
168
|
// let data = $abiUtils.encode(abi.inputs, req.params);
|
|
@@ -178,7 +178,7 @@ export class RpcContract {
|
|
|
178
178
|
// let results = Array.isArray(result) === false
|
|
179
179
|
// ? [ result ]
|
|
180
180
|
// : (outputs.length === 1
|
|
181
|
-
// //
|
|
181
|
+
// // Decode array as a single value
|
|
182
182
|
// ? [ result ]
|
|
183
183
|
// : result
|
|
184
184
|
// );
|
|
@@ -200,7 +200,7 @@ namespace utils {
|
|
|
200
200
|
if (outputs.length > 1) {
|
|
201
201
|
let isNamedTuple = outputs.every(x => x.name != null && x.name !== '');
|
|
202
202
|
if (isNamedTuple) {
|
|
203
|
-
//
|
|
203
|
+
// Return as an object
|
|
204
204
|
abi = [ { type: 'tuple', components: outputs, name: null } ];
|
|
205
205
|
isDynamic = false;
|
|
206
206
|
}
|
|
@@ -34,7 +34,7 @@ export class RpcSubscription<T> extends SubjectStream<T> implements TTransport.S
|
|
|
34
34
|
|
|
35
35
|
static createMapping <T> (subscription: TTransport.Subscription<any>, transport: TTransport.Transport, mapper: (x: any) => any): RpcSubscription<T> {
|
|
36
36
|
let stream = new RpcSubscription<T>(subscription.id, transport, mapper);
|
|
37
|
-
//@TODO
|
|
37
|
+
//@TODO Fix 'any'
|
|
38
38
|
stream.fromStream(subscription as any);
|
|
39
39
|
return stream;
|
|
40
40
|
}
|
|
@@ -21,7 +21,7 @@ export class EIP1193Transport implements TTransport.Transport {
|
|
|
21
21
|
async request(req: TTransport.Request | TTransport.Request[]): Promise<any> {
|
|
22
22
|
|
|
23
23
|
if (Array.isArray(req)) {
|
|
24
|
-
// Hardhat in-memory
|
|
24
|
+
// Hardhat in-memory does not support batch requests
|
|
25
25
|
return alot(req).mapAsync(async x => {
|
|
26
26
|
return this.request(x);
|
|
27
27
|
}).toArrayAsync({ threads: 5 });
|
|
@@ -39,13 +39,13 @@ export class EIP1193Transport implements TTransport.Transport {
|
|
|
39
39
|
result
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
-
throw new Error(`Invalid transport
|
|
42
|
+
throw new Error(`Invalid transport: no sendAsync or request methods`);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
async subscribe(req: TTransport.Request): Promise<TTransport.Subscription<any>> {
|
|
46
|
-
throw new Error('Method not implemented
|
|
46
|
+
throw new Error('Method not implemented');
|
|
47
47
|
}
|
|
48
48
|
unsubscribe(req: TTransport.Request & { method: 'eth_unsubscribe'; params: [number]; }): Promise<RpcSubscription<any>> {
|
|
49
|
-
throw new Error('Method not implemented
|
|
49
|
+
throw new Error('Method not implemented');
|
|
50
50
|
}
|
|
51
51
|
}
|
|
@@ -26,6 +26,6 @@ export class Web3Transport implements TTransport.Transport {
|
|
|
26
26
|
return subscription as any as TTransport.Subscription<any>;
|
|
27
27
|
}
|
|
28
28
|
unsubscribe(req: TTransport.Request & { method: 'eth_unsubscribe'; params: [number]; }): Promise<RpcSubscription<any>> {
|
|
29
|
-
throw new Error('Method not implemented
|
|
29
|
+
throw new Error('Method not implemented');
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -23,7 +23,7 @@ export interface ITimelockService {
|
|
|
23
23
|
}>
|
|
24
24
|
/** Schedules-Wait-Execute a task distinguished by the unique task name
|
|
25
25
|
*
|
|
26
|
-
* 1. if schedule
|
|
26
|
+
* 1. if the schedule does not exist, create it
|
|
27
27
|
* 2. if schedule date NOT yet ready, exit
|
|
28
28
|
* 3. if schedule date IS ready, execute it
|
|
29
29
|
* 4. if executed, exit
|
|
@@ -46,7 +46,7 @@ export interface ITimelockService {
|
|
|
46
46
|
|
|
47
47
|
/** Schedules-Wait-Execute a task distinguished by the unique task name
|
|
48
48
|
*
|
|
49
|
-
* 1. if schedule
|
|
49
|
+
* 1. if the schedule does not exist, create it
|
|
50
50
|
* 2. if schedule date NOT yet ready, exit
|
|
51
51
|
* 3. if schedule date IS ready, execute it
|
|
52
52
|
* 4. if executed, exit
|
|
@@ -132,7 +132,7 @@ export class TimelockService implements ITimelockService {
|
|
|
132
132
|
|
|
133
133
|
/** Schedules-Wait-Execute a task distinguished by the unique task name
|
|
134
134
|
*
|
|
135
|
-
* 1. if schedule
|
|
135
|
+
* 1. if the schedule does not exist, create it
|
|
136
136
|
* 2. if schedule date NOT yet ready, exit
|
|
137
137
|
* 3. if schedule date IS ready, execute it
|
|
138
138
|
* 4. if executed, exit
|
|
@@ -180,7 +180,7 @@ export class TimelockService implements ITimelockService {
|
|
|
180
180
|
|
|
181
181
|
/** Schedules-Wait-Execute a task distinguished by the unique task name
|
|
182
182
|
*
|
|
183
|
-
* 1. if schedule
|
|
183
|
+
* 1. if the schedule does not exist, create it
|
|
184
184
|
* 2. if schedule date NOT yet ready, exit
|
|
185
185
|
* 3. if schedule date IS ready, execute it
|
|
186
186
|
* 4. if executed, exit
|
|
@@ -58,7 +58,7 @@ export class TimelockServiceFallbackSafe implements ITimelockService {
|
|
|
58
58
|
|
|
59
59
|
/** Schedules-Wait-Execute a task distinguished by the unique task name
|
|
60
60
|
*
|
|
61
|
-
* 1. if schedule
|
|
61
|
+
* 1. if the schedule does not exist, create it
|
|
62
62
|
* 2. if schedule date NOT yet ready, exit
|
|
63
63
|
* 3. if schedule date IS ready, execute it
|
|
64
64
|
* 4. if executed, exit
|
|
@@ -85,7 +85,7 @@ export class TimelockServiceFallbackSafe implements ITimelockService {
|
|
|
85
85
|
|
|
86
86
|
/** Schedules-Wait-Execute a task distinguished by the unique task name
|
|
87
87
|
*
|
|
88
|
-
* 1. if schedule
|
|
88
|
+
* 1. if the schedule does not exist, create it
|
|
89
89
|
* 2. if schedule date NOT yet ready, exit
|
|
90
90
|
* 3. if schedule date IS ready, execute it
|
|
91
91
|
* 4. if executed, exit
|
|
@@ -166,7 +166,7 @@ class MockedStorageTransport extends SlotsStorageTransport {
|
|
|
166
166
|
return data;
|
|
167
167
|
}
|
|
168
168
|
setStorageAt(slot: string | number | bigint, position: number, size: number, buffer: string | number | bigint | boolean): Promise<void> {
|
|
169
|
-
throw new Error('Method not implemented
|
|
169
|
+
throw new Error('Method not implemented');
|
|
170
170
|
}
|
|
171
171
|
|
|
172
172
|
async extractMappingKeys (ctx: { slot: ISlotVarDefinition }): Promise<{ keys: (string | number | bigint)[][] }> {
|
|
@@ -197,7 +197,7 @@ namespace $astSetters {
|
|
|
197
197
|
|
|
198
198
|
let body = method.body;
|
|
199
199
|
|
|
200
|
-
// Find a variable setter in the method's body
|
|
200
|
+
// Find a variable setter in the method's body
|
|
201
201
|
let matches = Ast.findMany<BinaryOperation | UnaryOperation | IndexAccess>(body, node => {
|
|
202
202
|
if (Ast.isBinaryOperation(node) && /^.?=$/.test(node.operator)) {
|
|
203
203
|
|
|
@@ -370,7 +370,7 @@ namespace $astSetters {
|
|
|
370
370
|
}
|
|
371
371
|
}
|
|
372
372
|
|
|
373
|
-
//
|
|
373
|
+
// Local variables are not logged to get the mapping key from
|
|
374
374
|
return {
|
|
375
375
|
method: await Ast.getAbi(method, source, inheritance),
|
|
376
376
|
accessors: setterIdentifiers.map(x => x.key)
|
|
@@ -659,7 +659,7 @@ namespace $node {
|
|
|
659
659
|
return accessors.every(key => event.args.some(arg => arg.key === key));
|
|
660
660
|
});
|
|
661
661
|
if (events.length > 0) {
|
|
662
|
-
//
|
|
662
|
+
// Most of the time there will be only one event, so just take the first one
|
|
663
663
|
let event = events[0];
|
|
664
664
|
let mappings = accessors.map(key => {
|
|
665
665
|
let index = event.args.findIndex(arg => arg.key === key);
|
|
@@ -72,7 +72,7 @@ export class SourceFile {
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
if (path == null) {
|
|
75
|
-
throw new Error(`Path ${this.path} not found to
|
|
75
|
+
throw new Error(`Path ${this.path} was not found to load the source from`);
|
|
76
76
|
}
|
|
77
77
|
return new class_Uri(path);
|
|
78
78
|
}
|
|
@@ -102,7 +102,7 @@ export class SourceFile {
|
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
/**
|
|
105
|
-
* @returns Inheritance chain:
|
|
105
|
+
* @returns Inheritance chain: from the base (root) class to the most derived class
|
|
106
106
|
*/
|
|
107
107
|
async getContractInheritanceChain(name?: string): Promise<TSourceFileContract[]> {
|
|
108
108
|
let contract = await this.getContract(name);
|
|
@@ -177,7 +177,7 @@ export class SourceFile {
|
|
|
177
177
|
|
|
178
178
|
let imports = await this.getImports();
|
|
179
179
|
|
|
180
|
-
// Track imports we have already looked in to prevent
|
|
180
|
+
// Track imports we have already looked in to prevent an infinite loop
|
|
181
181
|
imports = imports.filter(x => x.path in skipImports === false);
|
|
182
182
|
imports.forEach(x => skipImports[x.path] = true);
|
|
183
183
|
|
|
@@ -55,7 +55,7 @@ export namespace SolidityParser {
|
|
|
55
55
|
})
|
|
56
56
|
.toArrayAsync({ threads: 1 });
|
|
57
57
|
|
|
58
|
-
//
|
|
58
|
+
// Fix: remove duplicates due to interfaces and multiple inheritance
|
|
59
59
|
abisDef = alot(abisDef)
|
|
60
60
|
.map(def => {
|
|
61
61
|
let key = `${def.type} ${def.name} ${def.inputs?.map(input => input.type).join(',')}`;
|
|
@@ -41,7 +41,7 @@ export class SourceCodeProvider {
|
|
|
41
41
|
}).toArray();
|
|
42
42
|
|
|
43
43
|
if (files.length === 0) {
|
|
44
|
-
throw new Error(`Source code
|
|
44
|
+
throw new Error(`Source code cannot be loaded for ${this.client.platform}:${opts.address}`);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
let file = null as (typeof files[0]);
|
|
@@ -38,7 +38,7 @@ UTest({
|
|
|
38
38
|
|
|
39
39
|
paths.forEach(path => {
|
|
40
40
|
let keys = Accessor.parse(path).keys;
|
|
41
|
-
deepEq_(keys, expect, `${path}
|
|
41
|
+
deepEq_(keys, expect, `${path} does not match ${ JSON.stringify(expect, null, 2) }`);
|
|
42
42
|
})
|
|
43
43
|
})
|
|
44
44
|
}
|