viem 2.0.0-beta.6 → 2.0.0-beta.9
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 +470 -394
- package/README.md +52 -46
- package/_cjs/accounts/toAccount.js.map +1 -1
- package/_cjs/accounts/utils/signTransaction.js.map +1 -1
- package/_cjs/actions/ens/getEnsAddress.js +1 -1
- package/_cjs/actions/ens/getEnsAddress.js.map +1 -1
- package/_cjs/actions/ens/getEnsAvatar.js +1 -1
- package/_cjs/actions/ens/getEnsAvatar.js.map +1 -1
- package/_cjs/actions/ens/getEnsName.js +1 -1
- package/_cjs/actions/ens/getEnsName.js.map +1 -1
- package/_cjs/actions/ens/getEnsResolver.js +1 -1
- package/_cjs/actions/ens/getEnsResolver.js.map +1 -1
- package/_cjs/actions/ens/getEnsText.js +1 -1
- package/_cjs/actions/ens/getEnsText.js.map +1 -1
- package/_cjs/actions/getContract.js +7 -7
- package/_cjs/actions/getContract.js.map +1 -1
- package/_cjs/actions/public/call.js.map +1 -1
- package/_cjs/actions/public/createContractEventFilter.js +1 -1
- package/_cjs/actions/public/createContractEventFilter.js.map +1 -1
- package/_cjs/actions/public/createEventFilter.js +1 -1
- package/_cjs/actions/public/createEventFilter.js.map +1 -1
- package/_cjs/actions/public/estimateContractGas.js +1 -1
- package/_cjs/actions/public/estimateContractGas.js.map +1 -1
- package/_cjs/actions/public/estimateFeesPerGas.js +6 -3
- package/_cjs/actions/public/estimateFeesPerGas.js.map +1 -1
- package/_cjs/actions/public/estimateGas.js +3 -8
- package/_cjs/actions/public/estimateGas.js.map +1 -1
- package/_cjs/actions/public/estimateMaxPriorityFeePerGas.js +6 -4
- package/_cjs/actions/public/estimateMaxPriorityFeePerGas.js.map +1 -1
- package/_cjs/actions/public/getBlock.js.map +1 -1
- package/_cjs/actions/public/getBlockTransactionCount.js.map +1 -1
- package/_cjs/actions/public/getContractEvents.js +1 -1
- package/_cjs/actions/public/getContractEvents.js.map +1 -1
- package/_cjs/actions/public/getFilterChanges.js +10 -31
- package/_cjs/actions/public/getFilterChanges.js.map +1 -1
- package/_cjs/actions/public/getFilterLogs.js +8 -29
- package/_cjs/actions/public/getFilterLogs.js.map +1 -1
- package/_cjs/actions/public/getLogs.js +8 -29
- package/_cjs/actions/public/getLogs.js.map +1 -1
- package/_cjs/actions/public/getTransaction.js.map +1 -1
- package/_cjs/actions/public/getTransactionConfirmations.js +4 -2
- package/_cjs/actions/public/getTransactionConfirmations.js.map +1 -1
- package/_cjs/actions/public/multicall.js +1 -1
- package/_cjs/actions/public/multicall.js.map +1 -1
- package/_cjs/actions/public/readContract.js +1 -1
- package/_cjs/actions/public/readContract.js.map +1 -1
- package/_cjs/actions/public/simulateContract.js +1 -1
- package/_cjs/actions/public/simulateContract.js.map +1 -1
- package/_cjs/actions/public/verifyHash.js +1 -1
- package/_cjs/actions/public/verifyHash.js.map +1 -1
- package/_cjs/actions/public/waitForTransactionReceipt.js +18 -8
- package/_cjs/actions/public/waitForTransactionReceipt.js.map +1 -1
- package/_cjs/actions/public/watchBlockNumber.js +1 -1
- package/_cjs/actions/public/watchBlockNumber.js.map +1 -1
- package/_cjs/actions/public/watchBlocks.js +2 -2
- package/_cjs/actions/public/watchBlocks.js.map +1 -1
- package/_cjs/actions/public/watchContractEvent.js +7 -6
- package/_cjs/actions/public/watchContractEvent.js.map +1 -1
- package/_cjs/actions/public/watchEvent.js +7 -6
- package/_cjs/actions/public/watchEvent.js.map +1 -1
- package/_cjs/actions/public/watchPendingTransactions.js +5 -4
- package/_cjs/actions/public/watchPendingTransactions.js.map +1 -1
- package/_cjs/actions/test/setAutomine.js.map +1 -1
- package/_cjs/actions/wallet/addChain.js +1 -1
- package/_cjs/actions/wallet/addChain.js.map +1 -1
- package/_cjs/actions/wallet/prepareTransactionRequest.js +41 -38
- package/_cjs/actions/wallet/prepareTransactionRequest.js.map +1 -1
- package/_cjs/actions/wallet/requestAddresses.js +1 -1
- package/_cjs/actions/wallet/requestAddresses.js.map +1 -1
- package/_cjs/actions/wallet/requestPermissions.js +1 -1
- package/_cjs/actions/wallet/requestPermissions.js.map +1 -1
- package/_cjs/actions/wallet/sendRawTransaction.js +1 -1
- package/_cjs/actions/wallet/sendRawTransaction.js.map +1 -1
- package/_cjs/actions/wallet/sendTransaction.js +5 -5
- package/_cjs/actions/wallet/sendTransaction.js.map +1 -1
- package/_cjs/actions/wallet/signMessage.js +1 -1
- package/_cjs/actions/wallet/signMessage.js.map +1 -1
- package/_cjs/actions/wallet/signTransaction.js +2 -2
- package/_cjs/actions/wallet/signTransaction.js.map +1 -1
- package/_cjs/actions/wallet/signTypedData.js +1 -1
- package/_cjs/actions/wallet/signTypedData.js.map +1 -1
- package/_cjs/actions/wallet/switchChain.js +1 -1
- package/_cjs/actions/wallet/switchChain.js.map +1 -1
- package/_cjs/actions/wallet/watchAsset.js +1 -1
- package/_cjs/actions/wallet/watchAsset.js.map +1 -1
- package/_cjs/actions/wallet/writeContract.js +6 -3
- package/_cjs/actions/wallet/writeContract.js.map +1 -1
- package/_cjs/chains/celo/formatters.js.map +1 -1
- package/_cjs/chains/celo/parsers.js.map +1 -1
- package/_cjs/chains/celo/serializers.js +4 -8
- package/_cjs/chains/celo/serializers.js.map +1 -1
- package/_cjs/chains/celo/utils.js +6 -4
- package/_cjs/chains/celo/utils.js.map +1 -1
- package/_cjs/chains/definitions/aurora.js +6 -0
- package/_cjs/chains/definitions/aurora.js.map +1 -1
- package/_cjs/chains/definitions/base.js +8 -0
- package/_cjs/chains/definitions/base.js.map +1 -1
- package/_cjs/chains/definitions/baseGoerli.js +7 -1
- package/_cjs/chains/definitions/baseGoerli.js.map +1 -1
- package/_cjs/chains/definitions/baseSepolia.js +11 -2
- package/_cjs/chains/definitions/baseSepolia.js.map +1 -1
- package/_cjs/chains/definitions/bscTestnet.js +2 -1
- package/_cjs/chains/definitions/bscTestnet.js.map +1 -1
- package/_cjs/chains/definitions/confluxESpace.js +1 -0
- package/_cjs/chains/definitions/confluxESpace.js.map +1 -1
- package/_cjs/chains/definitions/confluxESpaceTestnet.js +34 -0
- package/_cjs/chains/definitions/confluxESpaceTestnet.js.map +1 -0
- package/_cjs/chains/definitions/filecoin.js +6 -0
- package/_cjs/chains/definitions/filecoin.js.map +1 -1
- package/_cjs/chains/definitions/klaytn.js +6 -0
- package/_cjs/chains/definitions/klaytn.js.map +1 -1
- package/_cjs/chains/definitions/klaytnBaobab.js +30 -0
- package/_cjs/chains/definitions/klaytnBaobab.js.map +1 -0
- package/_cjs/chains/definitions/optimism.js +7 -0
- package/_cjs/chains/definitions/optimism.js.map +1 -1
- package/_cjs/chains/definitions/optimismGoerli.js +7 -0
- package/_cjs/chains/definitions/optimismGoerli.js.map +1 -1
- package/_cjs/chains/definitions/optimismSepolia.js +7 -0
- package/_cjs/chains/definitions/optimismSepolia.js.map +1 -1
- package/_cjs/chains/definitions/pgn.js +37 -0
- package/_cjs/chains/definitions/pgn.js.map +1 -0
- package/_cjs/chains/definitions/pgnTestnet.js +38 -0
- package/_cjs/chains/definitions/pgnTestnet.js.map +1 -0
- package/_cjs/chains/definitions/rootstock.js +29 -0
- package/_cjs/chains/definitions/rootstock.js.map +1 -0
- package/_cjs/chains/definitions/sapphire.js +33 -0
- package/_cjs/chains/definitions/sapphire.js.map +1 -0
- package/_cjs/chains/definitions/sapphireTestnet.js +28 -0
- package/_cjs/chains/definitions/sapphireTestnet.js.map +1 -0
- package/_cjs/chains/definitions/shibarium.js +35 -0
- package/_cjs/chains/definitions/shibarium.js.map +1 -0
- package/_cjs/chains/definitions/shimmer.js +29 -0
- package/_cjs/chains/definitions/shimmer.js.map +1 -0
- package/_cjs/chains/definitions/shimmerTestnet.js +30 -0
- package/_cjs/chains/definitions/shimmerTestnet.js.map +1 -0
- package/_cjs/chains/definitions/zora.js +7 -0
- package/_cjs/chains/definitions/zora.js.map +1 -1
- package/_cjs/chains/definitions/zoraSepolia.js +7 -0
- package/_cjs/chains/definitions/zoraSepolia.js.map +1 -1
- package/_cjs/chains/definitions/zoraTestnet.js +7 -0
- package/_cjs/chains/definitions/zoraTestnet.js.map +1 -1
- package/_cjs/chains/index.js +24 -4
- package/_cjs/chains/index.js.map +1 -1
- package/_cjs/chains/opStack/abis.js +318 -1
- package/_cjs/chains/opStack/abis.js.map +1 -1
- package/_cjs/chains/opStack/actions/buildDepositTransaction.js +32 -0
- package/_cjs/chains/opStack/actions/buildDepositTransaction.js.map +1 -0
- package/_cjs/chains/opStack/actions/depositTransaction.js +36 -0
- package/_cjs/chains/opStack/actions/depositTransaction.js.map +1 -0
- package/_cjs/chains/opStack/actions/estimateContractL1Fee.js.map +1 -1
- package/_cjs/chains/opStack/actions/estimateContractL1Gas.js.map +1 -1
- package/_cjs/chains/opStack/actions/estimateContractTotalFee.js.map +1 -1
- package/_cjs/chains/opStack/actions/estimateContractTotalGas.js.map +1 -1
- package/_cjs/chains/opStack/chainConfig.js +2 -0
- package/_cjs/chains/opStack/chainConfig.js.map +1 -1
- package/_cjs/chains/opStack/chains.js +22 -0
- package/_cjs/chains/opStack/chains.js.map +1 -0
- package/_cjs/chains/opStack/decorators/{public.js → publicL2.js} +3 -1
- package/_cjs/chains/opStack/decorators/publicL2.js.map +1 -0
- package/_cjs/chains/opStack/decorators/walletL1.js +13 -0
- package/_cjs/chains/opStack/decorators/walletL1.js.map +1 -0
- package/_cjs/chains/opStack/formatters.js.map +1 -1
- package/_cjs/chains/opStack/index.js +34 -21
- package/_cjs/chains/opStack/index.js.map +1 -1
- package/_cjs/chains/opStack/parsers.js +55 -0
- package/_cjs/chains/opStack/parsers.js.map +1 -0
- package/_cjs/chains/opStack/serializers.js +52 -0
- package/_cjs/chains/opStack/serializers.js.map +1 -0
- package/_cjs/chains/opStack/{types.js → types/block.js} +1 -1
- package/_cjs/chains/opStack/types/block.js.map +1 -0
- package/_cjs/chains/opStack/types/chain.js +3 -0
- package/_cjs/chains/opStack/types/chain.js.map +1 -0
- package/_cjs/chains/opStack/types/contract.js +3 -0
- package/_cjs/chains/opStack/types/contract.js.map +1 -0
- package/_cjs/chains/opStack/types/transaction.js +3 -0
- package/_cjs/chains/opStack/types/transaction.js.map +1 -0
- package/_cjs/chains/opStack/utils/extractTransactionDepositedLogs.js +14 -0
- package/_cjs/chains/opStack/utils/extractTransactionDepositedLogs.js.map +1 -0
- package/_cjs/chains/opStack/utils/fromOpaqueData.js +29 -0
- package/_cjs/chains/opStack/utils/fromOpaqueData.js.map +1 -0
- package/_cjs/chains/opStack/utils/getL2TransactionHash.js +28 -0
- package/_cjs/chains/opStack/utils/getL2TransactionHash.js.map +1 -0
- package/_cjs/chains/opStack/utils/getL2TransactionHashes.js +11 -0
- package/_cjs/chains/opStack/utils/getL2TransactionHashes.js.map +1 -0
- package/_cjs/chains/opStack/utils/getSourceHash.js +21 -0
- package/_cjs/chains/opStack/utils/getSourceHash.js.map +1 -0
- package/_cjs/chains/zksync/serializers.js.map +1 -1
- package/_cjs/clients/createWalletClient.js +1 -1
- package/_cjs/clients/createWalletClient.js.map +1 -1
- package/_cjs/clients/decorators/public.js.map +1 -1
- package/_cjs/clients/decorators/wallet.js.map +1 -1
- package/_cjs/clients/transports/fallback.js +18 -4
- package/_cjs/clients/transports/fallback.js.map +1 -1
- package/_cjs/clients/transports/webSocket.js.map +1 -1
- package/_cjs/errors/base.js.map +1 -1
- package/_cjs/errors/contract.js.map +1 -1
- package/_cjs/errors/node.js +11 -11
- package/_cjs/errors/node.js.map +1 -1
- package/_cjs/errors/rpc.js +18 -18
- package/_cjs/errors/rpc.js.map +1 -1
- package/_cjs/errors/version.js +1 -1
- package/_cjs/index.js.map +1 -1
- package/_cjs/utils/abi/decodeAbiParameters.js.map +1 -1
- package/_cjs/utils/abi/decodeEventLog.js.map +1 -1
- package/_cjs/utils/abi/decodeFunctionData.js.map +1 -1
- package/_cjs/utils/abi/decodeFunctionResult.js.map +1 -1
- package/_cjs/utils/abi/encodeAbiParameters.js.map +1 -1
- package/_cjs/utils/abi/encodeErrorResult.js.map +1 -1
- package/_cjs/utils/abi/encodeEventTopics.js.map +1 -1
- package/_cjs/utils/abi/encodeFunctionData.js.map +1 -1
- package/_cjs/utils/abi/encodeFunctionResult.js.map +1 -1
- package/_cjs/utils/abi/encodePacked.js.map +1 -1
- package/_cjs/utils/abi/formatAbiItem.js.map +1 -1
- package/_cjs/utils/abi/getAbiItem.js.map +1 -1
- package/_cjs/utils/abi/parseEventLogs.js +37 -0
- package/_cjs/utils/abi/parseEventLogs.js.map +1 -0
- package/_cjs/utils/address/getAddress.js.map +1 -1
- package/_cjs/utils/address/getContractAddress.js.map +1 -1
- package/_cjs/utils/buildRequest.js +101 -82
- package/_cjs/utils/buildRequest.js.map +1 -1
- package/_cjs/utils/ccip.js +4 -2
- 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/encoding/fromRlp.js.map +1 -1
- package/_cjs/utils/encoding/toBytes.js +2 -2
- package/_cjs/utils/encoding/toBytes.js.map +1 -1
- package/_cjs/utils/encoding/toHex.js.map +1 -1
- package/_cjs/utils/encoding/toRlp.js +3 -1
- package/_cjs/utils/encoding/toRlp.js.map +1 -1
- package/_cjs/utils/ens/avatar/parseAvatarRecord.js.map +1 -1
- package/_cjs/utils/ens/avatar/utils.js +1 -1
- package/_cjs/utils/ens/avatar/utils.js.map +1 -1
- package/_cjs/utils/ens/namehash.js.map +1 -1
- package/_cjs/utils/ens/packetToBytes.js.map +1 -1
- package/_cjs/utils/errors/getContractError.js.map +1 -1
- package/_cjs/utils/errors/getNodeError.js +11 -11
- package/_cjs/utils/errors/getNodeError.js.map +1 -1
- package/_cjs/utils/formatters/block.js.map +1 -1
- package/_cjs/utils/formatters/extract.js.map +1 -1
- package/_cjs/utils/formatters/formatter.js.map +1 -1
- package/_cjs/utils/formatters/transaction.js.map +1 -1
- package/_cjs/utils/getAction.js +2 -2
- package/_cjs/utils/getAction.js.map +1 -1
- package/_cjs/utils/hash/normalizeSignature.js.map +1 -1
- package/_cjs/utils/index.js +3 -2
- package/_cjs/utils/index.js.map +1 -1
- package/_cjs/utils/observe.js +2 -1
- package/_cjs/utils/observe.js.map +1 -1
- package/_cjs/utils/promise/createBatchScheduler.js +8 -2
- 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/rpc.js.map +1 -1
- package/_cjs/utils/signature/hashTypedData.js.map +1 -1
- package/_cjs/utils/signature/signatureToCompactSignature.js.map +1 -1
- package/_cjs/utils/transaction/getTransactionType.js.map +1 -1
- package/_cjs/utils/transaction/parseTransaction.js.map +1 -1
- package/_cjs/utils/transaction/serializeAccessList.js.map +1 -1
- package/_cjs/utils/transaction/serializeTransaction.js.map +1 -1
- package/_cjs/utils/typedData.js.map +1 -1
- package/_cjs/utils/uid.js.map +1 -1
- package/_cjs/utils/unit/formatEther.js.map +1 -1
- package/_cjs/utils/unit/formatGwei.js.map +1 -1
- package/_cjs/utils/unit/formatUnits.js.map +1 -1
- package/_cjs/utils/unit/parseEther.js.map +1 -1
- package/_cjs/utils/unit/parseGwei.js.map +1 -1
- package/_cjs/utils/unit/parseUnits.js.map +1 -1
- package/_esm/accounts/toAccount.js.map +1 -1
- package/_esm/accounts/utils/signTransaction.js.map +1 -1
- package/_esm/actions/ens/getEnsAddress.js +3 -3
- package/_esm/actions/ens/getEnsAddress.js.map +1 -1
- package/_esm/actions/ens/getEnsAvatar.js +3 -3
- package/_esm/actions/ens/getEnsAvatar.js.map +1 -1
- package/_esm/actions/ens/getEnsName.js +3 -3
- package/_esm/actions/ens/getEnsName.js.map +1 -1
- package/_esm/actions/ens/getEnsResolver.js +3 -3
- package/_esm/actions/ens/getEnsResolver.js.map +1 -1
- package/_esm/actions/ens/getEnsText.js +3 -3
- package/_esm/actions/ens/getEnsText.js.map +1 -1
- package/_esm/actions/getContract.js +7 -7
- package/_esm/actions/getContract.js.map +1 -1
- package/_esm/actions/public/call.js.map +1 -1
- package/_esm/actions/public/createContractEventFilter.js +1 -1
- package/_esm/actions/public/createContractEventFilter.js.map +1 -1
- package/_esm/actions/public/createEventFilter.js +1 -1
- package/_esm/actions/public/createEventFilter.js.map +1 -1
- package/_esm/actions/public/estimateContractGas.js +1 -1
- package/_esm/actions/public/estimateContractGas.js.map +1 -1
- package/_esm/actions/public/estimateFeesPerGas.js +6 -3
- package/_esm/actions/public/estimateFeesPerGas.js.map +1 -1
- package/_esm/actions/public/estimateGas.js +3 -8
- package/_esm/actions/public/estimateGas.js.map +1 -1
- package/_esm/actions/public/estimateMaxPriorityFeePerGas.js +6 -4
- package/_esm/actions/public/estimateMaxPriorityFeePerGas.js.map +1 -1
- package/_esm/actions/public/getBlock.js +1 -1
- package/_esm/actions/public/getBlock.js.map +1 -1
- package/_esm/actions/public/getBlockNumber.js +1 -1
- package/_esm/actions/public/getBlockTransactionCount.js.map +1 -1
- package/_esm/actions/public/getContractEvents.js +1 -1
- package/_esm/actions/public/getContractEvents.js.map +1 -1
- package/_esm/actions/public/getFilterChanges.js +11 -33
- package/_esm/actions/public/getFilterChanges.js.map +1 -1
- package/_esm/actions/public/getFilterLogs.js +9 -31
- package/_esm/actions/public/getFilterLogs.js.map +1 -1
- package/_esm/actions/public/getLogs.js +10 -32
- package/_esm/actions/public/getLogs.js.map +1 -1
- package/_esm/actions/public/getTransaction.js +1 -1
- package/_esm/actions/public/getTransaction.js.map +1 -1
- package/_esm/actions/public/getTransactionConfirmations.js +5 -3
- package/_esm/actions/public/getTransactionConfirmations.js.map +1 -1
- package/_esm/actions/public/getTransactionReceipt.js +1 -1
- package/_esm/actions/public/multicall.js +1 -1
- package/_esm/actions/public/multicall.js.map +1 -1
- package/_esm/actions/public/readContract.js +2 -2
- package/_esm/actions/public/readContract.js.map +1 -1
- package/_esm/actions/public/simulateContract.js +2 -2
- package/_esm/actions/public/simulateContract.js.map +1 -1
- package/_esm/actions/public/verifyHash.js +1 -1
- package/_esm/actions/public/verifyHash.js.map +1 -1
- package/_esm/actions/public/waitForTransactionReceipt.js +22 -9
- package/_esm/actions/public/waitForTransactionReceipt.js.map +1 -1
- package/_esm/actions/public/watchBlockNumber.js +2 -2
- package/_esm/actions/public/watchBlockNumber.js.map +1 -1
- package/_esm/actions/public/watchBlocks.js +3 -3
- package/_esm/actions/public/watchBlocks.js.map +1 -1
- package/_esm/actions/public/watchContractEvent.js +7 -6
- package/_esm/actions/public/watchContractEvent.js.map +1 -1
- package/_esm/actions/public/watchEvent.js +7 -6
- package/_esm/actions/public/watchEvent.js.map +1 -1
- package/_esm/actions/public/watchPendingTransactions.js +5 -4
- package/_esm/actions/public/watchPendingTransactions.js.map +1 -1
- package/_esm/actions/test/setAutomine.js.map +1 -1
- package/_esm/actions/wallet/addChain.js +1 -1
- package/_esm/actions/wallet/addChain.js.map +1 -1
- package/_esm/actions/wallet/deployContract.js +1 -1
- package/_esm/actions/wallet/prepareTransactionRequest.js +44 -40
- package/_esm/actions/wallet/prepareTransactionRequest.js.map +1 -1
- package/_esm/actions/wallet/requestAddresses.js +1 -1
- package/_esm/actions/wallet/requestAddresses.js.map +1 -1
- package/_esm/actions/wallet/requestPermissions.js +1 -1
- package/_esm/actions/wallet/requestPermissions.js.map +1 -1
- package/_esm/actions/wallet/sendRawTransaction.js +1 -1
- package/_esm/actions/wallet/sendRawTransaction.js.map +1 -1
- package/_esm/actions/wallet/sendTransaction.js +6 -6
- package/_esm/actions/wallet/sendTransaction.js.map +1 -1
- package/_esm/actions/wallet/signMessage.js +1 -1
- package/_esm/actions/wallet/signMessage.js.map +1 -1
- package/_esm/actions/wallet/signTransaction.js +2 -2
- package/_esm/actions/wallet/signTransaction.js.map +1 -1
- package/_esm/actions/wallet/signTypedData.js +1 -1
- package/_esm/actions/wallet/signTypedData.js.map +1 -1
- package/_esm/actions/wallet/switchChain.js +1 -1
- package/_esm/actions/wallet/switchChain.js.map +1 -1
- package/_esm/actions/wallet/watchAsset.js +1 -1
- package/_esm/actions/wallet/watchAsset.js.map +1 -1
- package/_esm/actions/wallet/writeContract.js +7 -4
- package/_esm/actions/wallet/writeContract.js.map +1 -1
- package/_esm/chains/celo/formatters.js.map +1 -1
- package/_esm/chains/celo/parsers.js.map +1 -1
- package/_esm/chains/celo/serializers.js +4 -8
- package/_esm/chains/celo/serializers.js.map +1 -1
- package/_esm/chains/celo/utils.js +16 -5
- package/_esm/chains/celo/utils.js.map +1 -1
- package/_esm/chains/definitions/aurora.js +6 -0
- package/_esm/chains/definitions/aurora.js.map +1 -1
- package/_esm/chains/definitions/base.js +8 -0
- package/_esm/chains/definitions/base.js.map +1 -1
- package/_esm/chains/definitions/baseGoerli.js +7 -1
- package/_esm/chains/definitions/baseGoerli.js.map +1 -1
- package/_esm/chains/definitions/baseSepolia.js +11 -2
- package/_esm/chains/definitions/baseSepolia.js.map +1 -1
- package/_esm/chains/definitions/bscTestnet.js +2 -1
- package/_esm/chains/definitions/bscTestnet.js.map +1 -1
- package/_esm/chains/definitions/confluxESpace.js +1 -0
- package/_esm/chains/definitions/confluxESpace.js.map +1 -1
- package/_esm/chains/definitions/confluxESpaceTestnet.js +31 -0
- package/_esm/chains/definitions/confluxESpaceTestnet.js.map +1 -0
- package/_esm/chains/definitions/filecoin.js +6 -0
- package/_esm/chains/definitions/filecoin.js.map +1 -1
- package/_esm/chains/definitions/klaytn.js +6 -0
- package/_esm/chains/definitions/klaytn.js.map +1 -1
- package/_esm/chains/definitions/klaytnBaobab.js +27 -0
- package/_esm/chains/definitions/klaytnBaobab.js.map +1 -0
- package/_esm/chains/definitions/optimism.js +7 -0
- package/_esm/chains/definitions/optimism.js.map +1 -1
- package/_esm/chains/definitions/optimismGoerli.js +7 -0
- package/_esm/chains/definitions/optimismGoerli.js.map +1 -1
- package/_esm/chains/definitions/optimismSepolia.js +7 -0
- package/_esm/chains/definitions/optimismSepolia.js.map +1 -1
- package/_esm/chains/definitions/pgn.js +34 -0
- package/_esm/chains/definitions/pgn.js.map +1 -0
- package/_esm/chains/definitions/pgnTestnet.js +35 -0
- package/_esm/chains/definitions/pgnTestnet.js.map +1 -0
- package/_esm/chains/definitions/rootstock.js +26 -0
- package/_esm/chains/definitions/rootstock.js.map +1 -0
- package/_esm/chains/definitions/sapphire.js +30 -0
- package/_esm/chains/definitions/sapphire.js.map +1 -0
- package/_esm/chains/definitions/sapphireTestnet.js +25 -0
- package/_esm/chains/definitions/sapphireTestnet.js.map +1 -0
- package/_esm/chains/definitions/shibarium.js +32 -0
- package/_esm/chains/definitions/shibarium.js.map +1 -0
- package/_esm/chains/definitions/shimmer.js +26 -0
- package/_esm/chains/definitions/shimmer.js.map +1 -0
- package/_esm/chains/definitions/shimmerTestnet.js +27 -0
- package/_esm/chains/definitions/shimmerTestnet.js.map +1 -0
- package/_esm/chains/definitions/zora.js +7 -0
- package/_esm/chains/definitions/zora.js.map +1 -1
- package/_esm/chains/definitions/zoraSepolia.js +7 -0
- package/_esm/chains/definitions/zoraSepolia.js.map +1 -1
- package/_esm/chains/definitions/zoraTestnet.js +7 -0
- package/_esm/chains/definitions/zoraTestnet.js.map +1 -1
- package/_esm/chains/index.js +10 -0
- package/_esm/chains/index.js.map +1 -1
- package/_esm/chains/opStack/abis.js +317 -0
- package/_esm/chains/opStack/abis.js.map +1 -1
- package/_esm/chains/opStack/actions/buildDepositTransaction.js +54 -0
- package/_esm/chains/opStack/actions/buildDepositTransaction.js.map +1 -0
- package/_esm/chains/opStack/actions/depositTransaction.js +88 -0
- package/_esm/chains/opStack/actions/depositTransaction.js.map +1 -0
- package/_esm/chains/opStack/actions/estimateContractL1Fee.js.map +1 -1
- package/_esm/chains/opStack/actions/estimateContractL1Gas.js.map +1 -1
- package/_esm/chains/opStack/actions/estimateContractTotalFee.js.map +1 -1
- package/_esm/chains/opStack/actions/estimateContractTotalGas.js.map +1 -1
- package/_esm/chains/opStack/actions/estimateL1Fee.js +1 -1
- package/_esm/chains/opStack/actions/estimateL1Fee.js.map +1 -1
- package/_esm/chains/opStack/actions/estimateL1Gas.js.map +1 -1
- package/_esm/chains/opStack/chainConfig.js +2 -0
- package/_esm/chains/opStack/chainConfig.js.map +1 -1
- package/_esm/chains/opStack/chains.js +10 -0
- package/_esm/chains/opStack/chains.js.map +1 -0
- package/_esm/chains/opStack/decorators/{public.js → publicL2.js} +3 -1
- package/_esm/chains/opStack/decorators/publicL2.js.map +1 -0
- package/_esm/chains/opStack/decorators/walletL1.js +9 -0
- package/_esm/chains/opStack/decorators/walletL1.js.map +1 -0
- package/_esm/chains/opStack/formatters.js.map +1 -1
- package/_esm/chains/opStack/index.js +12 -10
- package/_esm/chains/opStack/index.js.map +1 -1
- package/_esm/chains/opStack/parsers.js +51 -0
- package/_esm/chains/opStack/parsers.js.map +1 -0
- package/_esm/chains/opStack/serializers.js +47 -0
- package/_esm/chains/opStack/serializers.js.map +1 -0
- package/_esm/chains/opStack/types/block.js +2 -0
- package/_esm/chains/opStack/types/block.js.map +1 -0
- package/_esm/chains/opStack/types/chain.js +2 -0
- package/_esm/chains/opStack/types/chain.js.map +1 -0
- package/_esm/chains/opStack/types/contract.js +2 -0
- package/_esm/chains/opStack/types/contract.js.map +1 -0
- package/_esm/chains/opStack/types/transaction.js +2 -0
- package/_esm/chains/opStack/types/transaction.js.map +1 -0
- package/_esm/chains/opStack/utils/extractTransactionDepositedLogs.js +10 -0
- package/_esm/chains/opStack/utils/extractTransactionDepositedLogs.js.map +1 -0
- package/_esm/chains/opStack/utils/fromOpaqueData.js +25 -0
- package/_esm/chains/opStack/utils/fromOpaqueData.js.map +1 -0
- package/_esm/chains/opStack/utils/getL2TransactionHash.js +25 -0
- package/_esm/chains/opStack/utils/getL2TransactionHash.js.map +1 -0
- package/_esm/chains/opStack/utils/getL2TransactionHashes.js +7 -0
- package/_esm/chains/opStack/utils/getL2TransactionHashes.js.map +1 -0
- package/_esm/chains/opStack/utils/getSourceHash.js +18 -0
- package/_esm/chains/opStack/utils/getSourceHash.js.map +1 -0
- package/_esm/chains/zksync/serializers.js +1 -1
- package/_esm/chains/zksync/serializers.js.map +1 -1
- package/_esm/clients/createWalletClient.js +1 -1
- package/_esm/clients/createWalletClient.js.map +1 -1
- package/_esm/clients/decorators/public.js.map +1 -1
- package/_esm/clients/decorators/wallet.js.map +1 -1
- package/_esm/clients/transports/fallback.js +19 -6
- package/_esm/clients/transports/fallback.js.map +1 -1
- package/_esm/clients/transports/webSocket.js.map +1 -1
- package/_esm/errors/base.js.map +1 -1
- package/_esm/errors/contract.js.map +1 -1
- package/_esm/errors/node.js +11 -22
- package/_esm/errors/node.js.map +1 -1
- package/_esm/errors/rpc.js +18 -36
- package/_esm/errors/rpc.js.map +1 -1
- package/_esm/errors/version.js +1 -1
- package/_esm/index.js.map +1 -1
- package/_esm/utils/abi/decodeAbiParameters.js.map +1 -1
- package/_esm/utils/abi/decodeEventLog.js.map +1 -1
- package/_esm/utils/abi/decodeFunctionData.js.map +1 -1
- package/_esm/utils/abi/decodeFunctionResult.js.map +1 -1
- package/_esm/utils/abi/encodeAbiParameters.js.map +1 -1
- package/_esm/utils/abi/encodeErrorResult.js.map +1 -1
- package/_esm/utils/abi/encodeEventTopics.js.map +1 -1
- package/_esm/utils/abi/encodeFunctionData.js.map +1 -1
- package/_esm/utils/abi/encodeFunctionResult.js.map +1 -1
- package/_esm/utils/abi/encodePacked.js.map +1 -1
- package/_esm/utils/abi/formatAbiItem.js.map +1 -1
- package/_esm/utils/abi/getAbiItem.js.map +1 -1
- package/_esm/utils/abi/parseEventLogs.js +59 -0
- package/_esm/utils/abi/parseEventLogs.js.map +1 -0
- package/_esm/utils/address/getAddress.js.map +1 -1
- package/_esm/utils/address/getContractAddress.js.map +1 -1
- package/_esm/utils/buildRequest.js +129 -102
- package/_esm/utils/buildRequest.js.map +1 -1
- package/_esm/utils/ccip.js +4 -2
- 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/encoding/fromRlp.js.map +1 -1
- package/_esm/utils/encoding/toBytes.js +2 -2
- package/_esm/utils/encoding/toBytes.js.map +1 -1
- package/_esm/utils/encoding/toHex.js.map +1 -1
- package/_esm/utils/encoding/toRlp.js +3 -1
- package/_esm/utils/encoding/toRlp.js.map +1 -1
- package/_esm/utils/ens/avatar/parseAvatarRecord.js.map +1 -1
- package/_esm/utils/ens/avatar/utils.js +1 -1
- package/_esm/utils/ens/avatar/utils.js.map +1 -1
- package/_esm/utils/ens/namehash.js +1 -1
- package/_esm/utils/ens/namehash.js.map +1 -1
- package/_esm/utils/ens/normalize.js +2 -2
- package/_esm/utils/ens/packetToBytes.js.map +1 -1
- package/_esm/utils/errors/getContractError.js.map +1 -1
- package/_esm/utils/errors/getNodeError.js +11 -11
- package/_esm/utils/errors/getNodeError.js.map +1 -1
- package/_esm/utils/formatters/block.js.map +1 -1
- package/_esm/utils/formatters/extract.js.map +1 -1
- package/_esm/utils/formatters/formatter.js.map +1 -1
- package/_esm/utils/formatters/transaction.js.map +1 -1
- package/_esm/utils/getAction.js +12 -2
- package/_esm/utils/getAction.js.map +1 -1
- package/_esm/utils/hash/normalizeSignature.js.map +1 -1
- package/_esm/utils/index.js +2 -1
- package/_esm/utils/index.js.map +1 -1
- package/_esm/utils/observe.js +2 -1
- package/_esm/utils/observe.js.map +1 -1
- package/_esm/utils/promise/createBatchScheduler.js +8 -2
- 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/rpc.js.map +1 -1
- package/_esm/utils/signature/hashTypedData.js.map +1 -1
- package/_esm/utils/signature/signatureToCompactSignature.js.map +1 -1
- package/_esm/utils/transaction/getTransactionType.js.map +1 -1
- package/_esm/utils/transaction/parseTransaction.js.map +1 -1
- package/_esm/utils/transaction/serializeAccessList.js.map +1 -1
- package/_esm/utils/transaction/serializeTransaction.js.map +1 -1
- package/_esm/utils/typedData.js.map +1 -1
- package/_esm/utils/uid.js.map +1 -1
- package/_esm/utils/unit/formatEther.js +11 -0
- package/_esm/utils/unit/formatEther.js.map +1 -1
- package/_esm/utils/unit/formatGwei.js +11 -0
- package/_esm/utils/unit/formatGwei.js.map +1 -1
- package/_esm/utils/unit/formatUnits.js +11 -0
- package/_esm/utils/unit/formatUnits.js.map +1 -1
- package/_esm/utils/unit/parseEther.js +11 -0
- package/_esm/utils/unit/parseEther.js.map +1 -1
- package/_esm/utils/unit/parseGwei.js +11 -0
- package/_esm/utils/unit/parseGwei.js.map +1 -1
- package/_esm/utils/unit/parseUnits.js +11 -0
- package/_esm/utils/unit/parseUnits.js.map +1 -1
- package/_types/accounts/utils/signTransaction.d.ts.map +1 -1
- package/_types/actions/ens/getEnsAddress.d.ts +2 -2
- package/_types/actions/ens/getEnsAddress.d.ts.map +1 -1
- package/_types/actions/ens/getEnsAvatar.d.ts +2 -2
- package/_types/actions/ens/getEnsAvatar.d.ts.map +1 -1
- package/_types/actions/ens/getEnsName.d.ts +2 -2
- package/_types/actions/ens/getEnsName.d.ts.map +1 -1
- package/_types/actions/ens/getEnsResolver.d.ts +2 -2
- package/_types/actions/ens/getEnsResolver.d.ts.map +1 -1
- package/_types/actions/ens/getEnsText.d.ts +2 -2
- package/_types/actions/ens/getEnsText.d.ts.map +1 -1
- package/_types/actions/getContract.d.ts +5 -5
- package/_types/actions/getContract.d.ts.map +1 -1
- package/_types/actions/public/createContractEventFilter.d.ts.map +1 -1
- package/_types/actions/public/estimateContractGas.d.ts +2 -2
- package/_types/actions/public/estimateContractGas.d.ts.map +1 -1
- package/_types/actions/public/estimateFeesPerGas.d.ts +2 -2
- package/_types/actions/public/estimateFeesPerGas.d.ts.map +1 -1
- package/_types/actions/public/estimateGas.d.ts +5 -3
- package/_types/actions/public/estimateGas.d.ts.map +1 -1
- package/_types/actions/public/estimateMaxPriorityFeePerGas.d.ts +2 -2
- package/_types/actions/public/estimateMaxPriorityFeePerGas.d.ts.map +1 -1
- package/_types/actions/public/getBlock.d.ts +2 -2
- package/_types/actions/public/getBlock.d.ts.map +1 -1
- package/_types/actions/public/getBlockNumber.d.ts +1 -1
- package/_types/actions/public/getContractEvents.d.ts.map +1 -1
- package/_types/actions/public/getFilterChanges.d.ts.map +1 -1
- package/_types/actions/public/getFilterLogs.d.ts.map +1 -1
- package/_types/actions/public/getLogs.d.ts +1 -1
- package/_types/actions/public/getLogs.d.ts.map +1 -1
- package/_types/actions/public/getTransaction.d.ts +2 -2
- package/_types/actions/public/getTransaction.d.ts.map +1 -1
- package/_types/actions/public/getTransactionConfirmations.d.ts +1 -1
- package/_types/actions/public/getTransactionConfirmations.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/multicall.d.ts.map +1 -1
- package/_types/actions/public/readContract.d.ts +1 -1
- package/_types/actions/public/readContract.d.ts.map +1 -1
- package/_types/actions/public/simulateContract.d.ts +4 -4
- package/_types/actions/public/simulateContract.d.ts.map +1 -1
- package/_types/actions/public/verifyHash.d.ts.map +1 -1
- package/_types/actions/public/waitForTransactionReceipt.d.ts +1 -1
- package/_types/actions/public/waitForTransactionReceipt.d.ts.map +1 -1
- package/_types/actions/public/watchBlockNumber.d.ts +1 -1
- package/_types/actions/public/watchBlockNumber.d.ts.map +1 -1
- package/_types/actions/public/watchBlocks.d.ts +1 -1
- package/_types/actions/public/watchBlocks.d.ts.map +1 -1
- package/_types/actions/public/watchContractEvent.d.ts.map +1 -1
- package/_types/actions/public/watchEvent.d.ts.map +1 -1
- package/_types/actions/public/watchPendingTransactions.d.ts.map +1 -1
- package/_types/actions/wallet/addChain.d.ts.map +1 -1
- package/_types/actions/wallet/deployContract.d.ts +3 -3
- package/_types/actions/wallet/deployContract.d.ts.map +1 -1
- package/_types/actions/wallet/prepareTransactionRequest.d.ts +19 -7
- package/_types/actions/wallet/prepareTransactionRequest.d.ts.map +1 -1
- package/_types/actions/wallet/requestAddresses.d.ts.map +1 -1
- package/_types/actions/wallet/requestPermissions.d.ts.map +1 -1
- package/_types/actions/wallet/sendRawTransaction.d.ts.map +1 -1
- package/_types/actions/wallet/sendTransaction.d.ts +4 -4
- package/_types/actions/wallet/sendTransaction.d.ts.map +1 -1
- package/_types/actions/wallet/signMessage.d.ts.map +1 -1
- package/_types/actions/wallet/signTransaction.d.ts +2 -2
- package/_types/actions/wallet/signTransaction.d.ts.map +1 -1
- package/_types/actions/wallet/signTypedData.d.ts.map +1 -1
- package/_types/actions/wallet/switchChain.d.ts.map +1 -1
- package/_types/actions/wallet/watchAsset.d.ts.map +1 -1
- package/_types/actions/wallet/writeContract.d.ts +4 -4
- package/_types/actions/wallet/writeContract.d.ts.map +1 -1
- package/_types/chains/celo/chainConfig.d.ts +45 -45
- package/_types/chains/celo/formatters.d.ts +45 -45
- package/_types/chains/celo/parsers.d.ts.map +1 -1
- package/_types/chains/celo/serializers.d.ts.map +1 -1
- package/_types/chains/celo/utils.d.ts.map +1 -1
- package/_types/chains/definitions/aurora.d.ts +6 -8
- package/_types/chains/definitions/aurora.d.ts.map +1 -1
- package/_types/chains/definitions/auroraTestnet.d.ts +1 -1
- package/_types/chains/definitions/base.d.ts +44 -36
- package/_types/chains/definitions/base.d.ts.map +1 -1
- package/_types/chains/definitions/baseGoerli.d.ts +42 -35
- package/_types/chains/definitions/baseGoerli.d.ts.map +1 -1
- package/_types/chains/definitions/baseSepolia.d.ts +43 -35
- package/_types/chains/definitions/baseSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/bearNetworkChainMainnet.d.ts +1 -1
- package/_types/chains/definitions/bearNetworkChainTestnet.d.ts +1 -1
- package/_types/chains/definitions/bronos.d.ts +1 -1
- package/_types/chains/definitions/bronosTestnet.d.ts +1 -1
- package/_types/chains/definitions/bscTestnet.d.ts +4 -1
- package/_types/chains/definitions/bscTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/bxn.d.ts +1 -1
- package/_types/chains/definitions/bxnTestnet.d.ts +1 -1
- package/_types/chains/definitions/celo.d.ts +45 -45
- package/_types/chains/definitions/celoAlfajores.d.ts +45 -45
- package/_types/chains/definitions/celoCannoli.d.ts +45 -45
- package/_types/chains/definitions/chiliz.d.ts +1 -1
- package/_types/chains/definitions/classic.d.ts +1 -1
- package/_types/chains/definitions/confluxESpace.d.ts +1 -0
- package/_types/chains/definitions/confluxESpace.d.ts.map +1 -1
- package/_types/chains/definitions/confluxESpaceTestnet.d.ts +38 -0
- package/_types/chains/definitions/confluxESpaceTestnet.d.ts.map +1 -0
- package/_types/chains/definitions/dfk.d.ts +1 -1
- package/_types/chains/definitions/dogechain.d.ts +1 -1
- package/_types/chains/definitions/edgewareTestnet.d.ts +1 -1
- package/_types/chains/definitions/ekta.d.ts +1 -1
- package/_types/chains/definitions/ektaTestnet.d.ts +1 -1
- package/_types/chains/definitions/evmos.d.ts +1 -1
- package/_types/chains/definitions/evmosTestnet.d.ts +1 -1
- package/_types/chains/definitions/fibo.d.ts +1 -1
- package/_types/chains/definitions/filecoin.d.ts +6 -8
- package/_types/chains/definitions/filecoin.d.ts.map +1 -1
- package/_types/chains/definitions/filecoinCalibration.d.ts +1 -1
- package/_types/chains/definitions/filecoinHyperspace.d.ts +1 -1
- package/_types/chains/definitions/flare.d.ts +1 -1
- package/_types/chains/definitions/flareTestnet.d.ts +1 -1
- package/_types/chains/definitions/foundry.d.ts +1 -1
- package/_types/chains/definitions/fuseSparknet.d.ts +1 -1
- package/_types/chains/definitions/haqqMainnet.d.ts +1 -1
- package/_types/chains/definitions/haqqTestedge2.d.ts +1 -1
- package/_types/chains/definitions/hardhat.d.ts +1 -1
- package/_types/chains/definitions/iotex.d.ts +1 -1
- package/_types/chains/definitions/iotexTestnet.d.ts +1 -1
- package/_types/chains/definitions/klaytn.d.ts +6 -8
- package/_types/chains/definitions/klaytn.d.ts.map +1 -1
- package/_types/chains/definitions/klaytnBaobab.d.ts +40 -0
- package/_types/chains/definitions/klaytnBaobab.d.ts.map +1 -0
- package/_types/chains/definitions/kroma.d.ts +1 -1
- package/_types/chains/definitions/kromaSepolia.d.ts +1 -1
- package/_types/chains/definitions/localhost.d.ts +1 -1
- package/_types/chains/definitions/lukso.d.ts +1 -1
- package/_types/chains/definitions/mantleTestnet.d.ts +1 -1
- package/_types/chains/definitions/meter.d.ts +1 -1
- package/_types/chains/definitions/meterTestnet.d.ts +1 -1
- package/_types/chains/definitions/moonbeamDev.d.ts +1 -1
- package/_types/chains/definitions/oasys.d.ts +1 -1
- package/_types/chains/definitions/optimism.d.ts +43 -36
- package/_types/chains/definitions/optimism.d.ts.map +1 -1
- package/_types/chains/definitions/optimismGoerli.d.ts +43 -36
- package/_types/chains/definitions/optimismGoerli.d.ts.map +1 -1
- package/_types/chains/definitions/optimismSepolia.d.ts +43 -36
- package/_types/chains/definitions/optimismSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/pgn.d.ts +555 -0
- package/_types/chains/definitions/pgn.d.ts.map +1 -0
- package/_types/chains/definitions/pgnTestnet.d.ts +555 -0
- package/_types/chains/definitions/pgnTestnet.d.ts.map +1 -0
- package/_types/chains/definitions/qMainnet.d.ts +1 -1
- package/_types/chains/definitions/qTestnet.d.ts +1 -1
- package/_types/chains/definitions/rootstock.d.ts +40 -0
- package/_types/chains/definitions/rootstock.d.ts.map +1 -0
- package/_types/chains/definitions/sapphire.d.ts +38 -0
- package/_types/chains/definitions/sapphire.d.ts.map +1 -0
- package/_types/chains/definitions/sapphireTestnet.d.ts +40 -0
- package/_types/chains/definitions/sapphireTestnet.d.ts.map +1 -0
- package/_types/chains/definitions/scrollTestnet.d.ts +1 -1
- package/_types/chains/definitions/shardeumSphinx.d.ts +1 -1
- package/_types/chains/definitions/shibarium.d.ts +40 -0
- package/_types/chains/definitions/shibarium.d.ts.map +1 -0
- package/_types/chains/definitions/shimmer.d.ts +38 -0
- package/_types/chains/definitions/shimmer.d.ts.map +1 -0
- package/_types/chains/definitions/shimmerTestnet.d.ts +38 -0
- package/_types/chains/definitions/shimmerTestnet.d.ts.map +1 -0
- package/_types/chains/definitions/songbird.d.ts +1 -1
- package/_types/chains/definitions/songbirdTestnet.d.ts +1 -1
- package/_types/chains/definitions/spicy.d.ts +1 -1
- package/_types/chains/definitions/taikoJolnir.d.ts +1 -1
- package/_types/chains/definitions/taikoTestnetSepolia.d.ts +1 -1
- package/_types/chains/definitions/taraxa.d.ts +1 -1
- package/_types/chains/definitions/taraxaTestnet.d.ts +1 -1
- package/_types/chains/definitions/telosTestnet.d.ts +1 -1
- package/_types/chains/definitions/tenet.d.ts +1 -1
- package/_types/chains/definitions/thunderTestnet.d.ts +1 -1
- package/_types/chains/definitions/vechain.d.ts +1 -1
- package/_types/chains/definitions/xdc.d.ts +1 -1
- package/_types/chains/definitions/xdcTestnet.d.ts +1 -1
- package/_types/chains/definitions/zetachainAthensTestnet.d.ts +1 -1
- package/_types/chains/definitions/zhejiang.d.ts +1 -1
- package/_types/chains/definitions/zkSync.d.ts +6 -6
- package/_types/chains/definitions/zkSyncTestnet.d.ts +6 -6
- package/_types/chains/definitions/zora.d.ts +43 -36
- package/_types/chains/definitions/zora.d.ts.map +1 -1
- package/_types/chains/definitions/zoraSepolia.d.ts +43 -36
- package/_types/chains/definitions/zoraSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/zoraTestnet.d.ts +43 -36
- package/_types/chains/definitions/zoraTestnet.d.ts.map +1 -1
- package/_types/chains/index.d.ts +12 -1
- package/_types/chains/index.d.ts.map +1 -1
- package/_types/chains/opStack/abis.d.ts +435 -0
- package/_types/chains/opStack/abis.d.ts.map +1 -1
- package/_types/chains/opStack/actions/buildDepositTransaction.d.ts +63 -0
- package/_types/chains/opStack/actions/buildDepositTransaction.d.ts.map +1 -0
- package/_types/chains/opStack/actions/depositTransaction.d.ts +96 -0
- package/_types/chains/opStack/actions/depositTransaction.d.ts.map +1 -0
- package/_types/chains/opStack/actions/estimateL1Fee.d.ts +3 -3
- package/_types/chains/opStack/actions/estimateL1Fee.d.ts.map +1 -1
- package/_types/chains/opStack/actions/estimateL1Gas.d.ts +2 -2
- package/_types/chains/opStack/actions/estimateL1Gas.d.ts.map +1 -1
- package/_types/chains/opStack/chainConfig.d.ts +41 -38
- package/_types/chains/opStack/chainConfig.d.ts.map +1 -1
- package/_types/chains/opStack/chains.d.ts +10 -0
- package/_types/chains/opStack/chains.d.ts.map +1 -0
- package/_types/chains/opStack/decorators/{public.d.ts → publicL2.d.ts} +31 -4
- package/_types/chains/opStack/decorators/publicL2.d.ts.map +1 -0
- package/_types/chains/opStack/decorators/walletL1.d.ts +64 -0
- package/_types/chains/opStack/decorators/walletL1.d.ts.map +1 -0
- package/_types/chains/opStack/formatters.d.ts +36 -35
- package/_types/chains/opStack/formatters.d.ts.map +1 -1
- package/_types/chains/opStack/index.d.ts +14 -11
- package/_types/chains/opStack/index.d.ts.map +1 -1
- package/_types/chains/opStack/parsers.d.ts +8 -0
- package/_types/chains/opStack/parsers.d.ts.map +1 -0
- package/_types/chains/opStack/serializers.d.ts +12 -0
- package/_types/chains/opStack/serializers.d.ts.map +1 -0
- package/_types/chains/opStack/types/block.d.ts +13 -0
- package/_types/chains/opStack/types/block.d.ts.map +1 -0
- package/_types/chains/opStack/types/chain.d.ts +9 -0
- package/_types/chains/opStack/types/chain.d.ts.map +1 -0
- package/_types/chains/opStack/types/contract.d.ts +13 -0
- package/_types/chains/opStack/types/contract.d.ts.map +1 -0
- package/_types/chains/opStack/{types.d.ts → types/transaction.d.ts} +21 -14
- package/_types/chains/opStack/types/transaction.d.ts.map +1 -0
- package/_types/chains/opStack/utils/extractTransactionDepositedLogs.d.ts +446 -0
- package/_types/chains/opStack/utils/extractTransactionDepositedLogs.d.ts.map +1 -0
- package/_types/chains/opStack/utils/fromOpaqueData.d.ts +15 -0
- package/_types/chains/opStack/utils/fromOpaqueData.d.ts.map +1 -0
- package/_types/chains/opStack/utils/getL2TransactionHash.d.ts +12 -0
- package/_types/chains/opStack/utils/getL2TransactionHash.d.ts.map +1 -0
- package/_types/chains/opStack/utils/getL2TransactionHashes.d.ts +11 -0
- package/_types/chains/opStack/utils/getL2TransactionHashes.d.ts.map +1 -0
- package/_types/chains/opStack/utils/getSourceHash.d.ts +28 -0
- package/_types/chains/opStack/utils/getSourceHash.d.ts.map +1 -0
- package/_types/chains/zksync/chainConfig.d.ts +6 -6
- package/_types/chains/zksync/formatters.d.ts +6 -6
- package/_types/clients/createClient.d.ts +1 -1
- package/_types/clients/decorators/public.d.ts +25 -25
- package/_types/clients/decorators/public.d.ts.map +1 -1
- package/_types/clients/decorators/wallet.d.ts +6 -6
- package/_types/clients/decorators/wallet.d.ts.map +1 -1
- package/_types/clients/transports/fallback.d.ts.map +1 -1
- package/_types/errors/estimateGas.d.ts +1 -1
- package/_types/errors/estimateGas.d.ts.map +1 -1
- package/_types/errors/version.d.ts +1 -1
- package/_types/index.d.ts +1 -1
- package/_types/index.d.ts.map +1 -1
- package/_types/types/account.d.ts +6 -3
- package/_types/types/account.d.ts.map +1 -1
- package/_types/types/chain.d.ts +12 -15
- package/_types/types/chain.d.ts.map +1 -1
- package/_types/types/contract.d.ts.map +1 -1
- package/_types/types/eip1193.d.ts +5 -1
- package/_types/types/eip1193.d.ts.map +1 -1
- package/_types/types/ens.d.ts +1 -1
- package/_types/types/ens.d.ts.map +1 -1
- package/_types/types/filter.d.ts.map +1 -1
- package/_types/types/log.d.ts.map +1 -1
- package/_types/types/multicall.d.ts.map +1 -1
- package/_types/types/rpc.d.ts.map +1 -1
- package/_types/types/transaction.d.ts.map +1 -1
- package/_types/types/utils.d.ts +17 -1
- package/_types/types/utils.d.ts.map +1 -1
- package/_types/utils/abi/decodeEventLog.d.ts.map +1 -1
- package/_types/utils/abi/decodeFunctionData.d.ts.map +1 -1
- package/_types/utils/abi/decodeFunctionResult.d.ts.map +1 -1
- package/_types/utils/abi/encodeDeployData.d.ts.map +1 -1
- package/_types/utils/abi/encodeErrorResult.d.ts.map +1 -1
- package/_types/utils/abi/encodeEventTopics.d.ts.map +1 -1
- package/_types/utils/abi/encodeFunctionData.d.ts.map +1 -1
- package/_types/utils/abi/encodeFunctionResult.d.ts.map +1 -1
- package/_types/utils/abi/parseEventLogs.d.ts +43 -0
- package/_types/utils/abi/parseEventLogs.d.ts.map +1 -0
- package/_types/utils/buildRequest.d.ts +3 -6
- package/_types/utils/buildRequest.d.ts.map +1 -1
- package/_types/utils/ccip.d.ts.map +1 -1
- package/_types/utils/encoding/fromBytes.d.ts.map +1 -1
- package/_types/utils/encoding/fromHex.d.ts.map +1 -1
- package/_types/utils/ens/avatar/utils.d.ts.map +1 -1
- package/_types/utils/ens/namehash.d.ts +1 -1
- package/_types/utils/ens/normalize.d.ts +2 -2
- package/_types/utils/errors/getNodeError.d.ts.map +1 -1
- package/_types/utils/formatters/block.d.ts +3 -7
- package/_types/utils/formatters/block.d.ts.map +1 -1
- package/_types/utils/formatters/formatter.d.ts +1 -1
- package/_types/utils/formatters/transaction.d.ts +4 -8
- package/_types/utils/formatters/transaction.d.ts.map +1 -1
- package/_types/utils/formatters/transactionReceipt.d.ts +2 -2
- package/_types/utils/formatters/transactionReceipt.d.ts.map +1 -1
- package/_types/utils/formatters/transactionRequest.d.ts +2 -2
- package/_types/utils/getAction.d.ts +8 -1
- package/_types/utils/getAction.d.ts.map +1 -1
- package/_types/utils/index.d.ts +2 -1
- package/_types/utils/index.d.ts.map +1 -1
- package/_types/utils/promise/createBatchScheduler.d.ts.map +1 -1
- package/_types/utils/transaction/getSerializedTransactionType.d.ts.map +1 -1
- package/_types/utils/transaction/getTransactionType.d.ts.map +1 -1
- package/_types/utils/transaction/serializeTransaction.d.ts.map +1 -1
- package/_types/utils/unit/formatEther.d.ts +11 -0
- package/_types/utils/unit/formatEther.d.ts.map +1 -1
- package/_types/utils/unit/formatGwei.d.ts +11 -0
- package/_types/utils/unit/formatGwei.d.ts.map +1 -1
- package/_types/utils/unit/formatUnits.d.ts +11 -0
- package/_types/utils/unit/formatUnits.d.ts.map +1 -1
- package/_types/utils/unit/parseEther.d.ts +11 -0
- package/_types/utils/unit/parseEther.d.ts.map +1 -1
- package/_types/utils/unit/parseGwei.d.ts +11 -0
- package/_types/utils/unit/parseGwei.d.ts.map +1 -1
- package/_types/utils/unit/parseUnits.d.ts +11 -0
- package/_types/utils/unit/parseUnits.d.ts.map +1 -1
- package/accounts/utils/signTransaction.ts +4 -2
- package/actions/ens/getEnsAddress.ts +3 -2
- package/actions/ens/getEnsAvatar.ts +3 -2
- package/actions/ens/getEnsName.ts +3 -2
- package/actions/ens/getEnsResolver.ts +3 -2
- package/actions/ens/getEnsText.ts +3 -2
- package/actions/getContract.ts +12 -11
- package/actions/public/createContractEventFilter.ts +7 -7
- package/actions/public/createEventFilter.ts +1 -1
- package/actions/public/estimateContractGas.ts +3 -9
- package/actions/public/estimateFeesPerGas.ts +8 -5
- package/actions/public/estimateGas.ts +8 -14
- package/actions/public/estimateMaxPriorityFeePerGas.ts +10 -6
- package/actions/public/getBlock.ts +2 -2
- package/actions/public/getBlockNumber.ts +1 -1
- package/actions/public/getContractEvents.ts +1 -0
- package/actions/public/getFilterChanges.ts +30 -39
- package/actions/public/getFilterLogs.ts +17 -38
- package/actions/public/getLogs.ts +16 -38
- package/actions/public/getTransaction.ts +2 -2
- package/actions/public/getTransactionConfirmations.ts +5 -3
- package/actions/public/getTransactionReceipt.ts +2 -2
- package/actions/public/multicall.ts +1 -0
- package/actions/public/readContract.ts +2 -1
- package/actions/public/simulateContract.ts +8 -5
- package/actions/public/verifyHash.ts +1 -0
- package/actions/public/waitForTransactionReceipt.ts +40 -13
- package/actions/public/watchBlockNumber.ts +2 -1
- package/actions/public/watchBlocks.ts +3 -1
- package/actions/public/watchContractEvent.ts +19 -4
- package/actions/public/watchEvent.ts +19 -4
- package/actions/public/watchPendingTransactions.ts +13 -3
- package/actions/wallet/addChain.ts +17 -14
- package/actions/wallet/deployContract.ts +3 -3
- package/actions/wallet/prepareTransactionRequest.ts +130 -67
- package/actions/wallet/requestAddresses.ts +4 -1
- package/actions/wallet/requestPermissions.ts +7 -4
- package/actions/wallet/sendRawTransaction.ts +7 -4
- package/actions/wallet/sendTransaction.ts +19 -16
- package/actions/wallet/signMessage.ts +7 -4
- package/actions/wallet/signTransaction.ts +23 -19
- package/actions/wallet/signTypedData.ts +7 -4
- package/actions/wallet/switchChain.ts +11 -8
- package/actions/wallet/watchAsset.ts +7 -4
- package/actions/wallet/writeContract.ts +21 -12
- package/chains/celo/parsers.ts +3 -3
- package/chains/celo/serializers.ts +4 -8
- package/chains/celo/utils.ts +16 -3
- package/chains/definitions/aurora.ts +6 -0
- package/chains/definitions/base.ts +9 -0
- package/chains/definitions/baseGoerli.ts +8 -1
- package/chains/definitions/baseSepolia.ts +12 -2
- package/chains/definitions/bscTestnet.ts +2 -1
- package/chains/definitions/confluxESpace.ts +1 -0
- package/chains/definitions/confluxESpaceTestnet.ts +31 -0
- package/chains/definitions/filecoin.ts +6 -0
- package/chains/definitions/klaytn.ts +6 -0
- package/chains/definitions/klaytnBaobab.ts +27 -0
- package/chains/definitions/optimism.ts +8 -0
- package/chains/definitions/optimismGoerli.ts +8 -0
- package/chains/definitions/optimismSepolia.ts +8 -0
- package/chains/definitions/pgn.ts +34 -0
- package/chains/definitions/pgnTestnet.ts +35 -0
- package/chains/definitions/rootstock.ts +26 -0
- package/chains/definitions/sapphire.ts +30 -0
- package/chains/definitions/sapphireTestnet.ts +25 -0
- package/chains/definitions/shibarium.ts +32 -0
- package/chains/definitions/shimmer.ts +26 -0
- package/chains/definitions/shimmerTestnet.ts +27 -0
- package/chains/definitions/zora.ts +8 -0
- package/chains/definitions/zoraSepolia.ts +8 -0
- package/chains/definitions/zoraTestnet.ts +8 -0
- package/chains/index.ts +14 -2
- package/chains/opStack/abis.ts +318 -0
- package/chains/opStack/actions/buildDepositTransaction.ts +151 -0
- package/chains/opStack/actions/depositTransaction.ts +171 -0
- package/chains/opStack/actions/estimateL1Fee.ts +3 -3
- package/chains/opStack/actions/estimateL1Gas.ts +2 -2
- package/chains/opStack/chainConfig.ts +2 -0
- package/chains/opStack/chains.ts +9 -0
- package/chains/opStack/decorators/{public.ts → publicL2.ts} +47 -4
- package/chains/opStack/decorators/walletL1.ts +86 -0
- package/chains/opStack/formatters.ts +3 -1
- package/chains/opStack/index.ts +77 -12
- package/chains/opStack/parsers.ts +88 -0
- package/chains/opStack/serializers.ts +88 -0
- package/chains/opStack/types/block.ts +34 -0
- package/chains/opStack/types/chain.ts +7 -0
- package/chains/opStack/types/contract.ts +17 -0
- package/chains/opStack/{types.ts → types/transaction.ts} +39 -33
- package/chains/opStack/utils/extractTransactionDepositedLogs.ts +36 -0
- package/chains/opStack/utils/fromOpaqueData.ts +40 -0
- package/chains/opStack/utils/getL2TransactionHash.ts +52 -0
- package/chains/opStack/utils/getL2TransactionHashes.ts +21 -0
- package/chains/opStack/utils/getSourceHash.ts +61 -0
- package/clients/createClient.ts +1 -1
- package/clients/createWalletClient.ts +1 -1
- package/clients/decorators/public.ts +42 -31
- package/clients/decorators/wallet.ts +26 -7
- package/clients/transports/fallback.ts +24 -6
- package/errors/base.ts +2 -2
- package/errors/estimateGas.ts +1 -1
- package/errors/version.ts +1 -1
- package/index.ts +2 -1
- package/package.json +15 -37
- package/types/account.ts +11 -2
- package/types/chain.ts +23 -12
- package/types/contract.ts +64 -64
- package/types/eip1193.ts +8 -0
- package/types/ens.ts +1 -1
- package/types/filter.ts +12 -12
- package/types/log.ts +4 -4
- package/types/multicall.ts +66 -61
- package/types/rpc.ts +1 -1
- package/types/transaction.ts +4 -4
- package/types/utils.ts +26 -7
- package/utils/abi/decodeEventLog.ts +2 -1
- package/utils/abi/decodeFunctionData.ts +2 -1
- package/utils/abi/decodeFunctionResult.ts +2 -2
- package/utils/abi/encodeDeployData.ts +2 -2
- package/utils/abi/encodeErrorResult.ts +2 -2
- package/utils/abi/encodeEventTopics.ts +6 -6
- package/utils/abi/encodeFunctionData.ts +2 -2
- package/utils/abi/encodeFunctionResult.ts +2 -2
- package/utils/abi/parseEventLogs.ts +129 -0
- package/utils/buildRequest.ts +46 -41
- package/utils/ccip.ts +4 -3
- package/utils/encoding/fromBytes.ts +8 -8
- package/utils/encoding/fromHex.ts +8 -8
- package/utils/encoding/toBytes.ts +2 -2
- package/utils/encoding/toRlp.ts +3 -1
- package/utils/ens/avatar/utils.ts +3 -1
- package/utils/ens/namehash.ts +1 -1
- package/utils/ens/normalize.ts +2 -2
- package/utils/errors/getContractError.ts +2 -2
- package/utils/errors/getNodeError.ts +12 -11
- package/utils/formatters/block.ts +2 -4
- package/utils/formatters/formatter.ts +1 -1
- package/utils/formatters/transaction.ts +2 -4
- package/utils/formatters/transactionReceipt.ts +1 -1
- package/utils/getAction.ts +11 -1
- package/utils/index.ts +6 -2
- package/utils/observe.ts +1 -1
- package/utils/promise/createBatchScheduler.ts +8 -4
- package/utils/transaction/getSerializedTransactionType.ts +2 -2
- package/utils/transaction/getTransactionType.ts +2 -1
- package/utils/transaction/serializeTransaction.ts +6 -3
- package/utils/unit/formatEther.ts +11 -0
- package/utils/unit/formatGwei.ts +11 -0
- package/utils/unit/formatUnits.ts +11 -0
- package/utils/unit/parseEther.ts +11 -0
- package/utils/unit/parseGwei.ts +11 -0
- package/utils/unit/parseUnits.ts +11 -0
- package/_cjs/chains/opStack/decorators/public.js.map +0 -1
- package/_cjs/chains/opStack/types.js.map +0 -1
- package/_esm/chains/opStack/decorators/public.js.map +0 -1
- package/_esm/chains/opStack/types.js +0 -2
- package/_esm/chains/opStack/types.js.map +0 -1
- package/_types/chains/opStack/decorators/public.d.ts.map +0 -1
- package/_types/chains/opStack/types.d.ts.map +0 -1
@@ -60,7 +60,7 @@ export type GetEnsTextErrorType =
|
|
60
60
|
* Gets a text record for specified ENS name.
|
61
61
|
*
|
62
62
|
* - Docs: https://viem.sh/docs/ens/actions/getEnsResolver.html
|
63
|
-
* - Examples: https://stackblitz.com/github/
|
63
|
+
* - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens
|
64
64
|
*
|
65
65
|
* Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract.
|
66
66
|
*
|
@@ -80,7 +80,7 @@ export type GetEnsTextErrorType =
|
|
80
80
|
* transport: http(),
|
81
81
|
* })
|
82
82
|
* const twitterRecord = await getEnsText(client, {
|
83
|
-
* name: normalize('
|
83
|
+
* name: normalize('wevm.eth'),
|
84
84
|
* key: 'com.twitter',
|
85
85
|
* })
|
86
86
|
* // 'wagmi_sh'
|
@@ -113,6 +113,7 @@ export async function getEnsText<TChain extends Chain | undefined>(
|
|
113
113
|
const res = await getAction(
|
114
114
|
client,
|
115
115
|
readContract,
|
116
|
+
'readContract',
|
116
117
|
)({
|
117
118
|
address: universalResolverAddress,
|
118
119
|
abi: universalResolverResolveAbi,
|
package/actions/getContract.ts
CHANGED
@@ -555,6 +555,7 @@ export function getContract<
|
|
555
555
|
return getAction(
|
556
556
|
publicClient,
|
557
557
|
readContract,
|
558
|
+
'readContract',
|
558
559
|
)({
|
559
560
|
abi,
|
560
561
|
address,
|
@@ -585,6 +586,7 @@ export function getContract<
|
|
585
586
|
return getAction(
|
586
587
|
publicClient,
|
587
588
|
simulateContract,
|
589
|
+
'simulateContract',
|
588
590
|
)({
|
589
591
|
abi,
|
590
592
|
address,
|
@@ -621,6 +623,7 @@ export function getContract<
|
|
621
623
|
return getAction(
|
622
624
|
publicClient,
|
623
625
|
createContractEventFilter,
|
626
|
+
'createContractEventFilter',
|
624
627
|
)({
|
625
628
|
abi,
|
626
629
|
address,
|
@@ -655,6 +658,7 @@ export function getContract<
|
|
655
658
|
return getAction(
|
656
659
|
publicClient,
|
657
660
|
getContractEvents,
|
661
|
+
'getContractEvents',
|
658
662
|
)({
|
659
663
|
abi,
|
660
664
|
address,
|
@@ -689,6 +693,7 @@ export function getContract<
|
|
689
693
|
return getAction(
|
690
694
|
publicClient,
|
691
695
|
watchContractEvent,
|
696
|
+
'watchContractEvent',
|
692
697
|
)({
|
693
698
|
abi,
|
694
699
|
address,
|
@@ -722,6 +727,7 @@ export function getContract<
|
|
722
727
|
return getAction(
|
723
728
|
walletClient,
|
724
729
|
writeContract,
|
730
|
+
'writeContract',
|
725
731
|
)({
|
726
732
|
abi,
|
727
733
|
address,
|
@@ -755,6 +761,7 @@ export function getContract<
|
|
755
761
|
return getAction(
|
756
762
|
client,
|
757
763
|
estimateContractGas,
|
764
|
+
'estimateContractGas',
|
758
765
|
)({
|
759
766
|
abi,
|
760
767
|
address,
|
@@ -859,13 +866,7 @@ type GetEstimateFunction<
|
|
859
866
|
Args = AbiParametersToPrimitiveTypes<TAbiFunction['inputs']>,
|
860
867
|
Options = Prettify<
|
861
868
|
UnionOmit<
|
862
|
-
EstimateContractGasParameters<
|
863
|
-
TAbi,
|
864
|
-
TFunctionName,
|
865
|
-
TArgs,
|
866
|
-
TChain,
|
867
|
-
TAccount
|
868
|
-
>,
|
869
|
+
EstimateContractGasParameters<TAbi, TFunctionName, TArgs, TChain>,
|
869
870
|
'abi' | 'address' | 'args' | 'functionName'
|
870
871
|
>
|
871
872
|
>,
|
@@ -919,7 +920,7 @@ type GetSimulateFunction<
|
|
919
920
|
>(
|
920
921
|
...parameters: Args extends readonly []
|
921
922
|
? [
|
922
|
-
options?:
|
923
|
+
options?: Omit<
|
923
924
|
SimulateContractParameters<
|
924
925
|
TAbi,
|
925
926
|
TFunctionName,
|
@@ -933,7 +934,7 @@ type GetSimulateFunction<
|
|
933
934
|
]
|
934
935
|
: [
|
935
936
|
args: Args,
|
936
|
-
options?:
|
937
|
+
options?: Omit<
|
937
938
|
SimulateContractParameters<
|
938
939
|
TAbi,
|
939
940
|
TFunctionName,
|
@@ -962,7 +963,7 @@ type GetSimulateFunction<
|
|
962
963
|
>(
|
963
964
|
...parameters:
|
964
965
|
| [
|
965
|
-
options?:
|
966
|
+
options?: Omit<
|
966
967
|
SimulateContractParameters<
|
967
968
|
TAbi,
|
968
969
|
TFunctionName,
|
@@ -976,7 +977,7 @@ type GetSimulateFunction<
|
|
976
977
|
]
|
977
978
|
| [
|
978
979
|
args: readonly unknown[],
|
979
|
-
options?:
|
980
|
+
options?: Omit<
|
980
981
|
SimulateContractParameters<
|
981
982
|
TAbi,
|
982
983
|
TFunctionName,
|
@@ -48,12 +48,12 @@ export type CreateContractEventFilterParameters<
|
|
48
48
|
args?: never
|
49
49
|
}
|
50
50
|
: MaybeExtractEventArgsFromAbi<abi, eventName> extends infer TEventFilterArgs
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
51
|
+
? {
|
52
|
+
args?: TEventFilterArgs | (args extends TEventFilterArgs ? args : never)
|
53
|
+
}
|
54
|
+
: {
|
55
|
+
args?: never
|
56
|
+
})
|
57
57
|
|
58
58
|
export type CreateContractEventFilterReturnType<
|
59
59
|
abi extends Abi | readonly unknown[] = Abi,
|
@@ -155,7 +155,7 @@ export async function createContractEventFilter<
|
|
155
155
|
eventName,
|
156
156
|
id,
|
157
157
|
request: getRequest(id),
|
158
|
-
strict,
|
158
|
+
strict: Boolean(strict),
|
159
159
|
type: 'event',
|
160
160
|
} as unknown as CreateContractEventFilterReturnType<
|
161
161
|
abi,
|
@@ -44,14 +44,13 @@ export type EstimateContractGasParameters<
|
|
44
44
|
functionName
|
45
45
|
> = ContractFunctionArgs<abi, 'nonpayable' | 'payable', functionName>,
|
46
46
|
chain extends Chain | undefined = Chain | undefined,
|
47
|
-
account extends Account | undefined = undefined,
|
48
47
|
> = ContractFunctionParameters<
|
49
48
|
abi,
|
50
49
|
'nonpayable' | 'payable',
|
51
50
|
functionName,
|
52
51
|
args
|
53
52
|
> &
|
54
|
-
UnionOmit<EstimateGasParameters<chain
|
53
|
+
UnionOmit<EstimateGasParameters<chain>, 'data' | 'to' | 'value'> &
|
55
54
|
GetValue<
|
56
55
|
abi,
|
57
56
|
functionName,
|
@@ -101,13 +100,7 @@ export async function estimateContractGas<
|
|
101
100
|
account extends Account | undefined = undefined,
|
102
101
|
>(
|
103
102
|
client: Client<Transport, chain, account>,
|
104
|
-
parameters: EstimateContractGasParameters<
|
105
|
-
abi,
|
106
|
-
functionName,
|
107
|
-
args,
|
108
|
-
chain,
|
109
|
-
account
|
110
|
-
>,
|
103
|
+
parameters: EstimateContractGasParameters<abi, functionName, args, chain>,
|
111
104
|
): Promise<EstimateContractGasReturnType> {
|
112
105
|
const { abi, address, args, functionName, ...request } =
|
113
106
|
parameters as EstimateContractGasParameters
|
@@ -120,6 +113,7 @@ export async function estimateContractGas<
|
|
120
113
|
const gas = await getAction(
|
121
114
|
client,
|
122
115
|
estimateGas,
|
116
|
+
'estimateGas',
|
123
117
|
)({
|
124
118
|
data,
|
125
119
|
to: address,
|
@@ -13,7 +13,7 @@ import type {
|
|
13
13
|
ChainEstimateFeesPerGasFnParameters,
|
14
14
|
ChainFeesFnParameters,
|
15
15
|
} from '../../types/chain.js'
|
16
|
-
import type {
|
16
|
+
import type { GetChainParameter } from '../../types/chain.js'
|
17
17
|
import type {
|
18
18
|
FeeValuesEIP1559,
|
19
19
|
FeeValuesLegacy,
|
@@ -42,7 +42,7 @@ export type EstimateFeesPerGasParameters<
|
|
42
42
|
* @default 'eip1559'
|
43
43
|
*/
|
44
44
|
type?: type | FeeValuesType
|
45
|
-
} &
|
45
|
+
} & GetChainParameter<chain, chainOverride>
|
46
46
|
|
47
47
|
export type EstimateFeesPerGasReturnType<
|
48
48
|
type extends FeeValuesType = FeeValuesType,
|
@@ -126,7 +126,9 @@ export async function internal_estimateFeesPerGas<
|
|
126
126
|
(base * BigInt(Math.ceil(baseFeeMultiplier * denominator))) /
|
127
127
|
BigInt(denominator)
|
128
128
|
|
129
|
-
const block = block_
|
129
|
+
const block = block_
|
130
|
+
? block_
|
131
|
+
: await getAction(client, getBlock, 'getBlock')({})
|
130
132
|
|
131
133
|
if (typeof chain?.fees?.estimateFeesPerGas === 'function')
|
132
134
|
return chain.fees.estimateFeesPerGas({
|
@@ -146,7 +148,7 @@ export async function internal_estimateFeesPerGas<
|
|
146
148
|
: await internal_estimateMaxPriorityFeePerGas(
|
147
149
|
client as Client<Transport, Chain>,
|
148
150
|
{
|
149
|
-
block,
|
151
|
+
block: block as Block,
|
150
152
|
chain,
|
151
153
|
request,
|
152
154
|
},
|
@@ -163,7 +165,8 @@ export async function internal_estimateFeesPerGas<
|
|
163
165
|
}
|
164
166
|
|
165
167
|
const gasPrice =
|
166
|
-
request?.gasPrice ??
|
168
|
+
request?.gasPrice ??
|
169
|
+
multiply(await getAction(client, getGasPrice, 'getGasPrice')({}))
|
167
170
|
return {
|
168
171
|
gasPrice,
|
169
172
|
} as EstimateFeesPerGasReturnType<type>
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import type { Address } from 'abitype'
|
1
2
|
import type { Account } from '../../accounts/types.js'
|
2
3
|
import {
|
3
4
|
type ParseAccountErrorType,
|
@@ -5,9 +6,7 @@ import {
|
|
5
6
|
} from '../../accounts/utils/parseAccount.js'
|
6
7
|
import type { Client } from '../../clients/createClient.js'
|
7
8
|
import type { Transport } from '../../clients/transports/createTransport.js'
|
8
|
-
import { AccountNotFoundError } from '../../errors/account.js'
|
9
9
|
import type { BaseError } from '../../errors/base.js'
|
10
|
-
import type { GetAccountParameter } from '../../types/account.js'
|
11
10
|
import type { BlockTag } from '../../types/block.js'
|
12
11
|
import type { Chain } from '../../types/chain.js'
|
13
12
|
import type { TransactionRequest } from '../../types/transaction.js'
|
@@ -42,10 +41,9 @@ export type FormattedEstimateGas<
|
|
42
41
|
|
43
42
|
export type EstimateGasParameters<
|
44
43
|
TChain extends Chain | undefined = Chain | undefined,
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
(
|
44
|
+
> = UnionOmit<FormattedEstimateGas<TChain>, 'from'> & {
|
45
|
+
account?: Account | Address
|
46
|
+
} & (
|
49
47
|
| {
|
50
48
|
/** The balance of the account at a block number. */
|
51
49
|
blockNumber?: bigint
|
@@ -100,14 +98,10 @@ export async function estimateGas<
|
|
100
98
|
TAccount extends Account | undefined = undefined,
|
101
99
|
>(
|
102
100
|
client: Client<Transport, TChain, TAccount>,
|
103
|
-
args: EstimateGasParameters<TChain
|
101
|
+
args: EstimateGasParameters<TChain>,
|
104
102
|
): Promise<EstimateGasReturnType> {
|
105
103
|
const account_ = args.account ?? client.account
|
106
|
-
|
107
|
-
throw new AccountNotFoundError({
|
108
|
-
docsPath: '/docs/actions/public/estimateGas',
|
109
|
-
})
|
110
|
-
const account = parseAccount(account_)
|
104
|
+
const account = account_ ? parseAccount(account_) : undefined
|
111
105
|
|
112
106
|
try {
|
113
107
|
const {
|
@@ -124,7 +118,7 @@ export async function estimateGas<
|
|
124
118
|
value,
|
125
119
|
...rest
|
126
120
|
} =
|
127
|
-
account
|
121
|
+
account?.type === 'local'
|
128
122
|
? ((await prepareTransactionRequest(
|
129
123
|
client,
|
130
124
|
args as PrepareTransactionRequestParameters,
|
@@ -142,7 +136,7 @@ export async function estimateGas<
|
|
142
136
|
const request = format({
|
143
137
|
// Pick out extra data that might exist on the chain's transaction request type.
|
144
138
|
...extract(rest, { format: chainFormat }),
|
145
|
-
from: account
|
139
|
+
from: account?.address,
|
146
140
|
accessList,
|
147
141
|
data,
|
148
142
|
gas,
|
@@ -8,7 +8,7 @@ import type { ErrorType } from '../../errors/utils.js'
|
|
8
8
|
import type { Account } from '../../types/account.js'
|
9
9
|
import type { Block } from '../../types/block.js'
|
10
10
|
import type { Chain, ChainFeesFnParameters } from '../../types/chain.js'
|
11
|
-
import type {
|
11
|
+
import type { GetChainParameter } from '../../types/chain.js'
|
12
12
|
import type { RequestErrorType } from '../../utils/buildRequest.js'
|
13
13
|
import {
|
14
14
|
type HexToBigIntErrorType,
|
@@ -22,7 +22,7 @@ import { type GetGasPriceErrorType, getGasPrice } from './getGasPrice.js'
|
|
22
22
|
export type EstimateMaxPriorityFeePerGasParameters<
|
23
23
|
chain extends Chain | undefined = Chain | undefined,
|
24
24
|
chainOverride extends Chain | undefined = Chain | undefined,
|
25
|
-
> =
|
25
|
+
> = GetChainParameter<chain, chainOverride>
|
26
26
|
|
27
27
|
export type EstimateMaxPriorityFeePerGasReturnType = bigint
|
28
28
|
|
@@ -83,13 +83,15 @@ export async function internal_estimateMaxPriorityFeePerGas<
|
|
83
83
|
): Promise<EstimateMaxPriorityFeePerGasReturnType> {
|
84
84
|
const { block: block_, chain = client.chain, request } = args || {}
|
85
85
|
if (typeof chain?.fees?.defaultPriorityFee === 'function') {
|
86
|
-
const block = block_ || (await getAction(client, getBlock)({}))
|
86
|
+
const block = block_ || (await getAction(client, getBlock, 'getBlock')({}))
|
87
87
|
return chain.fees.defaultPriorityFee({
|
88
88
|
block,
|
89
89
|
client,
|
90
90
|
request,
|
91
91
|
} as ChainFeesFnParameters)
|
92
|
-
}
|
92
|
+
}
|
93
|
+
|
94
|
+
if (typeof chain?.fees?.defaultPriorityFee !== 'undefined')
|
93
95
|
return chain?.fees?.defaultPriorityFee
|
94
96
|
|
95
97
|
try {
|
@@ -102,8 +104,10 @@ export async function internal_estimateMaxPriorityFeePerGas<
|
|
102
104
|
// fall back to calculating it manually via `gasPrice - baseFeePerGas`.
|
103
105
|
// See: https://github.com/ethereum/pm/issues/328#:~:text=eth_maxPriorityFeePerGas%20after%20London%20will%20effectively%20return%20eth_gasPrice%20%2D%20baseFee
|
104
106
|
const [block, gasPrice] = await Promise.all([
|
105
|
-
block_
|
106
|
-
|
107
|
+
block_
|
108
|
+
? Promise.resolve(block_)
|
109
|
+
: getAction(client, getBlock, 'getBlock')({}),
|
110
|
+
getAction(client, getGasPrice, 'getGasPrice')({}),
|
107
111
|
])
|
108
112
|
|
109
113
|
if (typeof block.baseFeePerGas !== 'bigint')
|
@@ -51,7 +51,7 @@ export type GetBlockParameters<
|
|
51
51
|
)
|
52
52
|
|
53
53
|
export type GetBlockReturnType<
|
54
|
-
TChain extends Chain | undefined =
|
54
|
+
TChain extends Chain | undefined = undefined,
|
55
55
|
TIncludeTransactions extends boolean = false,
|
56
56
|
TBlockTag extends BlockTag = 'latest',
|
57
57
|
> = FormattedBlock<TChain, TIncludeTransactions, TBlockTag>
|
@@ -66,7 +66,7 @@ export type GetBlockErrorType =
|
|
66
66
|
* Returns information about a block at a block number, hash, or tag.
|
67
67
|
*
|
68
68
|
* - Docs: https://viem.sh/docs/actions/public/getBlock.html
|
69
|
-
* - Examples: https://stackblitz.com/github/
|
69
|
+
* - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks/fetching-blocks
|
70
70
|
* - JSON-RPC Methods:
|
71
71
|
* - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) for `blockNumber` & `blockTag`.
|
72
72
|
* - Calls [`eth_getBlockByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbyhash) for `blockHash`.
|
@@ -24,7 +24,7 @@ export function getBlockNumberCache(id: string) {
|
|
24
24
|
* Returns the number of the most recent block seen.
|
25
25
|
*
|
26
26
|
* - Docs: https://viem.sh/docs/actions/public/getBlockNumber.html
|
27
|
-
* - Examples: https://stackblitz.com/github/
|
27
|
+
* - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks/fetching-blocks
|
28
28
|
* - JSON-RPC Methods: [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber)
|
29
29
|
*
|
30
30
|
* @param client - Client to use
|
@@ -2,20 +2,15 @@ import type { Abi, AbiEvent, ExtractAbiEvent } from 'abitype'
|
|
2
2
|
|
3
3
|
import type { Client } from '../../clients/createClient.js'
|
4
4
|
import type { Transport } from '../../clients/transports/createTransport.js'
|
5
|
-
import {
|
6
|
-
DecodeLogDataMismatch,
|
7
|
-
DecodeLogTopicsMismatch,
|
8
|
-
} from '../../errors/abi.js'
|
9
5
|
import type { ErrorType } from '../../errors/utils.js'
|
6
|
+
import type { RpcLog } from '../../index.js'
|
10
7
|
import type { BlockNumber, BlockTag } from '../../types/block.js'
|
11
8
|
import type { Chain } from '../../types/chain.js'
|
12
9
|
import type { Filter, FilterType } from '../../types/filter.js'
|
13
10
|
import type { Log } from '../../types/log.js'
|
14
11
|
import type { Hash } from '../../types/misc.js'
|
15
|
-
import {
|
16
|
-
|
17
|
-
decodeEventLog,
|
18
|
-
} from '../../utils/abi/decodeEventLog.js'
|
12
|
+
import { type DecodeEventLogErrorType } from '../../utils/abi/decodeEventLog.js'
|
13
|
+
import { parseEventLogs } from '../../utils/abi/parseEventLogs.js'
|
19
14
|
import type { RequestErrorType } from '../../utils/buildRequest.js'
|
20
15
|
import {
|
21
16
|
type FormatLogErrorType,
|
@@ -185,38 +180,34 @@ export async function getFilterChanges<
|
|
185
180
|
method: 'eth_getFilterChanges',
|
186
181
|
params: [filter.id],
|
187
182
|
})
|
188
|
-
return logs
|
189
|
-
.map((log) => {
|
190
|
-
if (typeof log === 'string') return log
|
191
|
-
try {
|
192
|
-
const { eventName, args } =
|
193
|
-
'abi' in filter && filter.abi
|
194
|
-
? decodeEventLog({
|
195
|
-
abi: filter.abi,
|
196
|
-
data: log.data,
|
197
|
-
topics: log.topics as any,
|
198
|
-
strict,
|
199
|
-
})
|
200
|
-
: { eventName: undefined, args: undefined }
|
201
|
-
return formatLog(log, { args, eventName })
|
202
|
-
} catch (err) {
|
203
|
-
let eventName
|
204
|
-
let isUnnamed
|
205
|
-
if (
|
206
|
-
err instanceof DecodeLogDataMismatch ||
|
207
|
-
err instanceof DecodeLogTopicsMismatch
|
208
|
-
) {
|
209
|
-
// If strict mode is on, and log data/topics do not match event definition, skip.
|
210
|
-
if ('strict' in filter && filter.strict) return
|
211
|
-
eventName = err.abiItem.name
|
212
|
-
isUnnamed = err.abiItem.inputs?.some((x) => !('name' in x && x.name))
|
213
|
-
}
|
214
183
|
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
184
|
+
if (typeof logs[0] === 'string')
|
185
|
+
return logs as GetFilterChangesReturnType<
|
186
|
+
TFilterType,
|
187
|
+
TAbi,
|
188
|
+
TEventName,
|
189
|
+
TStrict,
|
190
|
+
TFromBlock,
|
191
|
+
TToBlock
|
192
|
+
>
|
193
|
+
|
194
|
+
if (!('abi' in filter) || !filter.abi)
|
195
|
+
return logs.map((log) =>
|
196
|
+
formatLog(log as RpcLog),
|
197
|
+
) as GetFilterChangesReturnType<
|
198
|
+
TFilterType,
|
199
|
+
TAbi,
|
200
|
+
TEventName,
|
201
|
+
TStrict,
|
202
|
+
TFromBlock,
|
203
|
+
TToBlock
|
204
|
+
>
|
205
|
+
|
206
|
+
return parseEventLogs({
|
207
|
+
abi: filter.abi,
|
208
|
+
logs: logs as RpcLog[],
|
209
|
+
strict,
|
210
|
+
}) as unknown as GetFilterChangesReturnType<
|
220
211
|
TFilterType,
|
221
212
|
TAbi,
|
222
213
|
TEventName,
|
@@ -2,19 +2,14 @@ import type { Abi, AbiEvent, ExtractAbiEvent } from 'abitype'
|
|
2
2
|
|
3
3
|
import type { Client } from '../../clients/createClient.js'
|
4
4
|
import type { Transport } from '../../clients/transports/createTransport.js'
|
5
|
-
|
6
|
-
DecodeLogDataMismatch,
|
7
|
-
DecodeLogTopicsMismatch,
|
8
|
-
} from '../../errors/abi.js'
|
5
|
+
|
9
6
|
import type { ErrorType } from '../../errors/utils.js'
|
10
7
|
import type { BlockNumber, BlockTag } from '../../types/block.js'
|
11
8
|
import type { Chain } from '../../types/chain.js'
|
12
9
|
import type { Filter } from '../../types/filter.js'
|
13
10
|
import type { Log } from '../../types/log.js'
|
14
|
-
import {
|
15
|
-
|
16
|
-
decodeEventLog,
|
17
|
-
} from '../../utils/abi/decodeEventLog.js'
|
11
|
+
import { type DecodeEventLogErrorType } from '../../utils/abi/decodeEventLog.js'
|
12
|
+
import { parseEventLogs } from '../../utils/abi/parseEventLogs.js'
|
18
13
|
import type { RequestErrorType } from '../../utils/buildRequest.js'
|
19
14
|
import {
|
20
15
|
type FormatLogErrorType,
|
@@ -100,37 +95,21 @@ export async function getFilterLogs<
|
|
100
95
|
method: 'eth_getFilterLogs',
|
101
96
|
params: [filter.id],
|
102
97
|
})
|
103
|
-
return logs
|
104
|
-
.map((log) => {
|
105
|
-
try {
|
106
|
-
const { eventName, args } =
|
107
|
-
'abi' in filter && filter.abi
|
108
|
-
? decodeEventLog({
|
109
|
-
abi: filter.abi,
|
110
|
-
data: log.data,
|
111
|
-
topics: log.topics as any,
|
112
|
-
strict,
|
113
|
-
})
|
114
|
-
: { eventName: undefined, args: undefined }
|
115
|
-
return formatLog(log, { args, eventName })
|
116
|
-
} catch (err) {
|
117
|
-
let eventName
|
118
|
-
let isUnnamed
|
119
|
-
if (
|
120
|
-
err instanceof DecodeLogDataMismatch ||
|
121
|
-
err instanceof DecodeLogTopicsMismatch
|
122
|
-
) {
|
123
|
-
// If strict mode is on, and log data/topics do not match event definition, skip.
|
124
|
-
if ('strict' in filter && filter.strict) return
|
125
|
-
eventName = err.abiItem.name
|
126
|
-
isUnnamed = err.abiItem.inputs?.some((x) => !('name' in x && x.name))
|
127
|
-
}
|
128
98
|
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
99
|
+
if (!filter.abi)
|
100
|
+
return logs.map((log) => formatLog(log)) as GetFilterLogsReturnType<
|
101
|
+
TAbi,
|
102
|
+
TEventName,
|
103
|
+
TStrict,
|
104
|
+
TFromBlock,
|
105
|
+
TToBlock
|
106
|
+
>
|
107
|
+
|
108
|
+
return parseEventLogs({
|
109
|
+
abi: filter.abi,
|
110
|
+
logs,
|
111
|
+
strict,
|
112
|
+
}) as unknown as GetFilterLogsReturnType<
|
134
113
|
TAbi,
|
135
114
|
TEventName,
|
136
115
|
TStrict,
|
@@ -2,10 +2,6 @@ import type { AbiEvent, Address } from 'abitype'
|
|
2
2
|
|
3
3
|
import type { Client } from '../../clients/createClient.js'
|
4
4
|
import type { Transport } from '../../clients/transports/createTransport.js'
|
5
|
-
import {
|
6
|
-
DecodeLogDataMismatch,
|
7
|
-
DecodeLogTopicsMismatch,
|
8
|
-
} from '../../errors/abi.js'
|
9
5
|
import type { ErrorType } from '../../errors/utils.js'
|
10
6
|
import type { BlockNumber, BlockTag } from '../../types/block.js'
|
11
7
|
import type { Chain } from '../../types/chain.js'
|
@@ -16,15 +12,13 @@ import type {
|
|
16
12
|
import type { Log } from '../../types/log.js'
|
17
13
|
import type { Hash, LogTopic } from '../../types/misc.js'
|
18
14
|
import type { RpcLog } from '../../types/rpc.js'
|
19
|
-
import {
|
20
|
-
type DecodeEventLogErrorType,
|
21
|
-
decodeEventLog,
|
22
|
-
} from '../../utils/abi/decodeEventLog.js'
|
15
|
+
import { type DecodeEventLogErrorType } from '../../utils/abi/decodeEventLog.js'
|
23
16
|
import {
|
24
17
|
type EncodeEventTopicsErrorType,
|
25
18
|
type EncodeEventTopicsParameters,
|
26
19
|
encodeEventTopics,
|
27
20
|
} from '../../utils/abi/encodeEventTopics.js'
|
21
|
+
import { parseEventLogs } from '../../utils/abi/parseEventLogs.js'
|
28
22
|
import type { RequestErrorType } from '../../utils/buildRequest.js'
|
29
23
|
import {
|
30
24
|
type NumberToHexErrorType,
|
@@ -119,7 +113,7 @@ export type GetLogsErrorType =
|
|
119
113
|
* Returns a list of event logs matching the provided parameters.
|
120
114
|
*
|
121
115
|
* - Docs: https://viem.sh/docs/actions/public/getLogs.html
|
122
|
-
* - Examples: https://stackblitz.com/github/
|
116
|
+
* - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/filters-and-logs/event-logs
|
123
117
|
* - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs)
|
124
118
|
*
|
125
119
|
* @param client - Client to use
|
@@ -206,36 +200,20 @@ export async function getLogs<
|
|
206
200
|
})
|
207
201
|
}
|
208
202
|
|
209
|
-
|
210
|
-
.map((log) =>
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
strict,
|
218
|
-
})
|
219
|
-
: { eventName: undefined, args: undefined }
|
220
|
-
return formatLog(log, { args, eventName: eventName as string })
|
221
|
-
} catch (err) {
|
222
|
-
let eventName
|
223
|
-
let isUnnamed
|
224
|
-
if (
|
225
|
-
err instanceof DecodeLogDataMismatch ||
|
226
|
-
err instanceof DecodeLogTopicsMismatch
|
227
|
-
) {
|
228
|
-
// If strict mode is on, and log data/topics do not match event definition, skip.
|
229
|
-
if (strict) return
|
230
|
-
eventName = err.abiItem.name
|
231
|
-
isUnnamed = err.abiItem.inputs?.some((x) => !('name' in x && x.name))
|
232
|
-
}
|
203
|
+
if (!events)
|
204
|
+
return logs.map((log) => formatLog(log)) as GetLogsReturnType<
|
205
|
+
TAbiEvent,
|
206
|
+
TAbiEvents,
|
207
|
+
TStrict,
|
208
|
+
TFromBlock,
|
209
|
+
TToBlock
|
210
|
+
>
|
233
211
|
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
212
|
+
return parseEventLogs({
|
213
|
+
abi: events,
|
214
|
+
logs,
|
215
|
+
strict,
|
216
|
+
}) as unknown as GetLogsReturnType<
|
239
217
|
TAbiEvent,
|
240
218
|
TAbiEvents,
|
241
219
|
TStrict,
|