viem 2.17.2 → 2.17.4
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/CHANGELOG.md +12 -0
- package/_cjs/accounts/toAccount.js.map +1 -1
- package/_cjs/actions/ens/getEnsAddress.js.map +1 -1
- package/_cjs/actions/ens/getEnsAvatar.js.map +1 -1
- package/_cjs/actions/ens/getEnsName.js.map +1 -1
- package/_cjs/actions/ens/getEnsResolver.js.map +1 -1
- package/_cjs/actions/ens/getEnsText.js.map +1 -1
- package/_cjs/actions/getContract.js.map +1 -1
- package/_cjs/actions/public/call.js.map +1 -1
- package/_cjs/actions/public/createBlockFilter.js.map +1 -1
- package/_cjs/actions/public/createEventFilter.js.map +1 -1
- package/_cjs/actions/public/createPendingTransactionFilter.js.map +1 -1
- package/_cjs/actions/public/estimateGas.js.map +1 -1
- package/_cjs/actions/public/getBalance.js.map +1 -1
- package/_cjs/actions/public/getBlobBaseFee.js.map +1 -1
- package/_cjs/actions/public/getBlock.js.map +1 -1
- package/_cjs/actions/public/getBlockNumber.js.map +1 -1
- package/_cjs/actions/public/getBlockTransactionCount.js.map +1 -1
- package/_cjs/actions/public/getChainId.js.map +1 -1
- package/_cjs/actions/public/getCode.js.map +1 -1
- package/_cjs/actions/public/getFeeHistory.js.map +1 -1
- package/_cjs/actions/public/getFilterChanges.js.map +1 -1
- package/_cjs/actions/public/getFilterLogs.js.map +1 -1
- package/_cjs/actions/public/getGasPrice.js.map +1 -1
- package/_cjs/actions/public/getLogs.js.map +1 -1
- package/_cjs/actions/public/getProof.js.map +1 -1
- package/_cjs/actions/public/getStorageAt.js.map +1 -1
- package/_cjs/actions/public/getTransaction.js.map +1 -1
- package/_cjs/actions/public/getTransactionConfirmations.js.map +1 -1
- package/_cjs/actions/public/getTransactionCount.js.map +1 -1
- package/_cjs/actions/public/getTransactionReceipt.js.map +1 -1
- package/_cjs/actions/public/uninstallFilter.js.map +1 -1
- package/_cjs/actions/public/verifyHash.js +9 -0
- package/_cjs/actions/public/verifyHash.js.map +1 -1
- package/_cjs/actions/public/verifyMessage.js.map +1 -1
- package/_cjs/actions/public/waitForTransactionReceipt.js.map +1 -1
- package/_cjs/actions/public/watchBlockNumber.js.map +1 -1
- package/_cjs/actions/public/watchBlocks.js.map +1 -1
- package/_cjs/actions/public/watchEvent.js.map +1 -1
- package/_cjs/actions/public/watchPendingTransactions.js.map +1 -1
- package/_cjs/actions/test/dropTransaction.js.map +1 -1
- package/_cjs/actions/test/dumpState.js.map +1 -1
- package/_cjs/actions/test/getAutomine.js.map +1 -1
- package/_cjs/actions/test/getTxpoolContent.js.map +1 -1
- package/_cjs/actions/test/getTxpoolStatus.js.map +1 -1
- package/_cjs/actions/test/impersonateAccount.js.map +1 -1
- package/_cjs/actions/test/increaseTime.js.map +1 -1
- package/_cjs/actions/test/inspectTxpool.js.map +1 -1
- package/_cjs/actions/test/loadState.js.map +1 -1
- package/_cjs/actions/test/mine.js.map +1 -1
- package/_cjs/actions/test/removeBlockTimestampInterval.js.map +1 -1
- package/_cjs/actions/test/reset.js.map +1 -1
- package/_cjs/actions/test/revert.js.map +1 -1
- package/_cjs/actions/test/sendUnsignedTransaction.js.map +1 -1
- package/_cjs/actions/test/setAutomine.js.map +1 -1
- package/_cjs/actions/test/setBalance.js.map +1 -1
- package/_cjs/actions/test/setBlockGasLimit.js.map +1 -1
- package/_cjs/actions/test/setBlockTimestampInterval.js.map +1 -1
- package/_cjs/actions/test/setCode.js.map +1 -1
- package/_cjs/actions/test/setCoinbase.js.map +1 -1
- package/_cjs/actions/test/setIntervalMining.js.map +1 -1
- package/_cjs/actions/test/setLoggingEnabled.js.map +1 -1
- package/_cjs/actions/test/setMinGasPrice.js.map +1 -1
- package/_cjs/actions/test/setNextBlockBaseFeePerGas.js.map +1 -1
- package/_cjs/actions/test/setNextBlockTimestamp.js.map +1 -1
- package/_cjs/actions/test/setNonce.js.map +1 -1
- package/_cjs/actions/test/setRpcUrl.js.map +1 -1
- package/_cjs/actions/test/setStorageAt.js.map +1 -1
- package/_cjs/actions/test/snapshot.js.map +1 -1
- package/_cjs/actions/test/stopImpersonatingAccount.js.map +1 -1
- package/_cjs/actions/wallet/addChain.js.map +1 -1
- package/_cjs/actions/wallet/getAddresses.js.map +1 -1
- package/_cjs/actions/wallet/getPermissions.js.map +1 -1
- package/_cjs/actions/wallet/requestAddresses.js.map +1 -1
- package/_cjs/actions/wallet/requestPermissions.js.map +1 -1
- package/_cjs/actions/wallet/sendRawTransaction.js.map +1 -1
- package/_cjs/actions/wallet/signMessage.js.map +1 -1
- package/_cjs/actions/wallet/switchChain.js.map +1 -1
- package/_cjs/actions/wallet/watchAsset.js.map +1 -1
- package/_cjs/celo/parsers.js.map +1 -1
- package/_cjs/chains/definitions/dreyerxTestnet.js +26 -0
- package/_cjs/chains/definitions/dreyerxTestnet.js.map +1 -0
- package/_cjs/chains/index.js +8 -6
- package/_cjs/chains/index.js.map +1 -1
- package/_cjs/clients/decorators/public.js.map +1 -1
- package/_cjs/clients/decorators/test.js.map +1 -1
- package/_cjs/clients/decorators/wallet.js.map +1 -1
- package/_cjs/clients/transports/createTransport.js.map +1 -1
- package/_cjs/clients/transports/custom.js.map +1 -1
- package/_cjs/errors/version.js +1 -1
- package/_cjs/op-stack/actions/estimateL1Gas.js.map +1 -1
- package/_cjs/op-stack/actions/estimateTotalFee.js.map +1 -1
- package/_cjs/op-stack/actions/estimateTotalGas.js.map +1 -1
- package/_cjs/op-stack/actions/getL1BaseFee.js.map +1 -1
- package/_cjs/op-stack/decorators/publicL1.js.map +1 -1
- package/_cjs/op-stack/decorators/publicL2.js.map +1 -1
- package/_cjs/op-stack/decorators/walletL1.js.map +1 -1
- package/_cjs/op-stack/decorators/walletL2.js.map +1 -1
- package/_cjs/op-stack/parsers.js.map +1 -1
- package/_cjs/utils/abi/decodeAbiParameters.js.map +1 -1
- package/_cjs/utils/abi/decodeErrorResult.js.map +1 -1
- package/_cjs/utils/abi/encodeAbiParameters.js.map +1 -1
- package/_cjs/utils/abi/encodePacked.js.map +1 -1
- package/_cjs/utils/ccip.js.map +1 -1
- package/_cjs/utils/data/concat.js.map +1 -1
- package/_cjs/utils/data/pad.js.map +1 -1
- package/_cjs/utils/data/slice.js.map +1 -1
- package/_cjs/utils/data/trim.js.map +1 -1
- package/_cjs/utils/encoding/fromBytes.js.map +1 -1
- package/_cjs/utils/encoding/fromHex.js.map +1 -1
- package/_cjs/utils/ens/avatar/parseAvatarRecord.js.map +1 -1
- package/_cjs/utils/ens/avatar/utils.js.map +1 -1
- package/_cjs/utils/filters/createFilterRequestScope.js.map +1 -1
- package/_cjs/utils/formatters/formatter.js.map +1 -1
- package/_cjs/utils/hash/keccak256.js.map +1 -1
- package/_cjs/utils/hash/ripemd160.js.map +1 -1
- package/_cjs/utils/hash/sha256.js.map +1 -1
- package/_cjs/utils/observe.js.map +1 -1
- package/_cjs/utils/poll.js.map +1 -1
- package/_cjs/utils/promise/createBatchScheduler.js.map +1 -1
- package/_cjs/utils/promise/withCache.js.map +1 -1
- package/_cjs/utils/promise/withRetry.js.map +1 -1
- package/_cjs/utils/promise/withTimeout.js.map +1 -1
- package/_cjs/utils/signature/hashMessage.js.map +1 -1
- package/_cjs/utils/transaction/parseTransaction.js.map +1 -1
- package/_cjs/zksync/actions/getAllBalances.js.map +1 -1
- package/_cjs/zksync/actions/getBaseTokenL1Address.js.map +1 -1
- package/_cjs/zksync/actions/getBlockDetails.js.map +1 -1
- package/_cjs/zksync/actions/getBridgehubContractAddress.js.map +1 -1
- package/_cjs/zksync/actions/getDefaultBridgeAddresses.js.map +1 -1
- package/_cjs/zksync/actions/getL1Allowance.js.map +1 -1
- package/_cjs/zksync/actions/getL1Balance.js.map +1 -1
- package/_cjs/zksync/actions/getL1BatchBlockRange.js.map +1 -1
- package/_cjs/zksync/actions/getL1BatchDetails.js.map +1 -1
- package/_cjs/zksync/actions/getL1BatchNumber.js.map +1 -1
- package/_cjs/zksync/actions/getL1ChainId.js.map +1 -1
- package/_cjs/zksync/actions/getL1TokenBalance.js.map +1 -1
- package/_cjs/zksync/actions/getLogProof.js.map +1 -1
- package/_cjs/zksync/actions/getMainContractAddress.js.map +1 -1
- package/_cjs/zksync/actions/getRawBlockTransactions.js.map +1 -1
- package/_cjs/zksync/actions/getTestnetPaymasterAddress.js.map +1 -1
- package/_cjs/zksync/actions/getTransactionDetails.js.map +1 -1
- package/_cjs/zksync/actions/signEip712Transaction.js.map +1 -1
- package/_cjs/zksync/actions/signTransaction.js.map +1 -1
- package/_cjs/zksync/decorators/publicL1.js.map +1 -1
- package/_cjs/zksync/decorators/publicL2.js.map +1 -1
- package/_esm/accounts/toAccount.js.map +1 -1
- package/_esm/actions/ens/getEnsAddress.js.map +1 -1
- package/_esm/actions/ens/getEnsAvatar.js.map +1 -1
- package/_esm/actions/ens/getEnsName.js.map +1 -1
- package/_esm/actions/ens/getEnsResolver.js.map +1 -1
- package/_esm/actions/ens/getEnsText.js.map +1 -1
- package/_esm/actions/getContract.js.map +1 -1
- package/_esm/actions/public/call.js.map +1 -1
- package/_esm/actions/public/createBlockFilter.js.map +1 -1
- package/_esm/actions/public/createEventFilter.js.map +1 -1
- package/_esm/actions/public/createPendingTransactionFilter.js.map +1 -1
- package/_esm/actions/public/estimateGas.js.map +1 -1
- package/_esm/actions/public/getBalance.js.map +1 -1
- package/_esm/actions/public/getBlobBaseFee.js.map +1 -1
- package/_esm/actions/public/getBlock.js.map +1 -1
- package/_esm/actions/public/getBlockNumber.js.map +1 -1
- package/_esm/actions/public/getBlockTransactionCount.js.map +1 -1
- package/_esm/actions/public/getChainId.js.map +1 -1
- package/_esm/actions/public/getCode.js.map +1 -1
- package/_esm/actions/public/getFeeHistory.js.map +1 -1
- package/_esm/actions/public/getFilterChanges.js.map +1 -1
- package/_esm/actions/public/getFilterLogs.js.map +1 -1
- package/_esm/actions/public/getGasPrice.js.map +1 -1
- package/_esm/actions/public/getLogs.js.map +1 -1
- package/_esm/actions/public/getProof.js.map +1 -1
- package/_esm/actions/public/getStorageAt.js.map +1 -1
- package/_esm/actions/public/getTransaction.js.map +1 -1
- package/_esm/actions/public/getTransactionConfirmations.js.map +1 -1
- package/_esm/actions/public/getTransactionCount.js.map +1 -1
- package/_esm/actions/public/getTransactionReceipt.js.map +1 -1
- package/_esm/actions/public/uninstallFilter.js.map +1 -1
- package/_esm/actions/public/verifyHash.js +10 -0
- package/_esm/actions/public/verifyHash.js.map +1 -1
- package/_esm/actions/public/verifyMessage.js.map +1 -1
- package/_esm/actions/public/waitForTransactionReceipt.js.map +1 -1
- package/_esm/actions/public/watchBlockNumber.js.map +1 -1
- package/_esm/actions/public/watchBlocks.js.map +1 -1
- package/_esm/actions/public/watchEvent.js.map +1 -1
- package/_esm/actions/public/watchPendingTransactions.js.map +1 -1
- package/_esm/actions/test/dropTransaction.js.map +1 -1
- package/_esm/actions/test/dumpState.js.map +1 -1
- package/_esm/actions/test/getAutomine.js.map +1 -1
- package/_esm/actions/test/getTxpoolContent.js.map +1 -1
- package/_esm/actions/test/getTxpoolStatus.js.map +1 -1
- package/_esm/actions/test/impersonateAccount.js.map +1 -1
- package/_esm/actions/test/increaseTime.js.map +1 -1
- package/_esm/actions/test/inspectTxpool.js.map +1 -1
- package/_esm/actions/test/loadState.js.map +1 -1
- package/_esm/actions/test/mine.js.map +1 -1
- package/_esm/actions/test/removeBlockTimestampInterval.js.map +1 -1
- package/_esm/actions/test/reset.js.map +1 -1
- package/_esm/actions/test/revert.js.map +1 -1
- package/_esm/actions/test/sendUnsignedTransaction.js.map +1 -1
- package/_esm/actions/test/setAutomine.js.map +1 -1
- package/_esm/actions/test/setBalance.js.map +1 -1
- package/_esm/actions/test/setBlockGasLimit.js.map +1 -1
- package/_esm/actions/test/setBlockTimestampInterval.js.map +1 -1
- package/_esm/actions/test/setCode.js.map +1 -1
- package/_esm/actions/test/setCoinbase.js.map +1 -1
- package/_esm/actions/test/setIntervalMining.js.map +1 -1
- package/_esm/actions/test/setLoggingEnabled.js.map +1 -1
- package/_esm/actions/test/setMinGasPrice.js.map +1 -1
- package/_esm/actions/test/setNextBlockBaseFeePerGas.js.map +1 -1
- package/_esm/actions/test/setNextBlockTimestamp.js.map +1 -1
- package/_esm/actions/test/setNonce.js.map +1 -1
- package/_esm/actions/test/setRpcUrl.js.map +1 -1
- package/_esm/actions/test/setStorageAt.js.map +1 -1
- package/_esm/actions/test/snapshot.js.map +1 -1
- package/_esm/actions/test/stopImpersonatingAccount.js.map +1 -1
- package/_esm/actions/wallet/addChain.js.map +1 -1
- package/_esm/actions/wallet/getAddresses.js.map +1 -1
- package/_esm/actions/wallet/getPermissions.js.map +1 -1
- package/_esm/actions/wallet/requestAddresses.js.map +1 -1
- package/_esm/actions/wallet/requestPermissions.js.map +1 -1
- package/_esm/actions/wallet/sendRawTransaction.js.map +1 -1
- package/_esm/actions/wallet/signMessage.js.map +1 -1
- package/_esm/actions/wallet/switchChain.js.map +1 -1
- package/_esm/actions/wallet/watchAsset.js.map +1 -1
- package/_esm/celo/parsers.js.map +1 -1
- package/_esm/chains/definitions/dreyerxTestnet.js +23 -0
- package/_esm/chains/definitions/dreyerxTestnet.js.map +1 -0
- package/_esm/chains/index.js +1 -0
- package/_esm/chains/index.js.map +1 -1
- package/_esm/clients/decorators/public.js.map +1 -1
- package/_esm/clients/decorators/test.js.map +1 -1
- package/_esm/clients/decorators/wallet.js.map +1 -1
- package/_esm/clients/transports/createTransport.js.map +1 -1
- package/_esm/clients/transports/custom.js.map +1 -1
- package/_esm/errors/version.js +1 -1
- package/_esm/op-stack/actions/estimateL1Gas.js.map +1 -1
- package/_esm/op-stack/actions/estimateTotalFee.js.map +1 -1
- package/_esm/op-stack/actions/estimateTotalGas.js.map +1 -1
- package/_esm/op-stack/actions/getL1BaseFee.js.map +1 -1
- package/_esm/op-stack/decorators/publicL1.js.map +1 -1
- package/_esm/op-stack/decorators/publicL2.js.map +1 -1
- package/_esm/op-stack/decorators/walletL1.js.map +1 -1
- package/_esm/op-stack/decorators/walletL2.js.map +1 -1
- package/_esm/op-stack/parsers.js.map +1 -1
- package/_esm/utils/abi/decodeAbiParameters.js.map +1 -1
- package/_esm/utils/abi/decodeErrorResult.js.map +1 -1
- package/_esm/utils/abi/encodeAbiParameters.js.map +1 -1
- package/_esm/utils/abi/encodePacked.js.map +1 -1
- package/_esm/utils/ccip.js.map +1 -1
- package/_esm/utils/data/concat.js.map +1 -1
- package/_esm/utils/data/pad.js.map +1 -1
- package/_esm/utils/data/slice.js.map +1 -1
- package/_esm/utils/data/trim.js.map +1 -1
- package/_esm/utils/encoding/fromBytes.js.map +1 -1
- package/_esm/utils/encoding/fromHex.js.map +1 -1
- package/_esm/utils/ens/avatar/parseAvatarRecord.js.map +1 -1
- package/_esm/utils/ens/avatar/utils.js.map +1 -1
- package/_esm/utils/filters/createFilterRequestScope.js.map +1 -1
- package/_esm/utils/formatters/formatter.js.map +1 -1
- package/_esm/utils/hash/keccak256.js.map +1 -1
- package/_esm/utils/hash/ripemd160.js.map +1 -1
- package/_esm/utils/hash/sha256.js.map +1 -1
- package/_esm/utils/observe.js.map +1 -1
- package/_esm/utils/poll.js.map +1 -1
- package/_esm/utils/promise/createBatchScheduler.js.map +1 -1
- package/_esm/utils/promise/withCache.js.map +1 -1
- package/_esm/utils/promise/withRetry.js.map +1 -1
- package/_esm/utils/promise/withTimeout.js.map +1 -1
- package/_esm/utils/signature/hashMessage.js.map +1 -1
- package/_esm/utils/transaction/parseTransaction.js.map +1 -1
- package/_esm/zksync/actions/getAllBalances.js.map +1 -1
- package/_esm/zksync/actions/getBaseTokenL1Address.js.map +1 -1
- package/_esm/zksync/actions/getBlockDetails.js.map +1 -1
- package/_esm/zksync/actions/getBridgehubContractAddress.js.map +1 -1
- package/_esm/zksync/actions/getDefaultBridgeAddresses.js.map +1 -1
- package/_esm/zksync/actions/getL1Allowance.js.map +1 -1
- package/_esm/zksync/actions/getL1Balance.js.map +1 -1
- package/_esm/zksync/actions/getL1BatchBlockRange.js.map +1 -1
- package/_esm/zksync/actions/getL1BatchDetails.js.map +1 -1
- package/_esm/zksync/actions/getL1BatchNumber.js.map +1 -1
- package/_esm/zksync/actions/getL1ChainId.js.map +1 -1
- package/_esm/zksync/actions/getL1TokenBalance.js.map +1 -1
- package/_esm/zksync/actions/getLogProof.js.map +1 -1
- package/_esm/zksync/actions/getMainContractAddress.js.map +1 -1
- package/_esm/zksync/actions/getRawBlockTransactions.js.map +1 -1
- package/_esm/zksync/actions/getTestnetPaymasterAddress.js.map +1 -1
- package/_esm/zksync/actions/getTransactionDetails.js.map +1 -1
- package/_esm/zksync/actions/signEip712Transaction.js.map +1 -1
- package/_esm/zksync/actions/signTransaction.js.map +1 -1
- package/_esm/zksync/decorators/publicL1.js.map +1 -1
- package/_esm/zksync/decorators/publicL2.js.map +1 -1
- package/_types/accounts/toAccount.d.ts +2 -2
- package/_types/accounts/toAccount.d.ts.map +1 -1
- package/_types/accounts/types.d.ts +6 -6
- package/_types/accounts/types.d.ts.map +1 -1
- package/_types/actions/ens/getEnsAddress.d.ts +1 -1
- package/_types/actions/ens/getEnsAddress.d.ts.map +1 -1
- package/_types/actions/ens/getEnsAvatar.d.ts +1 -1
- package/_types/actions/ens/getEnsAvatar.d.ts.map +1 -1
- package/_types/actions/ens/getEnsName.d.ts +1 -1
- package/_types/actions/ens/getEnsName.d.ts.map +1 -1
- package/_types/actions/ens/getEnsResolver.d.ts +1 -1
- package/_types/actions/ens/getEnsResolver.d.ts.map +1 -1
- package/_types/actions/ens/getEnsText.d.ts +1 -1
- package/_types/actions/ens/getEnsText.d.ts.map +1 -1
- package/_types/actions/getContract.d.ts +60 -60
- package/_types/actions/getContract.d.ts.map +1 -1
- package/_types/actions/public/call.d.ts +3 -3
- package/_types/actions/public/call.d.ts.map +1 -1
- package/_types/actions/public/createBlockFilter.d.ts +1 -1
- package/_types/actions/public/createBlockFilter.d.ts.map +1 -1
- package/_types/actions/public/createContractEventFilter.d.ts +2 -2
- package/_types/actions/public/createContractEventFilter.d.ts.map +1 -1
- package/_types/actions/public/createEventFilter.d.ts +13 -13
- package/_types/actions/public/createEventFilter.d.ts.map +1 -1
- package/_types/actions/public/createPendingTransactionFilter.d.ts +1 -1
- package/_types/actions/public/createPendingTransactionFilter.d.ts.map +1 -1
- package/_types/actions/public/estimateGas.d.ts +3 -3
- package/_types/actions/public/estimateGas.d.ts.map +1 -1
- package/_types/actions/public/getBalance.d.ts +1 -1
- package/_types/actions/public/getBalance.d.ts.map +1 -1
- package/_types/actions/public/getBlobBaseFee.d.ts +1 -1
- package/_types/actions/public/getBlobBaseFee.d.ts.map +1 -1
- package/_types/actions/public/getBlock.d.ts +5 -5
- package/_types/actions/public/getBlock.d.ts.map +1 -1
- package/_types/actions/public/getBlockNumber.d.ts +1 -1
- package/_types/actions/public/getBlockNumber.d.ts.map +1 -1
- package/_types/actions/public/getBlockTransactionCount.d.ts +1 -1
- package/_types/actions/public/getBlockTransactionCount.d.ts.map +1 -1
- package/_types/actions/public/getChainId.d.ts +1 -1
- package/_types/actions/public/getChainId.d.ts.map +1 -1
- package/_types/actions/public/getCode.d.ts +1 -1
- package/_types/actions/public/getCode.d.ts.map +1 -1
- package/_types/actions/public/getContractEvents.d.ts +1 -1
- package/_types/actions/public/getContractEvents.d.ts.map +1 -1
- package/_types/actions/public/getFeeHistory.d.ts +1 -1
- package/_types/actions/public/getFeeHistory.d.ts.map +1 -1
- package/_types/actions/public/getFilterChanges.d.ts +4 -4
- package/_types/actions/public/getFilterChanges.d.ts.map +1 -1
- package/_types/actions/public/getFilterLogs.d.ts +4 -4
- package/_types/actions/public/getFilterLogs.d.ts.map +1 -1
- package/_types/actions/public/getGasPrice.d.ts +1 -1
- package/_types/actions/public/getGasPrice.d.ts.map +1 -1
- package/_types/actions/public/getLogs.d.ts +10 -10
- package/_types/actions/public/getLogs.d.ts.map +1 -1
- package/_types/actions/public/getProof.d.ts +1 -1
- package/_types/actions/public/getProof.d.ts.map +1 -1
- package/_types/actions/public/getStorageAt.d.ts +1 -1
- package/_types/actions/public/getStorageAt.d.ts.map +1 -1
- package/_types/actions/public/getTransaction.d.ts +4 -4
- package/_types/actions/public/getTransaction.d.ts.map +1 -1
- package/_types/actions/public/getTransactionConfirmations.d.ts +3 -3
- package/_types/actions/public/getTransactionConfirmations.d.ts.map +1 -1
- package/_types/actions/public/getTransactionCount.d.ts +1 -1
- package/_types/actions/public/getTransactionCount.d.ts.map +1 -1
- package/_types/actions/public/getTransactionReceipt.d.ts +2 -2
- package/_types/actions/public/getTransactionReceipt.d.ts.map +1 -1
- package/_types/actions/public/uninstallFilter.d.ts +1 -1
- package/_types/actions/public/uninstallFilter.d.ts.map +1 -1
- package/_types/actions/public/verifyHash.d.ts +1 -1
- package/_types/actions/public/verifyHash.d.ts.map +1 -1
- package/_types/actions/public/verifyMessage.d.ts +1 -1
- package/_types/actions/public/verifyMessage.d.ts.map +1 -1
- package/_types/actions/public/waitForTransactionReceipt.d.ts +7 -7
- package/_types/actions/public/waitForTransactionReceipt.d.ts.map +1 -1
- package/_types/actions/public/watchBlockNumber.d.ts +3 -3
- package/_types/actions/public/watchBlockNumber.d.ts.map +1 -1
- package/_types/actions/public/watchBlocks.d.ts +8 -8
- package/_types/actions/public/watchBlocks.d.ts.map +1 -1
- package/_types/actions/public/watchEvent.d.ts +11 -11
- package/_types/actions/public/watchEvent.d.ts.map +1 -1
- package/_types/actions/public/watchPendingTransactions.d.ts +3 -3
- package/_types/actions/public/watchPendingTransactions.d.ts.map +1 -1
- package/_types/actions/test/dropTransaction.d.ts +1 -1
- package/_types/actions/test/dropTransaction.d.ts.map +1 -1
- package/_types/actions/test/dumpState.d.ts +1 -1
- package/_types/actions/test/dumpState.d.ts.map +1 -1
- package/_types/actions/test/getAutomine.d.ts +1 -1
- package/_types/actions/test/getAutomine.d.ts.map +1 -1
- package/_types/actions/test/getTxpoolContent.d.ts +1 -1
- package/_types/actions/test/getTxpoolContent.d.ts.map +1 -1
- package/_types/actions/test/getTxpoolStatus.d.ts +1 -1
- package/_types/actions/test/getTxpoolStatus.d.ts.map +1 -1
- package/_types/actions/test/impersonateAccount.d.ts +1 -1
- package/_types/actions/test/impersonateAccount.d.ts.map +1 -1
- package/_types/actions/test/increaseTime.d.ts +1 -1
- package/_types/actions/test/increaseTime.d.ts.map +1 -1
- package/_types/actions/test/inspectTxpool.d.ts +1 -1
- package/_types/actions/test/inspectTxpool.d.ts.map +1 -1
- package/_types/actions/test/loadState.d.ts +1 -1
- package/_types/actions/test/loadState.d.ts.map +1 -1
- package/_types/actions/test/mine.d.ts +1 -1
- package/_types/actions/test/mine.d.ts.map +1 -1
- package/_types/actions/test/removeBlockTimestampInterval.d.ts +1 -1
- package/_types/actions/test/removeBlockTimestampInterval.d.ts.map +1 -1
- package/_types/actions/test/reset.d.ts +1 -1
- package/_types/actions/test/reset.d.ts.map +1 -1
- package/_types/actions/test/revert.d.ts +1 -1
- package/_types/actions/test/revert.d.ts.map +1 -1
- package/_types/actions/test/sendUnsignedTransaction.d.ts +2 -2
- package/_types/actions/test/sendUnsignedTransaction.d.ts.map +1 -1
- package/_types/actions/test/setAutomine.d.ts +1 -1
- package/_types/actions/test/setAutomine.d.ts.map +1 -1
- package/_types/actions/test/setBalance.d.ts +1 -1
- package/_types/actions/test/setBalance.d.ts.map +1 -1
- package/_types/actions/test/setBlockGasLimit.d.ts +1 -1
- package/_types/actions/test/setBlockGasLimit.d.ts.map +1 -1
- package/_types/actions/test/setBlockTimestampInterval.d.ts +1 -1
- package/_types/actions/test/setBlockTimestampInterval.d.ts.map +1 -1
- package/_types/actions/test/setCode.d.ts +1 -1
- package/_types/actions/test/setCode.d.ts.map +1 -1
- package/_types/actions/test/setCoinbase.d.ts +1 -1
- package/_types/actions/test/setCoinbase.d.ts.map +1 -1
- package/_types/actions/test/setIntervalMining.d.ts +1 -1
- package/_types/actions/test/setIntervalMining.d.ts.map +1 -1
- package/_types/actions/test/setLoggingEnabled.d.ts +1 -1
- package/_types/actions/test/setLoggingEnabled.d.ts.map +1 -1
- package/_types/actions/test/setMinGasPrice.d.ts +1 -1
- package/_types/actions/test/setMinGasPrice.d.ts.map +1 -1
- package/_types/actions/test/setNextBlockBaseFeePerGas.d.ts +1 -1
- package/_types/actions/test/setNextBlockBaseFeePerGas.d.ts.map +1 -1
- package/_types/actions/test/setNextBlockTimestamp.d.ts +1 -1
- package/_types/actions/test/setNextBlockTimestamp.d.ts.map +1 -1
- package/_types/actions/test/setNonce.d.ts +1 -1
- package/_types/actions/test/setNonce.d.ts.map +1 -1
- package/_types/actions/test/setRpcUrl.d.ts +1 -1
- package/_types/actions/test/setRpcUrl.d.ts.map +1 -1
- package/_types/actions/test/setStorageAt.d.ts +1 -1
- package/_types/actions/test/setStorageAt.d.ts.map +1 -1
- package/_types/actions/test/snapshot.d.ts +1 -1
- package/_types/actions/test/snapshot.d.ts.map +1 -1
- package/_types/actions/test/stopImpersonatingAccount.d.ts +1 -1
- package/_types/actions/test/stopImpersonatingAccount.d.ts.map +1 -1
- package/_types/actions/wallet/addChain.d.ts +1 -1
- package/_types/actions/wallet/addChain.d.ts.map +1 -1
- package/_types/actions/wallet/getAddresses.d.ts +1 -1
- package/_types/actions/wallet/getAddresses.d.ts.map +1 -1
- package/_types/actions/wallet/getPermissions.d.ts +1 -1
- package/_types/actions/wallet/getPermissions.d.ts.map +1 -1
- package/_types/actions/wallet/requestAddresses.d.ts +1 -1
- package/_types/actions/wallet/requestAddresses.d.ts.map +1 -1
- package/_types/actions/wallet/requestPermissions.d.ts +1 -1
- package/_types/actions/wallet/requestPermissions.d.ts.map +1 -1
- package/_types/actions/wallet/sendRawTransaction.d.ts +1 -1
- package/_types/actions/wallet/sendRawTransaction.d.ts.map +1 -1
- package/_types/actions/wallet/signMessage.d.ts +2 -2
- package/_types/actions/wallet/signMessage.d.ts.map +1 -1
- package/_types/actions/wallet/switchChain.d.ts +1 -1
- package/_types/actions/wallet/switchChain.d.ts.map +1 -1
- package/_types/actions/wallet/watchAsset.d.ts +1 -1
- package/_types/actions/wallet/watchAsset.d.ts.map +1 -1
- package/_types/celo/parsers.d.ts +2 -2
- package/_types/celo/parsers.d.ts.map +1 -1
- package/_types/celo/types.d.ts +1 -1
- package/_types/celo/types.d.ts.map +1 -1
- package/_types/chains/definitions/dreyerxTestnet.d.ts +35 -0
- package/_types/chains/definitions/dreyerxTestnet.d.ts.map +1 -0
- package/_types/chains/index.d.ts +1 -0
- package/_types/chains/index.d.ts.map +1 -1
- package/_types/clients/decorators/public.d.ts +23 -23
- package/_types/clients/decorators/public.d.ts.map +1 -1
- package/_types/clients/decorators/test.d.ts +4 -4
- package/_types/clients/decorators/test.d.ts.map +1 -1
- package/_types/clients/decorators/wallet.d.ts +10 -10
- package/_types/clients/decorators/wallet.d.ts.map +1 -1
- package/_types/clients/transports/createTransport.d.ts +9 -9
- package/_types/clients/transports/createTransport.d.ts.map +1 -1
- package/_types/clients/transports/custom.d.ts +1 -1
- package/_types/clients/transports/custom.d.ts.map +1 -1
- package/_types/errors/rpc.d.ts +5 -5
- package/_types/errors/rpc.d.ts.map +1 -1
- package/_types/errors/version.d.ts +1 -1
- package/_types/op-stack/actions/estimateL1Gas.d.ts +2 -2
- package/_types/op-stack/actions/estimateL1Gas.d.ts.map +1 -1
- package/_types/op-stack/actions/estimateTotalFee.d.ts +2 -2
- package/_types/op-stack/actions/estimateTotalFee.d.ts.map +1 -1
- package/_types/op-stack/actions/estimateTotalGas.d.ts +2 -2
- package/_types/op-stack/actions/estimateTotalGas.d.ts.map +1 -1
- package/_types/op-stack/actions/getL1BaseFee.d.ts +2 -2
- package/_types/op-stack/actions/getL1BaseFee.d.ts.map +1 -1
- package/_types/op-stack/decorators/publicL1.d.ts +1 -1
- package/_types/op-stack/decorators/publicL1.d.ts.map +1 -1
- package/_types/op-stack/decorators/publicL2.d.ts +1 -1
- package/_types/op-stack/decorators/publicL2.d.ts.map +1 -1
- package/_types/op-stack/decorators/walletL1.d.ts +1 -1
- package/_types/op-stack/decorators/walletL1.d.ts.map +1 -1
- package/_types/op-stack/decorators/walletL2.d.ts +1 -1
- package/_types/op-stack/decorators/walletL2.d.ts.map +1 -1
- package/_types/op-stack/parsers.d.ts +2 -2
- package/_types/op-stack/parsers.d.ts.map +1 -1
- package/_types/op-stack/types/block.d.ts +2 -2
- package/_types/op-stack/types/block.d.ts.map +1 -1
- package/_types/op-stack/types/transaction.d.ts +8 -8
- package/_types/op-stack/types/transaction.d.ts.map +1 -1
- package/_types/types/account.d.ts +5 -5
- package/_types/types/account.d.ts.map +1 -1
- package/_types/types/block.d.ts +7 -7
- package/_types/types/block.d.ts.map +1 -1
- package/_types/types/contract.d.ts +20 -20
- package/_types/types/contract.d.ts.map +1 -1
- package/_types/types/eip1193.d.ts +35 -35
- package/_types/types/eip1193.d.ts.map +1 -1
- package/_types/types/filter.d.ts +16 -16
- package/_types/types/filter.d.ts.map +1 -1
- package/_types/types/log.d.ts +20 -20
- package/_types/types/log.d.ts.map +1 -1
- package/_types/types/proof.d.ts +6 -6
- package/_types/types/proof.d.ts.map +1 -1
- package/_types/types/rpc.d.ts +2 -2
- package/_types/types/rpc.d.ts.map +1 -1
- package/_types/types/transport.d.ts +1 -1
- package/_types/types/transport.d.ts.map +1 -1
- package/_types/types/utils.d.ts +2 -2
- package/_types/types/utils.d.ts.map +1 -1
- package/_types/utils/abi/decodeAbiParameters.d.ts +2 -2
- package/_types/utils/abi/decodeAbiParameters.d.ts.map +1 -1
- package/_types/utils/abi/decodeErrorResult.d.ts +1 -1
- package/_types/utils/abi/decodeErrorResult.d.ts.map +1 -1
- package/_types/utils/abi/encodeAbiParameters.d.ts +1 -1
- package/_types/utils/abi/encodeAbiParameters.d.ts.map +1 -1
- package/_types/utils/abi/encodePacked.d.ts +4 -4
- package/_types/utils/abi/encodePacked.d.ts.map +1 -1
- package/_types/utils/ccip.d.ts +1 -1
- package/_types/utils/ccip.d.ts.map +1 -1
- package/_types/utils/data/concat.d.ts +2 -2
- package/_types/utils/data/concat.d.ts.map +1 -1
- package/_types/utils/data/pad.d.ts +2 -2
- package/_types/utils/data/pad.d.ts.map +1 -1
- package/_types/utils/data/slice.d.ts +3 -3
- package/_types/utils/data/slice.d.ts.map +1 -1
- package/_types/utils/data/trim.d.ts +2 -2
- package/_types/utils/data/trim.d.ts.map +1 -1
- package/_types/utils/encoding/fromBytes.d.ts +4 -4
- package/_types/utils/encoding/fromBytes.d.ts.map +1 -1
- package/_types/utils/encoding/fromHex.d.ts +4 -4
- package/_types/utils/encoding/fromHex.d.ts.map +1 -1
- package/_types/utils/ens/avatar/parseAvatarRecord.d.ts +1 -1
- package/_types/utils/ens/avatar/parseAvatarRecord.d.ts.map +1 -1
- package/_types/utils/ens/avatar/utils.d.ts +1 -1
- package/_types/utils/ens/avatar/utils.d.ts.map +1 -1
- package/_types/utils/filters/createFilterRequestScope.d.ts +1 -1
- package/_types/utils/filters/createFilterRequestScope.d.ts.map +1 -1
- package/_types/utils/formatters/block.d.ts +7 -7
- package/_types/utils/formatters/block.d.ts.map +1 -1
- package/_types/utils/formatters/formatter.d.ts +6 -6
- package/_types/utils/formatters/formatter.d.ts.map +1 -1
- package/_types/utils/formatters/transaction.d.ts +7 -7
- package/_types/utils/formatters/transaction.d.ts.map +1 -1
- package/_types/utils/formatters/transactionReceipt.d.ts +6 -6
- package/_types/utils/formatters/transactionReceipt.d.ts.map +1 -1
- package/_types/utils/formatters/transactionRequest.d.ts +6 -6
- package/_types/utils/formatters/transactionRequest.d.ts.map +1 -1
- package/_types/utils/hash/keccak256.d.ts +2 -2
- package/_types/utils/hash/keccak256.d.ts.map +1 -1
- package/_types/utils/hash/ripemd160.d.ts +2 -2
- package/_types/utils/hash/ripemd160.d.ts.map +1 -1
- package/_types/utils/hash/sha256.d.ts +2 -2
- package/_types/utils/hash/sha256.d.ts.map +1 -1
- package/_types/utils/observe.d.ts +2 -2
- package/_types/utils/observe.d.ts.map +1 -1
- package/_types/utils/poll.d.ts +4 -4
- package/_types/utils/poll.d.ts.map +1 -1
- package/_types/utils/promise/createBatchScheduler.d.ts +11 -11
- package/_types/utils/promise/createBatchScheduler.d.ts.map +1 -1
- package/_types/utils/promise/withCache.d.ts +7 -7
- package/_types/utils/promise/withCache.d.ts.map +1 -1
- package/_types/utils/promise/withRetry.d.ts +1 -1
- package/_types/utils/promise/withRetry.d.ts.map +1 -1
- package/_types/utils/promise/withTimeout.d.ts +3 -3
- package/_types/utils/promise/withTimeout.d.ts.map +1 -1
- package/_types/utils/rpc/http.d.ts +4 -4
- package/_types/utils/rpc/http.d.ts.map +1 -1
- package/_types/utils/signature/hashMessage.d.ts +2 -2
- package/_types/utils/signature/hashMessage.d.ts.map +1 -1
- package/_types/utils/transaction/parseTransaction.d.ts +2 -2
- package/_types/utils/transaction/parseTransaction.d.ts.map +1 -1
- package/_types/zksync/actions/getAllBalances.d.ts +2 -2
- package/_types/zksync/actions/getAllBalances.d.ts.map +1 -1
- package/_types/zksync/actions/getBaseTokenL1Address.d.ts +1 -1
- package/_types/zksync/actions/getBaseTokenL1Address.d.ts.map +1 -1
- package/_types/zksync/actions/getBlockDetails.d.ts +1 -1
- package/_types/zksync/actions/getBlockDetails.d.ts.map +1 -1
- package/_types/zksync/actions/getBridgehubContractAddress.d.ts +1 -1
- package/_types/zksync/actions/getBridgehubContractAddress.d.ts.map +1 -1
- package/_types/zksync/actions/getDefaultBridgeAddresses.d.ts +1 -1
- package/_types/zksync/actions/getDefaultBridgeAddresses.d.ts.map +1 -1
- package/_types/zksync/actions/getL1Allowance.d.ts +2 -2
- package/_types/zksync/actions/getL1Allowance.d.ts.map +1 -1
- package/_types/zksync/actions/getL1Balance.d.ts +2 -2
- package/_types/zksync/actions/getL1Balance.d.ts.map +1 -1
- package/_types/zksync/actions/getL1BatchBlockRange.d.ts +1 -1
- package/_types/zksync/actions/getL1BatchBlockRange.d.ts.map +1 -1
- package/_types/zksync/actions/getL1BatchDetails.d.ts +1 -1
- package/_types/zksync/actions/getL1BatchDetails.d.ts.map +1 -1
- package/_types/zksync/actions/getL1BatchNumber.d.ts +1 -1
- package/_types/zksync/actions/getL1BatchNumber.d.ts.map +1 -1
- package/_types/zksync/actions/getL1ChainId.d.ts +1 -1
- package/_types/zksync/actions/getL1ChainId.d.ts.map +1 -1
- package/_types/zksync/actions/getL1TokenBalance.d.ts +2 -2
- package/_types/zksync/actions/getL1TokenBalance.d.ts.map +1 -1
- package/_types/zksync/actions/getLogProof.d.ts +1 -1
- package/_types/zksync/actions/getLogProof.d.ts.map +1 -1
- package/_types/zksync/actions/getMainContractAddress.d.ts +1 -1
- package/_types/zksync/actions/getMainContractAddress.d.ts.map +1 -1
- package/_types/zksync/actions/getRawBlockTransactions.d.ts +1 -1
- package/_types/zksync/actions/getRawBlockTransactions.d.ts.map +1 -1
- package/_types/zksync/actions/getTestnetPaymasterAddress.d.ts +1 -1
- package/_types/zksync/actions/getTestnetPaymasterAddress.d.ts.map +1 -1
- package/_types/zksync/actions/getTransactionDetails.d.ts +1 -1
- package/_types/zksync/actions/getTransactionDetails.d.ts.map +1 -1
- package/_types/zksync/actions/signEip712Transaction.d.ts +3 -3
- package/_types/zksync/actions/signEip712Transaction.d.ts.map +1 -1
- package/_types/zksync/actions/signTransaction.d.ts +3 -3
- package/_types/zksync/actions/signTransaction.d.ts.map +1 -1
- package/_types/zksync/decorators/publicL1.d.ts +5 -5
- package/_types/zksync/decorators/publicL1.d.ts.map +1 -1
- package/_types/zksync/decorators/publicL2.d.ts +4 -4
- package/_types/zksync/decorators/publicL2.d.ts.map +1 -1
- package/_types/zksync/types/block.d.ts +2 -2
- package/_types/zksync/types/block.d.ts.map +1 -1
- package/_types/zksync/types/eip712.d.ts +3 -3
- package/_types/zksync/types/eip712.d.ts.map +1 -1
- package/_types/zksync/types/fee.d.ts +9 -9
- package/_types/zksync/types/fee.d.ts.map +1 -1
- package/_types/zksync/types/log.d.ts +3 -3
- package/_types/zksync/types/log.d.ts.map +1 -1
- package/_types/zksync/types/transaction.d.ts +18 -18
- package/_types/zksync/types/transaction.d.ts.map +1 -1
- package/accounts/toAccount.ts +8 -8
- package/accounts/types.ts +8 -8
- package/actions/ens/getEnsAddress.ts +2 -2
- package/actions/ens/getEnsAvatar.ts +2 -2
- package/actions/ens/getEnsName.ts +2 -2
- package/actions/ens/getEnsResolver.ts +2 -2
- package/actions/ens/getEnsText.ts +2 -2
- package/actions/getContract.ts +302 -300
- package/actions/public/call.ts +12 -12
- package/actions/public/createBlockFilter.ts +2 -2
- package/actions/public/createContractEventFilter.ts +3 -3
- package/actions/public/createEventFilter.ts +65 -64
- package/actions/public/createPendingTransactionFilter.ts +3 -3
- package/actions/public/estimateGas.ts +8 -9
- package/actions/public/getBalance.ts +2 -2
- package/actions/public/getBlobBaseFee.ts +3 -3
- package/actions/public/getBlock.ts +15 -15
- package/actions/public/getBlockNumber.ts +2 -2
- package/actions/public/getBlockTransactionCount.ts +2 -4
- package/actions/public/getChainId.ts +3 -3
- package/actions/public/getCode.ts +2 -2
- package/actions/public/getContractEvents.ts +10 -10
- package/actions/public/getFeeHistory.ts +2 -2
- package/actions/public/getFilterChanges.ts +59 -67
- package/actions/public/getFilterLogs.ts +36 -36
- package/actions/public/getGasPrice.ts +3 -3
- package/actions/public/getLogs.ts +47 -53
- package/actions/public/getProof.ts +2 -2
- package/actions/public/getStorageAt.ts +2 -2
- package/actions/public/getTransaction.ts +10 -10
- package/actions/public/getTransactionConfirmations.ts +5 -5
- package/actions/public/getTransactionCount.ts +3 -3
- package/actions/public/getTransactionReceipt.ts +5 -5
- package/actions/public/uninstallFilter.ts +3 -3
- package/actions/public/verifyHash.ts +14 -2
- package/actions/public/verifyMessage.ts +2 -2
- package/actions/public/waitForTransactionReceipt.ts +14 -14
- package/actions/public/watchBlockNumber.ts +6 -6
- package/actions/public/watchBlocks.ts +25 -27
- package/actions/public/watchEvent.ts +39 -37
- package/actions/public/watchPendingTransactions.ts +6 -6
- package/actions/test/dropTransaction.ts +3 -3
- package/actions/test/dumpState.ts +3 -3
- package/actions/test/getAutomine.ts +3 -3
- package/actions/test/getTxpoolContent.ts +3 -3
- package/actions/test/getTxpoolStatus.ts +3 -3
- package/actions/test/impersonateAccount.ts +3 -3
- package/actions/test/increaseTime.ts +3 -3
- package/actions/test/inspectTxpool.ts +3 -3
- package/actions/test/loadState.ts +3 -3
- package/actions/test/mine.ts +3 -3
- package/actions/test/removeBlockTimestampInterval.ts +3 -3
- package/actions/test/reset.ts +3 -3
- package/actions/test/revert.ts +3 -3
- package/actions/test/sendUnsignedTransaction.ts +6 -6
- package/actions/test/setAutomine.ts +3 -3
- package/actions/test/setBalance.ts +3 -3
- package/actions/test/setBlockGasLimit.ts +3 -3
- package/actions/test/setBlockTimestampInterval.ts +3 -3
- package/actions/test/setCode.ts +3 -3
- package/actions/test/setCoinbase.ts +3 -3
- package/actions/test/setIntervalMining.ts +3 -3
- package/actions/test/setLoggingEnabled.ts +3 -3
- package/actions/test/setMinGasPrice.ts +3 -3
- package/actions/test/setNextBlockBaseFeePerGas.ts +3 -3
- package/actions/test/setNextBlockTimestamp.ts +3 -3
- package/actions/test/setNonce.ts +3 -3
- package/actions/test/setRpcUrl.ts +3 -3
- package/actions/test/setStorageAt.ts +3 -3
- package/actions/test/snapshot.ts +3 -3
- package/actions/test/stopImpersonatingAccount.ts +3 -3
- package/actions/wallet/addChain.ts +3 -3
- package/actions/wallet/getAddresses.ts +3 -5
- package/actions/wallet/getPermissions.ts +3 -3
- package/actions/wallet/requestAddresses.ts +3 -3
- package/actions/wallet/requestPermissions.ts +3 -3
- package/actions/wallet/sendRawTransaction.ts +2 -2
- package/actions/wallet/signMessage.ts +6 -6
- package/actions/wallet/switchChain.ts +3 -3
- package/actions/wallet/watchAsset.ts +3 -3
- package/celo/parsers.ts +10 -10
- package/celo/types.ts +2 -2
- package/chains/definitions/dreyerxTestnet.ts +23 -0
- package/chains/index.ts +1 -0
- package/clients/decorators/public.ts +130 -138
- package/clients/decorators/test.ts +12 -12
- package/clients/decorators/wallet.ts +34 -36
- package/clients/transports/createTransport.ts +17 -17
- package/clients/transports/custom.ts +2 -2
- package/errors/rpc.ts +6 -6
- package/errors/version.ts +1 -1
- package/op-stack/actions/estimateL1Gas.ts +10 -10
- package/op-stack/actions/estimateTotalFee.ts +9 -9
- package/op-stack/actions/estimateTotalGas.ts +9 -9
- package/op-stack/actions/getL1BaseFee.ts +7 -7
- package/op-stack/decorators/publicL1.ts +5 -5
- package/op-stack/decorators/publicL2.ts +5 -5
- package/op-stack/decorators/walletL1.ts +5 -5
- package/op-stack/decorators/walletL2.ts +5 -5
- package/op-stack/parsers.ts +9 -9
- package/op-stack/types/block.ts +10 -10
- package/op-stack/types/transaction.ts +19 -19
- package/package.json +1 -1
- package/types/account.ts +12 -12
- package/types/block.ts +14 -14
- package/types/contract.ts +60 -56
- package/types/eip1193.ts +52 -55
- package/types/filter.ts +25 -25
- package/types/log.ts +50 -50
- package/types/proof.ts +6 -6
- package/types/rpc.ts +9 -9
- package/types/transport.ts +2 -2
- package/types/utils.ts +2 -2
- package/utils/abi/decodeAbiParameters.ts +6 -6
- package/utils/abi/decodeErrorResult.ts +4 -4
- package/utils/abi/encodeAbiParameters.ts +18 -18
- package/utils/abi/encodePacked.ts +8 -8
- package/utils/ccip.ts +2 -2
- package/utils/data/concat.ts +8 -7
- package/utils/data/pad.ts +6 -6
- package/utils/data/slice.ts +6 -6
- package/utils/data/trim.ts +6 -6
- package/utils/encoding/fromBytes.ts +16 -16
- package/utils/encoding/fromHex.ts +15 -15
- package/utils/ens/avatar/parseAvatarRecord.ts +4 -4
- package/utils/ens/avatar/utils.ts +2 -2
- package/utils/filters/createFilterRequestScope.ts +2 -2
- package/utils/formatters/block.ts +9 -9
- package/utils/formatters/formatter.ts +11 -11
- package/utils/formatters/transaction.ts +5 -5
- package/utils/formatters/transactionReceipt.ts +2 -2
- package/utils/formatters/transactionRequest.ts +2 -2
- package/utils/hash/keccak256.ts +8 -8
- package/utils/hash/ripemd160.ts +8 -8
- package/utils/hash/sha256.ts +8 -8
- package/utils/observe.ts +8 -8
- package/utils/poll.ts +6 -6
- package/utils/promise/createBatchScheduler.ts +27 -30
- package/utils/promise/withCache.ts +8 -8
- package/utils/promise/withRetry.ts +3 -3
- package/utils/promise/withTimeout.ts +3 -3
- package/utils/rpc/http.ts +7 -7
- package/utils/signature/hashMessage.ts +6 -6
- package/utils/transaction/parseTransaction.ts +13 -13
- package/zksync/actions/getAllBalances.ts +6 -6
- package/zksync/actions/getBaseTokenL1Address.ts +3 -3
- package/zksync/actions/getBlockDetails.ts +3 -3
- package/zksync/actions/getBridgehubContractAddress.ts +3 -3
- package/zksync/actions/getDefaultBridgeAddresses.ts +3 -3
- package/zksync/actions/getL1Allowance.ts +6 -6
- package/zksync/actions/getL1Balance.ts +9 -9
- package/zksync/actions/getL1BatchBlockRange.ts +3 -3
- package/zksync/actions/getL1BatchDetails.ts +3 -3
- package/zksync/actions/getL1BatchNumber.ts +3 -3
- package/zksync/actions/getL1ChainId.ts +3 -3
- package/zksync/actions/getL1TokenBalance.ts +6 -6
- package/zksync/actions/getLogProof.ts +3 -3
- package/zksync/actions/getMainContractAddress.ts +3 -3
- package/zksync/actions/getRawBlockTransactions.ts +3 -3
- package/zksync/actions/getTestnetPaymasterAddress.ts +3 -3
- package/zksync/actions/getTransactionDetails.ts +3 -3
- package/zksync/actions/signEip712Transaction.ts +13 -13
- package/zksync/actions/signTransaction.ts +13 -13
- package/zksync/decorators/publicL1.ts +10 -10
- package/zksync/decorators/publicL2.ts +9 -9
- package/zksync/types/block.ts +10 -10
- package/zksync/types/eip712.ts +5 -5
- package/zksync/types/fee.ts +9 -9
- package/zksync/types/log.ts +12 -12
- package/zksync/types/transaction.ts +52 -53
package/types/log.ts
CHANGED
|
@@ -13,57 +13,57 @@ import type {
|
|
|
13
13
|
import type { Hash, Hex } from './misc.js'
|
|
14
14
|
|
|
15
15
|
export type Log<
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
? [
|
|
16
|
+
quantity = bigint,
|
|
17
|
+
index = number,
|
|
18
|
+
pending extends boolean = boolean,
|
|
19
|
+
abiEvent extends AbiEvent | undefined = undefined,
|
|
20
|
+
strict extends boolean | undefined = undefined,
|
|
21
|
+
abi extends Abi | readonly unknown[] | undefined = abiEvent extends AbiEvent
|
|
22
|
+
? [abiEvent]
|
|
23
23
|
: undefined,
|
|
24
|
-
|
|
25
|
-
?
|
|
24
|
+
eventName extends string | undefined = abiEvent extends AbiEvent
|
|
25
|
+
? abiEvent['name']
|
|
26
26
|
: undefined,
|
|
27
27
|
> = {
|
|
28
28
|
/** The address from which this log originated */
|
|
29
29
|
address: Address
|
|
30
30
|
/** Hash of block containing this log or `null` if pending */
|
|
31
|
-
blockHash:
|
|
31
|
+
blockHash: pending extends true ? null : Hash
|
|
32
32
|
/** Number of block containing this log or `null` if pending */
|
|
33
|
-
blockNumber:
|
|
33
|
+
blockNumber: pending extends true ? null : quantity
|
|
34
34
|
/** Contains the non-indexed arguments of the log */
|
|
35
35
|
data: Hex
|
|
36
36
|
/** Index of this log within its block or `null` if pending */
|
|
37
|
-
logIndex:
|
|
37
|
+
logIndex: pending extends true ? null : index
|
|
38
38
|
/** Hash of the transaction that created this log or `null` if pending */
|
|
39
|
-
transactionHash:
|
|
39
|
+
transactionHash: pending extends true ? null : Hash
|
|
40
40
|
/** Index of the transaction that created this log or `null` if pending */
|
|
41
|
-
transactionIndex:
|
|
41
|
+
transactionIndex: pending extends true ? null : index
|
|
42
42
|
/** `true` if this filter has been destroyed and is invalid */
|
|
43
43
|
removed: boolean
|
|
44
|
-
} & GetInferredLogValues<
|
|
44
|
+
} & GetInferredLogValues<abiEvent, abi, eventName, strict>
|
|
45
45
|
|
|
46
46
|
type Topics<
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
> =
|
|
47
|
+
head extends AbiEvent['inputs'],
|
|
48
|
+
base = [Hex],
|
|
49
|
+
> = head extends readonly [
|
|
50
50
|
infer _Head,
|
|
51
51
|
...infer Tail extends AbiEvent['inputs'],
|
|
52
52
|
]
|
|
53
53
|
? _Head extends { indexed: true }
|
|
54
54
|
? [Hex, ...Topics<Tail>]
|
|
55
55
|
: Topics<Tail>
|
|
56
|
-
:
|
|
56
|
+
: base
|
|
57
57
|
|
|
58
58
|
type GetTopics<
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
?
|
|
59
|
+
abiEvent extends AbiEvent | undefined = undefined,
|
|
60
|
+
abi extends Abi | readonly unknown[] = [abiEvent],
|
|
61
|
+
eventName extends string | undefined = abiEvent extends AbiEvent
|
|
62
|
+
? abiEvent['name']
|
|
63
63
|
: undefined,
|
|
64
|
-
_AbiEvent extends AbiEvent | undefined =
|
|
65
|
-
?
|
|
66
|
-
? ExtractAbiEvent<
|
|
64
|
+
_AbiEvent extends AbiEvent | undefined = abi extends Abi
|
|
65
|
+
? eventName extends string
|
|
66
|
+
? ExtractAbiEvent<abi, eventName>
|
|
67
67
|
: undefined
|
|
68
68
|
: undefined,
|
|
69
69
|
_Args = _AbiEvent extends AbiEvent
|
|
@@ -74,58 +74,58 @@ type GetTopics<
|
|
|
74
74
|
| (readonly unknown[] extends _Args ? true : false),
|
|
75
75
|
> = true extends _FailedToParseArgs
|
|
76
76
|
? [Hex, ...Hex[]] | []
|
|
77
|
-
:
|
|
78
|
-
? Topics<
|
|
77
|
+
: abiEvent extends AbiEvent
|
|
78
|
+
? Topics<abiEvent['inputs']>
|
|
79
79
|
: _AbiEvent extends AbiEvent
|
|
80
80
|
? Topics<_AbiEvent['inputs']>
|
|
81
81
|
: [Hex, ...Hex[]] | []
|
|
82
82
|
|
|
83
83
|
type GetInferredLogValues<
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
? [
|
|
84
|
+
abiEvent extends AbiEvent | undefined = undefined,
|
|
85
|
+
abi extends Abi | readonly unknown[] | undefined = abiEvent extends AbiEvent
|
|
86
|
+
? [abiEvent]
|
|
87
87
|
: undefined,
|
|
88
|
-
|
|
89
|
-
?
|
|
88
|
+
eventName extends string | undefined = abiEvent extends AbiEvent
|
|
89
|
+
? abiEvent['name']
|
|
90
90
|
: undefined,
|
|
91
|
-
|
|
92
|
-
_EventNames extends string =
|
|
93
|
-
? Abi extends
|
|
91
|
+
strict extends boolean | undefined = undefined,
|
|
92
|
+
_EventNames extends string = abi extends Abi
|
|
93
|
+
? Abi extends abi
|
|
94
94
|
? string
|
|
95
|
-
: ExtractAbiEventNames<
|
|
95
|
+
: ExtractAbiEventNames<abi>
|
|
96
96
|
: string,
|
|
97
|
-
> =
|
|
98
|
-
?
|
|
97
|
+
> = abi extends Abi
|
|
98
|
+
? eventName extends string
|
|
99
99
|
? {
|
|
100
100
|
args: GetEventArgs<
|
|
101
|
-
|
|
102
|
-
|
|
101
|
+
abi,
|
|
102
|
+
eventName,
|
|
103
103
|
{
|
|
104
104
|
EnableUnion: false
|
|
105
105
|
IndexedOnly: false
|
|
106
|
-
Required:
|
|
106
|
+
Required: strict extends boolean ? strict : false
|
|
107
107
|
}
|
|
108
108
|
>
|
|
109
109
|
/** The event name decoded from `topics`. */
|
|
110
|
-
eventName:
|
|
110
|
+
eventName: eventName
|
|
111
111
|
/** List of order-dependent topics */
|
|
112
|
-
topics: GetTopics<
|
|
112
|
+
topics: GetTopics<abiEvent, abi, eventName>
|
|
113
113
|
}
|
|
114
114
|
: {
|
|
115
|
-
[
|
|
115
|
+
[name in _EventNames]: {
|
|
116
116
|
args: GetEventArgs<
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
abi,
|
|
118
|
+
name,
|
|
119
119
|
{
|
|
120
120
|
EnableUnion: false
|
|
121
121
|
IndexedOnly: false
|
|
122
|
-
Required:
|
|
122
|
+
Required: strict extends boolean ? strict : false
|
|
123
123
|
}
|
|
124
124
|
>
|
|
125
125
|
/** The event name decoded from `topics`. */
|
|
126
|
-
eventName:
|
|
126
|
+
eventName: name
|
|
127
127
|
/** List of order-dependent topics */
|
|
128
|
-
topics: GetTopics<
|
|
128
|
+
topics: GetTopics<abiEvent, abi, name>
|
|
129
129
|
}
|
|
130
130
|
}[_EventNames]
|
|
131
131
|
: {
|
package/types/proof.ts
CHANGED
|
@@ -3,18 +3,18 @@ import type { Hash } from './misc.js'
|
|
|
3
3
|
|
|
4
4
|
type AccountProof = Hash
|
|
5
5
|
|
|
6
|
-
type StorageProof<
|
|
6
|
+
type StorageProof<quantity = bigint> = {
|
|
7
7
|
key: Hash
|
|
8
8
|
proof: Hash[]
|
|
9
|
-
value:
|
|
9
|
+
value: quantity
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
export type Proof<
|
|
12
|
+
export type Proof<quantity = bigint, index = number> = {
|
|
13
13
|
address: Address
|
|
14
|
-
balance:
|
|
14
|
+
balance: quantity
|
|
15
15
|
codeHash: Hash
|
|
16
|
-
nonce:
|
|
16
|
+
nonce: index
|
|
17
17
|
storageHash: Hash
|
|
18
18
|
accountProof: AccountProof[]
|
|
19
|
-
storageProof: StorageProof<
|
|
19
|
+
storageProof: StorageProof<quantity>[]
|
|
20
20
|
}
|
package/types/rpc.ts
CHANGED
|
@@ -30,10 +30,10 @@ export type Status = '0x0' | '0x1'
|
|
|
30
30
|
export type TransactionType = '0x0' | '0x1' | '0x2' | (string & {})
|
|
31
31
|
|
|
32
32
|
export type RpcBlock<
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
> = Block<Quantity,
|
|
33
|
+
blockTag extends BlockTag = BlockTag,
|
|
34
|
+
includeTransactions extends boolean = boolean,
|
|
35
|
+
transaction = RpcTransaction<blockTag extends 'pending' ? true : false>,
|
|
36
|
+
> = Block<Quantity, includeTransactions, blockTag, transaction>
|
|
37
37
|
export type RpcBlockNumber = BlockNumber<Quantity>
|
|
38
38
|
export type RpcBlockIdentifier = BlockIdentifier<Quantity>
|
|
39
39
|
export type RpcUncle = Uncle<Quantity>
|
|
@@ -55,18 +55,18 @@ export type RpcTransactionRequest = OneOf<
|
|
|
55
55
|
>
|
|
56
56
|
// `yParity` is optional on the RPC type as some nodes do not return it
|
|
57
57
|
// for 1559 & 2930 transactions (they should!).
|
|
58
|
-
export type RpcTransaction<
|
|
59
|
-
| Omit<TransactionLegacy<Quantity, Index,
|
|
58
|
+
export type RpcTransaction<pending extends boolean = boolean> = OneOf<
|
|
59
|
+
| Omit<TransactionLegacy<Quantity, Index, pending, '0x0'>, 'typeHex'>
|
|
60
60
|
| PartialBy<
|
|
61
|
-
Omit<TransactionEIP2930<Quantity, Index,
|
|
61
|
+
Omit<TransactionEIP2930<Quantity, Index, pending, '0x1'>, 'typeHex'>,
|
|
62
62
|
'yParity'
|
|
63
63
|
>
|
|
64
64
|
| PartialBy<
|
|
65
|
-
Omit<TransactionEIP1559<Quantity, Index,
|
|
65
|
+
Omit<TransactionEIP1559<Quantity, Index, pending, '0x2'>, 'typeHex'>,
|
|
66
66
|
'yParity'
|
|
67
67
|
>
|
|
68
68
|
| PartialBy<
|
|
69
|
-
Omit<TransactionEIP4844<Quantity, Index,
|
|
69
|
+
Omit<TransactionEIP4844<Quantity, Index, pending, '0x3'>, 'typeHex'>,
|
|
70
70
|
'yParity'
|
|
71
71
|
>
|
|
72
72
|
>
|
package/types/transport.ts
CHANGED
|
@@ -2,8 +2,8 @@ import type { Transport } from '../clients/transports/createTransport.js'
|
|
|
2
2
|
import type { FallbackTransport } from '../clients/transports/fallback.js'
|
|
3
3
|
import type { Some } from './utils.js'
|
|
4
4
|
|
|
5
|
-
export type GetTransportConfig<
|
|
6
|
-
ReturnType<
|
|
5
|
+
export type GetTransportConfig<transport extends Transport> =
|
|
6
|
+
ReturnType<transport>['config']
|
|
7
7
|
|
|
8
8
|
export type GetPollOptions<transport extends Transport> =
|
|
9
9
|
| (HasTransportType<transport, 'webSocket'> extends true
|
package/types/utils.ts
CHANGED
|
@@ -110,7 +110,7 @@ export type IsUndefined<T> = [undefined] extends [T] ? true : false
|
|
|
110
110
|
export type MaybePromise<T> = T | Promise<T>
|
|
111
111
|
|
|
112
112
|
/**
|
|
113
|
-
* @description Makes attributes on the type T required if
|
|
113
|
+
* @description Makes attributes on the type T required if required is true.
|
|
114
114
|
*
|
|
115
115
|
* @example
|
|
116
116
|
* MaybeRequired<{ a: string, b?: number }, true>
|
|
@@ -119,7 +119,7 @@ export type MaybePromise<T> = T | Promise<T>
|
|
|
119
119
|
* MaybeRequired<{ a: string, b?: number }, false>
|
|
120
120
|
* => { a: string, b?: number }
|
|
121
121
|
*/
|
|
122
|
-
export type MaybeRequired<T,
|
|
122
|
+
export type MaybeRequired<T, required extends boolean> = required extends true
|
|
123
123
|
? ExactRequired<T>
|
|
124
124
|
: T
|
|
125
125
|
|
|
@@ -36,9 +36,9 @@ import { type BytesToHexErrorType, bytesToHex } from '../encoding/toHex.js'
|
|
|
36
36
|
import { getArrayComponents } from './encodeAbiParameters.js'
|
|
37
37
|
|
|
38
38
|
export type DecodeAbiParametersReturnType<
|
|
39
|
-
|
|
39
|
+
params extends readonly AbiParameter[] = readonly AbiParameter[],
|
|
40
40
|
> = AbiParametersToPrimitiveTypes<
|
|
41
|
-
|
|
41
|
+
params extends readonly AbiParameter[] ? params : AbiParameter[]
|
|
42
42
|
>
|
|
43
43
|
|
|
44
44
|
export type DecodeAbiParametersErrorType =
|
|
@@ -50,11 +50,11 @@ export type DecodeAbiParametersErrorType =
|
|
|
50
50
|
| ErrorType
|
|
51
51
|
|
|
52
52
|
export function decodeAbiParameters<
|
|
53
|
-
const
|
|
53
|
+
const params extends readonly AbiParameter[],
|
|
54
54
|
>(
|
|
55
|
-
params:
|
|
55
|
+
params: params,
|
|
56
56
|
data: ByteArray | Hex,
|
|
57
|
-
): DecodeAbiParametersReturnType<
|
|
57
|
+
): DecodeAbiParametersReturnType<params> {
|
|
58
58
|
const bytes = typeof data === 'string' ? hexToBytes(data) : data
|
|
59
59
|
const cursor = createCursor(bytes)
|
|
60
60
|
|
|
@@ -78,7 +78,7 @@ export function decodeAbiParameters<
|
|
|
78
78
|
consumed += consumed_
|
|
79
79
|
values.push(data)
|
|
80
80
|
}
|
|
81
|
-
return values as DecodeAbiParametersReturnType<
|
|
81
|
+
return values as DecodeAbiParametersReturnType<params>
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
type DecodeParameterErrorType =
|
|
@@ -62,9 +62,9 @@ export type DecodeErrorResultErrorType =
|
|
|
62
62
|
| ToFunctionSelectorErrorType
|
|
63
63
|
| ErrorType
|
|
64
64
|
|
|
65
|
-
export function decodeErrorResult<const
|
|
66
|
-
parameters: DecodeErrorResultParameters<
|
|
67
|
-
): DecodeErrorResultReturnType<
|
|
65
|
+
export function decodeErrorResult<const abi extends Abi | readonly unknown[]>(
|
|
66
|
+
parameters: DecodeErrorResultParameters<abi>,
|
|
67
|
+
): DecodeErrorResultReturnType<abi> {
|
|
68
68
|
const { abi, data } = parameters as DecodeErrorResultParameters
|
|
69
69
|
|
|
70
70
|
const signature = slice(data, 0, 4)
|
|
@@ -86,5 +86,5 @@ export function decodeErrorResult<const TAbi extends Abi | readonly unknown[]>(
|
|
|
86
86
|
? decodeAbiParameters(abiItem.inputs, slice(data, 4))
|
|
87
87
|
: undefined,
|
|
88
88
|
errorName: (abiItem as { name: string }).name,
|
|
89
|
-
} as DecodeErrorResultReturnType<
|
|
89
|
+
} as DecodeErrorResultReturnType<abi>
|
|
90
90
|
}
|
|
@@ -81,11 +81,11 @@ export type EncodeAbiParametersErrorType =
|
|
|
81
81
|
* ```
|
|
82
82
|
*/
|
|
83
83
|
export function encodeAbiParameters<
|
|
84
|
-
const
|
|
84
|
+
const params extends readonly AbiParameter[] | readonly unknown[],
|
|
85
85
|
>(
|
|
86
|
-
params:
|
|
87
|
-
values:
|
|
88
|
-
? AbiParametersToPrimitiveTypes<
|
|
86
|
+
params: params,
|
|
87
|
+
values: params extends readonly AbiParameter[]
|
|
88
|
+
? AbiParametersToPrimitiveTypes<params>
|
|
89
89
|
: never,
|
|
90
90
|
): EncodeAbiParametersReturnType {
|
|
91
91
|
if (params.length !== values.length)
|
|
@@ -112,12 +112,12 @@ type Tuple = AbiParameterToPrimitiveType<TupleAbiParameter>
|
|
|
112
112
|
|
|
113
113
|
type PrepareParamsErrorType = PrepareParamErrorType | ErrorType
|
|
114
114
|
|
|
115
|
-
function prepareParams<const
|
|
115
|
+
function prepareParams<const params extends readonly AbiParameter[]>({
|
|
116
116
|
params,
|
|
117
117
|
values,
|
|
118
118
|
}: {
|
|
119
|
-
params:
|
|
120
|
-
values: AbiParametersToPrimitiveTypes<
|
|
119
|
+
params: params
|
|
120
|
+
values: AbiParametersToPrimitiveTypes<params>
|
|
121
121
|
}) {
|
|
122
122
|
const preparedParams: PreparedParam[] = []
|
|
123
123
|
for (let i = 0; i < params.length; i++) {
|
|
@@ -138,12 +138,12 @@ type PrepareParamErrorType =
|
|
|
138
138
|
| InvalidAbiEncodingTypeErrorType
|
|
139
139
|
| ErrorType
|
|
140
140
|
|
|
141
|
-
function prepareParam<const
|
|
141
|
+
function prepareParam<const param extends AbiParameter>({
|
|
142
142
|
param,
|
|
143
143
|
value,
|
|
144
144
|
}: {
|
|
145
|
-
param:
|
|
146
|
-
value: AbiParameterToPrimitiveType<
|
|
145
|
+
param: param
|
|
146
|
+
value: AbiParameterToPrimitiveType<param>
|
|
147
147
|
}): PreparedParam {
|
|
148
148
|
const arrayComponents = getArrayComponents(param.type)
|
|
149
149
|
if (arrayComponents) {
|
|
@@ -230,14 +230,14 @@ type EncodeArrayErrorType =
|
|
|
230
230
|
// | PrepareParamErrorType
|
|
231
231
|
| ErrorType
|
|
232
232
|
|
|
233
|
-
function encodeArray<const
|
|
234
|
-
value: AbiParameterToPrimitiveType<
|
|
233
|
+
function encodeArray<const param extends AbiParameter>(
|
|
234
|
+
value: AbiParameterToPrimitiveType<param>,
|
|
235
235
|
{
|
|
236
236
|
length,
|
|
237
237
|
param,
|
|
238
238
|
}: {
|
|
239
239
|
length: number | null
|
|
240
|
-
param:
|
|
240
|
+
param: param
|
|
241
241
|
},
|
|
242
242
|
): PreparedParam {
|
|
243
243
|
const dynamic = length === null
|
|
@@ -283,9 +283,9 @@ type EncodeBytesErrorType =
|
|
|
283
283
|
| SizeErrorType
|
|
284
284
|
| ErrorType
|
|
285
285
|
|
|
286
|
-
function encodeBytes<const
|
|
286
|
+
function encodeBytes<const param extends AbiParameter>(
|
|
287
287
|
value: Hex,
|
|
288
|
-
{ param }: { param:
|
|
288
|
+
{ param }: { param: param },
|
|
289
289
|
): PreparedParam {
|
|
290
290
|
const [, paramSize] = param.type.split('bytes')
|
|
291
291
|
const bytesSize = size(value)
|
|
@@ -373,10 +373,10 @@ type EncodeTupleErrorType =
|
|
|
373
373
|
| ErrorType
|
|
374
374
|
|
|
375
375
|
function encodeTuple<
|
|
376
|
-
const
|
|
376
|
+
const param extends AbiParameter & { components: readonly AbiParameter[] },
|
|
377
377
|
>(
|
|
378
|
-
value: AbiParameterToPrimitiveType<
|
|
379
|
-
{ param }: { param:
|
|
378
|
+
value: AbiParameterToPrimitiveType<param>,
|
|
379
|
+
{ param }: { param: param },
|
|
380
380
|
): PreparedParam {
|
|
381
381
|
let dynamic = false
|
|
382
382
|
const preparedParams: PreparedParam[] = []
|
|
@@ -45,10 +45,10 @@ type PackedAbiType =
|
|
|
45
45
|
| SolidityArrayWithoutTuple
|
|
46
46
|
|
|
47
47
|
type EncodePackedValues<
|
|
48
|
-
|
|
48
|
+
packedAbiTypes extends readonly PackedAbiType[] | readonly unknown[],
|
|
49
49
|
> = {
|
|
50
|
-
[K in keyof
|
|
51
|
-
? AbiParameterToPrimitiveType<{ type:
|
|
50
|
+
[K in keyof packedAbiTypes]: packedAbiTypes[K] extends AbiType
|
|
51
|
+
? AbiParameterToPrimitiveType<{ type: packedAbiTypes[K] }>
|
|
52
52
|
: unknown
|
|
53
53
|
}
|
|
54
54
|
|
|
@@ -59,8 +59,8 @@ export type EncodePackedErrorType =
|
|
|
59
59
|
| ErrorType
|
|
60
60
|
|
|
61
61
|
export function encodePacked<
|
|
62
|
-
const
|
|
63
|
-
>(types:
|
|
62
|
+
const packedAbiTypes extends readonly PackedAbiType[] | readonly unknown[],
|
|
63
|
+
>(types: packedAbiTypes, values: EncodePackedValues<packedAbiTypes>): Hex {
|
|
64
64
|
if (types.length !== values.length)
|
|
65
65
|
throw new AbiEncodingLengthMismatchError({
|
|
66
66
|
expectedLength: types.length as number,
|
|
@@ -87,9 +87,9 @@ type EncodeErrorType =
|
|
|
87
87
|
| UnsupportedPackedAbiType
|
|
88
88
|
| ErrorType
|
|
89
89
|
|
|
90
|
-
function encode<const
|
|
91
|
-
type:
|
|
92
|
-
value: EncodePackedValues<[
|
|
90
|
+
function encode<const packedAbiType extends PackedAbiType | unknown>(
|
|
91
|
+
type: packedAbiType,
|
|
92
|
+
value: EncodePackedValues<[packedAbiType]>[0],
|
|
93
93
|
isArray = false,
|
|
94
94
|
): Hex {
|
|
95
95
|
if (type === 'address') {
|
package/utils/ccip.ts
CHANGED
|
@@ -56,8 +56,8 @@ export const offchainLookupAbiItem = {
|
|
|
56
56
|
|
|
57
57
|
export type OffchainLookupErrorType = OffchainLookupErrorType_ | ErrorType
|
|
58
58
|
|
|
59
|
-
export async function offchainLookup<
|
|
60
|
-
client: Client<Transport,
|
|
59
|
+
export async function offchainLookup<chain extends Chain | undefined>(
|
|
60
|
+
client: Client<Transport, chain>,
|
|
61
61
|
{
|
|
62
62
|
blockNumber,
|
|
63
63
|
blockTag,
|
package/utils/data/concat.ts
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import type { ErrorType } from '../../errors/utils.js'
|
|
2
2
|
import type { ByteArray, Hex } from '../../types/misc.js'
|
|
3
3
|
|
|
4
|
-
export type ConcatReturnType<
|
|
5
|
-
|
|
4
|
+
export type ConcatReturnType<value extends Hex | ByteArray> = value extends Hex
|
|
5
|
+
? Hex
|
|
6
|
+
: ByteArray
|
|
6
7
|
|
|
7
8
|
export type ConcatErrorType =
|
|
8
9
|
| ConcatBytesErrorType
|
|
9
10
|
| ConcatHexErrorType
|
|
10
11
|
| ErrorType
|
|
11
12
|
|
|
12
|
-
export function concat<
|
|
13
|
-
values: readonly
|
|
14
|
-
): ConcatReturnType<
|
|
13
|
+
export function concat<value extends Hex | ByteArray>(
|
|
14
|
+
values: readonly value[],
|
|
15
|
+
): ConcatReturnType<value> {
|
|
15
16
|
if (typeof values[0] === 'string')
|
|
16
|
-
return concatHex(values as readonly Hex[]) as ConcatReturnType<
|
|
17
|
-
return concatBytes(values as readonly ByteArray[]) as ConcatReturnType<
|
|
17
|
+
return concatHex(values as readonly Hex[]) as ConcatReturnType<value>
|
|
18
|
+
return concatBytes(values as readonly ByteArray[]) as ConcatReturnType<value>
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
export type ConcatBytesErrorType = ErrorType
|
package/utils/data/pad.ts
CHANGED
|
@@ -9,19 +9,19 @@ type PadOptions = {
|
|
|
9
9
|
dir?: 'left' | 'right' | undefined
|
|
10
10
|
size?: number | null | undefined
|
|
11
11
|
}
|
|
12
|
-
export type PadReturnType<
|
|
12
|
+
export type PadReturnType<value extends ByteArray | Hex> = value extends Hex
|
|
13
13
|
? Hex
|
|
14
14
|
: ByteArray
|
|
15
15
|
|
|
16
16
|
export type PadErrorType = PadHexErrorType | PadBytesErrorType | ErrorType
|
|
17
17
|
|
|
18
|
-
export function pad<
|
|
19
|
-
hexOrBytes:
|
|
18
|
+
export function pad<value extends ByteArray | Hex>(
|
|
19
|
+
hexOrBytes: value,
|
|
20
20
|
{ dir, size = 32 }: PadOptions = {},
|
|
21
|
-
): PadReturnType<
|
|
21
|
+
): PadReturnType<value> {
|
|
22
22
|
if (typeof hexOrBytes === 'string')
|
|
23
|
-
return padHex(hexOrBytes, { dir, size }) as PadReturnType<
|
|
24
|
-
return padBytes(hexOrBytes, { dir, size }) as PadReturnType<
|
|
23
|
+
return padHex(hexOrBytes, { dir, size }) as PadReturnType<value>
|
|
24
|
+
return padBytes(hexOrBytes, { dir, size }) as PadReturnType<value>
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
export type PadHexErrorType = SizeExceedsPaddingSizeErrorType | ErrorType
|
package/utils/data/slice.ts
CHANGED
|
@@ -8,7 +8,7 @@ import type { ByteArray, Hex } from '../../types/misc.js'
|
|
|
8
8
|
import { type IsHexErrorType, isHex } from './isHex.js'
|
|
9
9
|
import { type SizeErrorType, size } from './size.js'
|
|
10
10
|
|
|
11
|
-
export type SliceReturnType<
|
|
11
|
+
export type SliceReturnType<value extends ByteArray | Hex> = value extends Hex
|
|
12
12
|
? Hex
|
|
13
13
|
: ByteArray
|
|
14
14
|
|
|
@@ -25,19 +25,19 @@ export type SliceErrorType =
|
|
|
25
25
|
* @param start The start offset (in bytes).
|
|
26
26
|
* @param end The end offset (in bytes).
|
|
27
27
|
*/
|
|
28
|
-
export function slice<
|
|
29
|
-
value:
|
|
28
|
+
export function slice<value extends ByteArray | Hex>(
|
|
29
|
+
value: value,
|
|
30
30
|
start?: number | undefined,
|
|
31
31
|
end?: number | undefined,
|
|
32
32
|
{ strict }: { strict?: boolean | undefined } = {},
|
|
33
|
-
): SliceReturnType<
|
|
33
|
+
): SliceReturnType<value> {
|
|
34
34
|
if (isHex(value, { strict: false }))
|
|
35
35
|
return sliceHex(value as Hex, start, end, {
|
|
36
36
|
strict,
|
|
37
|
-
}) as SliceReturnType<
|
|
37
|
+
}) as SliceReturnType<value>
|
|
38
38
|
return sliceBytes(value as ByteArray, start, end, {
|
|
39
39
|
strict,
|
|
40
|
-
}) as SliceReturnType<
|
|
40
|
+
}) as SliceReturnType<value>
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
export type AssertStartOffsetErrorType =
|
package/utils/data/trim.ts
CHANGED
|
@@ -4,16 +4,16 @@ import type { ByteArray, Hex } from '../../types/misc.js'
|
|
|
4
4
|
type TrimOptions = {
|
|
5
5
|
dir?: 'left' | 'right' | undefined
|
|
6
6
|
}
|
|
7
|
-
export type TrimReturnType<
|
|
7
|
+
export type TrimReturnType<value extends ByteArray | Hex> = value extends Hex
|
|
8
8
|
? Hex
|
|
9
9
|
: ByteArray
|
|
10
10
|
|
|
11
11
|
export type TrimErrorType = ErrorType
|
|
12
12
|
|
|
13
|
-
export function trim<
|
|
14
|
-
hexOrBytes:
|
|
13
|
+
export function trim<value extends ByteArray | Hex>(
|
|
14
|
+
hexOrBytes: value,
|
|
15
15
|
{ dir = 'left' }: TrimOptions = {},
|
|
16
|
-
): TrimReturnType<
|
|
16
|
+
): TrimReturnType<value> {
|
|
17
17
|
let data: any =
|
|
18
18
|
typeof hexOrBytes === 'string' ? hexOrBytes.replace('0x', '') : hexOrBytes
|
|
19
19
|
|
|
@@ -32,7 +32,7 @@ export function trim<TValue extends ByteArray | Hex>(
|
|
|
32
32
|
if (data.length === 1 && dir === 'right') data = `${data}0`
|
|
33
33
|
return `0x${
|
|
34
34
|
data.length % 2 === 1 ? `0${data}` : data
|
|
35
|
-
}` as TrimReturnType<
|
|
35
|
+
}` as TrimReturnType<value>
|
|
36
36
|
}
|
|
37
|
-
return data as TrimReturnType<
|
|
37
|
+
return data as TrimReturnType<value>
|
|
38
38
|
}
|
|
@@ -14,25 +14,25 @@ import {
|
|
|
14
14
|
import { type BytesToHexErrorType, bytesToHex } from './toHex.js'
|
|
15
15
|
|
|
16
16
|
export type FromBytesParameters<
|
|
17
|
-
|
|
17
|
+
to extends 'string' | 'hex' | 'bigint' | 'number' | 'boolean',
|
|
18
18
|
> =
|
|
19
|
-
|
|
|
19
|
+
| to
|
|
20
20
|
| {
|
|
21
21
|
/** Size of the bytes. */
|
|
22
22
|
size?: number | undefined
|
|
23
23
|
/** Type to convert to. */
|
|
24
|
-
to:
|
|
24
|
+
to: to
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
export type FromBytesReturnType<
|
|
27
|
+
export type FromBytesReturnType<to> = to extends 'string'
|
|
28
28
|
? string
|
|
29
|
-
:
|
|
29
|
+
: to extends 'hex'
|
|
30
30
|
? Hex
|
|
31
|
-
:
|
|
31
|
+
: to extends 'bigint'
|
|
32
32
|
? bigint
|
|
33
|
-
:
|
|
33
|
+
: to extends 'number'
|
|
34
34
|
? number
|
|
35
|
-
:
|
|
35
|
+
: to extends 'boolean'
|
|
36
36
|
? boolean
|
|
37
37
|
: never
|
|
38
38
|
|
|
@@ -68,23 +68,23 @@ export type FromBytesErrorType =
|
|
|
68
68
|
* // 'Hello world'
|
|
69
69
|
*/
|
|
70
70
|
export function fromBytes<
|
|
71
|
-
|
|
71
|
+
to extends 'string' | 'hex' | 'bigint' | 'number' | 'boolean',
|
|
72
72
|
>(
|
|
73
73
|
bytes: ByteArray,
|
|
74
|
-
toOrOpts: FromBytesParameters<
|
|
75
|
-
): FromBytesReturnType<
|
|
74
|
+
toOrOpts: FromBytesParameters<to>,
|
|
75
|
+
): FromBytesReturnType<to> {
|
|
76
76
|
const opts = typeof toOrOpts === 'string' ? { to: toOrOpts } : toOrOpts
|
|
77
77
|
const to = opts.to
|
|
78
78
|
|
|
79
79
|
if (to === 'number')
|
|
80
|
-
return bytesToNumber(bytes, opts) as FromBytesReturnType<
|
|
80
|
+
return bytesToNumber(bytes, opts) as FromBytesReturnType<to>
|
|
81
81
|
if (to === 'bigint')
|
|
82
|
-
return bytesToBigInt(bytes, opts) as FromBytesReturnType<
|
|
82
|
+
return bytesToBigInt(bytes, opts) as FromBytesReturnType<to>
|
|
83
83
|
if (to === 'boolean')
|
|
84
|
-
return bytesToBool(bytes, opts) as FromBytesReturnType<
|
|
84
|
+
return bytesToBool(bytes, opts) as FromBytesReturnType<to>
|
|
85
85
|
if (to === 'string')
|
|
86
|
-
return bytesToString(bytes, opts) as FromBytesReturnType<
|
|
87
|
-
return bytesToHex(bytes, opts) as FromBytesReturnType<
|
|
86
|
+
return bytesToString(bytes, opts) as FromBytesReturnType<to>
|
|
87
|
+
return bytesToHex(bytes, opts) as FromBytesReturnType<to>
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
export type BytesToBigIntOpts = {
|