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
package/lib/cjs/abi/fragments.js
CHANGED
|
@@ -36,7 +36,7 @@ function setify(items) {
|
|
|
36
36
|
}
|
|
37
37
|
const _kwVisibDeploy = "external public payable";
|
|
38
38
|
const KwVisibDeploy = setify(_kwVisibDeploy.split(" "));
|
|
39
|
-
// Visibility
|
|
39
|
+
// Visibility keywords
|
|
40
40
|
const _kwVisib = "constant external internal payable private public pure view";
|
|
41
41
|
const KwVisib = setify(_kwVisib.split(" "));
|
|
42
42
|
const _kwTypes = "constructor error event fallback function receive struct";
|
|
@@ -44,10 +44,10 @@ const KwTypes = setify(_kwTypes.split(" "));
|
|
|
44
44
|
const _kwModifiers = "calldata memory storage payable indexed";
|
|
45
45
|
const KwModifiers = setify(_kwModifiers.split(" "));
|
|
46
46
|
const _kwOther = "tuple returns";
|
|
47
|
-
// All
|
|
47
|
+
// All keywords
|
|
48
48
|
const _keywords = [_kwTypes, _kwModifiers, _kwOther, _kwVisib].join(" ");
|
|
49
49
|
const Keywords = setify(_keywords.split(" "));
|
|
50
|
-
// Single
|
|
50
|
+
// Single-character tokens
|
|
51
51
|
const SimpleTokens = {
|
|
52
52
|
"(": "OPEN_PAREN", ")": "CLOSE_PAREN",
|
|
53
53
|
"[": "OPEN_BRACKET", "]": "CLOSE_BRACKET",
|
|
@@ -57,7 +57,7 @@ const SimpleTokens = {
|
|
|
57
57
|
const regexWhitespacePrefix = new RegExp("^(\\s*)");
|
|
58
58
|
const regexNumberPrefix = new RegExp("^([0-9]+)");
|
|
59
59
|
const regexIdPrefix = new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)");
|
|
60
|
-
// Parser
|
|
60
|
+
// Parser regexes to check validity
|
|
61
61
|
const regexId = new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$");
|
|
62
62
|
const regexType = new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");
|
|
63
63
|
class TokenString {
|
|
@@ -72,7 +72,7 @@ class TokenString {
|
|
|
72
72
|
}
|
|
73
73
|
clone() { return new TokenString(__classPrivateFieldGet(this, _TokenString_tokens, "f")); }
|
|
74
74
|
reset() { __classPrivateFieldSet(this, _TokenString_offset, 0, "f"); }
|
|
75
|
-
// Pops and returns the value of the next token
|
|
75
|
+
// Pops and returns the value of the next token if it is a keyword in `allowed`; throws if out of tokens
|
|
76
76
|
popKeyword(allowed) {
|
|
77
77
|
const top = this.peek();
|
|
78
78
|
if (top.type !== "KEYWORD" || !allowed.has(top.text)) {
|
|
@@ -87,7 +87,7 @@ class TokenString {
|
|
|
87
87
|
}
|
|
88
88
|
return this.pop().text;
|
|
89
89
|
}
|
|
90
|
-
// Pops and returns
|
|
90
|
+
// Pops and returns "(" TOKENS ")"
|
|
91
91
|
popParen() {
|
|
92
92
|
const top = this.peek();
|
|
93
93
|
if (top.type !== "OPEN_PAREN") {
|
|
@@ -112,14 +112,14 @@ class TokenString {
|
|
|
112
112
|
__classPrivateFieldSet(this, _TokenString_offset, top.match + 1, "f");
|
|
113
113
|
return result;
|
|
114
114
|
}
|
|
115
|
-
// Returns the top
|
|
115
|
+
// Returns the top token, throwing if out of tokens
|
|
116
116
|
peek() {
|
|
117
117
|
if (__classPrivateFieldGet(this, _TokenString_offset, "f") >= __classPrivateFieldGet(this, _TokenString_tokens, "f").length) {
|
|
118
118
|
throw new Error("out-of-bounds");
|
|
119
119
|
}
|
|
120
120
|
return __classPrivateFieldGet(this, _TokenString_tokens, "f")[__classPrivateFieldGet(this, _TokenString_offset, "f")];
|
|
121
121
|
}
|
|
122
|
-
// Returns the next value
|
|
122
|
+
// Returns the next value if it is a keyword in `allowed`
|
|
123
123
|
peekKeyword(allowed) {
|
|
124
124
|
const top = this.peekType("KEYWORD");
|
|
125
125
|
return (top != null && allowed.has(top)) ? top : null;
|
|
@@ -244,7 +244,7 @@ function lex(text) {
|
|
|
244
244
|
}
|
|
245
245
|
return new TokenString(tokens.map((t) => Object.freeze(t)));
|
|
246
246
|
}
|
|
247
|
-
// Check only one
|
|
247
|
+
// Check that only one item from `allowed` is in `set`
|
|
248
248
|
function allowSingle(set, allowed) {
|
|
249
249
|
let included = [];
|
|
250
250
|
for (const key in allowed.keys()) {
|
|
@@ -256,7 +256,7 @@ function allowSingle(set, allowed) {
|
|
|
256
256
|
throw new Error(`conflicting types: ${included.join(", ")}`);
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
|
-
// Functions to process a Solidity
|
|
259
|
+
// Functions to process a Solidity signature TokenString from left to right for..
|
|
260
260
|
// ...the name with an optional type, returning the name
|
|
261
261
|
function consumeName(type, tokens) {
|
|
262
262
|
if (tokens.peekKeyword(KwTypes)) {
|
|
@@ -267,7 +267,7 @@ function consumeName(type, tokens) {
|
|
|
267
267
|
}
|
|
268
268
|
return tokens.popType("ID");
|
|
269
269
|
}
|
|
270
|
-
// ...all keywords matching allowed
|
|
270
|
+
// ...all keywords matching `allowed`, returning the keywords
|
|
271
271
|
function consumeKeywords(tokens, allowed) {
|
|
272
272
|
const keywords = new Set();
|
|
273
273
|
while (true) {
|
|
@@ -319,7 +319,7 @@ function consumeGas(tokens) {
|
|
|
319
319
|
if (tokens.peekType("NUMBER")) {
|
|
320
320
|
return _bigint_1.$bigint.toBigInt(tokens.pop().text);
|
|
321
321
|
}
|
|
322
|
-
throw new Error("
|
|
322
|
+
throw new Error("Invalid gas");
|
|
323
323
|
}
|
|
324
324
|
return null;
|
|
325
325
|
}
|
|
@@ -331,7 +331,7 @@ function consumeEoi(tokens) {
|
|
|
331
331
|
const regexArrayType = new RegExp(/^(.*)\[([0-9]*)\]$/);
|
|
332
332
|
function verifyBasicType(type) {
|
|
333
333
|
const match = type.match(regexType);
|
|
334
|
-
_require_1.$require.notNull(match, `
|
|
334
|
+
_require_1.$require.notNull(match, `Invalid type ${type}`);
|
|
335
335
|
if (type === "uint") {
|
|
336
336
|
return "uint256";
|
|
337
337
|
}
|
|
@@ -341,12 +341,12 @@ function verifyBasicType(type) {
|
|
|
341
341
|
if (match[2]) {
|
|
342
342
|
// bytesXX
|
|
343
343
|
const length = parseInt(match[2]);
|
|
344
|
-
_require_1.$require.True(length !== 0 && length <= 32, "
|
|
344
|
+
_require_1.$require.True(length !== 0 && length <= 32, "Invalid bytes length" + type);
|
|
345
345
|
}
|
|
346
346
|
else if (match[3]) {
|
|
347
347
|
// intXX or uintXX
|
|
348
348
|
const size = parseInt(match[3]);
|
|
349
|
-
_require_1.$require.True(size !== 0 && size <= 256 && (size % 8) === 0, "
|
|
349
|
+
_require_1.$require.True(size !== 0 && size <= 256 && (size % 8) === 0, "Invalid numeric width" + type);
|
|
350
350
|
}
|
|
351
351
|
return type;
|
|
352
352
|
}
|
|
@@ -361,7 +361,7 @@ const _guard = {};
|
|
|
361
361
|
// const FunctionFragmentInternal = "_FunctionInternal";
|
|
362
362
|
// const StructFragmentInternal = "_StructInternal";
|
|
363
363
|
/**
|
|
364
|
-
* Each input and output of a [[Fragment]] is an Array of **ParamType
|
|
364
|
+
* Each input and output of a [[Fragment]] is an Array of **ParamType**
|
|
365
365
|
*/
|
|
366
366
|
class ParamType {
|
|
367
367
|
/**
|
|
@@ -396,7 +396,7 @@ class ParamType {
|
|
|
396
396
|
this.arrayChildren = arrayChildren;
|
|
397
397
|
}
|
|
398
398
|
/**
|
|
399
|
-
* Return a string representation of this type
|
|
399
|
+
* Return a string representation of this type
|
|
400
400
|
*
|
|
401
401
|
* For example,
|
|
402
402
|
*
|
|
@@ -456,53 +456,53 @@ class ParamType {
|
|
|
456
456
|
return result;
|
|
457
457
|
}
|
|
458
458
|
/**
|
|
459
|
-
* Returns true if %%this%% is an Array type
|
|
459
|
+
* Returns true if %%this%% is an Array type
|
|
460
460
|
*
|
|
461
461
|
* This provides a type gaurd ensuring that [[arrayChildren]]
|
|
462
|
-
* and [[arrayLength]] are non-null
|
|
462
|
+
* and [[arrayLength]] are non-null
|
|
463
463
|
*/
|
|
464
464
|
isArray() {
|
|
465
465
|
return (this.baseType === "array");
|
|
466
466
|
}
|
|
467
467
|
/**
|
|
468
|
-
* Returns true if %%this%% is a Tuple type
|
|
468
|
+
* Returns true if %%this%% is a Tuple type
|
|
469
469
|
*
|
|
470
470
|
* This provides a type gaurd ensuring that [[components]]
|
|
471
|
-
* is non-null
|
|
471
|
+
* is non-null
|
|
472
472
|
*/
|
|
473
473
|
isTuple() {
|
|
474
474
|
return (this.baseType === "tuple");
|
|
475
475
|
}
|
|
476
476
|
/**
|
|
477
|
-
* Returns true if %%this%% is an Indexable type
|
|
477
|
+
* Returns true if %%this%% is an Indexable type
|
|
478
478
|
*
|
|
479
479
|
* This provides a type gaurd ensuring that [[indexed]]
|
|
480
|
-
* is non-null
|
|
480
|
+
* is non-null
|
|
481
481
|
*/
|
|
482
482
|
isIndexable() {
|
|
483
483
|
return (this.indexed != null);
|
|
484
484
|
}
|
|
485
485
|
/**
|
|
486
486
|
* Walks the **ParamType** with %%value%%, calling %%process%%
|
|
487
|
-
* on each type, destructing the %%value%% recursively
|
|
487
|
+
* on each type, destructing the %%value%% recursively
|
|
488
488
|
*/
|
|
489
489
|
walk(value, process) {
|
|
490
490
|
if (this.isArray()) {
|
|
491
491
|
if (!Array.isArray(value)) {
|
|
492
|
-
throw new Error("
|
|
492
|
+
throw new Error("Invalid array value");
|
|
493
493
|
}
|
|
494
494
|
if (this.arrayLength !== -1 && value.length !== this.arrayLength) {
|
|
495
|
-
throw new Error("
|
|
495
|
+
throw new Error("Array has the wrong length");
|
|
496
496
|
}
|
|
497
497
|
const _this = this;
|
|
498
498
|
return value.map((v) => (_this.arrayChildren.walk(v, process)));
|
|
499
499
|
}
|
|
500
500
|
if (this.isTuple()) {
|
|
501
501
|
if (!Array.isArray(value)) {
|
|
502
|
-
throw new Error("
|
|
502
|
+
throw new Error("Invalid tuple value");
|
|
503
503
|
}
|
|
504
504
|
if (value.length !== this.components.length) {
|
|
505
|
-
throw new Error("
|
|
505
|
+
throw new Error("Array has the wrong length");
|
|
506
506
|
}
|
|
507
507
|
const _this = this;
|
|
508
508
|
return value.map((v, i) => (_this.components[i].walk(v, process)));
|
|
@@ -511,10 +511,10 @@ class ParamType {
|
|
|
511
511
|
}
|
|
512
512
|
/**
|
|
513
513
|
* Walks the **ParamType** with %%value%%, asynchronously calling
|
|
514
|
-
* %%process%% on each type, destructing the %%value%% recursively
|
|
514
|
+
* %%process%% on each type, destructing the %%value%% recursively
|
|
515
515
|
*
|
|
516
516
|
* This can be used to resolve ENS naes by walking and resolving each
|
|
517
|
-
* ``"address"`` type
|
|
517
|
+
* ``"address"`` type
|
|
518
518
|
*/
|
|
519
519
|
async walkAsync(value, process) {
|
|
520
520
|
const promises = [];
|
|
@@ -528,10 +528,10 @@ class ParamType {
|
|
|
528
528
|
return result[0];
|
|
529
529
|
}
|
|
530
530
|
/**
|
|
531
|
-
* Creates a new **ParamType** for %%obj
|
|
531
|
+
* Creates a new **ParamType** for %%obj%%
|
|
532
532
|
*
|
|
533
533
|
* If %%allowIndexed%% then the ``indexed`` keyword is permitted,
|
|
534
|
-
* otherwise the ``indexed`` keyword will throw an error
|
|
534
|
+
* otherwise the ``indexed`` keyword will throw an error
|
|
535
535
|
*/
|
|
536
536
|
static from(obj, allowIndexed) {
|
|
537
537
|
if (ParamType.isParamType(obj)) {
|
|
@@ -542,7 +542,7 @@ class ParamType {
|
|
|
542
542
|
return ParamType.from(lex(obj), allowIndexed);
|
|
543
543
|
}
|
|
544
544
|
catch (error) {
|
|
545
|
-
throw new Error(`
|
|
545
|
+
throw new Error(`Invalid parameter type: ${error.message}`);
|
|
546
546
|
}
|
|
547
547
|
}
|
|
548
548
|
else if (obj instanceof TokenString) {
|
|
@@ -580,15 +580,15 @@ class ParamType {
|
|
|
580
580
|
}
|
|
581
581
|
const name = (obj.peekType("ID") ? obj.pop().text : "");
|
|
582
582
|
if (obj.length) {
|
|
583
|
-
throw new Error("
|
|
583
|
+
throw new Error("Leftover tokens");
|
|
584
584
|
}
|
|
585
585
|
return new ParamType(_guard, name, type, baseType, indexed, comps, arrayLength, arrayChildren);
|
|
586
586
|
}
|
|
587
587
|
const name = obj.name;
|
|
588
|
-
_require_1.$require.True(!name || (typeof (name) === "string" && regexId.test(name)), "
|
|
588
|
+
_require_1.$require.True(!name || (typeof (name) === "string" && regexId.test(name)), "Invalid name" + name);
|
|
589
589
|
let indexed = obj.indexed;
|
|
590
590
|
if (indexed != null) {
|
|
591
|
-
_require_1.$require.True(allowIndexed ?? true, `
|
|
591
|
+
_require_1.$require.True(allowIndexed ?? true, `Parameter cannot be indexed: ${obj.indexed}`);
|
|
592
592
|
indexed = !!indexed;
|
|
593
593
|
}
|
|
594
594
|
let type = obj.type;
|
|
@@ -604,14 +604,14 @@ class ParamType {
|
|
|
604
604
|
if (type === "tuple" || type.startsWith("tuple(" /* fix: ) */) || type.startsWith("(" /* fix: ) */)) {
|
|
605
605
|
const comps = (obj.components != null) ? obj.components.map((c) => ParamType.from(c)) : null;
|
|
606
606
|
const tuple = new ParamType(_guard, name || "", type, "tuple", indexed, comps, null, null);
|
|
607
|
-
// @TODO:
|
|
607
|
+
// @TODO: Use the lexer to validate and normalize type
|
|
608
608
|
return tuple;
|
|
609
609
|
}
|
|
610
610
|
type = verifyBasicType(obj.type);
|
|
611
611
|
return new ParamType(_guard, name || "", type, type, indexed, null, null, null);
|
|
612
612
|
}
|
|
613
613
|
/**
|
|
614
|
-
* Returns true if %%value%% is a **ParamType
|
|
614
|
+
* Returns true if %%value%% is a **ParamType**
|
|
615
615
|
*/
|
|
616
616
|
static isParamType(value) {
|
|
617
617
|
return (value instanceof ParamType); //value[internal] === ParamTypeInternal);
|
|
@@ -621,10 +621,10 @@ exports.ParamType = ParamType;
|
|
|
621
621
|
_ParamType_instances = new WeakSet(), _ParamType_walkAsync = function _ParamType_walkAsync(promises, value, process, setValue) {
|
|
622
622
|
if (this.isArray()) {
|
|
623
623
|
if (!Array.isArray(value)) {
|
|
624
|
-
throw new Error("
|
|
624
|
+
throw new Error("Invalid array value");
|
|
625
625
|
}
|
|
626
626
|
if (this.arrayLength !== -1 && value.length !== this.arrayLength) {
|
|
627
|
-
throw new Error("
|
|
627
|
+
throw new Error("Array has the wrong length");
|
|
628
628
|
}
|
|
629
629
|
const childType = this.arrayChildren;
|
|
630
630
|
const result = value.slice();
|
|
@@ -645,20 +645,20 @@ _ParamType_instances = new WeakSet(), _ParamType_walkAsync = function _ParamType
|
|
|
645
645
|
}
|
|
646
646
|
else {
|
|
647
647
|
if (value == null || typeof (value) !== "object") {
|
|
648
|
-
throw new Error("
|
|
648
|
+
throw new Error("Invalid tuple value");
|
|
649
649
|
}
|
|
650
650
|
result = components.map((param) => {
|
|
651
651
|
if (!param.name) {
|
|
652
|
-
throw new Error("
|
|
652
|
+
throw new Error("Cannot use object value with unnamed components");
|
|
653
653
|
}
|
|
654
654
|
if (!(param.name in value)) {
|
|
655
|
-
throw new Error(`
|
|
655
|
+
throw new Error(`Missing value for component ${param.name}`);
|
|
656
656
|
}
|
|
657
657
|
return value[param.name];
|
|
658
658
|
});
|
|
659
659
|
}
|
|
660
660
|
if (result.length !== this.components.length) {
|
|
661
|
-
throw new Error("
|
|
661
|
+
throw new Error("Array has the wrong length");
|
|
662
662
|
}
|
|
663
663
|
result.forEach((value, index) => {
|
|
664
664
|
var _a;
|
|
@@ -678,7 +678,7 @@ _ParamType_instances = new WeakSet(), _ParamType_walkAsync = function _ParamType
|
|
|
678
678
|
}
|
|
679
679
|
};
|
|
680
680
|
/**
|
|
681
|
-
* An abstract class to represent An individual fragment from a parse ABI
|
|
681
|
+
* An abstract class to represent An individual fragment from a parse ABI
|
|
682
682
|
*/
|
|
683
683
|
class Fragment {
|
|
684
684
|
/**
|
|
@@ -691,12 +691,12 @@ class Fragment {
|
|
|
691
691
|
this.inputs = inputs;
|
|
692
692
|
}
|
|
693
693
|
/**
|
|
694
|
-
* Creates a new **Fragment** for %%obj%%,
|
|
695
|
-
* ABI
|
|
694
|
+
* Creates a new **Fragment** for %%obj%%, which can be any supported
|
|
695
|
+
* ABI fragment type
|
|
696
696
|
*/
|
|
697
697
|
static from(obj) {
|
|
698
698
|
if (typeof (obj) === "string") {
|
|
699
|
-
// Try parsing JSON
|
|
699
|
+
// Try parsing JSON..
|
|
700
700
|
try {
|
|
701
701
|
Fragment.from(JSON.parse(obj));
|
|
702
702
|
}
|
|
@@ -732,34 +732,34 @@ class Fragment {
|
|
|
732
732
|
}
|
|
733
733
|
throw new Error(`UNSUPPORTED_OPERATION: unsupported type: ${obj.type}`);
|
|
734
734
|
}
|
|
735
|
-
throw new Error("unsupported
|
|
735
|
+
throw new Error("unsupported fragment object: " + JSON.stringify(obj));
|
|
736
736
|
}
|
|
737
737
|
/**
|
|
738
|
-
* Returns true if %%value%% is a [[ConstructorFragment]]
|
|
738
|
+
* Returns true if %%value%% is a [[ConstructorFragment]]
|
|
739
739
|
*/
|
|
740
740
|
static isConstructor(value) {
|
|
741
741
|
return ConstructorFragment.isFragment(value);
|
|
742
742
|
}
|
|
743
743
|
/**
|
|
744
|
-
* Returns true if %%value%% is an [[ErrorFragment]]
|
|
744
|
+
* Returns true if %%value%% is an [[ErrorFragment]]
|
|
745
745
|
*/
|
|
746
746
|
static isError(value) {
|
|
747
747
|
return ErrorFragment.isFragment(value);
|
|
748
748
|
}
|
|
749
749
|
/**
|
|
750
|
-
* Returns true if %%value%% is an [[EventFragment]]
|
|
750
|
+
* Returns true if %%value%% is an [[EventFragment]]
|
|
751
751
|
*/
|
|
752
752
|
static isEvent(value) {
|
|
753
753
|
return EventFragment.isFragment(value);
|
|
754
754
|
}
|
|
755
755
|
/**
|
|
756
|
-
* Returns true if %%value%% is a [[FunctionFragment]]
|
|
756
|
+
* Returns true if %%value%% is a [[FunctionFragment]]
|
|
757
757
|
*/
|
|
758
758
|
static isFunction(value) {
|
|
759
759
|
return FunctionFragment.isFragment(value);
|
|
760
760
|
}
|
|
761
761
|
/**
|
|
762
|
-
* Returns true if %%value%% is a [[StructFragment]]
|
|
762
|
+
* Returns true if %%value%% is a [[StructFragment]]
|
|
763
763
|
*/
|
|
764
764
|
static isStruct(value) {
|
|
765
765
|
return StructFragment.isFragment(value);
|
|
@@ -768,7 +768,7 @@ class Fragment {
|
|
|
768
768
|
exports.Fragment = Fragment;
|
|
769
769
|
/**
|
|
770
770
|
* An abstract class to represent An individual fragment
|
|
771
|
-
* which has a name from a parse ABI
|
|
771
|
+
* which has a name from a parse ABI
|
|
772
772
|
*/
|
|
773
773
|
class NamedFragment extends Fragment {
|
|
774
774
|
/**
|
|
@@ -776,7 +776,7 @@ class NamedFragment extends Fragment {
|
|
|
776
776
|
*/
|
|
777
777
|
constructor(guard, type, name, inputs) {
|
|
778
778
|
super(guard, type, inputs);
|
|
779
|
-
_require_1.$require.True(typeof (name) === "string" && regexId.test(name), "
|
|
779
|
+
_require_1.$require.True(typeof (name) === "string" && regexId.test(name), "Invalid identifier " + name);
|
|
780
780
|
//-inputs = Object.freeze(inputs.slice());
|
|
781
781
|
this.name = name;
|
|
782
782
|
}
|
|
@@ -786,7 +786,7 @@ function joinParams(format, params) {
|
|
|
786
786
|
return "(" + params.map((p) => p.format(format)).join((format === "full") ? ", " : ",") + ")";
|
|
787
787
|
}
|
|
788
788
|
/**
|
|
789
|
-
* A Fragment which represents a //Custom Error
|
|
789
|
+
* A Fragment which represents a //Custom Error//
|
|
790
790
|
*/
|
|
791
791
|
class ErrorFragment extends NamedFragment {
|
|
792
792
|
/**
|
|
@@ -797,13 +797,13 @@ class ErrorFragment extends NamedFragment {
|
|
|
797
797
|
//Object.defineProperty(this, internal, { value: ErrorFragmentInternal });
|
|
798
798
|
}
|
|
799
799
|
/**
|
|
800
|
-
* The Custom Error selector
|
|
800
|
+
* The Custom Error selector
|
|
801
801
|
*/
|
|
802
802
|
get selector() {
|
|
803
803
|
return _contract_1.$contract.keccak256(this.format("sighash")).substring(0, 10);
|
|
804
804
|
}
|
|
805
805
|
/**
|
|
806
|
-
* Returns a string representation of this fragment as %%format
|
|
806
|
+
* Returns a string representation of this fragment as %%format%%
|
|
807
807
|
*/
|
|
808
808
|
format(format) {
|
|
809
809
|
if (format == null) {
|
|
@@ -824,7 +824,7 @@ class ErrorFragment extends NamedFragment {
|
|
|
824
824
|
return result.join(" ");
|
|
825
825
|
}
|
|
826
826
|
/**
|
|
827
|
-
* Returns a new **ErrorFragment** for %%obj
|
|
827
|
+
* Returns a new **ErrorFragment** for %%obj%%
|
|
828
828
|
*/
|
|
829
829
|
static from(obj) {
|
|
830
830
|
if (ErrorFragment.isFragment(obj)) {
|
|
@@ -843,7 +843,7 @@ class ErrorFragment extends NamedFragment {
|
|
|
843
843
|
}
|
|
844
844
|
/**
|
|
845
845
|
* Returns ``true`` and provides a type guard if %%value%% is an
|
|
846
|
-
* **ErrorFragment
|
|
846
|
+
* **ErrorFragment**
|
|
847
847
|
*/
|
|
848
848
|
static isFragment(value) {
|
|
849
849
|
return (value instanceof ErrorFragment); //[internal] === ErrorFragmentInternal);
|
|
@@ -851,7 +851,7 @@ class ErrorFragment extends NamedFragment {
|
|
|
851
851
|
}
|
|
852
852
|
exports.ErrorFragment = ErrorFragment;
|
|
853
853
|
/**
|
|
854
|
-
* A Fragment which represents an Event
|
|
854
|
+
* A Fragment which represents an Event
|
|
855
855
|
*/
|
|
856
856
|
class EventFragment extends NamedFragment {
|
|
857
857
|
/**
|
|
@@ -863,13 +863,13 @@ class EventFragment extends NamedFragment {
|
|
|
863
863
|
this.anonymous = anonymous;
|
|
864
864
|
}
|
|
865
865
|
/**
|
|
866
|
-
* The Event topic hash
|
|
866
|
+
* The Event topic hash
|
|
867
867
|
*/
|
|
868
868
|
get topicHash() {
|
|
869
869
|
return _contract_1.$contract.keccak256(this.format("sighash"));
|
|
870
870
|
}
|
|
871
871
|
/**
|
|
872
|
-
* Returns a string representation of this event as %%format
|
|
872
|
+
* Returns a string representation of this event as %%format%%
|
|
873
873
|
*/
|
|
874
874
|
format(format) {
|
|
875
875
|
if (format == null) {
|
|
@@ -894,7 +894,7 @@ class EventFragment extends NamedFragment {
|
|
|
894
894
|
return result.join(" ");
|
|
895
895
|
}
|
|
896
896
|
/**
|
|
897
|
-
* Return the topic hash for an event with %%name%% and %%params
|
|
897
|
+
* Return the topic hash for an event with %%name%% and %%params%%
|
|
898
898
|
*/
|
|
899
899
|
static getTopicHash(name, params) {
|
|
900
900
|
params = (params || []).map((p) => ParamType.from(p));
|
|
@@ -902,7 +902,7 @@ class EventFragment extends NamedFragment {
|
|
|
902
902
|
return fragment.topicHash;
|
|
903
903
|
}
|
|
904
904
|
/**
|
|
905
|
-
* Returns a new **EventFragment** for %%obj
|
|
905
|
+
* Returns a new **EventFragment** for %%obj%%
|
|
906
906
|
*/
|
|
907
907
|
static from(obj) {
|
|
908
908
|
if (EventFragment.isFragment(obj)) {
|
|
@@ -913,7 +913,7 @@ class EventFragment extends NamedFragment {
|
|
|
913
913
|
return EventFragment.from(lex(obj));
|
|
914
914
|
}
|
|
915
915
|
catch (error) {
|
|
916
|
-
throw new Error("
|
|
916
|
+
throw new Error("Invalid event fragment: " + JSON.stringify(obj));
|
|
917
917
|
}
|
|
918
918
|
}
|
|
919
919
|
else if (obj instanceof TokenString) {
|
|
@@ -927,7 +927,7 @@ class EventFragment extends NamedFragment {
|
|
|
927
927
|
}
|
|
928
928
|
/**
|
|
929
929
|
* Returns ``true`` and provides a type guard if %%value%% is an
|
|
930
|
-
* **EventFragment
|
|
930
|
+
* **EventFragment**
|
|
931
931
|
*/
|
|
932
932
|
static isFragment(value) {
|
|
933
933
|
return (value instanceof EventFragment); //[internal] === EventFragmentInternal);
|
|
@@ -935,7 +935,7 @@ class EventFragment extends NamedFragment {
|
|
|
935
935
|
}
|
|
936
936
|
exports.EventFragment = EventFragment;
|
|
937
937
|
/**
|
|
938
|
-
* A Fragment which represents a constructor
|
|
938
|
+
* A Fragment which represents a constructor
|
|
939
939
|
*/
|
|
940
940
|
class ConstructorFragment extends Fragment {
|
|
941
941
|
/**
|
|
@@ -948,7 +948,7 @@ class ConstructorFragment extends Fragment {
|
|
|
948
948
|
this.gas = gas;
|
|
949
949
|
}
|
|
950
950
|
/**
|
|
951
|
-
* Returns a string representation of this constructor as %%format
|
|
951
|
+
* Returns a string representation of this constructor as %%format%%
|
|
952
952
|
*/
|
|
953
953
|
format(format) {
|
|
954
954
|
_require_1.$require.True(format != null && format !== "sighash", "UNSUPPORTED_OPERATION: cannot format a constructor for sighash");
|
|
@@ -969,7 +969,7 @@ class ConstructorFragment extends Fragment {
|
|
|
969
969
|
return result.join(" ");
|
|
970
970
|
}
|
|
971
971
|
/**
|
|
972
|
-
* Returns a new **ConstructorFragment** for %%obj
|
|
972
|
+
* Returns a new **ConstructorFragment** for %%obj%%
|
|
973
973
|
*/
|
|
974
974
|
static from(obj) {
|
|
975
975
|
if (ConstructorFragment.isFragment(obj)) {
|
|
@@ -980,7 +980,7 @@ class ConstructorFragment extends Fragment {
|
|
|
980
980
|
return ConstructorFragment.from(lex(obj));
|
|
981
981
|
}
|
|
982
982
|
catch (error) {
|
|
983
|
-
throw new Error("
|
|
983
|
+
throw new Error("Invalid constructor fragment: " + JSON.stringify(obj));
|
|
984
984
|
}
|
|
985
985
|
}
|
|
986
986
|
else if (obj instanceof TokenString) {
|
|
@@ -995,7 +995,7 @@ class ConstructorFragment extends Fragment {
|
|
|
995
995
|
}
|
|
996
996
|
/**
|
|
997
997
|
* Returns ``true`` and provides a type guard if %%value%% is a
|
|
998
|
-
* **ConstructorFragment
|
|
998
|
+
* **ConstructorFragment**
|
|
999
999
|
*/
|
|
1000
1000
|
static isFragment(value) {
|
|
1001
1001
|
return (value instanceof ConstructorFragment); //[internal] === ConstructorFragmentInternal);
|
|
@@ -1003,7 +1003,7 @@ class ConstructorFragment extends Fragment {
|
|
|
1003
1003
|
}
|
|
1004
1004
|
exports.ConstructorFragment = ConstructorFragment;
|
|
1005
1005
|
/**
|
|
1006
|
-
* A Fragment which represents a method
|
|
1006
|
+
* A Fragment which represents a method
|
|
1007
1007
|
*/
|
|
1008
1008
|
class FallbackFragment extends Fragment {
|
|
1009
1009
|
constructor(guard, inputs, payable) {
|
|
@@ -1012,7 +1012,7 @@ class FallbackFragment extends Fragment {
|
|
|
1012
1012
|
this.payable = payable;
|
|
1013
1013
|
}
|
|
1014
1014
|
/**
|
|
1015
|
-
* Returns a string representation of this fallback as %%format
|
|
1015
|
+
* Returns a string representation of this fallback as %%format%%
|
|
1016
1016
|
*/
|
|
1017
1017
|
format(format) {
|
|
1018
1018
|
const type = ((this.inputs.length === 0) ? "receive" : "fallback");
|
|
@@ -1023,7 +1023,7 @@ class FallbackFragment extends Fragment {
|
|
|
1023
1023
|
return `${type}()${this.payable ? " payable" : ""}`;
|
|
1024
1024
|
}
|
|
1025
1025
|
/**
|
|
1026
|
-
* Returns a new **FallbackFragment** for %%obj
|
|
1026
|
+
* Returns a new **FallbackFragment** for %%obj%%
|
|
1027
1027
|
*/
|
|
1028
1028
|
static from(obj) {
|
|
1029
1029
|
if (FallbackFragment.isFragment(obj)) {
|
|
@@ -1034,13 +1034,13 @@ class FallbackFragment extends Fragment {
|
|
|
1034
1034
|
return FallbackFragment.from(lex(obj));
|
|
1035
1035
|
}
|
|
1036
1036
|
catch (error) {
|
|
1037
|
-
throw new Error("
|
|
1037
|
+
throw new Error("Invalid fallback fragment: " + JSON.stringify(obj));
|
|
1038
1038
|
}
|
|
1039
1039
|
}
|
|
1040
1040
|
else if (obj instanceof TokenString) {
|
|
1041
1041
|
const errorObj = obj.toString();
|
|
1042
1042
|
const topIsValid = obj.peekKeyword(setify(["fallback", "receive"]));
|
|
1043
|
-
_require_1.$require.notNull(topIsValid, "
|
|
1043
|
+
_require_1.$require.notNull(topIsValid, "Type must be fallback or receive " + errorObj);
|
|
1044
1044
|
const type = obj.popKeyword(setify(["fallback", "receive"]));
|
|
1045
1045
|
// receive()
|
|
1046
1046
|
if (type === "receive") {
|
|
@@ -1078,11 +1078,11 @@ class FallbackFragment extends Fragment {
|
|
|
1078
1078
|
const payable = (obj.stateMutability === "payable");
|
|
1079
1079
|
return new FallbackFragment(_guard, inputs, payable);
|
|
1080
1080
|
}
|
|
1081
|
-
throw new Error("
|
|
1081
|
+
throw new Error("Invalid fallback fragment: " + JSON.stringify(obj));
|
|
1082
1082
|
}
|
|
1083
1083
|
/**
|
|
1084
1084
|
* Returns ``true`` and provides a type guard if %%value%% is a
|
|
1085
|
-
* **FallbackFragment
|
|
1085
|
+
* **FallbackFragment**
|
|
1086
1086
|
*/
|
|
1087
1087
|
static isFragment(value) {
|
|
1088
1088
|
return (value instanceof FallbackFragment); //[internal] === FallbackFragmentInternal);
|
|
@@ -1090,7 +1090,7 @@ class FallbackFragment extends Fragment {
|
|
|
1090
1090
|
}
|
|
1091
1091
|
exports.FallbackFragment = FallbackFragment;
|
|
1092
1092
|
/**
|
|
1093
|
-
* A Fragment which represents a method
|
|
1093
|
+
* A Fragment which represents a method
|
|
1094
1094
|
*/
|
|
1095
1095
|
class FunctionFragment extends NamedFragment {
|
|
1096
1096
|
/**
|
|
@@ -1109,13 +1109,13 @@ class FunctionFragment extends NamedFragment {
|
|
|
1109
1109
|
this.stateMutability = stateMutability;
|
|
1110
1110
|
}
|
|
1111
1111
|
/**
|
|
1112
|
-
* The Function selector
|
|
1112
|
+
* The Function selector
|
|
1113
1113
|
*/
|
|
1114
1114
|
get selector() {
|
|
1115
1115
|
return _contract_1.$contract.keccak256(this.format("sighash")).substring(0, 10);
|
|
1116
1116
|
}
|
|
1117
1117
|
/**
|
|
1118
|
-
* Returns a string representation of this function as %%format
|
|
1118
|
+
* Returns a string representation of this function as %%format%%
|
|
1119
1119
|
*/
|
|
1120
1120
|
format(format) {
|
|
1121
1121
|
if (format == null) {
|
|
@@ -1153,7 +1153,7 @@ class FunctionFragment extends NamedFragment {
|
|
|
1153
1153
|
return result.join(" ");
|
|
1154
1154
|
}
|
|
1155
1155
|
/**
|
|
1156
|
-
* Return the selector for a function with %%name%% and %%params
|
|
1156
|
+
* Return the selector for a function with %%name%% and %%params%%
|
|
1157
1157
|
*/
|
|
1158
1158
|
static getSelector(name, params) {
|
|
1159
1159
|
params = (params || []).map((p) => ParamType.from(p));
|
|
@@ -1161,7 +1161,7 @@ class FunctionFragment extends NamedFragment {
|
|
|
1161
1161
|
return fragment.selector;
|
|
1162
1162
|
}
|
|
1163
1163
|
/**
|
|
1164
|
-
* Returns a new **FunctionFragment** for %%obj
|
|
1164
|
+
* Returns a new **FunctionFragment** for %%obj%%
|
|
1165
1165
|
*/
|
|
1166
1166
|
static from(obj) {
|
|
1167
1167
|
if (FunctionFragment.isFragment(obj)) {
|
|
@@ -1210,7 +1210,7 @@ class FunctionFragment extends NamedFragment {
|
|
|
1210
1210
|
}
|
|
1211
1211
|
/**
|
|
1212
1212
|
* Returns ``true`` and provides a type guard if %%value%% is a
|
|
1213
|
-
* **FunctionFragment
|
|
1213
|
+
* **FunctionFragment**
|
|
1214
1214
|
*/
|
|
1215
1215
|
static isFragment(value) {
|
|
1216
1216
|
return (value instanceof FunctionFragment); //[internal] === FunctionFragmentInternal);
|
|
@@ -1218,7 +1218,7 @@ class FunctionFragment extends NamedFragment {
|
|
|
1218
1218
|
}
|
|
1219
1219
|
exports.FunctionFragment = FunctionFragment;
|
|
1220
1220
|
/**
|
|
1221
|
-
* A Fragment which represents a structure
|
|
1221
|
+
* A Fragment which represents a structure
|
|
1222
1222
|
*/
|
|
1223
1223
|
class StructFragment extends NamedFragment {
|
|
1224
1224
|
/**
|
|
@@ -1229,13 +1229,13 @@ class StructFragment extends NamedFragment {
|
|
|
1229
1229
|
//Object.defineProperty(this, internal, { value: StructFragmentInternal });
|
|
1230
1230
|
}
|
|
1231
1231
|
/**
|
|
1232
|
-
* Returns a string representation of this struct as %%format
|
|
1232
|
+
* Returns a string representation of this struct as %%format%%
|
|
1233
1233
|
*/
|
|
1234
1234
|
format() {
|
|
1235
1235
|
throw new Error("@TODO");
|
|
1236
1236
|
}
|
|
1237
1237
|
/**
|
|
1238
|
-
* Returns a new **StructFragment** for %%obj
|
|
1238
|
+
* Returns a new **StructFragment** for %%obj%%
|
|
1239
1239
|
*/
|
|
1240
1240
|
static from(obj) {
|
|
1241
1241
|
if (typeof (obj) === "string") {
|
|
@@ -1257,7 +1257,7 @@ class StructFragment extends NamedFragment {
|
|
|
1257
1257
|
// @TODO: fix this return type
|
|
1258
1258
|
/**
|
|
1259
1259
|
* Returns ``true`` and provides a type guard if %%value%% is a
|
|
1260
|
-
* **StructFragment
|
|
1260
|
+
* **StructFragment**
|
|
1261
1261
|
*/
|
|
1262
1262
|
static isFragment(value) {
|
|
1263
1263
|
return (value instanceof StructFragment); //[internal] === StructFragmentInternal);
|