viem 1.6.6 → 1.7.0
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/dist/cjs/actions/public/estimateFeesPerGas.js +59 -0
- package/dist/cjs/actions/public/estimateFeesPerGas.js.map +1 -0
- package/dist/cjs/actions/public/estimateMaxPriorityFeePerGas.js +44 -0
- package/dist/cjs/actions/public/estimateMaxPriorityFeePerGas.js.map +1 -0
- package/dist/cjs/actions/public/verifyHash.js.map +1 -1
- package/dist/cjs/actions/public/verifyMessage.js.map +1 -1
- package/dist/cjs/actions/public/verifyTypedData.js.map +1 -1
- package/dist/cjs/actions/wallet/deployContract.js.map +1 -1
- package/dist/cjs/actions/wallet/sendTransaction.js.map +1 -1
- package/dist/cjs/actions/wallet/writeContract.js.map +1 -1
- package/dist/cjs/clients/createTestClient.js.map +1 -1
- package/dist/cjs/clients/decorators/public.js +4 -0
- package/dist/cjs/clients/decorators/public.js.map +1 -1
- package/dist/cjs/errors/fee.js +42 -0
- package/dist/cjs/errors/fee.js.map +1 -0
- package/dist/cjs/errors/version.js +1 -1
- package/dist/cjs/index.js +8 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/public.js +5 -1
- package/dist/cjs/public.js.map +1 -1
- package/dist/cjs/utils/transaction/prepareRequest.js +26 -29
- package/dist/cjs/utils/transaction/prepareRequest.js.map +1 -1
- package/dist/esm/actions/public/estimateFeesPerGas.js +77 -0
- package/dist/esm/actions/public/estimateFeesPerGas.js.map +1 -0
- package/dist/esm/actions/public/estimateMaxPriorityFeePerGas.js +64 -0
- package/dist/esm/actions/public/estimateMaxPriorityFeePerGas.js.map +1 -0
- package/dist/esm/actions/public/verifyHash.js.map +1 -1
- package/dist/esm/actions/public/verifyMessage.js.map +1 -1
- package/dist/esm/actions/public/verifyTypedData.js.map +1 -1
- package/dist/esm/actions/wallet/deployContract.js.map +1 -1
- package/dist/esm/actions/wallet/sendTransaction.js.map +1 -1
- package/dist/esm/actions/wallet/writeContract.js.map +1 -1
- package/dist/esm/clients/createTestClient.js.map +1 -1
- package/dist/esm/clients/decorators/public.js +4 -0
- package/dist/esm/clients/decorators/public.js.map +1 -1
- package/dist/esm/errors/fee.js +36 -0
- package/dist/esm/errors/fee.js.map +1 -0
- package/dist/esm/errors/version.js +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/public.js +2 -0
- package/dist/esm/public.js.map +1 -1
- package/dist/esm/utils/transaction/prepareRequest.js +27 -31
- package/dist/esm/utils/transaction/prepareRequest.js.map +1 -1
- package/dist/types/abi.d.ts +6 -0
- package/dist/types/abi.d.ts.map +1 -0
- package/dist/types/accounts/generateMnemonic.d.ts +9 -0
- package/dist/types/accounts/generateMnemonic.d.ts.map +1 -0
- package/dist/types/accounts/generatePrivateKey.d.ts +8 -0
- package/dist/types/accounts/generatePrivateKey.d.ts.map +1 -0
- package/dist/types/accounts/hdKeyToAccount.d.ts +9 -0
- package/dist/types/accounts/hdKeyToAccount.d.ts.map +1 -0
- package/dist/types/accounts/index.d.ts +27 -0
- package/dist/types/accounts/index.d.ts.map +1 -0
- package/dist/types/accounts/mnemonicToAccount.d.ts +8 -0
- package/dist/types/accounts/mnemonicToAccount.d.ts.map +1 -0
- package/dist/types/accounts/privateKeyToAccount.d.ts +9 -0
- package/dist/types/accounts/privateKeyToAccount.d.ts.map +1 -0
- package/dist/types/accounts/toAccount.d.ts +11 -0
- package/dist/types/accounts/toAccount.d.ts.map +1 -0
- package/dist/types/accounts/types.d.ts +52 -0
- package/dist/types/accounts/types.d.ts.map +1 -0
- package/dist/types/accounts/utils/parseAccount.d.ts +4 -0
- package/dist/types/accounts/utils/parseAccount.d.ts.map +1 -0
- package/dist/types/accounts/utils/privateKeyToAddress.d.ts +11 -0
- package/dist/types/accounts/utils/privateKeyToAddress.d.ts.map +1 -0
- package/dist/types/accounts/utils/publicKeyToAddress.d.ts +11 -0
- package/dist/types/accounts/utils/publicKeyToAddress.d.ts.map +1 -0
- package/dist/types/accounts/utils/sign.d.ts +16 -0
- package/dist/types/accounts/utils/sign.d.ts.map +1 -0
- package/dist/types/accounts/utils/signMessage.d.ts +16 -0
- package/dist/types/accounts/utils/signMessage.d.ts.map +1 -0
- package/dist/types/accounts/utils/signTransaction.d.ts +12 -0
- package/dist/types/accounts/utils/signTransaction.d.ts.map +1 -0
- package/dist/types/accounts/utils/signTypedData.d.ts +20 -0
- package/dist/types/accounts/utils/signTypedData.d.ts.map +1 -0
- package/dist/types/accounts/wordlists/czech.d.ts +2 -0
- package/dist/types/accounts/wordlists/czech.d.ts.map +1 -0
- package/dist/types/accounts/wordlists/english.d.ts +2 -0
- package/dist/types/accounts/wordlists/english.d.ts.map +1 -0
- package/dist/types/accounts/wordlists/french.d.ts +2 -0
- package/dist/types/accounts/wordlists/french.d.ts.map +1 -0
- package/dist/types/accounts/wordlists/italian.d.ts +2 -0
- package/dist/types/accounts/wordlists/italian.d.ts.map +1 -0
- package/dist/types/accounts/wordlists/japanese.d.ts +2 -0
- package/dist/types/accounts/wordlists/japanese.d.ts.map +1 -0
- package/dist/types/accounts/wordlists/korean.d.ts +2 -0
- package/dist/types/accounts/wordlists/korean.d.ts.map +1 -0
- package/dist/types/accounts/wordlists/simplifiedChinese.d.ts +2 -0
- package/dist/types/accounts/wordlists/simplifiedChinese.d.ts.map +1 -0
- package/dist/types/accounts/wordlists/spanish.d.ts +2 -0
- package/dist/types/accounts/wordlists/spanish.d.ts.map +1 -0
- package/dist/types/accounts/wordlists/traditionalChinese.d.ts +2 -0
- package/dist/types/accounts/wordlists/traditionalChinese.d.ts.map +1 -0
- package/dist/types/actions/ens/getEnsAddress.d.ts +45 -0
- package/dist/types/actions/ens/getEnsAddress.d.ts.map +1 -0
- package/dist/types/actions/ens/getEnsAvatar.d.ts +41 -0
- package/dist/types/actions/ens/getEnsAvatar.d.ts.map +1 -0
- package/dist/types/actions/ens/getEnsName.d.ts +41 -0
- package/dist/types/actions/ens/getEnsName.d.ts.map +1 -0
- package/dist/types/actions/ens/getEnsResolver.d.ts +43 -0
- package/dist/types/actions/ens/getEnsResolver.d.ts.map +1 -0
- package/dist/types/actions/ens/getEnsText.d.ts +46 -0
- package/dist/types/actions/ens/getEnsText.d.ts.map +1 -0
- package/dist/types/actions/getContract.d.ts +314 -0
- package/dist/types/actions/getContract.d.ts.map +1 -0
- package/dist/types/actions/index.d.ts +80 -0
- package/dist/types/actions/index.d.ts.map +1 -0
- package/dist/types/actions/public/call.d.ts +56 -0
- package/dist/types/actions/public/call.d.ts.map +1 -0
- package/dist/types/actions/public/createBlockFilter.d.ts +28 -0
- package/dist/types/actions/public/createBlockFilter.d.ts.map +1 -0
- package/dist/types/actions/public/createContractEventFilter.d.ts +50 -0
- package/dist/types/actions/public/createContractEventFilter.d.ts.map +1 -0
- package/dist/types/actions/public/createEventFilter.d.ts +76 -0
- package/dist/types/actions/public/createEventFilter.d.ts.map +1 -0
- package/dist/types/actions/public/createPendingTransactionFilter.d.ts +28 -0
- package/dist/types/actions/public/createPendingTransactionFilter.d.ts.map +1 -0
- package/dist/types/actions/public/estimateContractGas.d.ts +39 -0
- package/dist/types/actions/public/estimateContractGas.d.ts.map +1 -0
- package/dist/types/actions/public/estimateFeesPerGas.d.ts +48 -0
- package/dist/types/actions/public/estimateFeesPerGas.d.ts.map +1 -0
- package/dist/types/actions/public/estimateGas.d.ts +49 -0
- package/dist/types/actions/public/estimateGas.d.ts.map +1 -0
- package/dist/types/actions/public/estimateMaxPriorityFeePerGas.d.ts +35 -0
- package/dist/types/actions/public/estimateMaxPriorityFeePerGas.d.ts.map +1 -0
- package/dist/types/actions/public/getBalance.d.ts +55 -0
- package/dist/types/actions/public/getBalance.d.ts.map +1 -0
- package/dist/types/actions/public/getBlock.d.ts +56 -0
- package/dist/types/actions/public/getBlock.d.ts.map +1 -0
- package/dist/types/actions/public/getBlockNumber.d.ts +57 -0
- package/dist/types/actions/public/getBlockNumber.d.ts.map +1 -0
- package/dist/types/actions/public/getBlockTransactionCount.d.ts +47 -0
- package/dist/types/actions/public/getBlockTransactionCount.d.ts.map +1 -0
- package/dist/types/actions/public/getBytecode.d.ts +41 -0
- package/dist/types/actions/public/getBytecode.d.ts.map +1 -0
- package/dist/types/actions/public/getChainId.d.ts +28 -0
- package/dist/types/actions/public/getChainId.d.ts.map +1 -0
- package/dist/types/actions/public/getFeeHistory.d.ts +53 -0
- package/dist/types/actions/public/getFeeHistory.d.ts.map +1 -0
- package/dist/types/actions/public/getFilterChanges.d.ts +96 -0
- package/dist/types/actions/public/getFilterChanges.d.ts.map +1 -0
- package/dist/types/actions/public/getFilterLogs.d.ts +40 -0
- package/dist/types/actions/public/getFilterLogs.d.ts.map +1 -0
- package/dist/types/actions/public/getGasPrice.d.ts +27 -0
- package/dist/types/actions/public/getGasPrice.d.ts.map +1 -0
- package/dist/types/actions/public/getLogs.d.ts +71 -0
- package/dist/types/actions/public/getLogs.d.ts.map +1 -0
- package/dist/types/actions/public/getStorageAt.d.ts +43 -0
- package/dist/types/actions/public/getStorageAt.d.ts.map +1 -0
- package/dist/types/actions/public/getTransaction.d.ts +65 -0
- package/dist/types/actions/public/getTransaction.d.ts.map +1 -0
- package/dist/types/actions/public/getTransactionConfirmations.d.ts +41 -0
- package/dist/types/actions/public/getTransactionConfirmations.d.ts.map +1 -0
- package/dist/types/actions/public/getTransactionCount.d.ts +44 -0
- package/dist/types/actions/public/getTransactionCount.d.ts.map +1 -0
- package/dist/types/actions/public/getTransactionReceipt.d.ts +36 -0
- package/dist/types/actions/public/getTransactionReceipt.d.ts.map +1 -0
- package/dist/types/actions/public/multicall.d.ts +56 -0
- package/dist/types/actions/public/multicall.d.ts.map +1 -0
- package/dist/types/actions/public/readContract.d.ts +41 -0
- package/dist/types/actions/public/readContract.d.ts.map +1 -0
- package/dist/types/actions/public/simulateContract.d.ts +54 -0
- package/dist/types/actions/public/simulateContract.d.ts.map +1 -0
- package/dist/types/actions/public/uninstallFilter.d.ts +34 -0
- package/dist/types/actions/public/uninstallFilter.d.ts.map +1 -0
- package/dist/types/actions/public/verifyHash.d.ts +24 -0
- package/dist/types/actions/public/verifyHash.d.ts.map +1 -0
- package/dist/types/actions/public/verifyMessage.d.ts +28 -0
- package/dist/types/actions/public/verifyMessage.d.ts.map +1 -0
- package/dist/types/actions/public/verifyTypedData.d.ts +27 -0
- package/dist/types/actions/public/verifyTypedData.d.ts.map +1 -0
- package/dist/types/actions/public/waitForTransactionReceipt.d.ts +72 -0
- package/dist/types/actions/public/waitForTransactionReceipt.d.ts.map +1 -0
- package/dist/types/actions/public/watchBlockNumber.d.ts +59 -0
- package/dist/types/actions/public/watchBlockNumber.d.ts.map +1 -0
- package/dist/types/actions/public/watchBlocks.d.ts +67 -0
- package/dist/types/actions/public/watchBlocks.d.ts.map +1 -0
- package/dist/types/actions/public/watchContractEvent.d.ts +89 -0
- package/dist/types/actions/public/watchContractEvent.d.ts.map +1 -0
- package/dist/types/actions/public/watchEvent.d.ts +104 -0
- package/dist/types/actions/public/watchEvent.d.ts.map +1 -0
- package/dist/types/actions/public/watchPendingTransactions.d.ts +74 -0
- package/dist/types/actions/public/watchPendingTransactions.d.ts.map +1 -0
- package/dist/types/actions/test/dropTransaction.d.ts +33 -0
- package/dist/types/actions/test/dropTransaction.d.ts.map +1 -0
- package/dist/types/actions/test/getAutomine.d.ts +27 -0
- package/dist/types/actions/test/getAutomine.d.ts.map +1 -0
- package/dist/types/actions/test/getTxpoolContent.d.ts +34 -0
- package/dist/types/actions/test/getTxpoolContent.d.ts.map +1 -0
- package/dist/types/actions/test/getTxpoolStatus.d.ts +30 -0
- package/dist/types/actions/test/getTxpoolStatus.d.ts.map +1 -0
- package/dist/types/actions/test/impersonateAccount.d.ts +33 -0
- package/dist/types/actions/test/impersonateAccount.d.ts.map +1 -0
- package/dist/types/actions/test/increaseTime.d.ts +32 -0
- package/dist/types/actions/test/increaseTime.d.ts.map +1 -0
- package/dist/types/actions/test/inspectTxpool.d.ts +31 -0
- package/dist/types/actions/test/inspectTxpool.d.ts.map +1 -0
- package/dist/types/actions/test/mine.d.ts +32 -0
- package/dist/types/actions/test/mine.d.ts.map +1 -0
- package/dist/types/actions/test/removeBlockTimestampInterval.d.ts +25 -0
- package/dist/types/actions/test/removeBlockTimestampInterval.d.ts.map +1 -0
- package/dist/types/actions/test/reset.d.ts +32 -0
- package/dist/types/actions/test/reset.d.ts.map +1 -0
- package/dist/types/actions/test/revert.d.ts +31 -0
- package/dist/types/actions/test/revert.d.ts.map +1 -0
- package/dist/types/actions/test/sendUnsignedTransaction.d.ts +35 -0
- package/dist/types/actions/test/sendUnsignedTransaction.d.ts.map +1 -0
- package/dist/types/actions/test/setAutomine.d.ts +25 -0
- package/dist/types/actions/test/setAutomine.d.ts.map +1 -0
- package/dist/types/actions/test/setBalance.d.ts +36 -0
- package/dist/types/actions/test/setBalance.d.ts.map +1 -0
- package/dist/types/actions/test/setBlockGasLimit.d.ts +30 -0
- package/dist/types/actions/test/setBlockGasLimit.d.ts.map +1 -0
- package/dist/types/actions/test/setBlockTimestampInterval.d.ts +30 -0
- package/dist/types/actions/test/setBlockTimestampInterval.d.ts.map +1 -0
- package/dist/types/actions/test/setCode.d.ts +37 -0
- package/dist/types/actions/test/setCode.d.ts.map +1 -0
- package/dist/types/actions/test/setCoinbase.d.ts +33 -0
- package/dist/types/actions/test/setCoinbase.d.ts.map +1 -0
- package/dist/types/actions/test/setIntervalMining.d.ts +30 -0
- package/dist/types/actions/test/setIntervalMining.d.ts.map +1 -0
- package/dist/types/actions/test/setLoggingEnabled.d.ts +25 -0
- package/dist/types/actions/test/setLoggingEnabled.d.ts.map +1 -0
- package/dist/types/actions/test/setMinGasPrice.d.ts +34 -0
- package/dist/types/actions/test/setMinGasPrice.d.ts.map +1 -0
- package/dist/types/actions/test/setNextBlockBaseFeePerGas.d.ts +32 -0
- package/dist/types/actions/test/setNextBlockBaseFeePerGas.d.ts.map +1 -0
- package/dist/types/actions/test/setNextBlockTimestamp.d.ts +30 -0
- package/dist/types/actions/test/setNextBlockTimestamp.d.ts.map +1 -0
- package/dist/types/actions/test/setNonce.d.ts +36 -0
- package/dist/types/actions/test/setNonce.d.ts.map +1 -0
- package/dist/types/actions/test/setRpcUrl.d.ts +26 -0
- package/dist/types/actions/test/setRpcUrl.d.ts.map +1 -0
- package/dist/types/actions/test/setStorageAt.d.ts +40 -0
- package/dist/types/actions/test/setStorageAt.d.ts.map +1 -0
- package/dist/types/actions/test/snapshot.d.ts +25 -0
- package/dist/types/actions/test/snapshot.d.ts.map +1 -0
- package/dist/types/actions/test/stopImpersonatingAccount.d.ts +33 -0
- package/dist/types/actions/test/stopImpersonatingAccount.d.ts.map +1 -0
- package/dist/types/actions/wallet/addChain.d.ts +29 -0
- package/dist/types/actions/wallet/addChain.d.ts.map +1 -0
- package/dist/types/actions/wallet/deployContract.d.ts +44 -0
- package/dist/types/actions/wallet/deployContract.d.ts.map +1 -0
- package/dist/types/actions/wallet/getAddresses.d.ts +28 -0
- package/dist/types/actions/wallet/getAddresses.d.ts.map +1 -0
- package/dist/types/actions/wallet/getPermissions.d.ts +28 -0
- package/dist/types/actions/wallet/getPermissions.d.ts.map +1 -0
- package/dist/types/actions/wallet/requestAddresses.d.ts +32 -0
- package/dist/types/actions/wallet/requestAddresses.d.ts.map +1 -0
- package/dist/types/actions/wallet/requestPermissions.d.ts +37 -0
- package/dist/types/actions/wallet/requestPermissions.d.ts.map +1 -0
- package/dist/types/actions/wallet/sendTransaction.d.ts +58 -0
- package/dist/types/actions/wallet/sendTransaction.d.ts.map +1 -0
- package/dist/types/actions/wallet/signMessage.d.ts +58 -0
- package/dist/types/actions/wallet/signMessage.d.ts.map +1 -0
- package/dist/types/actions/wallet/signTypedData.d.ts +114 -0
- package/dist/types/actions/wallet/signTypedData.d.ts.map +1 -0
- package/dist/types/actions/wallet/switchChain.d.ts +30 -0
- package/dist/types/actions/wallet/switchChain.d.ts.map +1 -0
- package/dist/types/actions/wallet/watchAsset.d.ts +37 -0
- package/dist/types/actions/wallet/watchAsset.d.ts.map +1 -0
- package/dist/types/actions/wallet/writeContract.d.ts +69 -0
- package/dist/types/actions/wallet/writeContract.d.ts.map +1 -0
- package/dist/types/chains/celo/formatters.d.ts +195 -0
- package/dist/types/chains/celo/formatters.d.ts.map +1 -0
- package/dist/types/chains/celo/parsers.d.ts +6 -0
- package/dist/types/chains/celo/parsers.d.ts.map +1 -0
- package/dist/types/chains/celo/serializers.d.ts +9 -0
- package/dist/types/chains/celo/serializers.d.ts.map +1 -0
- package/dist/types/chains/celo/types.d.ts +74 -0
- package/dist/types/chains/celo/types.d.ts.map +1 -0
- package/dist/types/chains/index.d.ts +5329 -0
- package/dist/types/chains/index.d.ts.map +1 -0
- package/dist/types/chains/optimism/fees.d.ts +4 -0
- package/dist/types/chains/optimism/fees.d.ts.map +1 -0
- package/dist/types/chains/optimism/formatters.d.ts +299 -0
- package/dist/types/chains/optimism/formatters.d.ts.map +1 -0
- package/dist/types/chains/optimism/types.d.ts +53 -0
- package/dist/types/chains/optimism/types.d.ts.map +1 -0
- package/dist/types/chains/utils.d.ts +7 -0
- package/dist/types/chains/utils.d.ts.map +1 -0
- package/dist/types/clients/createClient.d.ts +79 -0
- package/dist/types/clients/createClient.d.ts.map +1 -0
- package/dist/types/clients/createPublicClient.d.ts +29 -0
- package/dist/types/clients/createPublicClient.d.ts.map +1 -0
- package/dist/types/clients/createTestClient.d.ts +43 -0
- package/dist/types/clients/createTestClient.d.ts.map +1 -0
- package/dist/types/clients/createWalletClient.d.ts +49 -0
- package/dist/types/clients/createWalletClient.d.ts.map +1 -0
- package/dist/types/clients/decorators/public.d.ts +1133 -0
- package/dist/types/clients/decorators/public.d.ts.map +1 -0
- package/dist/types/clients/decorators/test.d.ts +599 -0
- package/dist/types/clients/decorators/test.d.ts.map +1 -0
- package/dist/types/clients/decorators/wallet.d.ts +449 -0
- package/dist/types/clients/decorators/wallet.d.ts.map +1 -0
- package/dist/types/clients/transports/createTransport.d.ts +34 -0
- package/dist/types/clients/transports/createTransport.d.ts.map +1 -0
- package/dist/types/clients/transports/custom.d.ts +21 -0
- package/dist/types/clients/transports/custom.d.ts.map +1 -0
- package/dist/types/clients/transports/fallback.d.ts +75 -0
- package/dist/types/clients/transports/fallback.d.ts.map +1 -0
- package/dist/types/clients/transports/http.d.ts +40 -0
- package/dist/types/clients/transports/http.d.ts.map +1 -0
- package/dist/types/clients/transports/webSocket.d.ts +46 -0
- package/dist/types/clients/transports/webSocket.d.ts.map +1 -0
- package/dist/types/constants/abis.d.ts +165 -0
- package/dist/types/constants/abis.d.ts.map +1 -0
- package/dist/types/constants/address.d.ts +2 -0
- package/dist/types/constants/address.d.ts.map +1 -0
- package/dist/types/constants/contract.d.ts +2 -0
- package/dist/types/constants/contract.d.ts.map +1 -0
- package/dist/types/constants/contracts.d.ts +2 -0
- package/dist/types/constants/contracts.d.ts.map +1 -0
- package/dist/types/constants/number.d.ts +97 -0
- package/dist/types/constants/number.d.ts.map +1 -0
- package/dist/types/constants/solidity.d.ts +15 -0
- package/dist/types/constants/solidity.d.ts.map +1 -0
- package/dist/types/constants/unit.d.ts +13 -0
- package/dist/types/constants/unit.d.ts.map +1 -0
- package/dist/types/contract.d.ts +30 -0
- package/dist/types/contract.d.ts.map +1 -0
- package/dist/types/ens.d.ts +9 -0
- package/dist/types/ens.d.ts.map +1 -0
- package/dist/types/errors/abi.d.ts +169 -0
- package/dist/types/errors/abi.d.ts.map +1 -0
- package/dist/types/errors/account.d.ts +8 -0
- package/dist/types/errors/account.d.ts.map +1 -0
- package/dist/types/errors/address.d.ts +8 -0
- package/dist/types/errors/address.d.ts.map +1 -0
- package/dist/types/errors/base.d.ts +24 -0
- package/dist/types/errors/base.d.ts.map +1 -0
- package/dist/types/errors/block.d.ts +10 -0
- package/dist/types/errors/block.d.ts.map +1 -0
- package/dist/types/errors/ccip.d.ts +29 -0
- package/dist/types/errors/ccip.d.ts.map +1 -0
- package/dist/types/errors/chain.d.ts +35 -0
- package/dist/types/errors/chain.d.ts.map +1 -0
- package/dist/types/errors/contract.d.ts +64 -0
- package/dist/types/errors/contract.d.ts.map +1 -0
- package/dist/types/errors/data.d.ts +18 -0
- package/dist/types/errors/data.d.ts.map +1 -0
- package/dist/types/errors/encoding.d.ts +53 -0
- package/dist/types/errors/encoding.d.ts.map +1 -0
- package/dist/types/errors/ens.d.ts +26 -0
- package/dist/types/errors/ens.d.ts.map +1 -0
- package/dist/types/errors/estimateGas.d.ts +14 -0
- package/dist/types/errors/estimateGas.d.ts.map +1 -0
- package/dist/types/errors/fee.d.ts +16 -0
- package/dist/types/errors/fee.d.ts.map +1 -0
- package/dist/types/errors/log.d.ts +6 -0
- package/dist/types/errors/log.d.ts.map +1 -0
- package/dist/types/errors/node.d.ts +105 -0
- package/dist/types/errors/node.d.ts.map +1 -0
- package/dist/types/errors/request.d.ts +61 -0
- package/dist/types/errors/request.d.ts.map +1 -0
- package/dist/types/errors/rpc.d.ts +221 -0
- package/dist/types/errors/rpc.d.ts.map +1 -0
- package/dist/types/errors/transaction.d.ts +79 -0
- package/dist/types/errors/transaction.d.ts.map +1 -0
- package/dist/types/errors/transport.d.ts +5 -0
- package/dist/types/errors/transport.d.ts.map +1 -0
- package/dist/types/errors/utils.d.ts +5 -0
- package/dist/types/errors/utils.d.ts.map +1 -0
- package/dist/types/errors/version.d.ts +2 -0
- package/dist/types/errors/version.d.ts.map +1 -0
- package/dist/types/index.d.ts +215 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/public.d.ts +33 -0
- package/dist/types/public.d.ts.map +1 -0
- package/dist/types/test.d.ts +29 -0
- package/dist/types/test.d.ts.map +1 -0
- package/dist/types/types/account.d.ts +12 -0
- package/dist/types/types/account.d.ts.map +1 -0
- package/dist/types/types/block.d.ts +62 -0
- package/dist/types/types/block.d.ts.map +1 -0
- package/dist/types/types/chain.d.ts +115 -0
- package/dist/types/types/chain.d.ts.map +1 -0
- package/dist/types/types/contract.d.ts +138 -0
- package/dist/types/types/contract.d.ts.map +1 -0
- package/dist/types/types/eip1193.d.ts +1228 -0
- package/dist/types/types/eip1193.d.ts.map +1 -0
- package/dist/types/types/ens.d.ts +5 -0
- package/dist/types/types/ens.d.ts.map +1 -0
- package/dist/types/types/fee.d.ts +30 -0
- package/dist/types/types/fee.d.ts.map +1 -0
- package/dist/types/types/filter.d.ts +40 -0
- package/dist/types/types/filter.d.ts.map +1 -0
- package/dist/types/types/log.d.ts +55 -0
- package/dist/types/types/log.d.ts.map +1 -0
- package/dist/types/types/misc.d.ts +14 -0
- package/dist/types/types/misc.d.ts.map +1 -0
- package/dist/types/types/multicall.d.ts +48 -0
- package/dist/types/types/multicall.d.ts.map +1 -0
- package/dist/types/types/rpc.d.ts +20 -0
- package/dist/types/types/rpc.d.ts.map +1 -0
- package/dist/types/types/transaction.d.ts +147 -0
- package/dist/types/types/transaction.d.ts.map +1 -0
- package/dist/types/types/transport.d.ts +3 -0
- package/dist/types/types/transport.d.ts.map +1 -0
- package/dist/types/types/typedData.d.ts +47 -0
- package/dist/types/types/typedData.d.ts.map +1 -0
- package/dist/types/types/utils.d.ts +188 -0
- package/dist/types/types/utils.d.ts.map +1 -0
- package/dist/types/types/window.d.ts +7 -0
- package/dist/types/types/window.d.ts.map +1 -0
- package/dist/types/utils/abi/decodeAbiParameters.d.ts +5 -0
- package/dist/types/utils/abi/decodeAbiParameters.d.ts.map +1 -0
- package/dist/types/utils/abi/decodeDeployData.d.ts +13 -0
- package/dist/types/utils/abi/decodeDeployData.d.ts.map +1 -0
- package/dist/types/utils/abi/decodeErrorResult.d.ts +16 -0
- package/dist/types/utils/abi/decodeErrorResult.d.ts.map +1 -0
- package/dist/types/utils/abi/decodeEventLog.d.ts +20 -0
- package/dist/types/utils/abi/decodeEventLog.d.ts.map +1 -0
- package/dist/types/utils/abi/decodeFunctionData.d.ts +15 -0
- package/dist/types/utils/abi/decodeFunctionData.d.ts.map +1 -0
- package/dist/types/utils/abi/decodeFunctionResult.d.ts +14 -0
- package/dist/types/utils/abi/decodeFunctionResult.d.ts.map +1 -0
- package/dist/types/utils/abi/encodeAbiParameters.d.ts +9 -0
- package/dist/types/utils/abi/encodeAbiParameters.d.ts.map +1 -0
- package/dist/types/utils/abi/encodeDeployData.d.ts +9 -0
- package/dist/types/utils/abi/encodeDeployData.d.ts.map +1 -0
- package/dist/types/utils/abi/encodeErrorResult.d.ts +11 -0
- package/dist/types/utils/abi/encodeErrorResult.d.ts.map +1 -0
- package/dist/types/utils/abi/encodeEventTopics.d.ts +13 -0
- package/dist/types/utils/abi/encodeEventTopics.d.ts.map +1 -0
- package/dist/types/utils/abi/encodeFunctionData.d.ts +11 -0
- package/dist/types/utils/abi/encodeFunctionData.d.ts.map +1 -0
- package/dist/types/utils/abi/encodeFunctionResult.d.ts +13 -0
- package/dist/types/utils/abi/encodeFunctionResult.d.ts.map +1 -0
- package/dist/types/utils/abi/encodePacked.d.ts +11 -0
- package/dist/types/utils/abi/encodePacked.d.ts.map +1 -0
- package/dist/types/utils/abi/formatAbiItem.d.ts +9 -0
- package/dist/types/utils/abi/formatAbiItem.d.ts.map +1 -0
- package/dist/types/utils/abi/formatAbiItemWithArgs.d.ts +8 -0
- package/dist/types/utils/abi/formatAbiItemWithArgs.d.ts.map +1 -0
- package/dist/types/utils/abi/getAbiItem.d.ts +12 -0
- package/dist/types/utils/abi/getAbiItem.d.ts.map +1 -0
- package/dist/types/utils/accounts.d.ts +3 -0
- package/dist/types/utils/accounts.d.ts.map +1 -0
- package/dist/types/utils/address/getAddress.d.ts +4 -0
- package/dist/types/utils/address/getAddress.d.ts.map +1 -0
- package/dist/types/utils/address/getContractAddress.d.ts +20 -0
- package/dist/types/utils/address/getContractAddress.d.ts.map +1 -0
- package/dist/types/utils/address/isAddress.d.ts +3 -0
- package/dist/types/utils/address/isAddress.d.ts.map +1 -0
- package/dist/types/utils/address/isAddressEqual.d.ts +3 -0
- package/dist/types/utils/address/isAddressEqual.d.ts.map +1 -0
- package/dist/types/utils/buildRequest.d.ts +6 -0
- package/dist/types/utils/buildRequest.d.ts.map +1 -0
- package/dist/types/utils/ccip.d.ts +37 -0
- package/dist/types/utils/ccip.d.ts.map +1 -0
- package/dist/types/utils/chain.d.ts +14 -0
- package/dist/types/utils/chain.d.ts.map +1 -0
- package/dist/types/utils/contract/extractFunctionParts.d.ts +13 -0
- package/dist/types/utils/contract/extractFunctionParts.d.ts.map +1 -0
- package/dist/types/utils/data/concat.d.ts +6 -0
- package/dist/types/utils/data/concat.d.ts.map +1 -0
- package/dist/types/utils/data/isBytes.d.ts +3 -0
- package/dist/types/utils/data/isBytes.d.ts.map +1 -0
- package/dist/types/utils/data/isBytesEqual.d.ts +3 -0
- package/dist/types/utils/data/isBytesEqual.d.ts.map +1 -0
- package/dist/types/utils/data/isHex.d.ts +5 -0
- package/dist/types/utils/data/isHex.d.ts.map +1 -0
- package/dist/types/utils/data/pad.d.ts +11 -0
- package/dist/types/utils/data/pad.d.ts.map +1 -0
- package/dist/types/utils/data/size.d.ts +9 -0
- package/dist/types/utils/data/size.d.ts.map +1 -0
- package/dist/types/utils/data/slice.d.ts +33 -0
- package/dist/types/utils/data/slice.d.ts.map +1 -0
- package/dist/types/utils/data/trim.d.ts +8 -0
- package/dist/types/utils/data/trim.d.ts.map +1 -0
- package/dist/types/utils/encoding/fromBytes.d.ts +109 -0
- package/dist/types/utils/encoding/fromBytes.d.ts.map +1 -0
- package/dist/types/utils/encoding/fromHex.d.ts +138 -0
- package/dist/types/utils/encoding/fromHex.d.ts.map +1 -0
- package/dist/types/utils/encoding/fromRlp.d.ts +6 -0
- package/dist/types/utils/encoding/fromRlp.d.ts.map +1 -0
- package/dist/types/utils/encoding/toBytes.d.ts +125 -0
- package/dist/types/utils/encoding/toBytes.d.ts.map +1 -0
- package/dist/types/utils/encoding/toHex.d.ts +139 -0
- package/dist/types/utils/encoding/toHex.d.ts.map +1 -0
- package/dist/types/utils/encoding/toRlp.d.ts +8 -0
- package/dist/types/utils/encoding/toRlp.d.ts.map +1 -0
- package/dist/types/utils/ens/avatar/parseAvatarRecord.d.ts +9 -0
- package/dist/types/utils/ens/avatar/parseAvatarRecord.d.ts.map +1 -0
- package/dist/types/utils/ens/avatar/utils.d.ts +37 -0
- package/dist/types/utils/ens/avatar/utils.d.ts.map +1 -0
- package/dist/types/utils/ens/encodeLabelhash.d.ts +3 -0
- package/dist/types/utils/ens/encodeLabelhash.d.ts.map +1 -0
- package/dist/types/utils/ens/encodedLabelToLabelhash.d.ts +3 -0
- package/dist/types/utils/ens/encodedLabelToLabelhash.d.ts.map +1 -0
- package/dist/types/utils/ens/errors.d.ts +2 -0
- package/dist/types/utils/ens/errors.d.ts.map +1 -0
- package/dist/types/utils/ens/labelhash.d.ts +11 -0
- package/dist/types/utils/ens/labelhash.d.ts.map +1 -0
- package/dist/types/utils/ens/namehash.d.ts +13 -0
- package/dist/types/utils/ens/namehash.d.ts.map +1 -0
- package/dist/types/utils/ens/normalize.d.ts +12 -0
- package/dist/types/utils/ens/normalize.d.ts.map +1 -0
- package/dist/types/utils/ens/packetToBytes.d.ts +3 -0
- package/dist/types/utils/ens/packetToBytes.d.ts.map +1 -0
- package/dist/types/utils/errors/getCallError.d.ts +9 -0
- package/dist/types/utils/errors/getCallError.d.ts.map +1 -0
- package/dist/types/utils/errors/getContractError.d.ts +12 -0
- package/dist/types/utils/errors/getContractError.d.ts.map +1 -0
- package/dist/types/utils/errors/getEstimateGasError.d.ts +11 -0
- package/dist/types/utils/errors/getEstimateGasError.d.ts.map +1 -0
- package/dist/types/utils/errors/getNodeError.d.ts +7 -0
- package/dist/types/utils/errors/getNodeError.d.ts.map +1 -0
- package/dist/types/utils/errors/getTransactionError.d.ts +12 -0
- package/dist/types/utils/errors/getTransactionError.d.ts.map +1 -0
- package/dist/types/utils/filters/createFilterRequestScope.d.ts +22 -0
- package/dist/types/utils/filters/createFilterRequestScope.d.ts.map +1 -0
- package/dist/types/utils/formatters/block.d.ts +28 -0
- package/dist/types/utils/formatters/block.d.ts.map +1 -0
- package/dist/types/utils/formatters/extract.d.ts +8 -0
- package/dist/types/utils/formatters/extract.d.ts.map +1 -0
- package/dist/types/utils/formatters/feeHistory.d.ts +4 -0
- package/dist/types/utils/formatters/feeHistory.d.ts.map +1 -0
- package/dist/types/utils/formatters/formatter.d.ts +10 -0
- package/dist/types/utils/formatters/formatter.d.ts.map +1 -0
- package/dist/types/utils/formatters/log.d.ts +7 -0
- package/dist/types/utils/formatters/log.d.ts.map +1 -0
- package/dist/types/utils/formatters/transaction.d.ts +30 -0
- package/dist/types/utils/formatters/transaction.d.ts.map +1 -0
- package/dist/types/utils/formatters/transactionReceipt.d.ts +14 -0
- package/dist/types/utils/formatters/transactionReceipt.d.ts.map +1 -0
- package/dist/types/utils/formatters/transactionRequest.d.ts +14 -0
- package/dist/types/utils/formatters/transactionRequest.d.ts.map +1 -0
- package/dist/types/utils/hash/getEventSelector.d.ts +4 -0
- package/dist/types/utils/hash/getEventSelector.d.ts.map +1 -0
- package/dist/types/utils/hash/getFunctionSelector.d.ts +3 -0
- package/dist/types/utils/hash/getFunctionSelector.d.ts.map +1 -0
- package/dist/types/utils/hash/hashFunction.d.ts +4 -0
- package/dist/types/utils/hash/hashFunction.d.ts.map +1 -0
- package/dist/types/utils/hash/isHash.d.ts +3 -0
- package/dist/types/utils/hash/isHash.d.ts.map +1 -0
- package/dist/types/utils/hash/keccak256.d.ts +6 -0
- package/dist/types/utils/hash/keccak256.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +82 -0
- package/dist/types/utils/index.d.ts.map +1 -0
- package/dist/types/utils/observe.d.ts +17 -0
- package/dist/types/utils/observe.d.ts.map +1 -0
- package/dist/types/utils/poll.d.ts +13 -0
- package/dist/types/utils/poll.d.ts.map +1 -0
- package/dist/types/utils/promise/createBatchScheduler.d.ts +17 -0
- package/dist/types/utils/promise/createBatchScheduler.d.ts.map +1 -0
- package/dist/types/utils/promise/withCache.d.ts +36 -0
- package/dist/types/utils/promise/withCache.d.ts.map +1 -0
- package/dist/types/utils/promise/withRetry.d.ts +12 -0
- package/dist/types/utils/promise/withRetry.d.ts.map +1 -0
- package/dist/types/utils/promise/withTimeout.d.ts +8 -0
- package/dist/types/utils/promise/withTimeout.d.ts.map +1 -0
- package/dist/types/utils/regex.d.ts +4 -0
- package/dist/types/utils/regex.d.ts.map +1 -0
- package/dist/types/utils/rpc.d.ts +72 -0
- package/dist/types/utils/rpc.d.ts.map +1 -0
- package/dist/types/utils/signature/hashMessage.d.ts +6 -0
- package/dist/types/utils/signature/hashMessage.d.ts.map +1 -0
- package/dist/types/utils/signature/hashTypedData.d.ts +11 -0
- package/dist/types/utils/signature/hashTypedData.d.ts.map +1 -0
- package/dist/types/utils/signature/hexToSignature.d.ts +13 -0
- package/dist/types/utils/signature/hexToSignature.d.ts.map +1 -0
- package/dist/types/utils/signature/recoverAddress.d.ts +9 -0
- package/dist/types/utils/signature/recoverAddress.d.ts.map +1 -0
- package/dist/types/utils/signature/recoverMessageAddress.d.ts +9 -0
- package/dist/types/utils/signature/recoverMessageAddress.d.ts.map +1 -0
- package/dist/types/utils/signature/recoverPublicKey.d.ts +8 -0
- package/dist/types/utils/signature/recoverPublicKey.d.ts.map +1 -0
- package/dist/types/utils/signature/recoverTypedDataAddress.d.ts +13 -0
- package/dist/types/utils/signature/recoverTypedDataAddress.d.ts.map +1 -0
- package/dist/types/utils/signature/signatureToHex.d.ts +17 -0
- package/dist/types/utils/signature/signatureToHex.d.ts.map +1 -0
- package/dist/types/utils/signature/verifyMessage.d.ts +25 -0
- package/dist/types/utils/signature/verifyMessage.d.ts.map +1 -0
- package/dist/types/utils/signature/verifyTypedData.d.ts +28 -0
- package/dist/types/utils/signature/verifyTypedData.d.ts.map +1 -0
- package/dist/types/utils/stringify.d.ts +2 -0
- package/dist/types/utils/stringify.d.ts.map +1 -0
- package/dist/types/utils/transaction/assertRequest.d.ts +5 -0
- package/dist/types/utils/transaction/assertRequest.d.ts.map +1 -0
- package/dist/types/utils/transaction/assertTransaction.d.ts +5 -0
- package/dist/types/utils/transaction/assertTransaction.d.ts.map +1 -0
- package/dist/types/utils/transaction/getSerializedTransactionType.d.ts +4 -0
- package/dist/types/utils/transaction/getSerializedTransactionType.d.ts.map +1 -0
- package/dist/types/utils/transaction/getTransactionType.d.ts +4 -0
- package/dist/types/utils/transaction/getTransactionType.d.ts.map +1 -0
- package/dist/types/utils/transaction/parseTransaction.d.ts +9 -0
- package/dist/types/utils/transaction/parseTransaction.d.ts.map +1 -0
- package/dist/types/utils/transaction/prepareRequest.d.ts +21 -0
- package/dist/types/utils/transaction/prepareRequest.d.ts.map +1 -0
- package/dist/types/utils/transaction/serializeAccessList.d.ts +5 -0
- package/dist/types/utils/transaction/serializeAccessList.d.ts.map +1 -0
- package/dist/types/utils/transaction/serializeTransaction.d.ts +7 -0
- package/dist/types/utils/transaction/serializeTransaction.d.ts.map +1 -0
- package/dist/types/utils/typedData.d.ts +6 -0
- package/dist/types/utils/typedData.d.ts.map +1 -0
- package/dist/types/utils/uid.d.ts +2 -0
- package/dist/types/utils/uid.d.ts.map +1 -0
- package/dist/types/utils/unit/formatEther.d.ts +2 -0
- package/dist/types/utils/unit/formatEther.d.ts.map +1 -0
- package/dist/types/utils/unit/formatGwei.d.ts +2 -0
- package/dist/types/utils/unit/formatGwei.d.ts.map +1 -0
- package/dist/types/utils/unit/formatUnits.d.ts +2 -0
- package/dist/types/utils/unit/formatUnits.d.ts.map +1 -0
- package/dist/types/utils/unit/parseEther.d.ts +2 -0
- package/dist/types/utils/unit/parseEther.d.ts.map +1 -0
- package/dist/types/utils/unit/parseGwei.d.ts +2 -0
- package/dist/types/utils/unit/parseGwei.d.ts.map +1 -0
- package/dist/types/utils/unit/parseUnits.d.ts +2 -0
- package/dist/types/utils/unit/parseUnits.d.ts.map +1 -0
- package/dist/types/utils/wait.d.ts +2 -0
- package/dist/types/utils/wait.d.ts.map +1 -0
- package/dist/types/wallet.d.ts +11 -0
- package/dist/types/wallet.d.ts.map +1 -0
- package/dist/types/window.d.ts +2 -0
- package/dist/types/window.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/actions/public/estimateFeesPerGas.ts +152 -0
- package/src/actions/public/estimateMaxPriorityFeePerGas.ts +96 -0
- package/src/actions/public/verifyHash.ts +1 -1
- package/src/actions/public/verifyMessage.ts +3 -2
- package/src/actions/public/verifyTypedData.ts +3 -2
- package/src/actions/wallet/deployContract.ts +2 -1
- package/src/actions/wallet/sendTransaction.ts +2 -1
- package/src/actions/wallet/writeContract.ts +2 -1
- package/src/clients/createTestClient.ts +2 -1
- package/src/clients/decorators/public.ts +64 -0
- package/src/errors/fee.ts +27 -0
- package/src/errors/version.ts +1 -1
- package/src/index.ts +38 -24
- package/src/public.ts +10 -0
- package/src/types/chain.ts +80 -12
- package/src/types/eip1193.ts +12 -0
- package/src/types/fee.ts +2 -0
- package/src/utils/transaction/prepareRequest.ts +37 -45
- package/chains/dist/cjs/celo/formatters.js.map +0 -1
- package/chains/dist/cjs/celo/parsers.js.map +0 -1
- package/chains/dist/cjs/celo/serializers.js.map +0 -1
- package/chains/dist/cjs/celo/types.js.map +0 -1
- package/chains/dist/cjs/index.js.map +0 -1
- package/chains/dist/cjs/optimism/fees.js.map +0 -1
- package/chains/dist/cjs/optimism/formatters.js.map +0 -1
- package/chains/dist/cjs/optimism/types.js.map +0 -1
- package/chains/dist/cjs/types.js.map +0 -1
- package/chains/dist/cjs/utils.js.map +0 -1
- package/chains/dist/tsconfig.build.tsbuildinfo +0 -1
- package/chains/node_modules/.bin/tsc +0 -17
- package/chains/node_modules/.bin/tsserver +0 -17
- package/chains/tsconfig.tsbuildinfo +0 -1
@@ -53,11 +53,21 @@ import {
|
|
53
53
|
type EstimateContractGasReturnType,
|
54
54
|
estimateContractGas,
|
55
55
|
} from '../../actions/public/estimateContractGas.js'
|
56
|
+
import {
|
57
|
+
type EstimateFeesPerGasParameters,
|
58
|
+
type EstimateFeesPerGasReturnType,
|
59
|
+
estimateFeesPerGas,
|
60
|
+
} from '../../actions/public/estimateFeesPerGas.js'
|
56
61
|
import {
|
57
62
|
type EstimateGasParameters,
|
58
63
|
type EstimateGasReturnType,
|
59
64
|
estimateGas,
|
60
65
|
} from '../../actions/public/estimateGas.js'
|
66
|
+
import {
|
67
|
+
type EstimateMaxPriorityFeePerGasParameters,
|
68
|
+
type EstimateMaxPriorityFeePerGasReturnType,
|
69
|
+
estimateMaxPriorityFeePerGas,
|
70
|
+
} from '../../actions/public/estimateMaxPriorityFeePerGas.js'
|
61
71
|
import {
|
62
72
|
type GetBalanceParameters,
|
63
73
|
type GetBalanceReturnType,
|
@@ -204,6 +214,7 @@ import type {
|
|
204
214
|
MaybeAbiEventName,
|
205
215
|
MaybeExtractEventArgsFromAbi,
|
206
216
|
} from '../../types/contract.js'
|
217
|
+
import type { FeeValuesType } from '../../types/fee.js'
|
207
218
|
import type { FilterType } from '../../types/filter.js'
|
208
219
|
import type { Client } from '../createClient.js'
|
209
220
|
import type { Transport } from '../transports/createTransport.js'
|
@@ -764,6 +775,33 @@ export type PublicActions<
|
|
764
775
|
getFeeHistory: (
|
765
776
|
args: GetFeeHistoryParameters,
|
766
777
|
) => Promise<GetFeeHistoryReturnType>
|
778
|
+
/**
|
779
|
+
* Returns an estimate for the fees per gas for a transaction to be included
|
780
|
+
* in the next block.
|
781
|
+
*
|
782
|
+
* - Docs: https://viem.sh/docs/actions/public/estimateFeesPerGas.html
|
783
|
+
*
|
784
|
+
* @param client - Client to use
|
785
|
+
* @param parameters - {@link EstimateFeesPerGasParameters}
|
786
|
+
* @returns An estimate (in wei) for the fees per gas. {@link EstimateFeesPerGasReturnType}
|
787
|
+
*
|
788
|
+
* @example
|
789
|
+
* import { createPublicClient, http } from 'viem'
|
790
|
+
* import { mainnet } from 'viem/chains'
|
791
|
+
*
|
792
|
+
* const client = createPublicClient({
|
793
|
+
* chain: mainnet,
|
794
|
+
* transport: http(),
|
795
|
+
* })
|
796
|
+
* const maxPriorityFeePerGas = await client.estimateFeesPerGas()
|
797
|
+
* // { maxFeePerGas: ..., maxPriorityFeePerGas: ... }
|
798
|
+
*/
|
799
|
+
estimateFeesPerGas: <
|
800
|
+
TChainOverride extends Chain | undefined,
|
801
|
+
TType extends FeeValuesType = 'eip1559',
|
802
|
+
>(
|
803
|
+
args?: EstimateFeesPerGasParameters<TChain, TChainOverride, TType>,
|
804
|
+
) => Promise<EstimateFeesPerGasReturnType>
|
767
805
|
/**
|
768
806
|
* Returns a list of logs or hashes based on a [Filter](/docs/glossary/terms#filter) since the last time it was called.
|
769
807
|
*
|
@@ -970,6 +1008,29 @@ export type PublicActions<
|
|
970
1008
|
) => Promise<
|
971
1009
|
GetLogsReturnType<TAbiEvent, TAbiEvents, TStrict, TFromBlock, TToBlock>
|
972
1010
|
>
|
1011
|
+
/**
|
1012
|
+
* Returns an estimate for the max priority fee per gas (in wei) for a transaction
|
1013
|
+
* to be included in the next block.
|
1014
|
+
*
|
1015
|
+
* - Docs: https://viem.sh/docs/actions/public/estimateMaxPriorityFeePerGas.html
|
1016
|
+
*
|
1017
|
+
* @param client - Client to use
|
1018
|
+
* @returns An estimate (in wei) for the max priority fee per gas. {@link EstimateMaxPriorityFeePerGasReturnType}
|
1019
|
+
*
|
1020
|
+
* @example
|
1021
|
+
* import { createPublicClient, http } from 'viem'
|
1022
|
+
* import { mainnet } from 'viem/chains'
|
1023
|
+
*
|
1024
|
+
* const client = createPublicClient({
|
1025
|
+
* chain: mainnet,
|
1026
|
+
* transport: http(),
|
1027
|
+
* })
|
1028
|
+
* const maxPriorityFeePerGas = await client.estimateMaxPriorityFeePerGas()
|
1029
|
+
* // 10000000n
|
1030
|
+
*/
|
1031
|
+
estimateMaxPriorityFeePerGas: <TChainOverride extends Chain | undefined,>(
|
1032
|
+
args?: EstimateMaxPriorityFeePerGasParameters<TChain, TChainOverride>,
|
1033
|
+
) => Promise<EstimateMaxPriorityFeePerGasReturnType>
|
973
1034
|
/**
|
974
1035
|
* Returns the value from a storage slot at a given address.
|
975
1036
|
*
|
@@ -1492,10 +1553,13 @@ export function publicActions<
|
|
1492
1553
|
getEnsResolver: (args) => getEnsResolver(client, args),
|
1493
1554
|
getEnsText: (args) => getEnsText(client, args),
|
1494
1555
|
getFeeHistory: (args) => getFeeHistory(client, args),
|
1556
|
+
estimateFeesPerGas: (args) => estimateFeesPerGas(client, args),
|
1495
1557
|
getFilterChanges: (args) => getFilterChanges(client, args),
|
1496
1558
|
getFilterLogs: (args) => getFilterLogs(client, args),
|
1497
1559
|
getGasPrice: () => getGasPrice(client),
|
1498
1560
|
getLogs: (args) => getLogs(client, args as any),
|
1561
|
+
estimateMaxPriorityFeePerGas: (args) =>
|
1562
|
+
estimateMaxPriorityFeePerGas(client, args),
|
1499
1563
|
getStorageAt: (args) => getStorageAt(client, args),
|
1500
1564
|
getTransaction: (args) => getTransaction(client, args),
|
1501
1565
|
getTransactionConfirmations: (args) =>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import { formatGwei } from '../utils/unit/formatGwei.js'
|
2
|
+
import { BaseError } from './base.js'
|
3
|
+
|
4
|
+
export class BaseFeeScalarError extends BaseError {
|
5
|
+
override name = 'BaseFeeScalarError'
|
6
|
+
constructor() {
|
7
|
+
super('`baseFeeMultiplier` must be greater than 1.')
|
8
|
+
}
|
9
|
+
}
|
10
|
+
|
11
|
+
export class Eip1559FeesNotSupportedError extends BaseError {
|
12
|
+
override name = 'Eip1559FeesNotSupportedError'
|
13
|
+
constructor() {
|
14
|
+
super('Chain does not support EIP-1559 fees.')
|
15
|
+
}
|
16
|
+
}
|
17
|
+
|
18
|
+
export class MaxFeePerGasTooLowError extends BaseError {
|
19
|
+
override name = 'MaxFeePerGasTooLowError'
|
20
|
+
constructor({ maxPriorityFeePerGas }: { maxPriorityFeePerGas: bigint }) {
|
21
|
+
super(
|
22
|
+
`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${formatGwei(
|
23
|
+
maxPriorityFeePerGas,
|
24
|
+
)} gwei).`,
|
25
|
+
)
|
26
|
+
}
|
27
|
+
}
|
package/src/errors/version.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export const version = '1.
|
1
|
+
export const version = '1.7.0'
|
package/src/index.ts
CHANGED
@@ -64,6 +64,14 @@ export type {
|
|
64
64
|
EstimateGasParameters,
|
65
65
|
EstimateGasReturnType,
|
66
66
|
} from './actions/public/estimateGas.js'
|
67
|
+
export type {
|
68
|
+
EstimateFeesPerGasParameters,
|
69
|
+
EstimateFeesPerGasReturnType,
|
70
|
+
} from './actions/public/estimateFeesPerGas.js'
|
71
|
+
export type {
|
72
|
+
EstimateMaxPriorityFeePerGasParameters,
|
73
|
+
EstimateMaxPriorityFeePerGasReturnType,
|
74
|
+
} from './actions/public/estimateMaxPriorityFeePerGas.js'
|
67
75
|
export type { GetAddressesReturnType } from './actions/wallet/getAddresses.js'
|
68
76
|
export type {
|
69
77
|
GetBalanceParameters,
|
@@ -245,6 +253,29 @@ export type {
|
|
245
253
|
WriteContractParameters,
|
246
254
|
WriteContractReturnType,
|
247
255
|
} from './actions/wallet/writeContract.js'
|
256
|
+
export type {
|
257
|
+
Chain,
|
258
|
+
ChainContract,
|
259
|
+
ChainFees,
|
260
|
+
ChainFormatter,
|
261
|
+
/** @deprecated use `ChainFormatter` instead. */
|
262
|
+
ChainFormatter as Formatter,
|
263
|
+
ChainFormatters,
|
264
|
+
/** @deprecated use `ChainFormatters` instead. */
|
265
|
+
ChainFormatters as Formatters,
|
266
|
+
ChainSerializers,
|
267
|
+
/** @deprecated use `ChainSerializers` instead. */
|
268
|
+
ChainSerializers as Serializers,
|
269
|
+
ExtractChainFormatterExclude,
|
270
|
+
/** @deprecated use `ExtractChainFormatterExclude` instead. */
|
271
|
+
ExtractChainFormatterExclude as ExtractFormatterExclude,
|
272
|
+
ExtractChainFormatterParameters,
|
273
|
+
/** @deprecated use `ExtractChainFormatterParameters` instead. */
|
274
|
+
ExtractChainFormatterParameters as ExtractFormatterParameters,
|
275
|
+
ExtractChainFormatterReturnType,
|
276
|
+
/** @deprecated use `ExtractChainFormatterReturnType` instead. */
|
277
|
+
ExtractChainFormatterReturnType as ExtractFormatterReturnType,
|
278
|
+
} from './types/chain.js'
|
248
279
|
export {
|
249
280
|
type Client,
|
250
281
|
type ClientConfig,
|
@@ -435,6 +466,11 @@ export {
|
|
435
466
|
ContractFunctionZeroDataError,
|
436
467
|
RawContractError,
|
437
468
|
} from './errors/contract.js'
|
469
|
+
export {
|
470
|
+
BaseFeeScalarError,
|
471
|
+
Eip1559FeesNotSupportedError,
|
472
|
+
MaxFeePerGasTooLowError,
|
473
|
+
} from './errors/fee.js'
|
438
474
|
export {
|
439
475
|
ChainDisconnectedError,
|
440
476
|
InternalRpcError,
|
@@ -571,30 +607,7 @@ export type {
|
|
571
607
|
Signature,
|
572
608
|
SignableMessage,
|
573
609
|
} from './types/misc.js'
|
574
|
-
export type {
|
575
|
-
Chain,
|
576
|
-
ChainContract,
|
577
|
-
ChainFees,
|
578
|
-
ChainFormatter,
|
579
|
-
/** @deprecated use `ChainFormatter` instead. */
|
580
|
-
ChainFormatter as Formatter,
|
581
|
-
ChainFormatters,
|
582
|
-
/** @deprecated use `ChainFormatters` instead. */
|
583
|
-
ChainFormatters as Formatters,
|
584
|
-
ChainSerializers,
|
585
|
-
/** @deprecated use `ChainSerializers` instead. */
|
586
|
-
ChainSerializers as Serializers,
|
587
|
-
ExtractChainFormatterExclude,
|
588
|
-
/** @deprecated use `ExtractChainFormatterExclude` instead. */
|
589
|
-
ExtractChainFormatterExclude as ExtractFormatterExclude,
|
590
|
-
ExtractChainFormatterParameters,
|
591
|
-
/** @deprecated use `ExtractChainFormatterParameters` instead. */
|
592
|
-
ExtractChainFormatterParameters as ExtractFormatterParameters,
|
593
|
-
ExtractChainFormatterReturnType,
|
594
|
-
/** @deprecated use `ExtractChainFormatterReturnType` instead. */
|
595
|
-
ExtractChainFormatterReturnType as ExtractFormatterReturnType,
|
596
|
-
GetChain,
|
597
|
-
} from './types/chain.js'
|
610
|
+
export type { GetChain } from './types/chain.js'
|
598
611
|
export type {
|
599
612
|
AddEthereumChainParameter,
|
600
613
|
EIP1193EventMap,
|
@@ -621,6 +634,7 @@ export type {
|
|
621
634
|
FeeValues,
|
622
635
|
FeeValuesEIP1559,
|
623
636
|
FeeValuesLegacy,
|
637
|
+
FeeValuesType,
|
624
638
|
} from './types/fee.js'
|
625
639
|
export type { Filter } from './types/filter.js'
|
626
640
|
export type {
|
package/src/public.ts
CHANGED
@@ -53,6 +53,11 @@ export {
|
|
53
53
|
type GetFeeHistoryParameters,
|
54
54
|
type GetFeeHistoryReturnType,
|
55
55
|
} from './actions/public/getFeeHistory.js'
|
56
|
+
export {
|
57
|
+
estimateFeesPerGas,
|
58
|
+
type EstimateFeesPerGasParameters,
|
59
|
+
type EstimateFeesPerGasReturnType,
|
60
|
+
} from './actions/public/estimateFeesPerGas.js'
|
56
61
|
export {
|
57
62
|
getFilterChanges,
|
58
63
|
type GetFilterChangesParameters,
|
@@ -68,6 +73,11 @@ export {
|
|
68
73
|
getGasPrice,
|
69
74
|
type GetGasPriceReturnType,
|
70
75
|
} from './actions/public/getGasPrice.js'
|
76
|
+
export {
|
77
|
+
estimateMaxPriorityFeePerGas,
|
78
|
+
type EstimateMaxPriorityFeePerGasParameters,
|
79
|
+
type EstimateMaxPriorityFeePerGasReturnType,
|
80
|
+
} from './actions/public/estimateMaxPriorityFeePerGas.js'
|
71
81
|
export {
|
72
82
|
getTransaction,
|
73
83
|
type GetTransactionParameters,
|
package/src/types/chain.ts
CHANGED
@@ -1,13 +1,18 @@
|
|
1
1
|
import type { Address } from 'abitype'
|
2
2
|
|
3
|
-
import type {
|
4
|
-
import type {
|
5
|
-
import type {
|
3
|
+
import type { EstimateFeesPerGasReturnType } from '../actions/public/estimateFeesPerGas.js'
|
4
|
+
import type { Client } from '../clients/createClient.js'
|
5
|
+
import type { Transport } from '../clients/transports/createTransport.js'
|
6
|
+
import type { Account } from '../types/account.js'
|
7
|
+
import type { FeeValuesType } from '../types/fee.js'
|
6
8
|
import type {
|
7
9
|
TransactionSerializable,
|
8
10
|
TransactionSerializableGeneric,
|
9
|
-
} from '
|
10
|
-
import type { IsUndefined, Prettify } from '
|
11
|
+
} from '../types/transaction.js'
|
12
|
+
import type { IsUndefined, Prettify } from '../types/utils.js'
|
13
|
+
import type { FormattedBlock } from '../utils/formatters/block.js'
|
14
|
+
import type { PrepareRequestParameters } from '../utils/transaction/prepareRequest.js'
|
15
|
+
import type { SerializeTransactionFn } from '../utils/transaction/serializeTransaction.js'
|
11
16
|
|
12
17
|
export type Chain<
|
13
18
|
formatters extends ChainFormatters | undefined = ChainFormatters | undefined,
|
@@ -16,8 +21,14 @@ export type Chain<
|
|
16
21
|
export type ChainConfig<
|
17
22
|
formatters extends ChainFormatters | undefined = ChainFormatters | undefined,
|
18
23
|
> = {
|
24
|
+
/**
|
25
|
+
* Modifies how chain data structures (ie. Blocks, Transactions, etc)
|
26
|
+
* are formatted & typed.
|
27
|
+
*/
|
19
28
|
formatters?: formatters | undefined
|
29
|
+
/** Modifies how data (ie. Transactions) is serialized. */
|
20
30
|
serializers?: ChainSerializers<formatters> | undefined
|
31
|
+
/** Modifies how fees are derived. */
|
21
32
|
fees?: ChainFees<formatters> | undefined
|
22
33
|
}
|
23
34
|
|
@@ -29,20 +40,42 @@ export type ChainContract = {
|
|
29
40
|
export type ChainFees<
|
30
41
|
formatters extends ChainFormatters | undefined = ChainFormatters | undefined,
|
31
42
|
> = {
|
32
|
-
|
43
|
+
/**
|
44
|
+
* The fee multiplier to use to account for fee fluctuations.
|
45
|
+
* Used in the [`estimateFeesPerGas` Action](/docs/actions/public/estimateFeesPerGas).
|
46
|
+
*
|
47
|
+
* @default 1.2
|
48
|
+
*/
|
49
|
+
baseFeeMultiplier?:
|
50
|
+
| number
|
51
|
+
| ((args: ChainFeesFnParameters<formatters>) => Promise<number> | number)
|
52
|
+
/**
|
53
|
+
* The default `maxPriorityFeePerGas` to use when a priority
|
54
|
+
* fee is not defined upon sending a transaction.
|
55
|
+
*
|
56
|
+
* Overrides the return value in the [`estimateMaxPriorityFeePerGas` Action](/docs/actions/public/estimateMaxPriorityFeePerGas).
|
57
|
+
*/
|
58
|
+
defaultPriorityFee?:
|
33
59
|
| bigint
|
34
|
-
| ((args:
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
60
|
+
| ((args: ChainFeesFnParameters<formatters>) => Promise<bigint> | bigint)
|
61
|
+
/**
|
62
|
+
* Allows customization of fee per gas values (e.g. `maxFeePerGas`/`maxPriorityFeePerGas`).
|
63
|
+
*
|
64
|
+
* Overrides the return value in the [`estimateFeesPerGas` Action](/docs/actions/public/estimateFeesPerGas).
|
65
|
+
*/
|
66
|
+
estimateFeesPerGas?: (
|
67
|
+
args: ChainEstimateFeesPerGasFnParameters<formatters>,
|
68
|
+
) => Promise<EstimateFeesPerGasReturnType> | bigint
|
40
69
|
}
|
41
70
|
|
42
71
|
export type ChainFormatters = {
|
72
|
+
/** Modifies how the Block structure is formatted & typed. */
|
43
73
|
block?: ChainFormatter<'block'>
|
74
|
+
/** Modifies how the Transaction structure is formatted & typed. */
|
44
75
|
transaction?: ChainFormatter<'transaction'>
|
76
|
+
/** Modifies how the TransactionReceipt structure is formatted & typed. */
|
45
77
|
transactionReceipt?: ChainFormatter<'transactionReceipt'>
|
78
|
+
/** Modifies how the TransactionRequest structure is formatted & typed. */
|
46
79
|
transactionRequest?: ChainFormatter<'transactionRequest'>
|
47
80
|
}
|
48
81
|
|
@@ -54,6 +87,7 @@ export type ChainFormatter<type extends string = string> = {
|
|
54
87
|
export type ChainSerializers<
|
55
88
|
formatters extends ChainFormatters | undefined = undefined,
|
56
89
|
> = {
|
90
|
+
/** Modifies how Transactions are serialized. */
|
57
91
|
transaction?: SerializeTransactionFn<
|
58
92
|
formatters extends ChainFormatters
|
59
93
|
? formatters['transactionRequest'] extends ChainFormatter
|
@@ -64,6 +98,40 @@ export type ChainSerializers<
|
|
64
98
|
>
|
65
99
|
}
|
66
100
|
|
101
|
+
/////////////////////////////////////////////////////////////////////
|
102
|
+
// Parameters
|
103
|
+
|
104
|
+
export type ChainFeesFnParameters<
|
105
|
+
formatters extends ChainFormatters | undefined = ChainFormatters | undefined,
|
106
|
+
> = {
|
107
|
+
/** The latest block. */
|
108
|
+
block: Prettify<FormattedBlock<{ formatters: formatters }>>
|
109
|
+
client: Client<Transport, Chain>
|
110
|
+
/**
|
111
|
+
* A transaction request. This value will be undefined if the caller
|
112
|
+
* is outside of a transaction request context (e.g. a direct call to
|
113
|
+
* the `estimateFeesPerGas` Action).
|
114
|
+
*/
|
115
|
+
request?: PrepareRequestParameters<
|
116
|
+
Omit<Chain, 'formatters'> & { formatters: formatters },
|
117
|
+
Account | undefined,
|
118
|
+
undefined
|
119
|
+
>
|
120
|
+
}
|
121
|
+
|
122
|
+
export type ChainEstimateFeesPerGasFnParameters<
|
123
|
+
formatters extends ChainFormatters | undefined = ChainFormatters | undefined,
|
124
|
+
> = {
|
125
|
+
/**
|
126
|
+
* A function to multiply the base fee based on the `baseFeeMultiplier` value.
|
127
|
+
*/
|
128
|
+
multiply(x: bigint): bigint
|
129
|
+
/**
|
130
|
+
* The type of fees to return.
|
131
|
+
*/
|
132
|
+
type: FeeValuesType
|
133
|
+
} & ChainFeesFnParameters<formatters>
|
134
|
+
|
67
135
|
/////////////////////////////////////////////////////////////////////
|
68
136
|
// Utils
|
69
137
|
|
package/src/types/eip1193.ts
CHANGED
@@ -571,6 +571,18 @@ export type PublicRpcSchema = [
|
|
571
571
|
Parameters: [block: BlockNumber | BlockTag]
|
572
572
|
ReturnType: Quantity
|
573
573
|
},
|
574
|
+
/**
|
575
|
+
* @description Returns the current maxPriorityFeePerGas in wei.
|
576
|
+
* @link https://ethereum.github.io/execution-apis/api-documentation/
|
577
|
+
* @example
|
578
|
+
* provider.request({ method: 'eth_maxPriorityFeePerGas' })
|
579
|
+
* // => '0x5f5e100'
|
580
|
+
*/
|
581
|
+
{
|
582
|
+
Method: 'eth_maxPriorityFeePerGas'
|
583
|
+
Parameters?: undefined
|
584
|
+
ReturnType: Quantity
|
585
|
+
},
|
574
586
|
/**
|
575
587
|
* @description Creates a filter to listen for new blocks that can be used with `eth_getFilterChanges`
|
576
588
|
* @link https://eips.ethereum.org/EIPS/eip-1474
|
package/src/types/fee.ts
CHANGED
@@ -2,22 +2,26 @@ import type { Address } from 'abitype'
|
|
2
2
|
|
3
3
|
import type { Account } from '../../accounts/types.js'
|
4
4
|
import { parseAccount } from '../../accounts/utils/parseAccount.js'
|
5
|
+
import { internal_estimateFeesPerGas } from '../../actions/public/estimateFeesPerGas.js'
|
5
6
|
import {
|
6
7
|
type EstimateGasParameters,
|
7
8
|
estimateGas,
|
8
9
|
} from '../../actions/public/estimateGas.js'
|
9
10
|
import { getBlock } from '../../actions/public/getBlock.js'
|
10
|
-
import { getGasPrice } from '../../actions/public/getGasPrice.js'
|
11
11
|
import { getTransactionCount } from '../../actions/public/getTransactionCount.js'
|
12
12
|
import type { SendTransactionParameters } from '../../actions/wallet/sendTransaction.js'
|
13
13
|
import type { Client } from '../../clients/createClient.js'
|
14
14
|
import type { Transport } from '../../clients/transports/createTransport.js'
|
15
15
|
import { AccountNotFoundError } from '../../errors/account.js'
|
16
|
-
import {
|
16
|
+
import {
|
17
|
+
Eip1559FeesNotSupportedError,
|
18
|
+
MaxFeePerGasTooLowError,
|
19
|
+
} from '../../errors/fee.js'
|
17
20
|
import type { GetAccountParameter } from '../../types/account.js'
|
18
|
-
import type { Chain
|
21
|
+
import type { Chain } from '../../types/chain.js'
|
22
|
+
import type { GetChain } from '../../types/chain.js'
|
19
23
|
import type { UnionOmit } from '../../types/utils.js'
|
20
|
-
import type
|
24
|
+
import { type FormattedTransactionRequest } from '../index.js'
|
21
25
|
import { type AssertRequestParameters, assertRequest } from './assertRequest.js'
|
22
26
|
|
23
27
|
export type PrepareRequestParameters<
|
@@ -60,15 +64,7 @@ export async function prepareRequest<
|
|
60
64
|
client: Client<Transport, TChain, TAccount>,
|
61
65
|
args: TArgs,
|
62
66
|
): Promise<PrepareRequestReturnType<TChain, TAccount, TChainOverride, TArgs>> {
|
63
|
-
const {
|
64
|
-
account: account_,
|
65
|
-
chain = client.chain,
|
66
|
-
gas,
|
67
|
-
gasPrice,
|
68
|
-
maxFeePerGas,
|
69
|
-
maxPriorityFeePerGas,
|
70
|
-
nonce,
|
71
|
-
} = args
|
67
|
+
const { account: account_, chain, gas, gasPrice, nonce } = args
|
72
68
|
if (!account_) throw new AccountNotFoundError()
|
73
69
|
const account = parseAccount(account_)
|
74
70
|
|
@@ -86,44 +82,40 @@ export async function prepareRequest<
|
|
86
82
|
typeof block.baseFeePerGas === 'bigint' &&
|
87
83
|
typeof gasPrice === 'undefined'
|
88
84
|
) {
|
89
|
-
let defaultPriorityFee = 1_500_000_000n // 1.5 gwei
|
90
|
-
if (typeof chain?.fees?.defaultPriorityFee !== 'undefined') {
|
91
|
-
defaultPriorityFee =
|
92
|
-
typeof chain.fees.defaultPriorityFee === 'bigint'
|
93
|
-
? chain.fees.defaultPriorityFee
|
94
|
-
: await chain.fees.defaultPriorityFee({
|
95
|
-
block,
|
96
|
-
request: request as PrepareRequestParameters,
|
97
|
-
})
|
98
|
-
}
|
99
|
-
|
100
85
|
// EIP-1559 fees
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
86
|
+
const { maxFeePerGas, maxPriorityFeePerGas } =
|
87
|
+
await internal_estimateFeesPerGas(client, {
|
88
|
+
block,
|
89
|
+
chain,
|
90
|
+
request: request as PrepareRequestParameters,
|
91
|
+
})
|
92
|
+
|
93
|
+
if (
|
94
|
+
typeof args.maxPriorityFeePerGas === 'undefined' &&
|
95
|
+
args.maxFeePerGas &&
|
96
|
+
args.maxFeePerGas < maxPriorityFeePerGas
|
97
|
+
)
|
98
|
+
throw new MaxFeePerGasTooLowError({
|
99
|
+
maxPriorityFeePerGas,
|
100
|
+
})
|
101
|
+
|
102
|
+
request.maxPriorityFeePerGas = maxPriorityFeePerGas
|
103
|
+
request.maxFeePerGas = args.maxFeePerGas ?? maxFeePerGas
|
117
104
|
} else if (typeof gasPrice === 'undefined') {
|
118
105
|
// Legacy fees
|
119
106
|
if (
|
120
|
-
typeof maxFeePerGas !== 'undefined' ||
|
121
|
-
typeof maxPriorityFeePerGas !== 'undefined'
|
107
|
+
typeof args.maxFeePerGas !== 'undefined' ||
|
108
|
+
typeof args.maxPriorityFeePerGas !== 'undefined'
|
122
109
|
)
|
123
|
-
throw new
|
110
|
+
throw new Eip1559FeesNotSupportedError()
|
124
111
|
|
125
|
-
|
126
|
-
|
112
|
+
const { gasPrice: gasPrice_ } = await internal_estimateFeesPerGas(client, {
|
113
|
+
block,
|
114
|
+
chain,
|
115
|
+
request: request as PrepareRequestParameters,
|
116
|
+
type: 'legacy',
|
117
|
+
})
|
118
|
+
request.gasPrice = gasPrice_
|
127
119
|
}
|
128
120
|
|
129
121
|
if (typeof gas === 'undefined')
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"formatters.js","sourceRoot":"","sources":["../../../src/celo/formatters.ts"],"names":[],"mappings":";;;AAAA,+BAA6E;AAG7E,0CAKoB;AAaP,QAAA,cAAc,GAAG;IAC5B,KAAK,EAAgB,IAAA,sBAAW,EAAC;QAC/B,OAAO,EAAE,CAAC,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,CAAC;QACjE,MAAM,CACJ,IAEC;YAID,MAAM,YAAY,GAAG,IAAI,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE;gBAC1D,IAAI,OAAO,WAAW,KAAK,QAAQ;oBAAE,OAAO,WAAW,CAAA;gBACvD,OAAO;oBACL,GAAG,IAAA,wBAAiB,EAAC,WAAW,CAAC;oBACjC,WAAW,EAAE,WAAW,CAAC,WAAW;oBACpC,UAAU,EAAE,WAAW,CAAC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CACgC,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"parsers.js","sourceRoot":"","sources":["../../../src/celo/parsers.ts"],"names":[],"mappings":";;;AAAA,+BAaa;AAEb,qDAAyD;AAezD,SAAgB,oBAAoB,CAGlC,qBAAkC;IAElC,MAAM,cAAc,GAAG,IAAA,eAAQ,EAAC,qBAAqB,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;IAE5D,IAAI,cAAc,KAAK,MAAM;QAC3B,OAAO,qBAAqB,CAC1B,qBAAmD,CACL,CAAA;IAElD,OAAO,IAAA,uBAAgB,EACrB,qBAAqB,CACyB,CAAA;AAClD,CAAC;AAfD,oDAeC;AAED,SAAS,qBAAqB,CAC5B,qBAAiD;IAEjD,MAAM,gBAAgB,GAAG,IAAA,yBAAkB,EAAC,qBAAqB,CAAC,CAAA;IAElE,MAAM,CACJ,OAAO,EACP,KAAK,EACL,oBAAoB,EACpB,YAAY,EACZ,GAAG,EACH,WAAW,EACX,mBAAmB,EACnB,UAAU,EACV,EAAE,EACF,KAAK,EACL,IAAI,EACJ,UAAU,EACV,CAAC,EACD,CAAC,EACD,CAAC,EACF,GAAG,gBAAgB,CAAA;IAEpB,IAAI,gBAAgB,CAAC,MAAM,KAAK,EAAE,IAAI,gBAAgB,CAAC,MAAM,KAAK,EAAE,EAAE;QACpE,MAAM,IAAI,wCAAiC,CAAC;YAC1C,UAAU,EAAE;gBACV,OAAO;gBACP,KAAK;gBACL,oBAAoB;gBACpB,YAAY;gBACZ,GAAG;gBACH,WAAW;gBACX,EAAE;gBACF,mBAAmB;gBACnB,UAAU;gBACV,KAAK;gBACL,IAAI;gBACJ,UAAU;gBACV,GAAG,CAAC,gBAAgB,CAAC,MAAM,GAAG,EAAE;oBAC9B,CAAC,CAAC;wBACE,CAAC;wBACD,CAAC;wBACD,CAAC;qBACF;oBACH,CAAC,CAAC,EAAE,CAAC;aACR;YACD,qBAAqB;YACrB,IAAI,EAAE,OAAO;SACd,CAAC,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eAAe,GAAiB,IAAA,sBAAW,EAAC,MAAM,CAAC,eAAe,CAAC,CAAA;AACnE,QAAA,GAAG,GAAiB,IAAA,sBAAW,EAAC,MAAM,CAAC,GAAG,CAAC,CAAA;AAC3C,QAAA,UAAU,GAAiB,IAAA,sBAAW,EAAC,MAAM,CAAC,UAAU,CAAC,CAAA;AACzD,QAAA,QAAQ,GAAiB,IAAA,sBAAW,EAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;AACrD,QAAA,MAAM,GAAiB,IAAA,sBAAW,EAAC,MAAM,CAAC,MAAM,CAAC,CAAA;AACjD,QAAA,aAAa,GAAiB,IAAA,sBAAW,EAAC,MAAM,CAAC,aAAa,CAAC,CAAA;AAC/D,QAAA,IAAI,GAAiB,IAAA,sBAAW,EAAC,MAAM,CAAC,IAAI,EAAE;IACzD,IAAI,EAAE,sBAAY;IAClB,UAAU,EAAE,kCAAkB;CAC/B,CAAC,CAAA;AACW,QAAA,WAAW,GAAiB,IAAA,sBAAW,EAAC,MAAM,CAAC,WAAW,EAAE;IACvE,IAAI,EAAE,sBAAY;IAClB,UAAU,EAAE,kCAAkB;CAC/B,CAAC,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"fees.js","sourceRoot":"","sources":["../../../src/optimism/fees.ts"],"names":[],"mappings":";;;AAEa,QAAA,YAAY,GAAG;IAC1B,kBAAkB,EAAE,QAAU;CACF,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"formatters.js","sourceRoot":"","sources":["../../../src/optimism/formatters.ts"],"names":[],"mappings":";;;AAAA,+BAKa;AAGb,0CAIoB;AAUP,QAAA,kBAAkB,GAAG;IAChC,KAAK,EAAgB,IAAA,sBAAW,EAAC;QAC/B,MAAM,CACJ,IAEC;YAID,MAAM,YAAY,GAAG,IAAI,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE;gBAC1D,IAAI,OAAO,WAAW,KAAK,QAAQ;oBA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AW,EAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI;gBACjE,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAA,kBAAW,EAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI;gBAC9D,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAA,kBAAW,EAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI;gBAClD,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI;aAChE,CAAA;QACH,CAAC;KACF,CAAC;CACgC,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/optimism/types.ts"],"names":[],"mappings":""}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":""}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":";;;AAAA,+BAKa;AAKb,SAAgB,WAAW,CAIzB,KAAY,EACZ,SAAkC,EAAE;IAEpC,MAAM,EACJ,IAAI,GAAG,KAAK,CAAC,IAAI,EACjB,UAAU,GAAG,KAAK,CAAC,UAAU,EAC7B,WAAW,GAAG,KAAK,CAAC,WAAW,GAChC,GAAG,MAAM,CAAA;IACV,OAAO;QACL,GAAG,KAAK;QACR,IAAI;QACJ,UAAU;QACV,WAAW;KACyC,CAAA;AACxD,CAAC;AAlBD,kCAkBC;AAED,SAAgB,eAAe,CAC7B,IAAW,EACX,MAAuC;IAEvC,OAAO,CAIL,EACA,OAAO,EACP,MAAM,EAAE,SAAS,GAIlB,EAAE,EAAE;QACH,OAAO;YACL,OAAO;YACP,MAAM,EAAE,CAAC,IAA8C,E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