viem 2.17.2 → 2.17.4
Sign up to get free protection for your applications and to get access to all the features.
- 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/actions/getContract.ts
CHANGED
@@ -69,35 +69,35 @@ import {
|
|
69
69
|
} from './wallet/writeContract.js'
|
70
70
|
|
71
71
|
type KeyedClient<
|
72
|
-
|
73
|
-
|
74
|
-
|
72
|
+
transport extends Transport = Transport,
|
73
|
+
chain extends Chain | undefined = Chain | undefined,
|
74
|
+
account extends Account | undefined = Account | undefined,
|
75
75
|
> =
|
76
76
|
| {
|
77
|
-
public?: Client<
|
78
|
-
wallet: Client<
|
77
|
+
public?: Client<transport, chain> | undefined
|
78
|
+
wallet: Client<transport, chain, account>
|
79
79
|
}
|
80
80
|
| {
|
81
|
-
public: Client<
|
82
|
-
wallet?: Client<
|
81
|
+
public: Client<transport, chain>
|
82
|
+
wallet?: Client<transport, chain, account> | undefined
|
83
83
|
}
|
84
84
|
|
85
85
|
export type GetContractParameters<
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
| Client<
|
92
|
-
| KeyedClient<
|
93
|
-
| Client<
|
94
|
-
| KeyedClient<
|
95
|
-
|
86
|
+
transport extends Transport = Transport,
|
87
|
+
chain extends Chain | undefined = Chain | undefined,
|
88
|
+
account extends Account | undefined = Account | undefined,
|
89
|
+
abi extends Abi | readonly unknown[] = Abi,
|
90
|
+
client extends
|
91
|
+
| Client<transport, chain, account>
|
92
|
+
| KeyedClient<transport, chain, account> =
|
93
|
+
| Client<transport, chain, account>
|
94
|
+
| KeyedClient<transport, chain, account>,
|
95
|
+
address extends Address = Address,
|
96
96
|
> = {
|
97
97
|
/** Contract ABI */
|
98
|
-
abi:
|
98
|
+
abi: abi
|
99
99
|
/** Contract address */
|
100
|
-
address:
|
100
|
+
address: address
|
101
101
|
/** The Client.
|
102
102
|
*
|
103
103
|
* If you pass in a [`publicClient`](https://viem.sh/docs/clients/public), the following methods are available:
|
@@ -114,43 +114,44 @@ export type GetContractParameters<
|
|
114
114
|
* - [`estimateGas`](https://viem.sh/docs/contract/estimateContractGas)
|
115
115
|
* - [`write`](https://viem.sh/docs/contract/writeContract)
|
116
116
|
*/
|
117
|
-
client:
|
117
|
+
client: client
|
118
118
|
}
|
119
119
|
|
120
120
|
export type GetContractReturnType<
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
121
|
+
abi extends Abi | readonly unknown[] = Abi,
|
122
|
+
client extends Client | KeyedClient = Client | KeyedClient,
|
123
|
+
address extends Address = Address,
|
124
|
+
//
|
125
|
+
_eventNames extends string = abi extends Abi
|
126
|
+
? Abi extends abi
|
126
127
|
? string
|
127
|
-
: ExtractAbiEventNames<
|
128
|
+
: ExtractAbiEventNames<abi>
|
128
129
|
: string,
|
129
|
-
|
130
|
-
? Abi extends
|
130
|
+
_readFunctionNames extends string = abi extends Abi
|
131
|
+
? Abi extends abi
|
131
132
|
? string
|
132
|
-
: ExtractAbiFunctionNames<
|
133
|
+
: ExtractAbiFunctionNames<abi, 'pure' | 'view'>
|
133
134
|
: string,
|
134
|
-
|
135
|
-
? Abi extends
|
135
|
+
_writeFunctionNames extends string = abi extends Abi
|
136
|
+
? Abi extends abi
|
136
137
|
? string
|
137
|
-
: ExtractAbiFunctionNames<
|
138
|
+
: ExtractAbiFunctionNames<abi, 'nonpayable' | 'payable'>
|
138
139
|
: string,
|
139
|
-
|
140
|
-
|
140
|
+
_narrowable extends boolean = IsNarrowable<abi, Abi>,
|
141
|
+
_publicClient extends Client | unknown = client extends {
|
141
142
|
public: Client
|
142
143
|
}
|
143
|
-
?
|
144
|
-
:
|
145
|
-
|
144
|
+
? client['public']
|
145
|
+
: client,
|
146
|
+
_walletClient extends Client | unknown = client extends {
|
146
147
|
wallet: Client
|
147
148
|
}
|
148
|
-
?
|
149
|
-
:
|
149
|
+
? client['wallet']
|
150
|
+
: client,
|
150
151
|
> = Prettify<
|
151
152
|
Prettify<
|
152
|
-
(
|
153
|
-
? (IsNever<
|
153
|
+
(_publicClient extends Client
|
154
|
+
? (IsNever<_readFunctionNames> extends true
|
154
155
|
? unknown
|
155
156
|
: {
|
156
157
|
/**
|
@@ -179,11 +180,11 @@ export type GetContractReturnType<
|
|
179
180
|
* // 424122n
|
180
181
|
*/
|
181
182
|
read: {
|
182
|
-
[functionName in
|
183
|
-
|
184
|
-
|
183
|
+
[functionName in _readFunctionNames]: GetReadFunction<
|
184
|
+
_narrowable,
|
185
|
+
abi,
|
185
186
|
functionName extends ContractFunctionName<
|
186
|
-
|
187
|
+
abi,
|
187
188
|
'pure' | 'view'
|
188
189
|
>
|
189
190
|
? functionName
|
@@ -191,7 +192,7 @@ export type GetContractReturnType<
|
|
191
192
|
>
|
192
193
|
}
|
193
194
|
}) &
|
194
|
-
(IsNever<
|
195
|
+
(IsNever<_writeFunctionNames> extends true
|
195
196
|
? unknown
|
196
197
|
: {
|
197
198
|
/**
|
@@ -215,13 +216,13 @@ export type GetContractReturnType<
|
|
215
216
|
* })
|
216
217
|
*/
|
217
218
|
estimateGas: {
|
218
|
-
[functionName in
|
219
|
-
|
220
|
-
|
219
|
+
[functionName in _writeFunctionNames]: GetEstimateFunction<
|
220
|
+
_narrowable,
|
221
|
+
_publicClient['chain'],
|
221
222
|
undefined,
|
222
|
-
|
223
|
+
abi,
|
223
224
|
functionName extends ContractFunctionName<
|
224
|
-
|
225
|
+
abi,
|
225
226
|
'nonpayable' | 'payable'
|
226
227
|
>
|
227
228
|
? functionName
|
@@ -253,15 +254,15 @@ export type GetContractReturnType<
|
|
253
254
|
* })
|
254
255
|
*/
|
255
256
|
simulate: {
|
256
|
-
[functionName in
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
?
|
261
|
-
:
|
262
|
-
|
257
|
+
[functionName in _writeFunctionNames]: GetSimulateFunction<
|
258
|
+
_narrowable,
|
259
|
+
_publicClient['chain'],
|
260
|
+
_walletClient extends Client
|
261
|
+
? _walletClient['account']
|
262
|
+
: _publicClient['account'],
|
263
|
+
abi,
|
263
264
|
functionName extends ContractFunctionName<
|
264
|
-
|
265
|
+
abi,
|
265
266
|
'nonpayable' | 'payable'
|
266
267
|
>
|
267
268
|
? functionName
|
@@ -269,7 +270,7 @@ export type GetContractReturnType<
|
|
269
270
|
>
|
270
271
|
}
|
271
272
|
}) &
|
272
|
-
(IsNever<
|
273
|
+
(IsNever<_eventNames> extends true
|
273
274
|
? unknown
|
274
275
|
: {
|
275
276
|
/**
|
@@ -291,12 +292,10 @@ export type GetContractReturnType<
|
|
291
292
|
* const filter = await contract.createEventFilter.Transfer()
|
292
293
|
*/
|
293
294
|
createEventFilter: {
|
294
|
-
[EventName in
|
295
|
-
|
296
|
-
|
297
|
-
EventName extends ContractEventName<
|
298
|
-
? EventName
|
299
|
-
: never
|
295
|
+
[EventName in _eventNames]: GetEventFilter<
|
296
|
+
_narrowable,
|
297
|
+
abi,
|
298
|
+
EventName extends ContractEventName<abi> ? EventName : never
|
300
299
|
>
|
301
300
|
}
|
302
301
|
/**
|
@@ -318,12 +317,10 @@ export type GetContractReturnType<
|
|
318
317
|
* const filter = await contract.createEventFilter.Transfer()
|
319
318
|
*/
|
320
319
|
getEvents: {
|
321
|
-
[EventName in
|
322
|
-
|
323
|
-
|
324
|
-
EventName extends ContractEventName<
|
325
|
-
? EventName
|
326
|
-
: never
|
320
|
+
[EventName in _eventNames]: GetEventsFunction<
|
321
|
+
_narrowable,
|
322
|
+
abi,
|
323
|
+
EventName extends ContractEventName<abi> ? EventName : never
|
327
324
|
>
|
328
325
|
}
|
329
326
|
/**
|
@@ -353,18 +350,16 @@ export type GetContractReturnType<
|
|
353
350
|
* )
|
354
351
|
*/
|
355
352
|
watchEvent: {
|
356
|
-
[EventName in
|
357
|
-
|
358
|
-
|
359
|
-
EventName extends ContractEventName<
|
360
|
-
? EventName
|
361
|
-
: never
|
353
|
+
[EventName in _eventNames]: GetWatchEvent<
|
354
|
+
_narrowable,
|
355
|
+
abi,
|
356
|
+
EventName extends ContractEventName<abi> ? EventName : never
|
362
357
|
>
|
363
358
|
}
|
364
359
|
})
|
365
360
|
: unknown) &
|
366
|
-
(
|
367
|
-
? IsNever<
|
361
|
+
(_walletClient extends Client
|
362
|
+
? IsNever<_writeFunctionNames> extends true
|
368
363
|
? unknown
|
369
364
|
: {
|
370
365
|
/**
|
@@ -388,13 +383,13 @@ export type GetContractReturnType<
|
|
388
383
|
* })
|
389
384
|
*/
|
390
385
|
estimateGas: {
|
391
|
-
[functionName in
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
386
|
+
[functionName in _writeFunctionNames]: GetEstimateFunction<
|
387
|
+
_narrowable,
|
388
|
+
_walletClient['chain'],
|
389
|
+
_walletClient['account'],
|
390
|
+
abi,
|
396
391
|
functionName extends ContractFunctionName<
|
397
|
-
|
392
|
+
abi,
|
398
393
|
'nonpayable' | 'payable'
|
399
394
|
>
|
400
395
|
? functionName
|
@@ -428,13 +423,13 @@ export type GetContractReturnType<
|
|
428
423
|
* })
|
429
424
|
*/
|
430
425
|
write: {
|
431
|
-
[functionName in
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
426
|
+
[functionName in _writeFunctionNames]: GetWriteFunction<
|
427
|
+
_narrowable,
|
428
|
+
_walletClient['chain'],
|
429
|
+
_walletClient['account'],
|
430
|
+
abi,
|
436
431
|
functionName extends ContractFunctionName<
|
437
|
-
|
432
|
+
abi,
|
438
433
|
'nonpayable' | 'payable'
|
439
434
|
>
|
440
435
|
? functionName
|
@@ -443,7 +438,7 @@ export type GetContractReturnType<
|
|
443
438
|
}
|
444
439
|
}
|
445
440
|
: unknown)
|
446
|
-
> & { address:
|
441
|
+
> & { address: address; abi: abi }
|
447
442
|
>
|
448
443
|
|
449
444
|
export type GetContractErrorType = ErrorType
|
@@ -474,29 +469,29 @@ export type GetContractErrorType = ErrorType
|
|
474
469
|
* })
|
475
470
|
*/
|
476
471
|
export function getContract<
|
477
|
-
|
478
|
-
|
479
|
-
const
|
480
|
-
const
|
481
|
-
| Client<
|
482
|
-
| KeyedClient<
|
483
|
-
|
484
|
-
|
472
|
+
transport extends Transport,
|
473
|
+
address extends Address,
|
474
|
+
const abi extends Abi | readonly unknown[],
|
475
|
+
const client extends
|
476
|
+
| Client<transport, chain, account>
|
477
|
+
| KeyedClient<transport, chain, account>,
|
478
|
+
chain extends Chain | undefined = Chain | undefined,
|
479
|
+
account extends Account | undefined = Account | undefined,
|
485
480
|
>({
|
486
481
|
abi,
|
487
482
|
address,
|
488
483
|
client: client_,
|
489
484
|
}: GetContractParameters<
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
>): GetContractReturnType<
|
485
|
+
transport,
|
486
|
+
chain,
|
487
|
+
account,
|
488
|
+
abi,
|
489
|
+
client,
|
490
|
+
address
|
491
|
+
>): GetContractReturnType<abi, client, address> {
|
497
492
|
const client = client_ as
|
498
|
-
| Client<
|
499
|
-
| KeyedClient<
|
493
|
+
| Client<transport, chain, account>
|
494
|
+
| KeyedClient<transport, chain, account>
|
500
495
|
|
501
496
|
const [publicClient, walletClient] = (() => {
|
502
497
|
if (!client) return [undefined, undefined]
|
@@ -779,7 +774,7 @@ export function getContract<
|
|
779
774
|
contract.address = address
|
780
775
|
contract.abi = abi
|
781
776
|
|
782
|
-
return contract as unknown as GetContractReturnType<
|
777
|
+
return contract as unknown as GetContractReturnType<abi, client, address>
|
783
778
|
}
|
784
779
|
|
785
780
|
/**
|
@@ -819,158 +814,161 @@ export function getEventParameters(
|
|
819
814
|
}
|
820
815
|
|
821
816
|
type GetReadFunction<
|
822
|
-
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
|
817
|
+
narrowable extends boolean,
|
818
|
+
abi extends Abi | readonly unknown[],
|
819
|
+
functionName extends ContractFunctionName<abi, 'pure' | 'view'>,
|
820
|
+
args extends ContractFunctionArgs<
|
821
|
+
abi,
|
827
822
|
'pure' | 'view',
|
828
|
-
|
829
|
-
> = ContractFunctionArgs<
|
830
|
-
|
831
|
-
? ExtractAbiFunction<
|
823
|
+
functionName
|
824
|
+
> = ContractFunctionArgs<abi, 'pure' | 'view', functionName>,
|
825
|
+
abiFunction extends AbiFunction = abi extends Abi
|
826
|
+
? ExtractAbiFunction<abi, functionName>
|
832
827
|
: AbiFunction,
|
833
|
-
|
834
|
-
|
828
|
+
//
|
829
|
+
_args = AbiParametersToPrimitiveTypes<abiFunction['inputs']>,
|
830
|
+
_options = Prettify<
|
835
831
|
UnionOmit<
|
836
|
-
ReadContractParameters<
|
832
|
+
ReadContractParameters<abi, functionName, args>,
|
837
833
|
'abi' | 'address' | 'args' | 'functionName'
|
838
834
|
>
|
839
835
|
>,
|
840
|
-
> =
|
836
|
+
> = narrowable extends true
|
841
837
|
? (
|
842
|
-
...parameters:
|
843
|
-
? [options?:
|
844
|
-
: [args:
|
845
|
-
) => Promise<ReadContractReturnType<
|
838
|
+
...parameters: _args extends readonly []
|
839
|
+
? [options?: _options]
|
840
|
+
: [args: _args, options?: _options]
|
841
|
+
) => Promise<ReadContractReturnType<abi, functionName, args>>
|
846
842
|
: (
|
847
843
|
...parameters:
|
848
|
-
| [options?:
|
849
|
-
| [args: readonly unknown[], options?:
|
844
|
+
| [options?: _options]
|
845
|
+
| [args: readonly unknown[], options?: _options]
|
850
846
|
) => Promise<ReadContractReturnType>
|
851
847
|
|
852
848
|
type GetEstimateFunction<
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
849
|
+
narrowable extends boolean,
|
850
|
+
chain extends Chain | undefined,
|
851
|
+
account extends Account | undefined,
|
852
|
+
abi extends Abi | readonly unknown[],
|
853
|
+
functionName extends ContractFunctionName<abi, 'nonpayable' | 'payable'>,
|
854
|
+
args extends ContractFunctionArgs<
|
855
|
+
abi,
|
860
856
|
'nonpayable' | 'payable',
|
861
|
-
|
862
|
-
> = ContractFunctionArgs<
|
863
|
-
|
864
|
-
? ExtractAbiFunction<
|
857
|
+
functionName
|
858
|
+
> = ContractFunctionArgs<abi, 'nonpayable' | 'payable', functionName>,
|
859
|
+
abiFunction extends AbiFunction = abi extends Abi
|
860
|
+
? ExtractAbiFunction<abi, functionName>
|
865
861
|
: AbiFunction,
|
866
|
-
|
867
|
-
|
862
|
+
//
|
863
|
+
_args = AbiParametersToPrimitiveTypes<abiFunction['inputs']>,
|
864
|
+
_options = Prettify<
|
868
865
|
UnionOmit<
|
869
|
-
EstimateContractGasParameters<
|
866
|
+
EstimateContractGasParameters<abi, functionName, args, chain>,
|
870
867
|
'abi' | 'address' | 'args' | 'functionName'
|
871
868
|
>
|
872
869
|
>,
|
873
|
-
// For making `options` parameter required if `
|
874
|
-
IsOptionsRequired = IsUndefined<
|
875
|
-
> =
|
870
|
+
// For making `options` parameter required if `account`
|
871
|
+
IsOptionsRequired = IsUndefined<account>,
|
872
|
+
> = narrowable extends true
|
876
873
|
? (
|
877
|
-
...parameters:
|
874
|
+
...parameters: _args extends readonly []
|
878
875
|
? IsOptionsRequired extends true
|
879
|
-
? [options:
|
880
|
-
: [options?:
|
876
|
+
? [options: _options]
|
877
|
+
: [options?: _options]
|
881
878
|
: [
|
882
|
-
args:
|
879
|
+
args: _args,
|
883
880
|
...parameters: IsOptionsRequired extends true
|
884
|
-
? [options:
|
885
|
-
: [options?:
|
881
|
+
? [options: _options]
|
882
|
+
: [options?: _options],
|
886
883
|
]
|
887
884
|
) => Promise<EstimateContractGasReturnType>
|
888
885
|
: (
|
889
886
|
...parameters:
|
890
887
|
| (IsOptionsRequired extends true
|
891
|
-
? [options:
|
892
|
-
: [options?:
|
888
|
+
? [options: _options]
|
889
|
+
: [options?: _options])
|
893
890
|
| [
|
894
891
|
args: readonly unknown[],
|
895
892
|
...parameters: IsOptionsRequired extends true
|
896
|
-
? [options:
|
897
|
-
: [options?:
|
893
|
+
? [options: _options]
|
894
|
+
: [options?: _options],
|
898
895
|
]
|
899
896
|
) => Promise<EstimateContractGasReturnType>
|
900
897
|
|
901
898
|
type GetSimulateFunction<
|
902
|
-
|
903
|
-
|
904
|
-
|
905
|
-
|
906
|
-
|
907
|
-
|
908
|
-
|
899
|
+
narrowable extends boolean,
|
900
|
+
chain extends Chain | undefined,
|
901
|
+
account extends Account | undefined,
|
902
|
+
abi extends Abi | readonly unknown[],
|
903
|
+
functionName extends ContractFunctionName<abi, 'nonpayable' | 'payable'>,
|
904
|
+
args extends ContractFunctionArgs<
|
905
|
+
abi,
|
909
906
|
'nonpayable' | 'payable',
|
910
|
-
|
911
|
-
> = ContractFunctionArgs<
|
912
|
-
|
913
|
-
? ExtractAbiFunction<
|
907
|
+
functionName
|
908
|
+
> = ContractFunctionArgs<abi, 'nonpayable' | 'payable', functionName>,
|
909
|
+
abiFunction extends AbiFunction = abi extends Abi
|
910
|
+
? ExtractAbiFunction<abi, functionName>
|
914
911
|
: AbiFunction,
|
915
|
-
|
916
|
-
|
912
|
+
//
|
913
|
+
_args = AbiParametersToPrimitiveTypes<abiFunction['inputs']>,
|
914
|
+
> = narrowable extends true
|
917
915
|
? <
|
918
|
-
|
919
|
-
|
916
|
+
chainOverride extends Chain | undefined = undefined,
|
917
|
+
accountOverride extends Account | Address | undefined = undefined,
|
920
918
|
>(
|
921
|
-
...parameters:
|
919
|
+
...parameters: _args extends readonly []
|
922
920
|
? [
|
923
921
|
options?: Omit<
|
924
922
|
SimulateContractParameters<
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
923
|
+
abi,
|
924
|
+
functionName,
|
925
|
+
args,
|
926
|
+
chain,
|
927
|
+
chainOverride,
|
928
|
+
accountOverride
|
931
929
|
>,
|
932
930
|
'abi' | 'address' | 'args' | 'functionName'
|
933
931
|
>,
|
934
932
|
]
|
935
933
|
: [
|
936
|
-
args:
|
934
|
+
args: _args,
|
937
935
|
options?: Omit<
|
938
936
|
SimulateContractParameters<
|
939
|
-
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
937
|
+
abi,
|
938
|
+
functionName,
|
939
|
+
args,
|
940
|
+
chain,
|
941
|
+
chainOverride,
|
942
|
+
accountOverride
|
945
943
|
>,
|
946
944
|
'abi' | 'address' | 'args' | 'functionName'
|
947
945
|
>,
|
948
946
|
]
|
949
947
|
) => Promise<
|
950
948
|
SimulateContractReturnType<
|
951
|
-
|
952
|
-
|
953
|
-
|
954
|
-
|
955
|
-
|
956
|
-
|
957
|
-
|
949
|
+
abi,
|
950
|
+
functionName,
|
951
|
+
args,
|
952
|
+
chain,
|
953
|
+
account,
|
954
|
+
chainOverride,
|
955
|
+
accountOverride
|
958
956
|
>
|
959
957
|
>
|
960
958
|
: <
|
961
|
-
|
962
|
-
|
959
|
+
chainOverride extends Chain | undefined = undefined,
|
960
|
+
accountOverride extends Account | Address | undefined = undefined,
|
963
961
|
>(
|
964
962
|
...parameters:
|
965
963
|
| [
|
966
964
|
options?: Omit<
|
967
965
|
SimulateContractParameters<
|
968
|
-
|
969
|
-
|
970
|
-
|
971
|
-
|
972
|
-
|
973
|
-
|
966
|
+
abi,
|
967
|
+
functionName,
|
968
|
+
args,
|
969
|
+
chain,
|
970
|
+
chainOverride,
|
971
|
+
accountOverride
|
974
972
|
>,
|
975
973
|
'abi' | 'address' | 'args' | 'functionName'
|
976
974
|
>,
|
@@ -979,12 +977,12 @@ type GetSimulateFunction<
|
|
979
977
|
args: readonly unknown[],
|
980
978
|
options?: Omit<
|
981
979
|
SimulateContractParameters<
|
982
|
-
|
983
|
-
|
984
|
-
|
985
|
-
|
986
|
-
|
987
|
-
|
980
|
+
abi,
|
981
|
+
functionName,
|
982
|
+
args,
|
983
|
+
chain,
|
984
|
+
chainOverride,
|
985
|
+
accountOverride
|
988
986
|
>,
|
989
987
|
'abi' | 'address' | 'args' | 'functionName'
|
990
988
|
>,
|
@@ -992,169 +990,173 @@ type GetSimulateFunction<
|
|
992
990
|
) => Promise<SimulateContractReturnType>
|
993
991
|
|
994
992
|
type GetWriteFunction<
|
995
|
-
|
996
|
-
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
|
993
|
+
narrowable extends boolean,
|
994
|
+
chain extends Chain | undefined,
|
995
|
+
account extends Account | undefined,
|
996
|
+
abi extends Abi | readonly unknown[],
|
997
|
+
functionName extends ContractFunctionName<abi, 'nonpayable' | 'payable'>,
|
998
|
+
args extends ContractFunctionArgs<
|
999
|
+
abi,
|
1002
1000
|
'nonpayable' | 'payable',
|
1003
|
-
|
1004
|
-
> = ContractFunctionArgs<
|
1005
|
-
|
1006
|
-
? ExtractAbiFunction<
|
1001
|
+
functionName
|
1002
|
+
> = ContractFunctionArgs<abi, 'nonpayable' | 'payable', functionName>,
|
1003
|
+
abiFunction extends AbiFunction = abi extends Abi
|
1004
|
+
? ExtractAbiFunction<abi, functionName>
|
1007
1005
|
: AbiFunction,
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1006
|
+
//
|
1007
|
+
_args = AbiParametersToPrimitiveTypes<abiFunction['inputs']>,
|
1008
|
+
// For making `options` parameter required if `account` or `chain` is undefined
|
1009
|
+
_isOptionsRequired = Or<[IsUndefined<account>, IsUndefined<chain>]>,
|
1010
|
+
> = narrowable extends true
|
1012
1011
|
? <
|
1013
|
-
|
1014
|
-
|
1012
|
+
chainOverride extends Chain | undefined,
|
1013
|
+
options extends Prettify<
|
1015
1014
|
UnionOmit<
|
1016
1015
|
WriteContractParameters<
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1021
|
-
|
1022
|
-
|
1016
|
+
abi,
|
1017
|
+
functionName,
|
1018
|
+
args,
|
1019
|
+
chain,
|
1020
|
+
account,
|
1021
|
+
chainOverride
|
1023
1022
|
>,
|
1024
1023
|
'abi' | 'address' | 'args' | 'functionName'
|
1025
1024
|
>
|
1026
1025
|
>,
|
1027
1026
|
>(
|
1028
|
-
...parameters:
|
1029
|
-
?
|
1030
|
-
? [options:
|
1031
|
-
: [options?:
|
1027
|
+
...parameters: _args extends readonly []
|
1028
|
+
? _isOptionsRequired extends true
|
1029
|
+
? [options: options]
|
1030
|
+
: [options?: options]
|
1032
1031
|
: [
|
1033
|
-
args:
|
1034
|
-
...parameters:
|
1035
|
-
? [options:
|
1036
|
-
: [options?:
|
1032
|
+
args: _args,
|
1033
|
+
...parameters: _isOptionsRequired extends true
|
1034
|
+
? [options: options]
|
1035
|
+
: [options?: options],
|
1037
1036
|
]
|
1038
1037
|
) => Promise<WriteContractReturnType>
|
1039
1038
|
: <
|
1040
|
-
|
1041
|
-
|
1039
|
+
chainOverride extends Chain | undefined,
|
1040
|
+
options extends Prettify<
|
1042
1041
|
UnionOmit<
|
1043
1042
|
WriteContractParameters<
|
1044
|
-
|
1045
|
-
|
1046
|
-
|
1047
|
-
|
1048
|
-
|
1049
|
-
|
1043
|
+
abi,
|
1044
|
+
functionName,
|
1045
|
+
args,
|
1046
|
+
chain,
|
1047
|
+
account,
|
1048
|
+
chainOverride
|
1050
1049
|
>,
|
1051
1050
|
'abi' | 'address' | 'args' | 'functionName'
|
1052
1051
|
>
|
1053
1052
|
>,
|
1054
|
-
Rest extends unknown[] =
|
1055
|
-
? [options:
|
1056
|
-
: [options?:
|
1053
|
+
Rest extends unknown[] = _isOptionsRequired extends true
|
1054
|
+
? [options: options]
|
1055
|
+
: [options?: options],
|
1057
1056
|
>(
|
1058
1057
|
...parameters: Rest | [args: readonly unknown[], ...parameters: Rest]
|
1059
1058
|
) => Promise<WriteContractReturnType>
|
1060
1059
|
|
1061
1060
|
type GetEventFilter<
|
1062
|
-
|
1063
|
-
|
1064
|
-
|
1065
|
-
|
1066
|
-
? ExtractAbiEvent<
|
1061
|
+
narrowable extends boolean,
|
1062
|
+
abi extends Abi | readonly unknown[],
|
1063
|
+
eventName extends ContractEventName<abi>,
|
1064
|
+
abiEvent extends AbiEvent = abi extends Abi
|
1065
|
+
? ExtractAbiEvent<abi, eventName>
|
1067
1066
|
: AbiEvent,
|
1068
|
-
|
1069
|
-
|
1067
|
+
//
|
1068
|
+
_args = AbiEventParametersToPrimitiveTypes<abiEvent['inputs']>,
|
1069
|
+
_options = Prettify<
|
1070
1070
|
Omit<
|
1071
|
-
CreateContractEventFilterParameters<
|
1071
|
+
CreateContractEventFilterParameters<abi, eventName>,
|
1072
1072
|
'abi' | 'address' | 'args' | 'eventName' | 'strict'
|
1073
1073
|
>
|
1074
1074
|
>,
|
1075
|
-
IndexedInputs = Extract<
|
1076
|
-
> =
|
1075
|
+
IndexedInputs = Extract<abiEvent['inputs'][number], { indexed: true }>,
|
1076
|
+
> = narrowable extends true
|
1077
1077
|
? <
|
1078
|
-
const
|
1079
|
-
| MaybeExtractEventArgsFromAbi<
|
1078
|
+
const args extends
|
1079
|
+
| MaybeExtractEventArgsFromAbi<abi, eventName>
|
1080
1080
|
| undefined,
|
1081
|
-
|
1081
|
+
strict extends boolean | undefined = undefined,
|
1082
1082
|
>(
|
1083
1083
|
...parameters: IsNever<IndexedInputs> extends true
|
1084
|
-
? [options?:
|
1084
|
+
? [options?: _options & { strict?: strict }]
|
1085
1085
|
: [
|
1086
|
-
args:
|
1087
|
-
options?:
|
1086
|
+
args: _args | (_args extends args ? Readonly<args> : never),
|
1087
|
+
options?: _options & { strict?: strict },
|
1088
1088
|
]
|
1089
1089
|
) => Promise<
|
1090
|
-
CreateContractEventFilterReturnType<
|
1090
|
+
CreateContractEventFilterReturnType<abi, eventName, args, strict>
|
1091
1091
|
>
|
1092
|
-
: <
|
1092
|
+
: <strict extends boolean | undefined = undefined>(
|
1093
1093
|
...parameters:
|
1094
|
-
| [options?:
|
1094
|
+
| [options?: _options & { strict?: strict }]
|
1095
1095
|
| [
|
1096
1096
|
args: readonly unknown[] | CreateContractFilterOptions,
|
1097
|
-
options?:
|
1097
|
+
options?: _options & { strict?: strict },
|
1098
1098
|
]
|
1099
1099
|
) => Promise<CreateContractEventFilterReturnType>
|
1100
1100
|
|
1101
1101
|
type GetEventsFunction<
|
1102
|
-
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1106
|
-
? ExtractAbiEvent<
|
1102
|
+
narrowable extends boolean,
|
1103
|
+
abi extends Abi | readonly unknown[],
|
1104
|
+
eventName extends ContractEventName<abi>,
|
1105
|
+
abiEvent extends AbiEvent = abi extends Abi
|
1106
|
+
? ExtractAbiEvent<abi, eventName>
|
1107
1107
|
: AbiEvent,
|
1108
|
-
|
1109
|
-
|
1108
|
+
//
|
1109
|
+
_args = AbiEventParametersToPrimitiveTypes<abiEvent['inputs']>,
|
1110
|
+
_options = Prettify<
|
1110
1111
|
Omit<
|
1111
|
-
GetContractEventsParameters<
|
1112
|
+
GetContractEventsParameters<abi, eventName>,
|
1112
1113
|
'abi' | 'address' | 'args' | 'eventName'
|
1113
1114
|
>
|
1114
1115
|
>,
|
1115
|
-
IndexedInputs = Extract<
|
1116
|
-
> =
|
1116
|
+
IndexedInputs = Extract<abiEvent['inputs'][number], { indexed: true }>,
|
1117
|
+
> = narrowable extends true
|
1117
1118
|
? (
|
1118
1119
|
...parameters: IsNever<IndexedInputs> extends true
|
1119
|
-
? [options?:
|
1120
|
-
: [args?:
|
1121
|
-
) => Promise<GetContractEventsReturnType<
|
1120
|
+
? [options?: _options]
|
1121
|
+
: [args?: _args, options?: _options]
|
1122
|
+
) => Promise<GetContractEventsReturnType<abi, eventName>>
|
1122
1123
|
: (
|
1123
1124
|
...parameters:
|
1124
|
-
| [options?:
|
1125
|
+
| [options?: _options]
|
1125
1126
|
| [
|
1126
1127
|
args?: readonly unknown[] | WatchContractEventOptions,
|
1127
|
-
options?:
|
1128
|
+
options?: _options,
|
1128
1129
|
]
|
1129
|
-
) => Promise<GetContractEventsReturnType<
|
1130
|
+
) => Promise<GetContractEventsReturnType<abi, eventName>>
|
1130
1131
|
|
1131
1132
|
type GetWatchEvent<
|
1132
|
-
|
1133
|
-
|
1134
|
-
|
1135
|
-
|
1136
|
-
? ExtractAbiEvent<
|
1133
|
+
narrowable extends boolean,
|
1134
|
+
abi extends Abi | readonly unknown[],
|
1135
|
+
eventName extends ContractEventName<abi>,
|
1136
|
+
abiEvent extends AbiEvent = abi extends Abi
|
1137
|
+
? ExtractAbiEvent<abi, eventName>
|
1137
1138
|
: AbiEvent,
|
1138
|
-
|
1139
|
-
|
1139
|
+
//
|
1140
|
+
_args = AbiEventParametersToPrimitiveTypes<abiEvent['inputs']>,
|
1141
|
+
_options = Prettify<
|
1140
1142
|
Omit<
|
1141
|
-
WatchContractEventParameters<
|
1143
|
+
WatchContractEventParameters<abi, eventName>,
|
1142
1144
|
'abi' | 'address' | 'args' | 'eventName'
|
1143
1145
|
>
|
1144
1146
|
>,
|
1145
|
-
|
1146
|
-
> =
|
1147
|
+
_indexedInputs = Extract<abiEvent['inputs'][number], { indexed: true }>,
|
1148
|
+
> = narrowable extends true
|
1147
1149
|
? (
|
1148
|
-
...parameters: IsNever<
|
1149
|
-
? [options:
|
1150
|
-
: [args:
|
1150
|
+
...parameters: IsNever<_indexedInputs> extends true
|
1151
|
+
? [options: _options]
|
1152
|
+
: [args: _args, options: _options]
|
1151
1153
|
) => WatchContractEventReturnType
|
1152
1154
|
: (
|
1153
1155
|
...parameters:
|
1154
|
-
| [options?:
|
1156
|
+
| [options?: _options]
|
1155
1157
|
| [
|
1156
1158
|
args: readonly unknown[] | WatchContractEventOptions,
|
1157
|
-
options?:
|
1159
|
+
options?: _options,
|
1158
1160
|
]
|
1159
1161
|
) => WatchContractEventReturnType
|
1160
1162
|
|