viem 2.0.0-beta.1 → 2.0.0-beta.3
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/_cjs/errors/version.js +1 -1
- package/_esm/chains/celo/chainConfig.js +7 -0
- package/_esm/chains/celo/chainConfig.js.map +1 -0
- package/_esm/chains/celo/formatters.js +1 -1
- package/_esm/chains/celo/formatters.js.map +1 -1
- package/_esm/chains/celo/index.js +4 -0
- package/_esm/chains/celo/index.js.map +1 -0
- package/_esm/chains/celo/parsers.js +3 -3
- package/_esm/chains/celo/parsers.js.map +1 -1
- package/_esm/chains/celo/serializers.js +5 -5
- package/_esm/chains/celo/serializers.js.map +1 -1
- package/_esm/chains/definitions/base.js +3 -2
- package/_esm/chains/definitions/base.js.map +1 -1
- package/_esm/chains/definitions/baseGoerli.js +4 -3
- package/_esm/chains/definitions/baseGoerli.js.map +1 -1
- package/_esm/chains/definitions/baseSepolia.js +4 -3
- package/_esm/chains/definitions/baseSepolia.js.map +1 -1
- package/_esm/chains/definitions/celo.js +2 -4
- package/_esm/chains/definitions/celo.js.map +1 -1
- package/_esm/chains/definitions/celoAlfajores.js +2 -4
- package/_esm/chains/definitions/celoAlfajores.js.map +1 -1
- package/_esm/chains/definitions/celoCannoli.js +2 -4
- package/_esm/chains/definitions/celoCannoli.js.map +1 -1
- package/_esm/chains/definitions/optimism.js +3 -2
- package/_esm/chains/definitions/optimism.js.map +1 -1
- package/_esm/chains/definitions/optimismGoerli.js +3 -2
- package/_esm/chains/definitions/optimismGoerli.js.map +1 -1
- package/_esm/chains/definitions/optimismSepolia.js +3 -2
- package/_esm/chains/definitions/optimismSepolia.js.map +1 -1
- package/_esm/chains/definitions/zkSync.js +2 -4
- package/_esm/chains/definitions/zkSync.js.map +1 -1
- package/_esm/chains/definitions/zkSyncTestnet.js +2 -4
- package/_esm/chains/definitions/zkSyncTestnet.js.map +1 -1
- package/_esm/chains/definitions/zora.js +3 -2
- package/_esm/chains/definitions/zora.js.map +1 -1
- package/_esm/chains/definitions/zoraSepolia.js +3 -2
- package/_esm/chains/definitions/zoraSepolia.js.map +1 -1
- package/_esm/chains/definitions/zoraTestnet.js +3 -2
- package/_esm/chains/definitions/zoraTestnet.js.map +1 -1
- package/_esm/chains/opStack/abis.js +74 -0
- package/_esm/chains/opStack/abis.js.map +1 -0
- package/_esm/chains/opStack/actions/estimateContractL1Fee.js +55 -0
- package/_esm/chains/opStack/actions/estimateContractL1Fee.js.map +1 -0
- package/_esm/chains/opStack/actions/estimateContractL1Gas.js +55 -0
- package/_esm/chains/opStack/actions/estimateContractL1Gas.js.map +1 -0
- package/_esm/chains/opStack/actions/estimateContractTotalFee.js +55 -0
- package/_esm/chains/opStack/actions/estimateContractTotalFee.js.map +1 -0
- package/_esm/chains/opStack/actions/estimateContractTotalGas.js +55 -0
- package/_esm/chains/opStack/actions/estimateContractTotalGas.js.map +1 -0
- package/_esm/chains/opStack/actions/estimateL1Fee.js +74 -0
- package/_esm/chains/opStack/actions/estimateL1Fee.js.map +1 -0
- package/_esm/chains/opStack/actions/estimateL1Gas.js +74 -0
- package/_esm/chains/opStack/actions/estimateL1Gas.js.map +1 -0
- package/_esm/chains/opStack/actions/estimateTotalFee.js +38 -0
- package/_esm/chains/opStack/actions/estimateTotalFee.js.map +1 -0
- package/_esm/chains/opStack/actions/estimateTotalGas.js +36 -0
- package/_esm/chains/opStack/actions/estimateTotalGas.js.map +1 -0
- package/_esm/chains/opStack/chainConfig.js +7 -0
- package/_esm/chains/opStack/chainConfig.js.map +1 -0
- package/_esm/chains/opStack/contracts.js +13 -0
- package/_esm/chains/opStack/contracts.js.map +1 -0
- package/_esm/chains/opStack/decorators/public.js +23 -0
- package/_esm/chains/opStack/decorators/public.js.map +1 -0
- package/_esm/chains/{optimism → opStack}/formatters.js +1 -1
- package/_esm/chains/opStack/formatters.js.map +1 -0
- package/_esm/chains/opStack/index.js +20 -0
- package/_esm/chains/opStack/index.js.map +1 -0
- package/{_cjs/accounts → _esm/chains/opStack}/types.js.map +1 -1
- package/_esm/chains/utils.js +0 -5
- package/_esm/chains/utils.js.map +1 -1
- package/_esm/chains/zksync/chainConfig.js +7 -0
- package/_esm/chains/zksync/chainConfig.js.map +1 -0
- package/_esm/chains/zksync/formatters.js +2 -2
- package/_esm/chains/zksync/formatters.js.map +1 -1
- package/_esm/chains/zksync/index.js +3 -0
- package/_esm/chains/zksync/index.js.map +1 -0
- package/_esm/chains/zksync/serializers.js +7 -7
- package/_esm/chains/zksync/serializers.js.map +1 -1
- package/_esm/errors/version.js +1 -1
- package/_types/chains/celo/chainConfig.d.ts +884 -0
- package/_types/chains/celo/chainConfig.d.ts.map +1 -0
- package/_types/chains/celo/formatters.d.ts +92 -92
- package/_types/chains/celo/formatters.d.ts.map +1 -1
- package/_types/chains/celo/index.d.ts +5 -0
- package/_types/chains/celo/index.d.ts.map +1 -0
- package/_types/chains/celo/parsers.d.ts +3 -3
- package/_types/chains/celo/parsers.d.ts.map +1 -1
- package/_types/chains/celo/serializers.d.ts +2 -2
- package/_types/chains/celo/serializers.d.ts.map +1 -1
- package/_types/chains/definitions/base.d.ts +92 -74
- package/_types/chains/definitions/base.d.ts.map +1 -1
- package/_types/chains/definitions/baseGoerli.d.ts +92 -74
- package/_types/chains/definitions/baseGoerli.d.ts.map +1 -1
- package/_types/chains/definitions/baseSepolia.d.ts +94 -82
- package/_types/chains/definitions/baseSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/celo.d.ts +97 -97
- package/_types/chains/definitions/celo.d.ts.map +1 -1
- package/_types/chains/definitions/celoAlfajores.d.ts +97 -97
- package/_types/chains/definitions/celoAlfajores.d.ts.map +1 -1
- package/_types/chains/definitions/celoCannoli.d.ts +97 -97
- package/_types/chains/definitions/celoCannoli.d.ts.map +1 -1
- package/_types/chains/definitions/optimism.d.ts +92 -74
- package/_types/chains/definitions/optimism.d.ts.map +1 -1
- package/_types/chains/definitions/optimismGoerli.d.ts +92 -74
- package/_types/chains/definitions/optimismGoerli.d.ts.map +1 -1
- package/_types/chains/definitions/optimismSepolia.d.ts +92 -74
- package/_types/chains/definitions/optimismSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/zkSync.d.ts +13 -13
- package/_types/chains/definitions/zkSync.d.ts.map +1 -1
- package/_types/chains/definitions/zkSyncTestnet.d.ts +13 -13
- package/_types/chains/definitions/zkSyncTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/zora.d.ts +92 -74
- package/_types/chains/definitions/zora.d.ts.map +1 -1
- package/_types/chains/definitions/zoraSepolia.d.ts +92 -74
- package/_types/chains/definitions/zoraSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/zoraTestnet.d.ts +92 -74
- package/_types/chains/definitions/zoraTestnet.d.ts.map +1 -1
- package/_types/chains/opStack/abis.d.ts +114 -0
- package/_types/chains/opStack/abis.d.ts.map +1 -0
- package/_types/chains/opStack/actions/estimateContractL1Fee.d.ts +39 -0
- package/_types/chains/opStack/actions/estimateContractL1Fee.d.ts.map +1 -0
- package/_types/chains/opStack/actions/estimateContractL1Gas.d.ts +39 -0
- package/_types/chains/opStack/actions/estimateContractL1Gas.d.ts.map +1 -0
- package/_types/chains/opStack/actions/estimateContractTotalFee.d.ts +39 -0
- package/_types/chains/opStack/actions/estimateContractTotalFee.d.ts.map +1 -0
- package/_types/chains/opStack/actions/estimateContractTotalGas.d.ts +39 -0
- package/_types/chains/opStack/actions/estimateContractTotalGas.d.ts.map +1 -0
- package/_types/chains/opStack/actions/estimateL1Fee.d.ts +43 -0
- package/_types/chains/opStack/actions/estimateL1Fee.d.ts.map +1 -0
- package/_types/chains/opStack/actions/estimateL1Gas.d.ts +43 -0
- package/_types/chains/opStack/actions/estimateL1Gas.d.ts.map +1 -0
- package/_types/chains/opStack/actions/estimateTotalFee.d.ts +37 -0
- package/_types/chains/opStack/actions/estimateTotalFee.d.ts.map +1 -0
- package/_types/chains/opStack/actions/estimateTotalGas.d.ts +36 -0
- package/_types/chains/opStack/actions/estimateTotalGas.d.ts.map +1 -0
- package/_types/chains/opStack/chainConfig.d.ts +521 -0
- package/_types/chains/opStack/chainConfig.d.ts.map +1 -0
- package/_types/chains/opStack/contracts.d.ts +21 -0
- package/_types/chains/opStack/contracts.d.ts.map +1 -0
- package/_types/chains/opStack/decorators/public.d.ts +214 -0
- package/_types/chains/opStack/decorators/public.d.ts.map +1 -0
- package/_types/chains/{optimism → opStack}/formatters.d.ts +76 -76
- package/_types/chains/{optimism → opStack}/formatters.d.ts.map +1 -1
- package/_types/chains/opStack/index.d.ts +21 -0
- package/_types/chains/opStack/index.d.ts.map +1 -0
- package/_types/chains/opStack/types.d.ts +53 -0
- package/_types/chains/opStack/types.d.ts.map +1 -0
- package/_types/chains/utils.d.ts +0 -8
- package/_types/chains/utils.d.ts.map +1 -1
- package/_types/chains/zksync/chainConfig.d.ts +490 -0
- package/_types/chains/zksync/chainConfig.d.ts.map +1 -0
- package/_types/chains/zksync/formatters.d.ts +1 -1
- package/_types/chains/zksync/formatters.d.ts.map +1 -1
- package/_types/chains/zksync/index.d.ts +4 -0
- package/_types/chains/zksync/index.d.ts.map +1 -0
- package/_types/chains/zksync/serializers.d.ts +2 -2
- package/_types/chains/zksync/serializers.d.ts.map +1 -1
- package/_types/errors/version.d.ts +1 -1
- package/_types/types/contract.d.ts +2 -1
- package/_types/types/contract.d.ts.map +1 -1
- package/_types/utils/formatters/transaction.d.ts +1 -1
- package/_types/utils/formatters/transactionRequest.d.ts +1 -1
- package/chains/celo/chainConfig.ts +7 -0
- package/chains/celo/formatters.ts +1 -1
- package/chains/celo/index.ts +35 -0
- package/chains/celo/package.json +6 -0
- package/chains/celo/parsers.ts +10 -12
- package/chains/celo/serializers.ts +5 -5
- package/chains/definitions/base.ts +3 -2
- package/chains/definitions/baseGoerli.ts +3 -2
- package/chains/definitions/baseSepolia.ts +3 -2
- package/chains/definitions/celo.ts +2 -4
- package/chains/definitions/celoAlfajores.ts +2 -4
- package/chains/definitions/celoCannoli.ts +2 -4
- package/chains/definitions/optimism.ts +3 -2
- package/chains/definitions/optimismGoerli.ts +3 -2
- package/chains/definitions/optimismSepolia.ts +3 -2
- package/chains/definitions/zkSync.ts +2 -4
- package/chains/definitions/zkSyncTestnet.ts +2 -4
- package/chains/definitions/zora.ts +3 -2
- package/chains/definitions/zoraSepolia.ts +3 -2
- package/chains/definitions/zoraTestnet.ts +3 -2
- package/chains/opStack/abis.ts +73 -0
- package/chains/opStack/actions/estimateContractL1Fee.ts +142 -0
- package/chains/opStack/actions/estimateContractL1Gas.ts +142 -0
- package/chains/opStack/actions/estimateContractTotalFee.ts +144 -0
- package/chains/opStack/actions/estimateContractTotalGas.ts +144 -0
- package/chains/opStack/actions/estimateL1Fee.ts +138 -0
- package/chains/opStack/actions/estimateL1Gas.ts +138 -0
- package/chains/opStack/actions/estimateTotalFee.ts +86 -0
- package/chains/opStack/actions/estimateTotalGas.ts +80 -0
- package/chains/opStack/chainConfig.ts +7 -0
- package/chains/opStack/contracts.ts +14 -0
- package/chains/opStack/decorators/public.ts +337 -0
- package/chains/{optimism → opStack}/formatters.ts +17 -17
- package/chains/opStack/index.ts +77 -0
- package/chains/opStack/package.json +6 -0
- package/chains/{optimism → opStack}/types.ts +20 -20
- package/chains/utils.ts +0 -83
- package/chains/zksync/chainConfig.ts +7 -0
- package/chains/zksync/formatters.ts +2 -2
- package/chains/zksync/index.ts +33 -0
- package/chains/zksync/package.json +6 -0
- package/chains/zksync/serializers.ts +7 -9
- package/errors/version.ts +1 -1
- package/package.json +26 -34
- package/types/contract.ts +3 -1
- package/_cjs/accounts/generateMnemonic.js +0 -9
- package/_cjs/accounts/generateMnemonic.js.map +0 -1
- package/_cjs/accounts/generatePrivateKey.js +0 -10
- package/_cjs/accounts/generatePrivateKey.js.map +0 -1
- package/_cjs/accounts/hdKeyToAccount.js +0 -16
- package/_cjs/accounts/hdKeyToAccount.js.map +0 -1
- package/_cjs/accounts/index.js +0 -52
- package/_cjs/accounts/index.js.map +0 -1
- package/_cjs/accounts/mnemonicToAccount.js +0 -12
- package/_cjs/accounts/mnemonicToAccount.js.map +0 -1
- package/_cjs/accounts/privateKeyToAccount.js +0 -33
- package/_cjs/accounts/privateKeyToAccount.js.map +0 -1
- package/_cjs/accounts/toAccount.js +0 -27
- package/_cjs/accounts/toAccount.js.map +0 -1
- package/_cjs/accounts/types.js +0 -3
- package/_cjs/accounts/utils/parseAccount.js +0 -10
- package/_cjs/accounts/utils/parseAccount.js.map +0 -1
- package/_cjs/accounts/utils/privateKeyToAddress.js +0 -12
- package/_cjs/accounts/utils/privateKeyToAddress.js.map +0 -1
- package/_cjs/accounts/utils/publicKeyToAddress.js +0 -11
- package/_cjs/accounts/utils/publicKeyToAddress.js.map +0 -1
- package/_cjs/accounts/utils/sign.js +0 -15
- package/_cjs/accounts/utils/sign.js.map +0 -1
- package/_cjs/accounts/utils/signMessage.js +0 -12
- package/_cjs/accounts/utils/signMessage.js.map +0 -1
- package/_cjs/accounts/utils/signTransaction.js +0 -15
- package/_cjs/accounts/utils/signTransaction.js.map +0 -1
- package/_cjs/accounts/utils/signTypedData.js +0 -16
- package/_cjs/accounts/utils/signTypedData.js.map +0 -1
- package/_cjs/actions/ens/getEnsAddress.js +0 -63
- package/_cjs/actions/ens/getEnsAddress.js.map +0 -1
- package/_cjs/actions/ens/getEnsAvatar.js +0 -25
- package/_cjs/actions/ens/getEnsAvatar.js.map +0 -1
- package/_cjs/actions/ens/getEnsName.js +0 -41
- package/_cjs/actions/ens/getEnsName.js.map +0 -1
- package/_cjs/actions/ens/getEnsResolver.js +0 -39
- package/_cjs/actions/ens/getEnsResolver.js.map +0 -1
- package/_cjs/actions/ens/getEnsText.js +0 -57
- package/_cjs/actions/ens/getEnsText.js.map +0 -1
- package/_cjs/actions/getContract.js +0 -184
- package/_cjs/actions/getContract.js.map +0 -1
- package/_cjs/actions/index.js +0 -167
- package/_cjs/actions/index.js.map +0 -1
- package/_cjs/actions/public/call.js +0 -156
- package/_cjs/actions/public/call.js.map +0 -1
- package/_cjs/actions/public/createBlockFilter.js +0 -15
- package/_cjs/actions/public/createBlockFilter.js.map +0 -1
- package/_cjs/actions/public/createContractEventFilter.js +0 -41
- package/_cjs/actions/public/createContractEventFilter.js.map +0 -1
- package/_cjs/actions/public/createEventFilter.js +0 -48
- package/_cjs/actions/public/createEventFilter.js.map +0 -1
- package/_cjs/actions/public/createPendingTransactionFilter.js +0 -15
- package/_cjs/actions/public/createPendingTransactionFilter.js.map +0 -1
- package/_cjs/actions/public/estimateContractGas.js +0 -37
- package/_cjs/actions/public/estimateContractGas.js.map +0 -1
- package/_cjs/actions/public/estimateFeesPerGas.js +0 -62
- package/_cjs/actions/public/estimateFeesPerGas.js.map +0 -1
- package/_cjs/actions/public/estimateGas.js +0 -56
- package/_cjs/actions/public/estimateGas.js.map +0 -1
- package/_cjs/actions/public/estimateMaxPriorityFeePerGas.js +0 -45
- package/_cjs/actions/public/estimateMaxPriorityFeePerGas.js.map +0 -1
- package/_cjs/actions/public/getBalance.js +0 -14
- package/_cjs/actions/public/getBalance.js.map +0 -1
- package/_cjs/actions/public/getBlock.js +0 -30
- package/_cjs/actions/public/getBlock.js.map +0 -1
- package/_cjs/actions/public/getBlockNumber.js +0 -17
- package/_cjs/actions/public/getBlockNumber.js.map +0 -1
- package/_cjs/actions/public/getBlockTransactionCount.js +0 -24
- package/_cjs/actions/public/getBlockTransactionCount.js.map +0 -1
- package/_cjs/actions/public/getBytecode.js +0 -16
- package/_cjs/actions/public/getBytecode.js.map +0 -1
- package/_cjs/actions/public/getChainId.js +0 -12
- package/_cjs/actions/public/getChainId.js.map +0 -1
- package/_cjs/actions/public/getContractEvents.js +0 -27
- package/_cjs/actions/public/getContractEvents.js.map +0 -1
- package/_cjs/actions/public/getFeeHistory.js +0 -19
- package/_cjs/actions/public/getFeeHistory.js.map +0 -1
- package/_cjs/actions/public/getFilterChanges.js +0 -44
- package/_cjs/actions/public/getFilterChanges.js.map +0 -1
- package/_cjs/actions/public/getFilterLogs.js +0 -42
- package/_cjs/actions/public/getFilterLogs.js.map +0 -1
- package/_cjs/actions/public/getGasPrice.js +0 -11
- package/_cjs/actions/public/getGasPrice.js.map +0 -1
- package/_cjs/actions/public/getLogs.js +0 -73
- package/_cjs/actions/public/getLogs.js.map +0 -1
- package/_cjs/actions/public/getProof.js +0 -16
- package/_cjs/actions/public/getProof.js.map +0 -1
- package/_cjs/actions/public/getStorageAt.js +0 -14
- package/_cjs/actions/public/getStorageAt.js.map +0 -1
- package/_cjs/actions/public/getTransaction.js +0 -41
- package/_cjs/actions/public/getTransaction.js.map +0 -1
- package/_cjs/actions/public/getTransactionConfirmations.js +0 -18
- package/_cjs/actions/public/getTransactionConfirmations.js.map +0 -1
- package/_cjs/actions/public/getTransactionCount.js +0 -14
- package/_cjs/actions/public/getTransactionCount.js.map +0 -1
- package/_cjs/actions/public/getTransactionReceipt.js +0 -18
- package/_cjs/actions/public/getTransactionReceipt.js.map +0 -1
- package/_cjs/actions/public/multicall.js +0 -135
- package/_cjs/actions/public/multicall.js.map +0 -1
- package/_cjs/actions/public/readContract.js +0 -40
- package/_cjs/actions/public/readContract.js.map +0 -1
- package/_cjs/actions/public/simulateContract.js +0 -56
- package/_cjs/actions/public/simulateContract.js.map +0 -1
- package/_cjs/actions/public/uninstallFilter.js +0 -11
- package/_cjs/actions/public/uninstallFilter.js.map +0 -1
- package/_cjs/actions/public/verifyHash.js +0 -32
- package/_cjs/actions/public/verifyHash.js.map +0 -1
- package/_cjs/actions/public/verifyMessage.js +0 -16
- package/_cjs/actions/public/verifyMessage.js.map +0 -1
- package/_cjs/actions/public/verifyTypedData.js +0 -16
- package/_cjs/actions/public/verifyTypedData.js.map +0 -1
- package/_cjs/actions/public/waitForTransactionReceipt.js +0 -119
- package/_cjs/actions/public/waitForTransactionReceipt.js.map +0 -1
- package/_cjs/actions/public/watchBlockNumber.js +0 -78
- package/_cjs/actions/public/watchBlockNumber.js.map +0 -1
- package/_cjs/actions/public/watchBlocks.js +0 -90
- package/_cjs/actions/public/watchBlocks.js.map +0 -1
- package/_cjs/actions/public/watchContractEvent.js +0 -162
- package/_cjs/actions/public/watchContractEvent.js.map +0 -1
- package/_cjs/actions/public/watchEvent.js +0 -161
- package/_cjs/actions/public/watchEvent.js.map +0 -1
- package/_cjs/actions/public/watchPendingTransactions.js +0 -88
- package/_cjs/actions/public/watchPendingTransactions.js.map +0 -1
- package/_cjs/actions/test/dropTransaction.js +0 -11
- package/_cjs/actions/test/dropTransaction.js.map +0 -1
- package/_cjs/actions/test/getAutomine.js +0 -14
- package/_cjs/actions/test/getAutomine.js.map +0 -1
- package/_cjs/actions/test/getTxpoolContent.js +0 -10
- package/_cjs/actions/test/getTxpoolContent.js.map +0 -1
- package/_cjs/actions/test/getTxpoolStatus.js +0 -15
- package/_cjs/actions/test/getTxpoolStatus.js.map +0 -1
- package/_cjs/actions/test/impersonateAccount.js +0 -11
- package/_cjs/actions/test/impersonateAccount.js.map +0 -1
- package/_cjs/actions/test/increaseTime.js +0 -12
- package/_cjs/actions/test/increaseTime.js.map +0 -1
- package/_cjs/actions/test/inspectTxpool.js +0 -10
- package/_cjs/actions/test/inspectTxpool.js.map +0 -1
- package/_cjs/actions/test/mine.js +0 -18
- package/_cjs/actions/test/mine.js.map +0 -1
- package/_cjs/actions/test/removeBlockTimestampInterval.js +0 -10
- package/_cjs/actions/test/removeBlockTimestampInterval.js.map +0 -1
- package/_cjs/actions/test/reset.js +0 -11
- package/_cjs/actions/test/reset.js.map +0 -1
- package/_cjs/actions/test/revert.js +0 -11
- package/_cjs/actions/test/revert.js.map +0 -1
- package/_cjs/actions/test/sendUnsignedTransaction.js +0 -30
- package/_cjs/actions/test/sendUnsignedTransaction.js.map +0 -1
- package/_cjs/actions/test/setAutomine.js +0 -18
- package/_cjs/actions/test/setAutomine.js.map +0 -1
- package/_cjs/actions/test/setBalance.js +0 -18
- package/_cjs/actions/test/setBalance.js.map +0 -1
- package/_cjs/actions/test/setBlockGasLimit.js +0 -12
- package/_cjs/actions/test/setBlockGasLimit.js.map +0 -1
- package/_cjs/actions/test/setBlockTimestampInterval.js +0 -16
- package/_cjs/actions/test/setBlockTimestampInterval.js.map +0 -1
- package/_cjs/actions/test/setCode.js +0 -11
- package/_cjs/actions/test/setCode.js.map +0 -1
- package/_cjs/actions/test/setCoinbase.js +0 -11
- package/_cjs/actions/test/setCoinbase.js.map +0 -1
- package/_cjs/actions/test/setIntervalMining.js +0 -16
- package/_cjs/actions/test/setIntervalMining.js.map +0 -1
- package/_cjs/actions/test/setLoggingEnabled.js +0 -11
- package/_cjs/actions/test/setLoggingEnabled.js.map +0 -1
- package/_cjs/actions/test/setMinGasPrice.js +0 -12
- package/_cjs/actions/test/setMinGasPrice.js.map +0 -1
- package/_cjs/actions/test/setNextBlockBaseFeePerGas.js +0 -12
- package/_cjs/actions/test/setNextBlockBaseFeePerGas.js.map +0 -1
- package/_cjs/actions/test/setNextBlockTimestamp.js +0 -12
- package/_cjs/actions/test/setNextBlockTimestamp.js.map +0 -1
- package/_cjs/actions/test/setNonce.js +0 -12
- package/_cjs/actions/test/setNonce.js.map +0 -1
- package/_cjs/actions/test/setRpcUrl.js +0 -11
- package/_cjs/actions/test/setRpcUrl.js.map +0 -1
- package/_cjs/actions/test/setStorageAt.js +0 -16
- package/_cjs/actions/test/setStorageAt.js.map +0 -1
- package/_cjs/actions/test/snapshot.js +0 -10
- package/_cjs/actions/test/snapshot.js.map +0 -1
- package/_cjs/actions/test/stopImpersonatingAccount.js +0 -11
- package/_cjs/actions/test/stopImpersonatingAccount.js.map +0 -1
- package/_cjs/actions/wallet/addChain.js +0 -23
- package/_cjs/actions/wallet/addChain.js.map +0 -1
- package/_cjs/actions/wallet/deployContract.js +0 -15
- package/_cjs/actions/wallet/deployContract.js.map +0 -1
- package/_cjs/actions/wallet/getAddresses.js +0 -12
- package/_cjs/actions/wallet/getAddresses.js.map +0 -1
- package/_cjs/actions/wallet/getPermissions.js +0 -9
- package/_cjs/actions/wallet/getPermissions.js.map +0 -1
- package/_cjs/actions/wallet/prepareTransactionRequest.js +0 -71
- package/_cjs/actions/wallet/prepareTransactionRequest.js.map +0 -1
- package/_cjs/actions/wallet/requestAddresses.js +0 -10
- package/_cjs/actions/wallet/requestAddresses.js.map +0 -1
- package/_cjs/actions/wallet/requestPermissions.js +0 -11
- package/_cjs/actions/wallet/requestPermissions.js.map +0 -1
- package/_cjs/actions/wallet/sendRawTransaction.js +0 -11
- package/_cjs/actions/wallet/sendRawTransaction.js.map +0 -1
- package/_cjs/actions/wallet/sendTransaction.js +0 -87
- package/_cjs/actions/wallet/sendTransaction.js.map +0 -1
- package/_cjs/actions/wallet/signMessage.js +0 -28
- package/_cjs/actions/wallet/signMessage.js.map +0 -1
- package/_cjs/actions/wallet/signTransaction.js +0 -48
- package/_cjs/actions/wallet/signTransaction.js.map +0 -1
- package/_cjs/actions/wallet/signTypedData.js +0 -30
- package/_cjs/actions/wallet/signTypedData.js.map +0 -1
- package/_cjs/actions/wallet/switchChain.js +0 -16
- package/_cjs/actions/wallet/switchChain.js.map +0 -1
- package/_cjs/actions/wallet/watchAsset.js +0 -12
- package/_cjs/actions/wallet/watchAsset.js.map +0 -1
- package/_cjs/actions/wallet/writeContract.js +0 -18
- package/_cjs/actions/wallet/writeContract.js.map +0 -1
- package/_cjs/chains/celo/formatters.js +0 -82
- package/_cjs/chains/celo/formatters.js.map +0 -1
- package/_cjs/chains/celo/parsers.js +0 -131
- package/_cjs/chains/celo/parsers.js.map +0 -1
- package/_cjs/chains/celo/serializers.js +0 -131
- package/_cjs/chains/celo/serializers.js.map +0 -1
- package/_cjs/chains/celo/types.js +0 -3
- package/_cjs/chains/celo/types.js.map +0 -1
- package/_cjs/chains/celo/utils.js +0 -44
- package/_cjs/chains/celo/utils.js.map +0 -1
- package/_cjs/chains/definitions/arbitrum.js +0 -24
- package/_cjs/chains/definitions/arbitrum.js.map +0 -1
- package/_cjs/chains/definitions/arbitrumGoerli.js +0 -30
- package/_cjs/chains/definitions/arbitrumGoerli.js.map +0 -1
- package/_cjs/chains/definitions/arbitrumNova.js +0 -24
- package/_cjs/chains/definitions/arbitrumNova.js.map +0 -1
- package/_cjs/chains/definitions/arbitrumSepolia.js +0 -32
- package/_cjs/chains/definitions/arbitrumSepolia.js.map +0 -1
- package/_cjs/chains/definitions/astar.js +0 -29
- package/_cjs/chains/definitions/astar.js.map +0 -1
- package/_cjs/chains/definitions/astarZkatana.js +0 -42
- package/_cjs/chains/definitions/astarZkatana.js.map +0 -1
- package/_cjs/chains/definitions/aurora.js +0 -20
- package/_cjs/chains/definitions/aurora.js.map +0 -1
- package/_cjs/chains/definitions/auroraTestnet.js +0 -21
- package/_cjs/chains/definitions/auroraTestnet.js.map +0 -1
- package/_cjs/chains/definitions/avalanche.js +0 -26
- package/_cjs/chains/definitions/avalanche.js.map +0 -1
- package/_cjs/chains/definitions/avalancheFuji.js +0 -27
- package/_cjs/chains/definitions/avalancheFuji.js.map +0 -1
- package/_cjs/chains/definitions/base.js +0 -29
- package/_cjs/chains/definitions/base.js.map +0 -1
- package/_cjs/chains/definitions/baseGoerli.js +0 -29
- package/_cjs/chains/definitions/baseGoerli.js.map +0 -1
- package/_cjs/chains/definitions/baseSepolia.js +0 -33
- package/_cjs/chains/definitions/baseSepolia.js.map +0 -1
- package/_cjs/chains/definitions/bearNetworkChainMainnet.js +0 -20
- package/_cjs/chains/definitions/bearNetworkChainMainnet.js.map +0 -1
- package/_cjs/chains/definitions/bearNetworkChainTestnet.js +0 -24
- package/_cjs/chains/definitions/bearNetworkChainTestnet.js.map +0 -1
- package/_cjs/chains/definitions/boba.js +0 -26
- package/_cjs/chains/definitions/boba.js.map +0 -1
- package/_cjs/chains/definitions/bronos.js +0 -20
- package/_cjs/chains/definitions/bronos.js.map +0 -1
- package/_cjs/chains/definitions/bronosTestnet.js +0 -21
- package/_cjs/chains/definitions/bronosTestnet.js.map +0 -1
- package/_cjs/chains/definitions/bsc.js +0 -26
- package/_cjs/chains/definitions/bsc.js.map +0 -1
- package/_cjs/chains/definitions/bscTestnet.js +0 -27
- package/_cjs/chains/definitions/bscTestnet.js.map +0 -1
- package/_cjs/chains/definitions/bxn.js +0 -21
- package/_cjs/chains/definitions/bxn.js.map +0 -1
- package/_cjs/chains/definitions/bxnTestnet.js +0 -25
- package/_cjs/chains/definitions/bxnTestnet.js.map +0 -1
- package/_cjs/chains/definitions/canto.js +0 -29
- package/_cjs/chains/definitions/canto.js.map +0 -1
- package/_cjs/chains/definitions/celo.js +0 -34
- package/_cjs/chains/definitions/celo.js.map +0 -1
- package/_cjs/chains/definitions/celoAlfajores.js +0 -36
- package/_cjs/chains/definitions/celoAlfajores.js.map +0 -1
- package/_cjs/chains/definitions/celoCannoli.js +0 -36
- package/_cjs/chains/definitions/celoCannoli.js.map +0 -1
- package/_cjs/chains/definitions/classic.js +0 -23
- package/_cjs/chains/definitions/classic.js.map +0 -1
- package/_cjs/chains/definitions/confluxESpace.js +0 -27
- package/_cjs/chains/definitions/confluxESpace.js.map +0 -1
- package/_cjs/chains/definitions/coreDao.js +0 -27
- package/_cjs/chains/definitions/coreDao.js.map +0 -1
- package/_cjs/chains/definitions/cronos.js +0 -26
- package/_cjs/chains/definitions/cronos.js.map +0 -1
- package/_cjs/chains/definitions/cronosTestnet.js +0 -30
- package/_cjs/chains/definitions/cronosTestnet.js.map +0 -1
- package/_cjs/chains/definitions/crossbell.js +0 -28
- package/_cjs/chains/definitions/crossbell.js.map +0 -1
- package/_cjs/chains/definitions/dfk.js +0 -25
- package/_cjs/chains/definitions/dfk.js.map +0 -1
- package/_cjs/chains/definitions/dogechain.js +0 -23
- package/_cjs/chains/definitions/dogechain.js.map +0 -1
- package/_cjs/chains/definitions/edgeware.js +0 -26
- package/_cjs/chains/definitions/edgeware.js.map +0 -1
- package/_cjs/chains/definitions/edgewareTestnet.js +0 -23
- package/_cjs/chains/definitions/edgewareTestnet.js.map +0 -1
- package/_cjs/chains/definitions/ekta.js +0 -20
- package/_cjs/chains/definitions/ekta.js.map +0 -1
- package/_cjs/chains/definitions/ektaTestnet.js +0 -21
- package/_cjs/chains/definitions/ektaTestnet.js.map +0 -1
- package/_cjs/chains/definitions/eon.js +0 -24
- package/_cjs/chains/definitions/eon.js.map +0 -1
- package/_cjs/chains/definitions/eos.js +0 -29
- package/_cjs/chains/definitions/eos.js.map +0 -1
- package/_cjs/chains/definitions/eosTestnet.js +0 -30
- package/_cjs/chains/definitions/eosTestnet.js.map +0 -1
- package/_cjs/chains/definitions/evmos.js +0 -20
- package/_cjs/chains/definitions/evmos.js.map +0 -1
- package/_cjs/chains/definitions/evmosTestnet.js +0 -23
- package/_cjs/chains/definitions/evmosTestnet.js.map +0 -1
- package/_cjs/chains/definitions/fantom.js +0 -26
- package/_cjs/chains/definitions/fantom.js.map +0 -1
- package/_cjs/chains/definitions/fantomTestnet.js +0 -26
- package/_cjs/chains/definitions/fantomTestnet.js.map +0 -1
- package/_cjs/chains/definitions/fibo.js +0 -20
- package/_cjs/chains/definitions/fibo.js.map +0 -1
- package/_cjs/chains/definitions/filecoin.js +0 -20
- package/_cjs/chains/definitions/filecoin.js.map +0 -1
- package/_cjs/chains/definitions/filecoinCalibration.js +0 -20
- package/_cjs/chains/definitions/filecoinCalibration.js.map +0 -1
- package/_cjs/chains/definitions/filecoinHyperspace.js +0 -20
- package/_cjs/chains/definitions/filecoinHyperspace.js.map +0 -1
- package/_cjs/chains/definitions/flare.js +0 -23
- package/_cjs/chains/definitions/flare.js.map +0 -1
- package/_cjs/chains/definitions/flareTestnet.js +0 -24
- package/_cjs/chains/definitions/flareTestnet.js.map +0 -1
- package/_cjs/chains/definitions/foundry.js +0 -20
- package/_cjs/chains/definitions/foundry.js.map +0 -1
- package/_cjs/chains/definitions/fuse.js +0 -22
- package/_cjs/chains/definitions/fuse.js.map +0 -1
- package/_cjs/chains/definitions/fuseSparknet.js +0 -19
- package/_cjs/chains/definitions/fuseSparknet.js.map +0 -1
- package/_cjs/chains/definitions/gnosis.js +0 -32
- package/_cjs/chains/definitions/gnosis.js.map +0 -1
- package/_cjs/chains/definitions/gnosisChiado.js +0 -33
- package/_cjs/chains/definitions/gnosisChiado.js.map +0 -1
- package/_cjs/chains/definitions/gobi.js +0 -22
- package/_cjs/chains/definitions/gobi.js.map +0 -1
- package/_cjs/chains/definitions/goerli.js +0 -35
- package/_cjs/chains/definitions/goerli.js.map +0 -1
- package/_cjs/chains/definitions/haqqMainnet.js +0 -25
- package/_cjs/chains/definitions/haqqMainnet.js.map +0 -1
- package/_cjs/chains/definitions/haqqTestedge2.js +0 -25
- package/_cjs/chains/definitions/haqqTestedge2.js.map +0 -1
- package/_cjs/chains/definitions/hardhat.js +0 -17
- package/_cjs/chains/definitions/hardhat.js.map +0 -1
- package/_cjs/chains/definitions/harmonyOne.js +0 -26
- package/_cjs/chains/definitions/harmonyOne.js.map +0 -1
- package/_cjs/chains/definitions/holesky.js +0 -22
- package/_cjs/chains/definitions/holesky.js.map +0 -1
- package/_cjs/chains/definitions/iotex.js +0 -23
- package/_cjs/chains/definitions/iotex.js.map +0 -1
- package/_cjs/chains/definitions/iotexTestnet.js +0 -23
- package/_cjs/chains/definitions/iotexTestnet.js.map +0 -1
- package/_cjs/chains/definitions/kava.js +0 -29
- package/_cjs/chains/definitions/kava.js.map +0 -1
- package/_cjs/chains/definitions/kavaTestnet.js +0 -32
- package/_cjs/chains/definitions/kavaTestnet.js.map +0 -1
- package/_cjs/chains/definitions/klaytn.js +0 -20
- package/_cjs/chains/definitions/klaytn.js.map +0 -1
- package/_cjs/chains/definitions/kroma.js +0 -22
- package/_cjs/chains/definitions/kroma.js.map +0 -1
- package/_cjs/chains/definitions/kromaSepolia.js +0 -22
- package/_cjs/chains/definitions/kromaSepolia.js.map +0 -1
- package/_cjs/chains/definitions/linea.js +0 -29
- package/_cjs/chains/definitions/linea.js.map +0 -1
- package/_cjs/chains/definitions/lineaTestnet.js +0 -29
- package/_cjs/chains/definitions/lineaTestnet.js.map +0 -1
- package/_cjs/chains/definitions/localhost.js +0 -17
- package/_cjs/chains/definitions/localhost.js.map +0 -1
- package/_cjs/chains/definitions/mainnet.js +0 -34
- package/_cjs/chains/definitions/mainnet.js.map +0 -1
- package/_cjs/chains/definitions/manta.js +0 -35
- package/_cjs/chains/definitions/manta.js.map +0 -1
- package/_cjs/chains/definitions/mantaTestnet.js +0 -36
- package/_cjs/chains/definitions/mantaTestnet.js.map +0 -1
- package/_cjs/chains/definitions/mantle.js +0 -29
- package/_cjs/chains/definitions/mantle.js.map +0 -1
- package/_cjs/chains/definitions/mantleTestnet.js +0 -24
- package/_cjs/chains/definitions/mantleTestnet.js.map +0 -1
- package/_cjs/chains/definitions/meter.js +0 -20
- package/_cjs/chains/definitions/meter.js.map +0 -1
- package/_cjs/chains/definitions/meterTestnet.js +0 -23
- package/_cjs/chains/definitions/meterTestnet.js.map +0 -1
- package/_cjs/chains/definitions/metis.js +0 -29
- package/_cjs/chains/definitions/metis.js.map +0 -1
- package/_cjs/chains/definitions/metisGoerli.js +0 -29
- package/_cjs/chains/definitions/metisGoerli.js.map +0 -1
- package/_cjs/chains/definitions/mev.js +0 -31
- package/_cjs/chains/definitions/mev.js.map +0 -1
- package/_cjs/chains/definitions/mevTestnet.js +0 -32
- package/_cjs/chains/definitions/mevTestnet.js.map +0 -1
- package/_cjs/chains/definitions/modeTestnet.js +0 -28
- package/_cjs/chains/definitions/modeTestnet.js.map +0 -1
- package/_cjs/chains/definitions/moonbaseAlpha.js +0 -33
- package/_cjs/chains/definitions/moonbaseAlpha.js.map +0 -1
- package/_cjs/chains/definitions/moonbeam.js +0 -33
- package/_cjs/chains/definitions/moonbeam.js.map +0 -1
- package/_cjs/chains/definitions/moonbeamDev.js +0 -20
- package/_cjs/chains/definitions/moonbeamDev.js.map +0 -1
- package/_cjs/chains/definitions/moonriver.js +0 -33
- package/_cjs/chains/definitions/moonriver.js.map +0 -1
- package/_cjs/chains/definitions/neonDevnet.js +0 -28
- package/_cjs/chains/definitions/neonDevnet.js.map +0 -1
- package/_cjs/chains/definitions/neonMainnet.js +0 -27
- package/_cjs/chains/definitions/neonMainnet.js.map +0 -1
- package/_cjs/chains/definitions/nexi.js +0 -27
- package/_cjs/chains/definitions/nexi.js.map +0 -1
- package/_cjs/chains/definitions/nexilix.js +0 -26
- package/_cjs/chains/definitions/nexilix.js.map +0 -1
- package/_cjs/chains/definitions/oasys.js +0 -21
- package/_cjs/chains/definitions/oasys.js.map +0 -1
- package/_cjs/chains/definitions/okc.js +0 -26
- package/_cjs/chains/definitions/okc.js.map +0 -1
- package/_cjs/chains/definitions/opBNB.js +0 -26
- package/_cjs/chains/definitions/opBNB.js.map +0 -1
- package/_cjs/chains/definitions/opBNBTestnet.js +0 -27
- package/_cjs/chains/definitions/opBNBTestnet.js.map +0 -1
- package/_cjs/chains/definitions/optimism.js +0 -29
- package/_cjs/chains/definitions/optimism.js.map +0 -1
- package/_cjs/chains/definitions/optimismGoerli.js +0 -30
- package/_cjs/chains/definitions/optimismGoerli.js.map +0 -1
- package/_cjs/chains/definitions/optimismSepolia.js +0 -30
- package/_cjs/chains/definitions/optimismSepolia.js.map +0 -1
- package/_cjs/chains/definitions/plinga.js +0 -27
- package/_cjs/chains/definitions/plinga.js.map +0 -1
- package/_cjs/chains/definitions/polygon.js +0 -27
- package/_cjs/chains/definitions/polygon.js.map +0 -1
- package/_cjs/chains/definitions/polygonMumbai.js +0 -28
- package/_cjs/chains/definitions/polygonMumbai.js.map +0 -1
- package/_cjs/chains/definitions/polygonZkEvm.js +0 -27
- package/_cjs/chains/definitions/polygonZkEvm.js.map +0 -1
- package/_cjs/chains/definitions/polygonZkEvmTestnet.js +0 -28
- package/_cjs/chains/definitions/polygonZkEvmTestnet.js.map +0 -1
- package/_cjs/chains/definitions/pulsechain.js +0 -32
- package/_cjs/chains/definitions/pulsechain.js.map +0 -1
- package/_cjs/chains/definitions/pulsechainV4.js +0 -32
- package/_cjs/chains/definitions/pulsechainV4.js.map +0 -1
- package/_cjs/chains/definitions/qMainnet.js +0 -23
- package/_cjs/chains/definitions/qMainnet.js.map +0 -1
- package/_cjs/chains/definitions/qTestnet.js +0 -24
- package/_cjs/chains/definitions/qTestnet.js.map +0 -1
- package/_cjs/chains/definitions/rollux.js +0 -29
- package/_cjs/chains/definitions/rollux.js.map +0 -1
- package/_cjs/chains/definitions/rolluxTestnet.js +0 -32
- package/_cjs/chains/definitions/rolluxTestnet.js.map +0 -1
- package/_cjs/chains/definitions/ronin.js +0 -24
- package/_cjs/chains/definitions/ronin.js.map +0 -1
- package/_cjs/chains/definitions/saigon.js +0 -28
- package/_cjs/chains/definitions/saigon.js.map +0 -1
- package/_cjs/chains/definitions/scroll.js +0 -29
- package/_cjs/chains/definitions/scroll.js.map +0 -1
- package/_cjs/chains/definitions/scrollSepolia.js +0 -28
- package/_cjs/chains/definitions/scrollSepolia.js.map +0 -1
- package/_cjs/chains/definitions/scrollTestnet.js +0 -23
- package/_cjs/chains/definitions/scrollTestnet.js.map +0 -1
- package/_cjs/chains/definitions/sepolia.js +0 -33
- package/_cjs/chains/definitions/sepolia.js.map +0 -1
- package/_cjs/chains/definitions/shardeumSphinx.js +0 -22
- package/_cjs/chains/definitions/shardeumSphinx.js.map +0 -1
- package/_cjs/chains/definitions/skale/brawl.js +0 -23
- package/_cjs/chains/definitions/skale/brawl.js.map +0 -1
- package/_cjs/chains/definitions/skale/calypso.js +0 -30
- package/_cjs/chains/definitions/skale/calypso.js.map +0 -1
- package/_cjs/chains/definitions/skale/calypsoTestnet.js +0 -33
- package/_cjs/chains/definitions/skale/calypsoTestnet.js.map +0 -1
- package/_cjs/chains/definitions/skale/chaosTestnet.js +0 -33
- package/_cjs/chains/definitions/skale/chaosTestnet.js.map +0 -1
- package/_cjs/chains/definitions/skale/cryptoBlades.js +0 -25
- package/_cjs/chains/definitions/skale/cryptoBlades.js.map +0 -1
- package/_cjs/chains/definitions/skale/cryptoColosseum.js +0 -23
- package/_cjs/chains/definitions/skale/cryptoColosseum.js.map +0 -1
- package/_cjs/chains/definitions/skale/europa.js +0 -28
- package/_cjs/chains/definitions/skale/europa.js.map +0 -1
- package/_cjs/chains/definitions/skale/europaTestnet.js +0 -31
- package/_cjs/chains/definitions/skale/europaTestnet.js.map +0 -1
- package/_cjs/chains/definitions/skale/exorde.js +0 -23
- package/_cjs/chains/definitions/skale/exorde.js.map +0 -1
- package/_cjs/chains/definitions/skale/humanProtocol.js +0 -23
- package/_cjs/chains/definitions/skale/humanProtocol.js.map +0 -1
- package/_cjs/chains/definitions/skale/nebula.js +0 -28
- package/_cjs/chains/definitions/skale/nebula.js.map +0 -1
- package/_cjs/chains/definitions/skale/nebulaTestnet.js +0 -31
- package/_cjs/chains/definitions/skale/nebulaTestnet.js.map +0 -1
- package/_cjs/chains/definitions/skale/razor.js +0 -23
- package/_cjs/chains/definitions/skale/razor.js.map +0 -1
- package/_cjs/chains/definitions/skale/titan.js +0 -28
- package/_cjs/chains/definitions/skale/titan.js.map +0 -1
- package/_cjs/chains/definitions/skale/titanTestnet.js +0 -33
- package/_cjs/chains/definitions/skale/titanTestnet.js.map +0 -1
- package/_cjs/chains/definitions/songbird.js +0 -23
- package/_cjs/chains/definitions/songbird.js.map +0 -1
- package/_cjs/chains/definitions/songbirdTestnet.js +0 -24
- package/_cjs/chains/definitions/songbirdTestnet.js.map +0 -1
- package/_cjs/chains/definitions/syscoin.js +0 -29
- package/_cjs/chains/definitions/syscoin.js.map +0 -1
- package/_cjs/chains/definitions/syscoinTestnet.js +0 -29
- package/_cjs/chains/definitions/syscoinTestnet.js.map +0 -1
- package/_cjs/chains/definitions/taikoJolnir.js +0 -21
- package/_cjs/chains/definitions/taikoJolnir.js.map +0 -1
- package/_cjs/chains/definitions/taikoTestnetSepolia.js +0 -21
- package/_cjs/chains/definitions/taikoTestnetSepolia.js.map +0 -1
- package/_cjs/chains/definitions/taraxa.js +0 -21
- package/_cjs/chains/definitions/taraxa.js.map +0 -1
- package/_cjs/chains/definitions/taraxaTestnet.js +0 -22
- package/_cjs/chains/definitions/taraxaTestnet.js.map +0 -1
- package/_cjs/chains/definitions/telos.js +0 -29
- package/_cjs/chains/definitions/telos.js.map +0 -1
- package/_cjs/chains/definitions/telosTestnet.js +0 -24
- package/_cjs/chains/definitions/telosTestnet.js.map +0 -1
- package/_cjs/chains/definitions/tenet.js +0 -23
- package/_cjs/chains/definitions/tenet.js.map +0 -1
- package/_cjs/chains/definitions/thunderTestnet.js +0 -22
- package/_cjs/chains/definitions/thunderTestnet.js.map +0 -1
- package/_cjs/chains/definitions/vechain.js +0 -25
- package/_cjs/chains/definitions/vechain.js.map +0 -1
- package/_cjs/chains/definitions/wanchain.js +0 -30
- package/_cjs/chains/definitions/wanchain.js.map +0 -1
- package/_cjs/chains/definitions/wanchainTestnet.js +0 -28
- package/_cjs/chains/definitions/wanchainTestnet.js.map +0 -1
- package/_cjs/chains/definitions/xdc.js +0 -21
- package/_cjs/chains/definitions/xdc.js.map +0 -1
- package/_cjs/chains/definitions/xdcTestnet.js +0 -21
- package/_cjs/chains/definitions/xdcTestnet.js.map +0 -1
- package/_cjs/chains/definitions/zetachainAthensTestnet.js +0 -26
- package/_cjs/chains/definitions/zetachainAthensTestnet.js.map +0 -1
- package/_cjs/chains/definitions/zhejiang.js +0 -22
- package/_cjs/chains/definitions/zhejiang.js.map +0 -1
- package/_cjs/chains/definitions/zkSync.js +0 -36
- package/_cjs/chains/definitions/zkSync.js.map +0 -1
- package/_cjs/chains/definitions/zkSyncTestnet.js +0 -33
- package/_cjs/chains/definitions/zkSyncTestnet.js.map +0 -1
- package/_cjs/chains/definitions/zora.js +0 -31
- package/_cjs/chains/definitions/zora.js.map +0 -1
- package/_cjs/chains/definitions/zoraSepolia.js +0 -40
- package/_cjs/chains/definitions/zoraSepolia.js.map +0 -1
- package/_cjs/chains/definitions/zoraTestnet.js +0 -35
- package/_cjs/chains/definitions/zoraTestnet.js.map +0 -1
- package/_cjs/chains/index.js +0 -319
- package/_cjs/chains/index.js.map +0 -1
- package/_cjs/chains/optimism/formatters.js +0 -54
- package/_cjs/chains/optimism/formatters.js.map +0 -1
- package/_cjs/chains/optimism/types.js +0 -3
- package/_cjs/chains/optimism/types.js.map +0 -1
- package/_cjs/chains/utils.js +0 -23
- package/_cjs/chains/utils.js.map +0 -1
- package/_cjs/chains/zksync/formatters.js +0 -128
- package/_cjs/chains/zksync/formatters.js.map +0 -1
- package/_cjs/chains/zksync/serializers.js +0 -74
- package/_cjs/chains/zksync/serializers.js.map +0 -1
- package/_cjs/chains/zksync/types.js +0 -3
- package/_cjs/chains/zksync/types.js.map +0 -1
- package/_cjs/clients/createClient.js +0 -42
- package/_cjs/clients/createClient.js.map +0 -1
- package/_cjs/clients/createPublicClient.js +0 -17
- package/_cjs/clients/createPublicClient.js.map +0 -1
- package/_cjs/clients/createTestClient.js +0 -20
- package/_cjs/clients/createTestClient.js.map +0 -1
- package/_cjs/clients/createWalletClient.js +0 -18
- package/_cjs/clients/createWalletClient.js.map +0 -1
- package/_cjs/clients/decorators/public.js +0 -101
- package/_cjs/clients/decorators/public.js.map +0 -1
- package/_cjs/clients/decorators/test.js +0 -70
- package/_cjs/clients/decorators/test.js.map +0 -1
- package/_cjs/clients/decorators/wallet.js +0 -41
- package/_cjs/clients/decorators/wallet.js.map +0 -1
- package/_cjs/clients/transports/createTransport.js +0 -13
- package/_cjs/clients/transports/createTransport.js.map +0 -1
- package/_cjs/clients/transports/custom.js +0 -17
- package/_cjs/clients/transports/custom.js.map +0 -1
- package/_cjs/clients/transports/fallback.js +0 -122
- package/_cjs/clients/transports/fallback.js.map +0 -1
- package/_cjs/clients/transports/http.js +0 -59
- package/_cjs/clients/transports/http.js.map +0 -1
- package/_cjs/clients/transports/webSocket.js +0 -81
- package/_cjs/clients/transports/webSocket.js.map +0 -1
- package/_cjs/constants/abis.js +0 -1350
- package/_cjs/constants/abis.js.map +0 -1
- package/_cjs/constants/address.js +0 -5
- package/_cjs/constants/address.js.map +0 -1
- package/_cjs/constants/contract.js +0 -5
- package/_cjs/constants/contract.js.map +0 -1
- package/_cjs/constants/contracts.js +0 -5
- package/_cjs/constants/contracts.js.map +0 -1
- package/_cjs/constants/number.js +0 -101
- package/_cjs/constants/number.js.map +0 -1
- package/_cjs/constants/solidity.js +0 -35
- package/_cjs/constants/solidity.js.map +0 -1
- package/_cjs/constants/unit.js +0 -16
- package/_cjs/constants/unit.js.map +0 -1
- package/_cjs/ens/index.js +0 -20
- package/_cjs/ens/index.js.map +0 -1
- package/_cjs/errors/abi.js +0 -461
- package/_cjs/errors/abi.js.map +0 -1
- package/_cjs/errors/account.js +0 -23
- package/_cjs/errors/account.js.map +0 -1
- package/_cjs/errors/address.js +0 -17
- package/_cjs/errors/address.js.map +0 -1
- package/_cjs/errors/base.js +0 -83
- package/_cjs/errors/base.js.map +0 -1
- package/_cjs/errors/block.js +0 -22
- package/_cjs/errors/block.js.map +0 -1
- package/_cjs/errors/ccip.js +0 -69
- package/_cjs/errors/ccip.js.map +0 -1
- package/_cjs/errors/chain.js +0 -86
- package/_cjs/errors/chain.js.map +0 -1
- package/_cjs/errors/contract.js +0 -286
- package/_cjs/errors/contract.js.map +0 -1
- package/_cjs/errors/cursor.js +0 -29
- package/_cjs/errors/cursor.js.map +0 -1
- package/_cjs/errors/data.js +0 -31
- package/_cjs/errors/data.js.map +0 -1
- package/_cjs/errors/encoding.js +0 -65
- package/_cjs/errors/encoding.js.map +0 -1
- package/_cjs/errors/ens.js +0 -59
- package/_cjs/errors/ens.js.map +0 -1
- package/_cjs/errors/estimateGas.js +0 -49
- package/_cjs/errors/estimateGas.js.map +0 -1
- package/_cjs/errors/fee.js +0 -42
- package/_cjs/errors/fee.js.map +0 -1
- package/_cjs/errors/log.js +0 -17
- package/_cjs/errors/log.js.map +0 -1
- package/_cjs/errors/node.js +0 -262
- package/_cjs/errors/node.js.map +0 -1
- package/_cjs/errors/request.js +0 -107
- package/_cjs/errors/request.js.map +0 -1
- package/_cjs/errors/rpc.js +0 -448
- package/_cjs/errors/rpc.js.map +0 -1
- package/_cjs/errors/transaction.js +0 -225
- package/_cjs/errors/transaction.js.map +0 -1
- package/_cjs/errors/transport.js +0 -13
- package/_cjs/errors/transport.js.map +0 -1
- package/_cjs/index.js +0 -482
- package/_cjs/index.js.map +0 -1
- package/_cjs/types/account.js +0 -3
- package/_cjs/types/account.js.map +0 -1
- package/_cjs/types/block.js +0 -3
- package/_cjs/types/block.js.map +0 -1
- package/_cjs/types/chain.js +0 -3
- package/_cjs/types/chain.js.map +0 -1
- package/_cjs/types/contract.js +0 -3
- package/_cjs/types/contract.js.map +0 -1
- package/_cjs/types/eip1193.js +0 -24
- package/_cjs/types/eip1193.js.map +0 -1
- package/_cjs/types/ens.js +0 -3
- package/_cjs/types/ens.js.map +0 -1
- package/_cjs/types/fee.js +0 -3
- package/_cjs/types/fee.js.map +0 -1
- package/_cjs/types/filter.js +0 -3
- package/_cjs/types/filter.js.map +0 -1
- package/_cjs/types/log.js +0 -3
- package/_cjs/types/log.js.map +0 -1
- package/_cjs/types/misc.js +0 -3
- package/_cjs/types/misc.js.map +0 -1
- package/_cjs/types/multicall.js +0 -3
- package/_cjs/types/multicall.js.map +0 -1
- package/_cjs/types/proof.js +0 -3
- package/_cjs/types/proof.js.map +0 -1
- package/_cjs/types/rpc.js +0 -3
- package/_cjs/types/rpc.js.map +0 -1
- package/_cjs/types/transaction.js +0 -3
- package/_cjs/types/transaction.js.map +0 -1
- package/_cjs/types/transport.js +0 -3
- package/_cjs/types/transport.js.map +0 -1
- package/_cjs/types/typedData.js +0 -3
- package/_cjs/types/typedData.js.map +0 -1
- package/_cjs/types/utils.js +0 -3
- package/_cjs/types/utils.js.map +0 -1
- package/_cjs/types/window.js +0 -3
- package/_cjs/types/window.js.map +0 -1
- package/_cjs/types/withdrawal.js +0 -3
- package/_cjs/types/withdrawal.js.map +0 -1
- package/_cjs/utils/abi/decodeAbiParameters.js +0 -210
- package/_cjs/utils/abi/decodeAbiParameters.js.map +0 -1
- package/_cjs/utils/abi/decodeDeployData.js +0 -22
- package/_cjs/utils/abi/decodeDeployData.js.map +0 -1
- package/_cjs/utils/abi/decodeErrorResult.js +0 -30
- package/_cjs/utils/abi/decodeErrorResult.js.map +0 -1
- package/_cjs/utils/abi/decodeEventLog.js +0 -85
- package/_cjs/utils/abi/decodeEventLog.js.map +0 -1
- package/_cjs/utils/abi/decodeFunctionData.js +0 -28
- package/_cjs/utils/abi/decodeFunctionData.js.map +0 -1
- package/_cjs/utils/abi/decodeFunctionResult.js +0 -29
- package/_cjs/utils/abi/decodeFunctionResult.js.map +0 -1
- package/_cjs/utils/abi/encodeAbiParameters.js +0 -211
- package/_cjs/utils/abi/encodeAbiParameters.js.map +0 -1
- package/_cjs/utils/abi/encodeDeployData.js +0 -23
- package/_cjs/utils/abi/encodeDeployData.js.map +0 -1
- package/_cjs/utils/abi/encodeErrorResult.js +0 -33
- package/_cjs/utils/abi/encodeErrorResult.js.map +0 -1
- package/_cjs/utils/abi/encodeEventTopics.js +0 -53
- package/_cjs/utils/abi/encodeEventTopics.js.map +0 -1
- package/_cjs/utils/abi/encodeFunctionData.js +0 -34
- package/_cjs/utils/abi/encodeFunctionData.js.map +0 -1
- package/_cjs/utils/abi/encodeFunctionResult.js +0 -27
- package/_cjs/utils/abi/encodeFunctionResult.js.map +0 -1
- package/_cjs/utils/abi/encodePacked.js +0 -73
- package/_cjs/utils/abi/encodePacked.js.map +0 -1
- package/_cjs/utils/abi/formatAbiItem.js +0 -27
- package/_cjs/utils/abi/formatAbiItem.js.map +0 -1
- package/_cjs/utils/abi/formatAbiItemWithArgs.js +0 -17
- package/_cjs/utils/abi/formatAbiItemWithArgs.js.map +0 -1
- package/_cjs/utils/abi/getAbiItem.js +0 -84
- package/_cjs/utils/abi/getAbiItem.js.map +0 -1
- package/_cjs/utils/accounts.js +0 -8
- package/_cjs/utils/accounts.js.map +0 -1
- package/_cjs/utils/address/getAddress.js +0 -31
- package/_cjs/utils/address/getAddress.js.map +0 -1
- package/_cjs/utils/address/getContractAddress.js +0 -42
- package/_cjs/utils/address/getContractAddress.js.map +0 -1
- package/_cjs/utils/address/isAddress.js +0 -9
- package/_cjs/utils/address/isAddress.js.map +0 -1
- package/_cjs/utils/address/isAddressEqual.js +0 -14
- package/_cjs/utils/address/isAddressEqual.js.map +0 -1
- package/_cjs/utils/buildRequest.js +0 -93
- package/_cjs/utils/buildRequest.js.map +0 -1
- package/_cjs/utils/ccip.js +0 -121
- package/_cjs/utils/ccip.js.map +0 -1
- package/_cjs/utils/chain/assertCurrentChain.js +0 -12
- package/_cjs/utils/chain/assertCurrentChain.js.map +0 -1
- package/_cjs/utils/chain/defineChain.js +0 -13
- package/_cjs/utils/chain/defineChain.js.map +0 -1
- package/_cjs/utils/chain/extractChain.js +0 -8
- package/_cjs/utils/chain/extractChain.js.map +0 -1
- package/_cjs/utils/chain/getChainContractAddress.js +0 -26
- package/_cjs/utils/chain/getChainContractAddress.js.map +0 -1
- package/_cjs/utils/cursor.js +0 -134
- package/_cjs/utils/cursor.js.map +0 -1
- package/_cjs/utils/data/concat.js +0 -28
- package/_cjs/utils/data/concat.js.map +0 -1
- package/_cjs/utils/data/isBytes.js +0 -14
- package/_cjs/utils/data/isBytes.js.map +0 -1
- package/_cjs/utils/data/isBytesEqual.js +0 -13
- package/_cjs/utils/data/isBytesEqual.js.map +0 -1
- package/_cjs/utils/data/isHex.js +0 -12
- package/_cjs/utils/data/isHex.js.map +0 -1
- package/_cjs/utils/data/pad.js +0 -42
- package/_cjs/utils/data/pad.js.map +0 -1
- package/_cjs/utils/data/size.js +0 -11
- package/_cjs/utils/data/size.js.map +0 -1
- package/_cjs/utils/data/slice.js +0 -54
- package/_cjs/utils/data/slice.js.map +0 -1
- package/_cjs/utils/data/trim.js +0 -25
- package/_cjs/utils/data/trim.js.map +0 -1
- package/_cjs/utils/encoding/fromBytes.js +0 -56
- package/_cjs/utils/encoding/fromBytes.js.map +0 -1
- package/_cjs/utils/encoding/fromHex.js +0 -70
- package/_cjs/utils/encoding/fromHex.js.map +0 -1
- package/_cjs/utils/encoding/fromRlp.js +0 -67
- package/_cjs/utils/encoding/fromRlp.js.map +0 -1
- package/_cjs/utils/encoding/toBytes.js +0 -83
- package/_cjs/utils/encoding/toBytes.js.map +0 -1
- package/_cjs/utils/encoding/toHex.js +0 -79
- package/_cjs/utils/encoding/toHex.js.map +0 -1
- package/_cjs/utils/encoding/toRlp.js +0 -105
- package/_cjs/utils/encoding/toRlp.js.map +0 -1
- package/_cjs/utils/ens/avatar/parseAvatarRecord.js +0 -34
- package/_cjs/utils/ens/avatar/parseAvatarRecord.js.map +0 -1
- package/_cjs/utils/ens/avatar/utils.js +0 -186
- package/_cjs/utils/ens/avatar/utils.js.map +0 -1
- package/_cjs/utils/ens/encodeLabelhash.js +0 -8
- package/_cjs/utils/ens/encodeLabelhash.js.map +0 -1
- package/_cjs/utils/ens/encodedLabelToLabelhash.js +0 -18
- package/_cjs/utils/ens/encodedLabelToLabelhash.js.map +0 -1
- package/_cjs/utils/ens/errors.js +0 -24
- package/_cjs/utils/ens/errors.js.map +0 -1
- package/_cjs/utils/ens/labelhash.js +0 -15
- package/_cjs/utils/ens/labelhash.js.map +0 -1
- package/_cjs/utils/ens/namehash.js +0 -24
- package/_cjs/utils/ens/namehash.js.map +0 -1
- package/_cjs/utils/ens/normalize.js +0 -9
- package/_cjs/utils/ens/normalize.js.map +0 -1
- package/_cjs/utils/ens/packetToBytes.js +0 -27
- package/_cjs/utils/ens/packetToBytes.js.map +0 -1
- package/_cjs/utils/errors/getCallError.js +0 -20
- package/_cjs/utils/errors/getCallError.js.map +0 -1
- package/_cjs/utils/errors/getContractError.js +0 -39
- package/_cjs/utils/errors/getContractError.js.map +0 -1
- package/_cjs/utils/errors/getEstimateGasError.js +0 -20
- package/_cjs/utils/errors/getEstimateGasError.js.map +0 -1
- package/_cjs/utils/errors/getNodeError.js +0 -65
- package/_cjs/utils/errors/getNodeError.js.map +0 -1
- package/_cjs/utils/errors/getTransactionError.js +0 -20
- package/_cjs/utils/errors/getTransactionError.js.map +0 -1
- package/_cjs/utils/filters/createFilterRequestScope.js +0 -14
- package/_cjs/utils/filters/createFilterRequestScope.js.map +0 -1
- package/_cjs/utils/formatters/block.js +0 -32
- package/_cjs/utils/formatters/block.js.map +0 -1
- package/_cjs/utils/formatters/extract.js +0 -24
- package/_cjs/utils/formatters/extract.js.map +0 -1
- package/_cjs/utils/formatters/feeHistory.js +0 -13
- package/_cjs/utils/formatters/feeHistory.js.map +0 -1
- package/_cjs/utils/formatters/formatter.js +0 -25
- package/_cjs/utils/formatters/formatter.js.map +0 -1
- package/_cjs/utils/formatters/log.js +0 -18
- package/_cjs/utils/formatters/log.js.map +0 -1
- package/_cjs/utils/formatters/proof.js +0 -22
- package/_cjs/utils/formatters/proof.js.map +0 -1
- package/_cjs/utils/formatters/transaction.js +0 -50
- package/_cjs/utils/formatters/transaction.js.map +0 -1
- package/_cjs/utils/formatters/transactionReceipt.js +0 -47
- package/_cjs/utils/formatters/transactionReceipt.js.map +0 -1
- package/_cjs/utils/formatters/transactionRequest.js +0 -39
- package/_cjs/utils/formatters/transactionRequest.js.map +0 -1
- package/_cjs/utils/getAction.js +0 -8
- package/_cjs/utils/getAction.js.map +0 -1
- package/_cjs/utils/hash/getEventSelector.js +0 -10
- package/_cjs/utils/hash/getEventSelector.js.map +0 -1
- package/_cjs/utils/hash/getEventSignature.js +0 -9
- package/_cjs/utils/hash/getEventSignature.js.map +0 -1
- package/_cjs/utils/hash/getFunctionSelector.js +0 -11
- package/_cjs/utils/hash/getFunctionSelector.js.map +0 -1
- package/_cjs/utils/hash/getFunctionSignature.js +0 -15
- package/_cjs/utils/hash/getFunctionSignature.js.map +0 -1
- package/_cjs/utils/hash/hashFunction.js +0 -17
- package/_cjs/utils/hash/hashFunction.js.map +0 -1
- package/_cjs/utils/hash/isHash.js +0 -10
- package/_cjs/utils/hash/isHash.js.map +0 -1
- package/_cjs/utils/hash/keccak256.js +0 -16
- package/_cjs/utils/hash/keccak256.js.map +0 -1
- package/_cjs/utils/hash/normalizeSignature.js +0 -48
- package/_cjs/utils/hash/normalizeSignature.js.map +0 -1
- package/_cjs/utils/index.js +0 -213
- package/_cjs/utils/index.js.map +0 -1
- package/_cjs/utils/observe.js +0 -42
- package/_cjs/utils/observe.js.map +0 -1
- package/_cjs/utils/poll.js +0 -27
- package/_cjs/utils/poll.js.map +0 -1
- package/_cjs/utils/promise/createBatchScheduler.js +0 -49
- package/_cjs/utils/promise/createBatchScheduler.js.map +0 -1
- package/_cjs/utils/promise/withCache.js +0 -47
- package/_cjs/utils/promise/withCache.js.map +0 -1
- package/_cjs/utils/promise/withRetry.js +0 -29
- package/_cjs/utils/promise/withRetry.js.map +0 -1
- package/_cjs/utils/promise/withTimeout.js +0 -35
- package/_cjs/utils/promise/withTimeout.js.map +0 -1
- package/_cjs/utils/regex.js +0 -7
- package/_cjs/utils/regex.js.map +0 -1
- package/_cjs/utils/rpc.js +0 -154
- package/_cjs/utils/rpc.js.map +0 -1
- package/_cjs/utils/signature/compactSignatureToHex.js +0 -10
- package/_cjs/utils/signature/compactSignatureToHex.js.map +0 -1
- package/_cjs/utils/signature/compactSignatureToSignature.js +0 -15
- package/_cjs/utils/signature/compactSignatureToSignature.js.map +0 -1
- package/_cjs/utils/signature/hashMessage.js +0 -19
- package/_cjs/utils/signature/hashMessage.js.map +0 -1
- package/_cjs/utils/signature/hashTypedData.js +0 -124
- package/_cjs/utils/signature/hashTypedData.js.map +0 -1
- package/_cjs/utils/signature/hexToCompactSignature.js +0 -14
- package/_cjs/utils/signature/hexToCompactSignature.js.map +0 -1
- package/_cjs/utils/signature/hexToSignature.js +0 -12
- package/_cjs/utils/signature/hexToSignature.js.map +0 -1
- package/_cjs/utils/signature/recoverAddress.js +0 -10
- package/_cjs/utils/signature/recoverAddress.js.map +0 -1
- package/_cjs/utils/signature/recoverMessageAddress.js +0 -10
- package/_cjs/utils/signature/recoverMessageAddress.js.map +0 -1
- package/_cjs/utils/signature/recoverPublicKey.js +0 -21
- package/_cjs/utils/signature/recoverPublicKey.js.map +0 -1
- package/_cjs/utils/signature/recoverTypedDataAddress.js +0 -19
- package/_cjs/utils/signature/recoverTypedDataAddress.js.map +0 -1
- package/_cjs/utils/signature/signatureToCompactSignature.js +0 -17
- package/_cjs/utils/signature/signatureToCompactSignature.js.map +0 -1
- package/_cjs/utils/signature/signatureToHex.js +0 -11
- package/_cjs/utils/signature/signatureToHex.js.map +0 -1
- package/_cjs/utils/signature/verifyMessage.js +0 -11
- package/_cjs/utils/signature/verifyMessage.js.map +0 -1
- package/_cjs/utils/signature/verifyTypedData.js +0 -18
- package/_cjs/utils/signature/verifyTypedData.js.map +0 -1
- package/_cjs/utils/stringify.js +0 -9
- package/_cjs/utils/stringify.js.map +0 -1
- package/_cjs/utils/transaction/assertRequest.js +0 -28
- package/_cjs/utils/transaction/assertRequest.js.map +0 -1
- package/_cjs/utils/transaction/assertTransaction.js +0 -51
- package/_cjs/utils/transaction/assertTransaction.js.map +0 -1
- package/_cjs/utils/transaction/getSerializedTransactionType.js +0 -18
- package/_cjs/utils/transaction/getSerializedTransactionType.js.map +0 -1
- package/_cjs/utils/transaction/getTransactionType.js +0 -19
- package/_cjs/utils/transaction/getTransactionType.js.map +0 -1
- package/_cjs/utils/transaction/parseTransaction.js +0 -213
- package/_cjs/utils/transaction/parseTransaction.js.map +0 -1
- package/_cjs/utils/transaction/serializeAccessList.js +0 -26
- package/_cjs/utils/transaction/serializeAccessList.js.map +0 -1
- package/_cjs/utils/transaction/serializeTransaction.js +0 -107
- package/_cjs/utils/transaction/serializeTransaction.js.map +0 -1
- package/_cjs/utils/typedData.js +0 -75
- package/_cjs/utils/typedData.js.map +0 -1
- package/_cjs/utils/uid.js +0 -18
- package/_cjs/utils/uid.js.map +0 -1
- package/_cjs/utils/unit/formatEther.js +0 -10
- package/_cjs/utils/unit/formatEther.js.map +0 -1
- package/_cjs/utils/unit/formatGwei.js +0 -10
- package/_cjs/utils/unit/formatGwei.js.map +0 -1
- package/_cjs/utils/unit/formatUnits.js +0 -18
- package/_cjs/utils/unit/formatUnits.js.map +0 -1
- package/_cjs/utils/unit/parseEther.js +0 -10
- package/_cjs/utils/unit/parseEther.js.map +0 -1
- package/_cjs/utils/unit/parseGwei.js +0 -10
- package/_cjs/utils/unit/parseGwei.js.map +0 -1
- package/_cjs/utils/unit/parseUnits.js +0 -38
- package/_cjs/utils/unit/parseUnits.js.map +0 -1
- package/_cjs/utils/wait.js +0 -8
- package/_cjs/utils/wait.js.map +0 -1
- package/_cjs/window/index.js +0 -4
- package/_cjs/window/index.js.map +0 -1
- package/_esm/chains/optimism/formatters.js.map +0 -1
- package/_esm/chains/optimism/types.js.map +0 -1
- package/_types/chains/optimism/types.d.ts +0 -53
- package/_types/chains/optimism/types.d.ts.map +0 -1
- /package/_esm/chains/{optimism → opStack}/types.js +0 -0
@@ -0,0 +1,138 @@
|
|
1
|
+
import type { Address } from 'abitype'
|
2
|
+
|
3
|
+
import { getChainId } from '../../../actions/public/getChainId.js'
|
4
|
+
import {
|
5
|
+
type ReadContractErrorType,
|
6
|
+
readContract,
|
7
|
+
} from '../../../actions/public/readContract.js'
|
8
|
+
import {
|
9
|
+
type PrepareTransactionRequestErrorType,
|
10
|
+
type PrepareTransactionRequestParameters,
|
11
|
+
prepareTransactionRequest,
|
12
|
+
} from '../../../actions/wallet/prepareTransactionRequest.js'
|
13
|
+
import type { Client } from '../../../clients/createClient.js'
|
14
|
+
import type { Transport } from '../../../clients/transports/createTransport.js'
|
15
|
+
import { maxInt256 } from '../../../constants/number.js'
|
16
|
+
import type { ErrorType } from '../../../errors/utils.js'
|
17
|
+
import type { Account, GetAccountParameter } from '../../../types/account.js'
|
18
|
+
import { type Chain, type GetChain } from '../../../types/chain.js'
|
19
|
+
import type { Signature } from '../../../types/misc.js'
|
20
|
+
import type { TransactionRequestEIP1559 } from '../../../types/transaction.js'
|
21
|
+
import type { RequestErrorType } from '../../../utils/buildRequest.js'
|
22
|
+
import { getChainContractAddress } from '../../../utils/chain/getChainContractAddress.js'
|
23
|
+
import { type HexToNumberErrorType } from '../../../utils/encoding/fromHex.js'
|
24
|
+
import { numberToHex } from '../../../utils/encoding/toHex.js'
|
25
|
+
import {
|
26
|
+
type AssertRequestErrorType,
|
27
|
+
assertRequest,
|
28
|
+
} from '../../../utils/transaction/assertRequest.js'
|
29
|
+
import {
|
30
|
+
type SerializeTransactionErrorType,
|
31
|
+
serializeTransaction,
|
32
|
+
} from '../../../utils/transaction/serializeTransaction.js'
|
33
|
+
import { gasPriceOracleAbi } from '../abis.js'
|
34
|
+
import { contracts } from '../contracts.js'
|
35
|
+
|
36
|
+
export type EstimateL1GasParameters<
|
37
|
+
TChain extends Chain | undefined = Chain | undefined,
|
38
|
+
TAccount extends Account | undefined = Account | undefined,
|
39
|
+
TChainOverride extends Chain | undefined = Chain | undefined,
|
40
|
+
> = Omit<TransactionRequestEIP1559, 'from'> &
|
41
|
+
GetAccountParameter<TAccount> &
|
42
|
+
GetChain<TChain, TChainOverride> & {
|
43
|
+
/** Gas price oracle address. */
|
44
|
+
gasPriceOracleAddress?: Address
|
45
|
+
}
|
46
|
+
|
47
|
+
export type EstimateL1GasReturnType = bigint
|
48
|
+
|
49
|
+
export type EstimateL1GasErrorType =
|
50
|
+
| RequestErrorType
|
51
|
+
| PrepareTransactionRequestErrorType
|
52
|
+
| AssertRequestErrorType
|
53
|
+
| SerializeTransactionErrorType
|
54
|
+
| HexToNumberErrorType
|
55
|
+
| ReadContractErrorType
|
56
|
+
| ErrorType
|
57
|
+
|
58
|
+
const stubSignature = {
|
59
|
+
r: numberToHex(maxInt256),
|
60
|
+
s: numberToHex(maxInt256),
|
61
|
+
v: 28n,
|
62
|
+
} as const satisfies Signature
|
63
|
+
|
64
|
+
/**
|
65
|
+
* Estimates the L1 data gas required to execute an L2 transaction.
|
66
|
+
*
|
67
|
+
* @param client - Client to use
|
68
|
+
* @param parameters - {@link EstimateL1GasParameters}
|
69
|
+
* @returns The gas estimate. {@link EstimateL1GasReturnType}
|
70
|
+
*
|
71
|
+
* @example
|
72
|
+
* import { createPublicClient, http, parseEther } from 'viem'
|
73
|
+
* import { optimism } from 'viem/chains'
|
74
|
+
* import { estimateL1Gas } from 'viem/chains/optimism'
|
75
|
+
*
|
76
|
+
* const client = createPublicClient({
|
77
|
+
* chain: optimism,
|
78
|
+
* transport: http(),
|
79
|
+
* })
|
80
|
+
* const l1Gas = await estimateL1Gas(client, {
|
81
|
+
* account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
|
82
|
+
* to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
|
83
|
+
* value: parseEther('1'),
|
84
|
+
* })
|
85
|
+
*/
|
86
|
+
export async function estimateL1Gas<
|
87
|
+
TChain extends Chain | undefined,
|
88
|
+
TAccount extends Account | undefined,
|
89
|
+
TChainOverride extends Chain | undefined = undefined,
|
90
|
+
>(
|
91
|
+
client: Client<Transport, TChain, TAccount>,
|
92
|
+
args: EstimateL1GasParameters<TChain, TAccount, TChainOverride>,
|
93
|
+
): Promise<EstimateL1GasReturnType> {
|
94
|
+
const {
|
95
|
+
chain = client.chain,
|
96
|
+
gasPriceOracleAddress: gasPriceOracleAddress_,
|
97
|
+
} = args
|
98
|
+
|
99
|
+
const gasPriceOracleAddress = (() => {
|
100
|
+
if (gasPriceOracleAddress_) return gasPriceOracleAddress_
|
101
|
+
if (chain)
|
102
|
+
return getChainContractAddress({
|
103
|
+
chain,
|
104
|
+
contract: 'gasPriceOracle',
|
105
|
+
})
|
106
|
+
return contracts.gasPriceOracle.address
|
107
|
+
})()
|
108
|
+
|
109
|
+
// Populate transaction with required fields to accurately estimate gas.
|
110
|
+
const [request, chainId] = await Promise.all([
|
111
|
+
prepareTransactionRequest(
|
112
|
+
client,
|
113
|
+
args as PrepareTransactionRequestParameters,
|
114
|
+
),
|
115
|
+
(async () => {
|
116
|
+
if (chain) return chain.id
|
117
|
+
return getChainId(client)
|
118
|
+
})(),
|
119
|
+
])
|
120
|
+
|
121
|
+
assertRequest(request)
|
122
|
+
|
123
|
+
const transaction = serializeTransaction(
|
124
|
+
{
|
125
|
+
...request,
|
126
|
+
chainId,
|
127
|
+
type: 'eip1559',
|
128
|
+
},
|
129
|
+
stubSignature,
|
130
|
+
)
|
131
|
+
|
132
|
+
return readContract(client, {
|
133
|
+
abi: gasPriceOracleAbi,
|
134
|
+
address: gasPriceOracleAddress,
|
135
|
+
functionName: 'getL1GasUsed',
|
136
|
+
args: [transaction],
|
137
|
+
})
|
138
|
+
}
|
@@ -0,0 +1,86 @@
|
|
1
|
+
import {
|
2
|
+
type EstimateGasErrorType,
|
3
|
+
type EstimateGasParameters,
|
4
|
+
estimateGas,
|
5
|
+
} from '../../../actions/public/estimateGas.js'
|
6
|
+
import {
|
7
|
+
type GetGasPriceErrorType,
|
8
|
+
getGasPrice,
|
9
|
+
} from '../../../actions/public/getGasPrice.js'
|
10
|
+
import {
|
11
|
+
type PrepareTransactionRequestErrorType,
|
12
|
+
type PrepareTransactionRequestParameters,
|
13
|
+
prepareTransactionRequest,
|
14
|
+
} from '../../../actions/wallet/prepareTransactionRequest.js'
|
15
|
+
import type { Client } from '../../../clients/createClient.js'
|
16
|
+
import type { Transport } from '../../../clients/transports/createTransport.js'
|
17
|
+
import type { ErrorType } from '../../../errors/utils.js'
|
18
|
+
import type { Account } from '../../../types/account.js'
|
19
|
+
import { type Chain } from '../../../types/chain.js'
|
20
|
+
import type { RequestErrorType } from '../../../utils/buildRequest.js'
|
21
|
+
import {
|
22
|
+
type EstimateL1FeeErrorType,
|
23
|
+
type EstimateL1FeeParameters,
|
24
|
+
estimateL1Fee,
|
25
|
+
} from './estimateL1Fee.js'
|
26
|
+
|
27
|
+
export type EstimateTotalFeeParameters<
|
28
|
+
TChain extends Chain | undefined = Chain | undefined,
|
29
|
+
TAccount extends Account | undefined = Account | undefined,
|
30
|
+
TChainOverride extends Chain | undefined = Chain | undefined,
|
31
|
+
> = EstimateL1FeeParameters<TChain, TAccount, TChainOverride>
|
32
|
+
|
33
|
+
export type EstimateTotalFeeReturnType = bigint
|
34
|
+
|
35
|
+
export type EstimateTotalFeeErrorType =
|
36
|
+
| RequestErrorType
|
37
|
+
| PrepareTransactionRequestErrorType
|
38
|
+
| EstimateL1FeeErrorType
|
39
|
+
| EstimateGasErrorType
|
40
|
+
| GetGasPriceErrorType
|
41
|
+
| ErrorType
|
42
|
+
|
43
|
+
/**
|
44
|
+
* Estimates the L1 data fee + L2 fee to execute an L2 transaction.
|
45
|
+
*
|
46
|
+
* @param client - Client to use
|
47
|
+
* @param parameters - {@link EstimateTotalFeeParameters}
|
48
|
+
* @returns The fee (in wei). {@link EstimateTotalFeeReturnType}
|
49
|
+
*
|
50
|
+
* @example
|
51
|
+
* import { createPublicClient, http, parseEther } from 'viem'
|
52
|
+
* import { optimism } from 'viem/chains'
|
53
|
+
* import { estimateTotalFee } from 'viem/chains/optimism'
|
54
|
+
*
|
55
|
+
* const client = createPublicClient({
|
56
|
+
* chain: optimism,
|
57
|
+
* transport: http(),
|
58
|
+
* })
|
59
|
+
* const totalGas = await estimateTotalFee(client, {
|
60
|
+
* account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
|
61
|
+
* to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
|
62
|
+
* value: parseEther('1'),
|
63
|
+
* })
|
64
|
+
*/
|
65
|
+
export async function estimateTotalFee<
|
66
|
+
TChain extends Chain | undefined,
|
67
|
+
TAccount extends Account | undefined,
|
68
|
+
TChainOverride extends Chain | undefined = undefined,
|
69
|
+
>(
|
70
|
+
client: Client<Transport, TChain, TAccount>,
|
71
|
+
args: EstimateTotalFeeParameters<TChain, TAccount, TChainOverride>,
|
72
|
+
): Promise<EstimateTotalFeeReturnType> {
|
73
|
+
// Populate transaction with required fields to accurately estimate gas.
|
74
|
+
const request = await prepareTransactionRequest(
|
75
|
+
client,
|
76
|
+
args as PrepareTransactionRequestParameters,
|
77
|
+
)
|
78
|
+
|
79
|
+
const [l1Fee, l2Gas, l2GasPrice] = await Promise.all([
|
80
|
+
estimateL1Fee(client, request as EstimateL1FeeParameters),
|
81
|
+
estimateGas(client, request as EstimateGasParameters),
|
82
|
+
getGasPrice(client),
|
83
|
+
])
|
84
|
+
|
85
|
+
return l1Fee + l2Gas * l2GasPrice
|
86
|
+
}
|
@@ -0,0 +1,80 @@
|
|
1
|
+
import {
|
2
|
+
type EstimateGasErrorType,
|
3
|
+
type EstimateGasParameters,
|
4
|
+
estimateGas,
|
5
|
+
} from '../../../actions/public/estimateGas.js'
|
6
|
+
import {
|
7
|
+
type PrepareTransactionRequestErrorType,
|
8
|
+
type PrepareTransactionRequestParameters,
|
9
|
+
prepareTransactionRequest,
|
10
|
+
} from '../../../actions/wallet/prepareTransactionRequest.js'
|
11
|
+
import type { Client } from '../../../clients/createClient.js'
|
12
|
+
import type { Transport } from '../../../clients/transports/createTransport.js'
|
13
|
+
import type { ErrorType } from '../../../errors/utils.js'
|
14
|
+
import type { Account } from '../../../types/account.js'
|
15
|
+
import { type Chain } from '../../../types/chain.js'
|
16
|
+
import type { RequestErrorType } from '../../../utils/buildRequest.js'
|
17
|
+
import {
|
18
|
+
type EstimateL1GasErrorType,
|
19
|
+
type EstimateL1GasParameters,
|
20
|
+
estimateL1Gas,
|
21
|
+
} from './estimateL1Gas.js'
|
22
|
+
|
23
|
+
export type EstimateTotalGasParameters<
|
24
|
+
TChain extends Chain | undefined = Chain | undefined,
|
25
|
+
TAccount extends Account | undefined = Account | undefined,
|
26
|
+
TChainOverride extends Chain | undefined = Chain | undefined,
|
27
|
+
> = EstimateL1GasParameters<TChain, TAccount, TChainOverride>
|
28
|
+
|
29
|
+
export type EstimateTotalGasReturnType = bigint
|
30
|
+
|
31
|
+
export type EstimateTotalGasErrorType =
|
32
|
+
| RequestErrorType
|
33
|
+
| PrepareTransactionRequestErrorType
|
34
|
+
| EstimateL1GasErrorType
|
35
|
+
| EstimateGasErrorType
|
36
|
+
| ErrorType
|
37
|
+
|
38
|
+
/**
|
39
|
+
* Estimates the amount of L1 data gas + L2 gas required to execute an L2 transaction.
|
40
|
+
*
|
41
|
+
* @param client - Client to use
|
42
|
+
* @param parameters - {@link EstimateTotalGasParameters}
|
43
|
+
* @returns The gas estimate. {@link EstimateTotalGasReturnType}
|
44
|
+
*
|
45
|
+
* @example
|
46
|
+
* import { createPublicClient, http, parseEther } from 'viem'
|
47
|
+
* import { optimism } from 'viem/chains'
|
48
|
+
* import { estimateTotalGas } from 'viem/chains/optimism'
|
49
|
+
*
|
50
|
+
* const client = createPublicClient({
|
51
|
+
* chain: optimism,
|
52
|
+
* transport: http(),
|
53
|
+
* })
|
54
|
+
* const totalGas = await estimateTotalGas(client, {
|
55
|
+
* account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
|
56
|
+
* to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
|
57
|
+
* value: parseEther('1'),
|
58
|
+
* })
|
59
|
+
*/
|
60
|
+
export async function estimateTotalGas<
|
61
|
+
TChain extends Chain | undefined,
|
62
|
+
TAccount extends Account | undefined,
|
63
|
+
TChainOverride extends Chain | undefined = undefined,
|
64
|
+
>(
|
65
|
+
client: Client<Transport, TChain, TAccount>,
|
66
|
+
args: EstimateTotalGasParameters<TChain, TAccount, TChainOverride>,
|
67
|
+
): Promise<EstimateTotalGasReturnType> {
|
68
|
+
// Populate transaction with required fields to accurately estimate gas.
|
69
|
+
const request = await prepareTransactionRequest(
|
70
|
+
client,
|
71
|
+
args as PrepareTransactionRequestParameters,
|
72
|
+
)
|
73
|
+
|
74
|
+
const [l1Gas, l2Gas] = await Promise.all([
|
75
|
+
estimateL1Gas(client, request as EstimateL1GasParameters),
|
76
|
+
estimateGas(client, request as EstimateGasParameters),
|
77
|
+
])
|
78
|
+
|
79
|
+
return l1Gas + l2Gas
|
80
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import type { Chain } from '../../types/chain.js'
|
2
|
+
|
3
|
+
export const contracts = {
|
4
|
+
gasPriceOracle: { address: '0x420000000000000000000000000000000000000F' },
|
5
|
+
l1Block: { address: '0x4200000000000000000000000000000000000015' },
|
6
|
+
l2CrossDomainMessenger: {
|
7
|
+
address: '0x4200000000000000000000000000000000000007',
|
8
|
+
},
|
9
|
+
l2Erc721Bridge: { address: '0x4200000000000000000000000000000000000014' },
|
10
|
+
l2StandardBridge: { address: '0x4200000000000000000000000000000000000010' },
|
11
|
+
l2ToL1MessagePasser: {
|
12
|
+
address: '0x4200000000000000000000000000000000000016',
|
13
|
+
},
|
14
|
+
} as const satisfies Chain['contracts']
|
@@ -0,0 +1,337 @@
|
|
1
|
+
import type { Abi } from 'abitype'
|
2
|
+
import type { Client } from '../../../clients/createClient.js'
|
3
|
+
import type { Transport } from '../../../clients/transports/createTransport.js'
|
4
|
+
import type { Account } from '../../../types/account.js'
|
5
|
+
import type { Chain } from '../../../types/chain.js'
|
6
|
+
import type {
|
7
|
+
ContractFunctionArgs,
|
8
|
+
ContractFunctionName,
|
9
|
+
} from '../../../types/contract.js'
|
10
|
+
import {
|
11
|
+
type EstimateContractL1FeeParameters,
|
12
|
+
type EstimateContractL1FeeReturnType,
|
13
|
+
estimateContractL1Fee,
|
14
|
+
} from '../actions/estimateContractL1Fee.js'
|
15
|
+
import {
|
16
|
+
type EstimateContractL1GasParameters,
|
17
|
+
type EstimateContractL1GasReturnType,
|
18
|
+
estimateContractL1Gas,
|
19
|
+
} from '../actions/estimateContractL1Gas.js'
|
20
|
+
import {
|
21
|
+
type EstimateContractTotalFeeParameters,
|
22
|
+
type EstimateContractTotalFeeReturnType,
|
23
|
+
estimateContractTotalFee,
|
24
|
+
} from '../actions/estimateContractTotalFee.js'
|
25
|
+
import {
|
26
|
+
type EstimateContractTotalGasParameters,
|
27
|
+
type EstimateContractTotalGasReturnType,
|
28
|
+
estimateContractTotalGas,
|
29
|
+
} from '../actions/estimateContractTotalGas.js'
|
30
|
+
import {
|
31
|
+
type EstimateL1FeeParameters,
|
32
|
+
type EstimateL1FeeReturnType,
|
33
|
+
estimateL1Fee,
|
34
|
+
} from '../actions/estimateL1Fee.js'
|
35
|
+
import {
|
36
|
+
type EstimateL1GasParameters,
|
37
|
+
type EstimateL1GasReturnType,
|
38
|
+
estimateL1Gas,
|
39
|
+
} from '../actions/estimateL1Gas.js'
|
40
|
+
import {
|
41
|
+
type EstimateTotalFeeParameters,
|
42
|
+
type EstimateTotalFeeReturnType,
|
43
|
+
estimateTotalFee,
|
44
|
+
} from '../actions/estimateTotalFee.js'
|
45
|
+
import {
|
46
|
+
type EstimateTotalGasParameters,
|
47
|
+
type EstimateTotalGasReturnType,
|
48
|
+
estimateTotalGas,
|
49
|
+
} from '../actions/estimateTotalGas.js'
|
50
|
+
|
51
|
+
export type OpStackPublicActions<
|
52
|
+
chain extends Chain | undefined = Chain | undefined,
|
53
|
+
account extends Account | undefined = Account | undefined,
|
54
|
+
> = {
|
55
|
+
/**
|
56
|
+
* Estimates the L1 data fee required to execute an L2 contract write.
|
57
|
+
*
|
58
|
+
* @param client - Client to use
|
59
|
+
* @param parameters - {@link EstimateContractL1FeeParameters}
|
60
|
+
* @returns The gas estimate (in wei). {@link EstimateContractL1FeeReturnType}
|
61
|
+
*
|
62
|
+
* @example
|
63
|
+
* import { createPublicClient, http, parseAbi } from 'viem'
|
64
|
+
* import { optimism } from 'viem/chains'
|
65
|
+
* import { opStackPublicActions } from 'viem/op-stack'
|
66
|
+
*
|
67
|
+
* const client = createPublicClient({
|
68
|
+
* chain: optimism,
|
69
|
+
* transport: http(),
|
70
|
+
* }).extend(opStackPublicActions())
|
71
|
+
*
|
72
|
+
* const l1Fee = await client.estimateContractL1Fee({
|
73
|
+
* address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
|
74
|
+
* abi: parseAbi(['function mint() public']),
|
75
|
+
* functionName: 'mint',
|
76
|
+
* account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
|
77
|
+
* })
|
78
|
+
*/
|
79
|
+
estimateContractL1Fee: <
|
80
|
+
const abi extends Abi | readonly unknown[],
|
81
|
+
functionName extends ContractFunctionName<abi, 'nonpayable' | 'payable'>,
|
82
|
+
args extends ContractFunctionArgs<abi, 'pure' | 'view', functionName>,
|
83
|
+
chainOverride extends Chain | undefined = undefined,
|
84
|
+
>(
|
85
|
+
parameters: EstimateContractL1FeeParameters<
|
86
|
+
abi,
|
87
|
+
functionName,
|
88
|
+
args,
|
89
|
+
chain,
|
90
|
+
account,
|
91
|
+
chainOverride
|
92
|
+
>,
|
93
|
+
) => Promise<EstimateContractL1FeeReturnType>
|
94
|
+
/**
|
95
|
+
* Estimates the L1 data gas required to successfully execute a contract write function call.
|
96
|
+
*
|
97
|
+
* @param client - Client to use
|
98
|
+
* @param parameters - {@link EstimateContractL1GasParameters}
|
99
|
+
* @returns The gas estimate (in wei). {@link EstimateContractL1GasReturnType}
|
100
|
+
*
|
101
|
+
* @example
|
102
|
+
* import { createPublicClient, http, parseAbi } from 'viem'
|
103
|
+
* import { optimism } from 'viem/chains'
|
104
|
+
* import { opStackPublicActions } from 'viem/op-stack'
|
105
|
+
*
|
106
|
+
* const client = createPublicClient({
|
107
|
+
* chain: optimism,
|
108
|
+
* transport: http(),
|
109
|
+
* }).extend(opStackPublicActions())
|
110
|
+
*
|
111
|
+
* const l1Gas = await client.estimateContractL1Gas({
|
112
|
+
* address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
|
113
|
+
* abi: parseAbi(['function mint() public']),
|
114
|
+
* functionName: 'mint',
|
115
|
+
* account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
|
116
|
+
* })
|
117
|
+
*/
|
118
|
+
estimateContractL1Gas: <
|
119
|
+
const abi extends Abi | readonly unknown[],
|
120
|
+
functionName extends ContractFunctionName<abi, 'nonpayable' | 'payable'>,
|
121
|
+
args extends ContractFunctionArgs<abi, 'pure' | 'view', functionName>,
|
122
|
+
chainOverride extends Chain | undefined = undefined,
|
123
|
+
>(
|
124
|
+
parameters: EstimateContractL1GasParameters<
|
125
|
+
abi,
|
126
|
+
functionName,
|
127
|
+
args,
|
128
|
+
chain,
|
129
|
+
account,
|
130
|
+
chainOverride
|
131
|
+
>,
|
132
|
+
) => Promise<EstimateContractL1GasReturnType>
|
133
|
+
/**
|
134
|
+
* Estimates the L1 + L2 fee to execute an L2 contract write.
|
135
|
+
*
|
136
|
+
* @param client - Client to use
|
137
|
+
* @param parameters - {@link EstimateContractTotalFeeParameters}
|
138
|
+
* @returns The gas estimate (in wei). {@link EstimateContractTotalFeeReturnType}
|
139
|
+
*
|
140
|
+
* @example
|
141
|
+
* import { createPublicClient, http, parseAbi } from 'viem'
|
142
|
+
* import { optimism } from 'viem/chains'
|
143
|
+
* import { opStackPublicActions } from 'viem/op-stack'
|
144
|
+
*
|
145
|
+
* const client = createPublicClient({
|
146
|
+
* chain: optimism,
|
147
|
+
* transport: http(),
|
148
|
+
* }).extend(opStackPublicActions())
|
149
|
+
*
|
150
|
+
* const totalFee = await client.estimateContractTotalFee({
|
151
|
+
* address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
|
152
|
+
* abi: parseAbi(['function mint() public']),
|
153
|
+
* functionName: 'mint',
|
154
|
+
* account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
|
155
|
+
* })
|
156
|
+
*/
|
157
|
+
estimateContractTotalFee: <
|
158
|
+
const abi extends Abi | readonly unknown[],
|
159
|
+
functionName extends ContractFunctionName<abi, 'nonpayable' | 'payable'>,
|
160
|
+
args extends ContractFunctionArgs<abi, 'pure' | 'view', functionName>,
|
161
|
+
chainOverride extends Chain | undefined = undefined,
|
162
|
+
>(
|
163
|
+
parameters: EstimateContractTotalFeeParameters<
|
164
|
+
abi,
|
165
|
+
functionName,
|
166
|
+
args,
|
167
|
+
chain,
|
168
|
+
account,
|
169
|
+
chainOverride
|
170
|
+
>,
|
171
|
+
) => Promise<EstimateContractTotalFeeReturnType>
|
172
|
+
/**
|
173
|
+
* Estimates the L1 data gas + L2 gas required to successfully execute a contract write function call.
|
174
|
+
*
|
175
|
+
* @param client - Client to use
|
176
|
+
* @param parameters - {@link EstimateContractTotalGasParameters}
|
177
|
+
* @returns The gas estimate (in wei). {@link EstimateContractTotalGasReturnType}
|
178
|
+
*
|
179
|
+
* @example
|
180
|
+
* import { createPublicClient, http, parseAbi } from 'viem'
|
181
|
+
* import { optimism } from 'viem/chains'
|
182
|
+
* import { opStackPublicActions } from 'viem/op-stack'
|
183
|
+
*
|
184
|
+
* const client = createPublicClient({
|
185
|
+
* chain: optimism,
|
186
|
+
* transport: http(),
|
187
|
+
* }).extend(opStackPublicActions())
|
188
|
+
*
|
189
|
+
* const totalGas = await client.estimateContractTotalGas({
|
190
|
+
* address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
|
191
|
+
* abi: parseAbi(['function mint() public']),
|
192
|
+
* functionName: 'mint',
|
193
|
+
* account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
|
194
|
+
* })
|
195
|
+
*/
|
196
|
+
estimateContractTotalGas: <
|
197
|
+
const abi extends Abi | readonly unknown[],
|
198
|
+
functionName extends ContractFunctionName<abi, 'nonpayable' | 'payable'>,
|
199
|
+
args extends ContractFunctionArgs<abi, 'pure' | 'view', functionName>,
|
200
|
+
chainOverride extends Chain | undefined = undefined,
|
201
|
+
>(
|
202
|
+
parameters: EstimateContractTotalGasParameters<
|
203
|
+
abi,
|
204
|
+
functionName,
|
205
|
+
args,
|
206
|
+
chain,
|
207
|
+
account,
|
208
|
+
chainOverride
|
209
|
+
>,
|
210
|
+
) => Promise<EstimateContractTotalGasReturnType>
|
211
|
+
/**
|
212
|
+
* Estimates the L1 data fee required to execute an L2 transaction.
|
213
|
+
*
|
214
|
+
* @param client - Client to use
|
215
|
+
* @param parameters - {@link EstimateL1FeeParameters}
|
216
|
+
* @returns The fee (in wei). {@link EstimateL1FeeReturnType}
|
217
|
+
*
|
218
|
+
* @example
|
219
|
+
* import { createPublicClient, http, parseEther } from 'viem'
|
220
|
+
* import { optimism } from 'viem/chains'
|
221
|
+
* import { opStackPublicActions } from 'viem/op-stack'
|
222
|
+
*
|
223
|
+
* const client = createPublicClient({
|
224
|
+
* chain: optimism,
|
225
|
+
* transport: http(),
|
226
|
+
* }).extend(opStackPublicActions())
|
227
|
+
*
|
228
|
+
* const l1Fee = await client.estimateL1Fee({
|
229
|
+
* account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
|
230
|
+
* to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
|
231
|
+
* value: parseEther('1'),
|
232
|
+
* })
|
233
|
+
*/
|
234
|
+
estimateL1Fee: <chainOverride extends Chain | undefined = undefined>(
|
235
|
+
parameters: EstimateL1FeeParameters<chain, account, chainOverride>,
|
236
|
+
) => Promise<EstimateL1FeeReturnType>
|
237
|
+
/**
|
238
|
+
* Estimates the amount of L1 data gas required to execute an L2 transaction.
|
239
|
+
*
|
240
|
+
* @param client - Client to use
|
241
|
+
* @param parameters - {@link EstimateL1GasParameters}
|
242
|
+
* @returns The gas estimate. {@link EstimateL1GasReturnType}
|
243
|
+
*
|
244
|
+
* @example
|
245
|
+
* import { createPublicClient, http, parseEther } from 'viem'
|
246
|
+
* import { optimism } from 'viem/chains'
|
247
|
+
* import { opStackPublicActions } from 'viem/op-stack'
|
248
|
+
*
|
249
|
+
* const client = createPublicClient({
|
250
|
+
* chain: optimism,
|
251
|
+
* transport: http(),
|
252
|
+
* }).extend(opStackPublicActions())
|
253
|
+
*
|
254
|
+
* const l1Gas = await client.estimateL1Gas({
|
255
|
+
* account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
|
256
|
+
* to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
|
257
|
+
* value: parseEther('1'),
|
258
|
+
* })
|
259
|
+
*/
|
260
|
+
estimateL1Gas: <chainOverride extends Chain | undefined = undefined>(
|
261
|
+
parameters: EstimateL1GasParameters<chain, account, chainOverride>,
|
262
|
+
) => Promise<EstimateL1GasReturnType>
|
263
|
+
/**
|
264
|
+
* Estimates the L1 data fee + L2 fee to execute an L2 transaction.
|
265
|
+
*
|
266
|
+
* @param client - Client to use
|
267
|
+
* @param parameters - {@link EstimateTotalFeeParameters}
|
268
|
+
* @returns The gas estimate. {@link EstimateTotalFeeReturnType}
|
269
|
+
*
|
270
|
+
* @example
|
271
|
+
* import { createPublicClient, http, parseEther } from 'viem'
|
272
|
+
* import { optimism } from 'viem/chains'
|
273
|
+
* import { opStackPublicActions } from 'viem/op-stack'
|
274
|
+
*
|
275
|
+
* const client = createPublicClient({
|
276
|
+
* chain: optimism,
|
277
|
+
* transport: http(),
|
278
|
+
* }).extend(opStackPublicActions())
|
279
|
+
*
|
280
|
+
* const totalFee = await client.estimateTotalFee({
|
281
|
+
* account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
|
282
|
+
* to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
|
283
|
+
* value: parseEther('1'),
|
284
|
+
* })
|
285
|
+
*/
|
286
|
+
estimateTotalFee: <chainOverride extends Chain | undefined = undefined>(
|
287
|
+
parameters: EstimateTotalFeeParameters<chain, account, chainOverride>,
|
288
|
+
) => Promise<EstimateTotalFeeReturnType>
|
289
|
+
/**
|
290
|
+
* Estimates the total amount of combined L1 data gas + L2 gas required to execute an L2 transaction.
|
291
|
+
*
|
292
|
+
* @param client - Client to use
|
293
|
+
* @param parameters - {@link EstimateTotalGasParameters}
|
294
|
+
* @returns The gas estimate. {@link EstimateTotalGasReturnType}
|
295
|
+
*
|
296
|
+
* @example
|
297
|
+
* import { createPublicClient, http, parseEther } from 'viem'
|
298
|
+
* import { optimism } from 'viem/chains'
|
299
|
+
* import { opStackPublicActions } from 'viem/op-stack'
|
300
|
+
*
|
301
|
+
* const client = createPublicClient({
|
302
|
+
* chain: optimism,
|
303
|
+
* transport: http(),
|
304
|
+
* }).extend(opStackPublicActions())
|
305
|
+
*
|
306
|
+
* const totalGas = await client.estimateTotalGas({
|
307
|
+
* account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
|
308
|
+
* to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
|
309
|
+
* value: parseEther('1'),
|
310
|
+
* })
|
311
|
+
*/
|
312
|
+
estimateTotalGas: <chainOverride extends Chain | undefined = undefined>(
|
313
|
+
parameters: EstimateTotalGasParameters<chain, account, chainOverride>,
|
314
|
+
) => Promise<EstimateTotalGasReturnType>
|
315
|
+
}
|
316
|
+
|
317
|
+
export function opStackPublicActions() {
|
318
|
+
return <
|
319
|
+
TChain extends Chain | undefined = Chain | undefined,
|
320
|
+
TAccount extends Account | undefined = Account | undefined,
|
321
|
+
>(
|
322
|
+
client: Client<Transport, TChain, TAccount>,
|
323
|
+
): OpStackPublicActions<TChain, TAccount> => {
|
324
|
+
return {
|
325
|
+
estimateContractL1Fee: (args) => estimateContractL1Fee(client, args),
|
326
|
+
estimateContractL1Gas: (args) => estimateContractL1Gas(client, args),
|
327
|
+
estimateContractTotalFee: (args) =>
|
328
|
+
estimateContractTotalFee(client, args),
|
329
|
+
estimateContractTotalGas: (args) =>
|
330
|
+
estimateContractTotalGas(client, args),
|
331
|
+
estimateL1Fee: (args) => estimateL1Fee(client, args),
|
332
|
+
estimateL1Gas: (args) => estimateL1Gas(client, args),
|
333
|
+
estimateTotalFee: (args) => estimateTotalFee(client, args),
|
334
|
+
estimateTotalGas: (args) => estimateTotalGas(client, args),
|
335
|
+
}
|
336
|
+
}
|
337
|
+
}
|