viem 2.0.0-beta.4 → 2.0.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/_cjs/accounts/generateMnemonic.js +9 -0
- package/_cjs/accounts/generateMnemonic.js.map +1 -0
- package/_cjs/accounts/generatePrivateKey.js +10 -0
- package/_cjs/accounts/generatePrivateKey.js.map +1 -0
- package/_cjs/accounts/hdKeyToAccount.js +16 -0
- package/_cjs/accounts/hdKeyToAccount.js.map +1 -0
- package/_cjs/accounts/index.js +52 -0
- package/_cjs/accounts/index.js.map +1 -0
- package/_cjs/accounts/mnemonicToAccount.js +12 -0
- package/_cjs/accounts/mnemonicToAccount.js.map +1 -0
- package/_cjs/accounts/privateKeyToAccount.js +33 -0
- package/_cjs/accounts/privateKeyToAccount.js.map +1 -0
- package/_cjs/accounts/toAccount.js +27 -0
- package/_cjs/accounts/toAccount.js.map +1 -0
- package/_cjs/accounts/types.js +3 -0
- package/_cjs/accounts/types.js.map +1 -0
- package/_cjs/accounts/utils/parseAccount.js +10 -0
- package/_cjs/accounts/utils/parseAccount.js.map +1 -0
- package/_cjs/accounts/utils/privateKeyToAddress.js +12 -0
- package/_cjs/accounts/utils/privateKeyToAddress.js.map +1 -0
- package/_cjs/accounts/utils/publicKeyToAddress.js +11 -0
- package/_cjs/accounts/utils/publicKeyToAddress.js.map +1 -0
- package/_cjs/accounts/utils/sign.js +15 -0
- package/_cjs/accounts/utils/sign.js.map +1 -0
- package/_cjs/accounts/utils/signMessage.js +12 -0
- package/_cjs/accounts/utils/signMessage.js.map +1 -0
- package/_cjs/accounts/utils/signTransaction.js +15 -0
- package/_cjs/accounts/utils/signTransaction.js.map +1 -0
- package/_cjs/accounts/utils/signTypedData.js +16 -0
- package/_cjs/accounts/utils/signTypedData.js.map +1 -0
- package/_cjs/actions/ens/getEnsAddress.js +63 -0
- package/_cjs/actions/ens/getEnsAddress.js.map +1 -0
- package/_cjs/actions/ens/getEnsAvatar.js +25 -0
- package/_cjs/actions/ens/getEnsAvatar.js.map +1 -0
- package/_cjs/actions/ens/getEnsName.js +41 -0
- package/_cjs/actions/ens/getEnsName.js.map +1 -0
- package/_cjs/actions/ens/getEnsResolver.js +39 -0
- package/_cjs/actions/ens/getEnsResolver.js.map +1 -0
- package/_cjs/actions/ens/getEnsText.js +57 -0
- package/_cjs/actions/ens/getEnsText.js.map +1 -0
- package/_cjs/actions/getContract.js +184 -0
- package/_cjs/actions/getContract.js.map +1 -0
- package/_cjs/actions/index.js +167 -0
- package/_cjs/actions/index.js.map +1 -0
- package/_cjs/actions/public/call.js +156 -0
- package/_cjs/actions/public/call.js.map +1 -0
- package/_cjs/actions/public/createBlockFilter.js +15 -0
- package/_cjs/actions/public/createBlockFilter.js.map +1 -0
- package/_cjs/actions/public/createContractEventFilter.js +41 -0
- package/_cjs/actions/public/createContractEventFilter.js.map +1 -0
- package/_cjs/actions/public/createEventFilter.js +48 -0
- package/_cjs/actions/public/createEventFilter.js.map +1 -0
- package/_cjs/actions/public/createPendingTransactionFilter.js +15 -0
- package/_cjs/actions/public/createPendingTransactionFilter.js.map +1 -0
- package/_cjs/actions/public/estimateContractGas.js +37 -0
- package/_cjs/actions/public/estimateContractGas.js.map +1 -0
- package/_cjs/actions/public/estimateFeesPerGas.js +62 -0
- package/_cjs/actions/public/estimateFeesPerGas.js.map +1 -0
- package/_cjs/actions/public/estimateGas.js +56 -0
- package/_cjs/actions/public/estimateGas.js.map +1 -0
- package/_cjs/actions/public/estimateMaxPriorityFeePerGas.js +45 -0
- package/_cjs/actions/public/estimateMaxPriorityFeePerGas.js.map +1 -0
- package/_cjs/actions/public/getBalance.js +14 -0
- package/_cjs/actions/public/getBalance.js.map +1 -0
- package/_cjs/actions/public/getBlock.js +30 -0
- package/_cjs/actions/public/getBlock.js.map +1 -0
- package/_cjs/actions/public/getBlockNumber.js +17 -0
- package/_cjs/actions/public/getBlockNumber.js.map +1 -0
- package/_cjs/actions/public/getBlockTransactionCount.js +24 -0
- package/_cjs/actions/public/getBlockTransactionCount.js.map +1 -0
- package/_cjs/actions/public/getBytecode.js +16 -0
- package/_cjs/actions/public/getBytecode.js.map +1 -0
- package/_cjs/actions/public/getChainId.js +12 -0
- package/_cjs/actions/public/getChainId.js.map +1 -0
- package/_cjs/actions/public/getContractEvents.js +27 -0
- package/_cjs/actions/public/getContractEvents.js.map +1 -0
- package/_cjs/actions/public/getFeeHistory.js +19 -0
- package/_cjs/actions/public/getFeeHistory.js.map +1 -0
- package/_cjs/actions/public/getFilterChanges.js +44 -0
- package/_cjs/actions/public/getFilterChanges.js.map +1 -0
- package/_cjs/actions/public/getFilterLogs.js +42 -0
- package/_cjs/actions/public/getFilterLogs.js.map +1 -0
- package/_cjs/actions/public/getGasPrice.js +11 -0
- package/_cjs/actions/public/getGasPrice.js.map +1 -0
- package/_cjs/actions/public/getLogs.js +73 -0
- package/_cjs/actions/public/getLogs.js.map +1 -0
- package/_cjs/actions/public/getProof.js +16 -0
- package/_cjs/actions/public/getProof.js.map +1 -0
- package/_cjs/actions/public/getStorageAt.js +14 -0
- package/_cjs/actions/public/getStorageAt.js.map +1 -0
- package/_cjs/actions/public/getTransaction.js +41 -0
- package/_cjs/actions/public/getTransaction.js.map +1 -0
- package/_cjs/actions/public/getTransactionConfirmations.js +18 -0
- package/_cjs/actions/public/getTransactionConfirmations.js.map +1 -0
- package/_cjs/actions/public/getTransactionCount.js +14 -0
- package/_cjs/actions/public/getTransactionCount.js.map +1 -0
- package/_cjs/actions/public/getTransactionReceipt.js +18 -0
- package/_cjs/actions/public/getTransactionReceipt.js.map +1 -0
- package/_cjs/actions/public/multicall.js +135 -0
- package/_cjs/actions/public/multicall.js.map +1 -0
- package/_cjs/actions/public/readContract.js +40 -0
- package/_cjs/actions/public/readContract.js.map +1 -0
- package/_cjs/actions/public/simulateContract.js +56 -0
- package/_cjs/actions/public/simulateContract.js.map +1 -0
- package/_cjs/actions/public/uninstallFilter.js +11 -0
- package/_cjs/actions/public/uninstallFilter.js.map +1 -0
- package/_cjs/actions/public/verifyHash.js +32 -0
- package/_cjs/actions/public/verifyHash.js.map +1 -0
- package/_cjs/actions/public/verifyMessage.js +16 -0
- package/_cjs/actions/public/verifyMessage.js.map +1 -0
- package/_cjs/actions/public/verifyTypedData.js +16 -0
- package/_cjs/actions/public/verifyTypedData.js.map +1 -0
- package/_cjs/actions/public/waitForTransactionReceipt.js +119 -0
- package/_cjs/actions/public/waitForTransactionReceipt.js.map +1 -0
- package/_cjs/actions/public/watchBlockNumber.js +78 -0
- package/_cjs/actions/public/watchBlockNumber.js.map +1 -0
- package/_cjs/actions/public/watchBlocks.js +90 -0
- package/_cjs/actions/public/watchBlocks.js.map +1 -0
- package/_cjs/actions/public/watchContractEvent.js +162 -0
- package/_cjs/actions/public/watchContractEvent.js.map +1 -0
- package/_cjs/actions/public/watchEvent.js +161 -0
- package/_cjs/actions/public/watchEvent.js.map +1 -0
- package/_cjs/actions/public/watchPendingTransactions.js +88 -0
- package/_cjs/actions/public/watchPendingTransactions.js.map +1 -0
- package/_cjs/actions/test/dropTransaction.js +11 -0
- package/_cjs/actions/test/dropTransaction.js.map +1 -0
- package/_cjs/actions/test/dumpState.js +10 -0
- package/_cjs/actions/test/dumpState.js.map +1 -0
- package/_cjs/actions/test/getAutomine.js +14 -0
- package/_cjs/actions/test/getAutomine.js.map +1 -0
- package/_cjs/actions/test/getTxpoolContent.js +10 -0
- package/_cjs/actions/test/getTxpoolContent.js.map +1 -0
- package/_cjs/actions/test/getTxpoolStatus.js +15 -0
- package/_cjs/actions/test/getTxpoolStatus.js.map +1 -0
- package/_cjs/actions/test/impersonateAccount.js +11 -0
- package/_cjs/actions/test/impersonateAccount.js.map +1 -0
- package/_cjs/actions/test/increaseTime.js +12 -0
- package/_cjs/actions/test/increaseTime.js.map +1 -0
- package/_cjs/actions/test/inspectTxpool.js +10 -0
- package/_cjs/actions/test/inspectTxpool.js.map +1 -0
- package/_cjs/actions/test/loadState.js +11 -0
- package/_cjs/actions/test/loadState.js.map +1 -0
- package/_cjs/actions/test/mine.js +18 -0
- package/_cjs/actions/test/mine.js.map +1 -0
- package/_cjs/actions/test/removeBlockTimestampInterval.js +10 -0
- package/_cjs/actions/test/removeBlockTimestampInterval.js.map +1 -0
- package/_cjs/actions/test/reset.js +11 -0
- package/_cjs/actions/test/reset.js.map +1 -0
- package/_cjs/actions/test/revert.js +11 -0
- package/_cjs/actions/test/revert.js.map +1 -0
- package/_cjs/actions/test/sendUnsignedTransaction.js +30 -0
- package/_cjs/actions/test/sendUnsignedTransaction.js.map +1 -0
- package/_cjs/actions/test/setAutomine.js +18 -0
- package/_cjs/actions/test/setAutomine.js.map +1 -0
- package/_cjs/actions/test/setBalance.js +18 -0
- package/_cjs/actions/test/setBalance.js.map +1 -0
- package/_cjs/actions/test/setBlockGasLimit.js +12 -0
- package/_cjs/actions/test/setBlockGasLimit.js.map +1 -0
- package/_cjs/actions/test/setBlockTimestampInterval.js +16 -0
- package/_cjs/actions/test/setBlockTimestampInterval.js.map +1 -0
- package/_cjs/actions/test/setCode.js +11 -0
- package/_cjs/actions/test/setCode.js.map +1 -0
- package/_cjs/actions/test/setCoinbase.js +11 -0
- package/_cjs/actions/test/setCoinbase.js.map +1 -0
- package/_cjs/actions/test/setIntervalMining.js +16 -0
- package/_cjs/actions/test/setIntervalMining.js.map +1 -0
- package/_cjs/actions/test/setLoggingEnabled.js +11 -0
- package/_cjs/actions/test/setLoggingEnabled.js.map +1 -0
- package/_cjs/actions/test/setMinGasPrice.js +12 -0
- package/_cjs/actions/test/setMinGasPrice.js.map +1 -0
- package/_cjs/actions/test/setNextBlockBaseFeePerGas.js +12 -0
- package/_cjs/actions/test/setNextBlockBaseFeePerGas.js.map +1 -0
- package/_cjs/actions/test/setNextBlockTimestamp.js +12 -0
- package/_cjs/actions/test/setNextBlockTimestamp.js.map +1 -0
- package/_cjs/actions/test/setNonce.js +12 -0
- package/_cjs/actions/test/setNonce.js.map +1 -0
- package/_cjs/actions/test/setRpcUrl.js +11 -0
- package/_cjs/actions/test/setRpcUrl.js.map +1 -0
- package/_cjs/actions/test/setStorageAt.js +16 -0
- package/_cjs/actions/test/setStorageAt.js.map +1 -0
- package/_cjs/actions/test/snapshot.js +10 -0
- package/_cjs/actions/test/snapshot.js.map +1 -0
- package/_cjs/actions/test/stopImpersonatingAccount.js +11 -0
- package/_cjs/actions/test/stopImpersonatingAccount.js.map +1 -0
- package/_cjs/actions/wallet/addChain.js +23 -0
- package/_cjs/actions/wallet/addChain.js.map +1 -0
- package/_cjs/actions/wallet/deployContract.js +15 -0
- package/_cjs/actions/wallet/deployContract.js.map +1 -0
- package/_cjs/actions/wallet/getAddresses.js +12 -0
- package/_cjs/actions/wallet/getAddresses.js.map +1 -0
- package/_cjs/actions/wallet/getPermissions.js +9 -0
- package/_cjs/actions/wallet/getPermissions.js.map +1 -0
- package/_cjs/actions/wallet/prepareTransactionRequest.js +71 -0
- package/_cjs/actions/wallet/prepareTransactionRequest.js.map +1 -0
- package/_cjs/actions/wallet/requestAddresses.js +10 -0
- package/_cjs/actions/wallet/requestAddresses.js.map +1 -0
- package/_cjs/actions/wallet/requestPermissions.js +11 -0
- package/_cjs/actions/wallet/requestPermissions.js.map +1 -0
- package/_cjs/actions/wallet/sendRawTransaction.js +11 -0
- package/_cjs/actions/wallet/sendRawTransaction.js.map +1 -0
- package/_cjs/actions/wallet/sendTransaction.js +87 -0
- package/_cjs/actions/wallet/sendTransaction.js.map +1 -0
- package/_cjs/actions/wallet/signMessage.js +28 -0
- package/_cjs/actions/wallet/signMessage.js.map +1 -0
- package/_cjs/actions/wallet/signTransaction.js +48 -0
- package/_cjs/actions/wallet/signTransaction.js.map +1 -0
- package/_cjs/actions/wallet/signTypedData.js +30 -0
- package/_cjs/actions/wallet/signTypedData.js.map +1 -0
- package/_cjs/actions/wallet/switchChain.js +16 -0
- package/_cjs/actions/wallet/switchChain.js.map +1 -0
- package/_cjs/actions/wallet/watchAsset.js +12 -0
- package/_cjs/actions/wallet/watchAsset.js.map +1 -0
- package/_cjs/actions/wallet/writeContract.js +18 -0
- package/_cjs/actions/wallet/writeContract.js.map +1 -0
- package/_cjs/chains/celo/chainConfig.js +10 -0
- package/_cjs/chains/celo/chainConfig.js.map +1 -0
- package/_cjs/chains/celo/formatters.js +82 -0
- package/_cjs/chains/celo/formatters.js.map +1 -0
- package/_cjs/chains/celo/index.js +10 -0
- package/_cjs/chains/celo/index.js.map +1 -0
- package/_cjs/chains/celo/parsers.js +131 -0
- package/_cjs/chains/celo/parsers.js.map +1 -0
- package/_cjs/chains/celo/serializers.js +131 -0
- package/_cjs/chains/celo/serializers.js.map +1 -0
- package/_cjs/chains/celo/types.js +3 -0
- package/_cjs/chains/celo/types.js.map +1 -0
- package/_cjs/chains/celo/utils.js +44 -0
- package/_cjs/chains/celo/utils.js.map +1 -0
- package/_cjs/chains/definitions/arbitrum.js +24 -0
- package/_cjs/chains/definitions/arbitrum.js.map +1 -0
- package/_cjs/chains/definitions/arbitrumGoerli.js +30 -0
- package/_cjs/chains/definitions/arbitrumGoerli.js.map +1 -0
- package/_cjs/chains/definitions/arbitrumNova.js +24 -0
- package/_cjs/chains/definitions/arbitrumNova.js.map +1 -0
- package/_cjs/chains/definitions/arbitrumSepolia.js +32 -0
- package/_cjs/chains/definitions/arbitrumSepolia.js.map +1 -0
- package/_cjs/chains/definitions/astar.js +29 -0
- package/_cjs/chains/definitions/astar.js.map +1 -0
- package/_cjs/chains/definitions/astarZkatana.js +42 -0
- package/_cjs/chains/definitions/astarZkatana.js.map +1 -0
- package/_cjs/chains/definitions/aurora.js +20 -0
- package/_cjs/chains/definitions/aurora.js.map +1 -0
- package/_cjs/chains/definitions/auroraTestnet.js +21 -0
- package/_cjs/chains/definitions/auroraTestnet.js.map +1 -0
- package/_cjs/chains/definitions/avalanche.js +26 -0
- package/_cjs/chains/definitions/avalanche.js.map +1 -0
- package/_cjs/chains/definitions/avalancheFuji.js +27 -0
- package/_cjs/chains/definitions/avalancheFuji.js.map +1 -0
- package/_cjs/chains/definitions/base.js +30 -0
- package/_cjs/chains/definitions/base.js.map +1 -0
- package/_cjs/chains/definitions/baseGoerli.js +30 -0
- package/_cjs/chains/definitions/baseGoerli.js.map +1 -0
- package/_cjs/chains/definitions/baseSepolia.js +34 -0
- package/_cjs/chains/definitions/baseSepolia.js.map +1 -0
- package/_cjs/chains/definitions/bearNetworkChainMainnet.js +20 -0
- package/_cjs/chains/definitions/bearNetworkChainMainnet.js.map +1 -0
- package/_cjs/chains/definitions/bearNetworkChainTestnet.js +24 -0
- package/_cjs/chains/definitions/bearNetworkChainTestnet.js.map +1 -0
- package/_cjs/chains/definitions/boba.js +26 -0
- package/_cjs/chains/definitions/boba.js.map +1 -0
- package/_cjs/chains/definitions/bronos.js +20 -0
- package/_cjs/chains/definitions/bronos.js.map +1 -0
- package/_cjs/chains/definitions/bronosTestnet.js +21 -0
- package/_cjs/chains/definitions/bronosTestnet.js.map +1 -0
- package/_cjs/chains/definitions/bsc.js +26 -0
- package/_cjs/chains/definitions/bsc.js.map +1 -0
- package/_cjs/chains/definitions/bscTestnet.js +27 -0
- package/_cjs/chains/definitions/bscTestnet.js.map +1 -0
- package/_cjs/chains/definitions/bxn.js +21 -0
- package/_cjs/chains/definitions/bxn.js.map +1 -0
- package/_cjs/chains/definitions/bxnTestnet.js +25 -0
- package/_cjs/chains/definitions/bxnTestnet.js.map +1 -0
- package/_cjs/chains/definitions/canto.js +29 -0
- package/_cjs/chains/definitions/canto.js.map +1 -0
- package/_cjs/chains/definitions/celo.js +32 -0
- package/_cjs/chains/definitions/celo.js.map +1 -0
- package/_cjs/chains/definitions/celoAlfajores.js +34 -0
- package/_cjs/chains/definitions/celoAlfajores.js.map +1 -0
- package/_cjs/chains/definitions/celoCannoli.js +34 -0
- package/_cjs/chains/definitions/celoCannoli.js.map +1 -0
- package/_cjs/chains/definitions/chiliz.js +26 -0
- package/_cjs/chains/definitions/chiliz.js.map +1 -0
- package/_cjs/chains/definitions/classic.js +23 -0
- package/_cjs/chains/definitions/classic.js.map +1 -0
- package/_cjs/chains/definitions/confluxESpace.js +27 -0
- package/_cjs/chains/definitions/confluxESpace.js.map +1 -0
- package/_cjs/chains/definitions/coreDao.js +27 -0
- package/_cjs/chains/definitions/coreDao.js.map +1 -0
- package/_cjs/chains/definitions/cronos.js +26 -0
- package/_cjs/chains/definitions/cronos.js.map +1 -0
- package/_cjs/chains/definitions/cronosTestnet.js +30 -0
- package/_cjs/chains/definitions/cronosTestnet.js.map +1 -0
- package/_cjs/chains/definitions/crossbell.js +28 -0
- package/_cjs/chains/definitions/crossbell.js.map +1 -0
- package/_cjs/chains/definitions/dfk.js +25 -0
- package/_cjs/chains/definitions/dfk.js.map +1 -0
- package/_cjs/chains/definitions/dogechain.js +23 -0
- package/_cjs/chains/definitions/dogechain.js.map +1 -0
- package/_cjs/chains/definitions/edgeware.js +26 -0
- package/_cjs/chains/definitions/edgeware.js.map +1 -0
- package/_cjs/chains/definitions/edgewareTestnet.js +23 -0
- package/_cjs/chains/definitions/edgewareTestnet.js.map +1 -0
- package/_cjs/chains/definitions/ekta.js +20 -0
- package/_cjs/chains/definitions/ekta.js.map +1 -0
- package/_cjs/chains/definitions/ektaTestnet.js +21 -0
- package/_cjs/chains/definitions/ektaTestnet.js.map +1 -0
- package/_cjs/chains/definitions/eon.js +24 -0
- package/_cjs/chains/definitions/eon.js.map +1 -0
- package/_cjs/chains/definitions/eos.js +29 -0
- package/_cjs/chains/definitions/eos.js.map +1 -0
- package/_cjs/chains/definitions/eosTestnet.js +30 -0
- package/_cjs/chains/definitions/eosTestnet.js.map +1 -0
- package/_cjs/chains/definitions/evmos.js +20 -0
- package/_cjs/chains/definitions/evmos.js.map +1 -0
- package/_cjs/chains/definitions/evmosTestnet.js +23 -0
- package/_cjs/chains/definitions/evmosTestnet.js.map +1 -0
- package/_cjs/chains/definitions/fantom.js +26 -0
- package/_cjs/chains/definitions/fantom.js.map +1 -0
- package/_cjs/chains/definitions/fantomTestnet.js +26 -0
- package/_cjs/chains/definitions/fantomTestnet.js.map +1 -0
- package/_cjs/chains/definitions/fibo.js +20 -0
- package/_cjs/chains/definitions/fibo.js.map +1 -0
- package/_cjs/chains/definitions/filecoin.js +20 -0
- package/_cjs/chains/definitions/filecoin.js.map +1 -0
- package/_cjs/chains/definitions/filecoinCalibration.js +20 -0
- package/_cjs/chains/definitions/filecoinCalibration.js.map +1 -0
- package/_cjs/chains/definitions/filecoinHyperspace.js +20 -0
- package/_cjs/chains/definitions/filecoinHyperspace.js.map +1 -0
- package/_cjs/chains/definitions/flare.js +23 -0
- package/_cjs/chains/definitions/flare.js.map +1 -0
- package/_cjs/chains/definitions/flareTestnet.js +24 -0
- package/_cjs/chains/definitions/flareTestnet.js.map +1 -0
- package/_cjs/chains/definitions/foundry.js +20 -0
- package/_cjs/chains/definitions/foundry.js.map +1 -0
- package/_cjs/chains/definitions/fuse.js +22 -0
- package/_cjs/chains/definitions/fuse.js.map +1 -0
- package/_cjs/chains/definitions/fuseSparknet.js +19 -0
- package/_cjs/chains/definitions/fuseSparknet.js.map +1 -0
- package/_cjs/chains/definitions/gnosis.js +32 -0
- package/_cjs/chains/definitions/gnosis.js.map +1 -0
- package/_cjs/chains/definitions/gnosisChiado.js +33 -0
- package/_cjs/chains/definitions/gnosisChiado.js.map +1 -0
- package/_cjs/chains/definitions/gobi.js +22 -0
- package/_cjs/chains/definitions/gobi.js.map +1 -0
- package/_cjs/chains/definitions/goerli.js +35 -0
- package/_cjs/chains/definitions/goerli.js.map +1 -0
- package/_cjs/chains/definitions/haqqMainnet.js +25 -0
- package/_cjs/chains/definitions/haqqMainnet.js.map +1 -0
- package/_cjs/chains/definitions/haqqTestedge2.js +25 -0
- package/_cjs/chains/definitions/haqqTestedge2.js.map +1 -0
- package/_cjs/chains/definitions/hardhat.js +17 -0
- package/_cjs/chains/definitions/hardhat.js.map +1 -0
- package/_cjs/chains/definitions/harmonyOne.js +26 -0
- package/_cjs/chains/definitions/harmonyOne.js.map +1 -0
- package/_cjs/chains/definitions/holesky.js +22 -0
- package/_cjs/chains/definitions/holesky.js.map +1 -0
- package/_cjs/chains/definitions/iotex.js +23 -0
- package/_cjs/chains/definitions/iotex.js.map +1 -0
- package/_cjs/chains/definitions/iotexTestnet.js +23 -0
- package/_cjs/chains/definitions/iotexTestnet.js.map +1 -0
- package/_cjs/chains/definitions/kava.js +29 -0
- package/_cjs/chains/definitions/kava.js.map +1 -0
- package/_cjs/chains/definitions/kavaTestnet.js +32 -0
- package/_cjs/chains/definitions/kavaTestnet.js.map +1 -0
- package/_cjs/chains/definitions/klaytn.js +20 -0
- package/_cjs/chains/definitions/klaytn.js.map +1 -0
- package/_cjs/chains/definitions/kroma.js +22 -0
- package/_cjs/chains/definitions/kroma.js.map +1 -0
- package/_cjs/chains/definitions/kromaSepolia.js +22 -0
- package/_cjs/chains/definitions/kromaSepolia.js.map +1 -0
- package/_cjs/chains/definitions/linea.js +29 -0
- package/_cjs/chains/definitions/linea.js.map +1 -0
- package/_cjs/chains/definitions/lineaTestnet.js +29 -0
- package/_cjs/chains/definitions/lineaTestnet.js.map +1 -0
- package/_cjs/chains/definitions/localhost.js +17 -0
- package/_cjs/chains/definitions/localhost.js.map +1 -0
- package/_cjs/chains/definitions/lukso.js +31 -0
- package/_cjs/chains/definitions/lukso.js.map +1 -0
- package/_cjs/chains/definitions/mainnet.js +34 -0
- package/_cjs/chains/definitions/mainnet.js.map +1 -0
- package/_cjs/chains/definitions/manta.js +35 -0
- package/_cjs/chains/definitions/manta.js.map +1 -0
- package/_cjs/chains/definitions/mantaTestnet.js +36 -0
- package/_cjs/chains/definitions/mantaTestnet.js.map +1 -0
- package/_cjs/chains/definitions/mantle.js +29 -0
- package/_cjs/chains/definitions/mantle.js.map +1 -0
- package/_cjs/chains/definitions/mantleTestnet.js +24 -0
- package/_cjs/chains/definitions/mantleTestnet.js.map +1 -0
- package/_cjs/chains/definitions/meter.js +20 -0
- package/_cjs/chains/definitions/meter.js.map +1 -0
- package/_cjs/chains/definitions/meterTestnet.js +23 -0
- package/_cjs/chains/definitions/meterTestnet.js.map +1 -0
- package/_cjs/chains/definitions/metis.js +29 -0
- package/_cjs/chains/definitions/metis.js.map +1 -0
- package/_cjs/chains/definitions/metisGoerli.js +29 -0
- package/_cjs/chains/definitions/metisGoerli.js.map +1 -0
- package/_cjs/chains/definitions/mev.js +31 -0
- package/_cjs/chains/definitions/mev.js.map +1 -0
- package/_cjs/chains/definitions/mevTestnet.js +32 -0
- package/_cjs/chains/definitions/mevTestnet.js.map +1 -0
- package/_cjs/chains/definitions/modeTestnet.js +28 -0
- package/_cjs/chains/definitions/modeTestnet.js.map +1 -0
- package/_cjs/chains/definitions/moonbaseAlpha.js +33 -0
- package/_cjs/chains/definitions/moonbaseAlpha.js.map +1 -0
- package/_cjs/chains/definitions/moonbeam.js +33 -0
- package/_cjs/chains/definitions/moonbeam.js.map +1 -0
- package/_cjs/chains/definitions/moonbeamDev.js +20 -0
- package/_cjs/chains/definitions/moonbeamDev.js.map +1 -0
- package/_cjs/chains/definitions/moonriver.js +33 -0
- package/_cjs/chains/definitions/moonriver.js.map +1 -0
- package/_cjs/chains/definitions/neonDevnet.js +28 -0
- package/_cjs/chains/definitions/neonDevnet.js.map +1 -0
- package/_cjs/chains/definitions/neonMainnet.js +27 -0
- package/_cjs/chains/definitions/neonMainnet.js.map +1 -0
- package/_cjs/chains/definitions/nexi.js +27 -0
- package/_cjs/chains/definitions/nexi.js.map +1 -0
- package/_cjs/chains/definitions/nexilix.js +26 -0
- package/_cjs/chains/definitions/nexilix.js.map +1 -0
- package/_cjs/chains/definitions/oasys.js +21 -0
- package/_cjs/chains/definitions/oasys.js.map +1 -0
- package/_cjs/chains/definitions/okc.js +26 -0
- package/_cjs/chains/definitions/okc.js.map +1 -0
- package/_cjs/chains/definitions/opBNB.js +26 -0
- package/_cjs/chains/definitions/opBNB.js.map +1 -0
- package/_cjs/chains/definitions/opBNBTestnet.js +27 -0
- package/_cjs/chains/definitions/opBNBTestnet.js.map +1 -0
- package/_cjs/chains/definitions/optimism.js +30 -0
- package/_cjs/chains/definitions/optimism.js.map +1 -0
- package/_cjs/chains/definitions/optimismGoerli.js +31 -0
- package/_cjs/chains/definitions/optimismGoerli.js.map +1 -0
- package/_cjs/chains/definitions/optimismSepolia.js +31 -0
- package/_cjs/chains/definitions/optimismSepolia.js.map +1 -0
- package/_cjs/chains/definitions/plinga.js +27 -0
- package/_cjs/chains/definitions/plinga.js.map +1 -0
- package/_cjs/chains/definitions/polygon.js +27 -0
- package/_cjs/chains/definitions/polygon.js.map +1 -0
- package/_cjs/chains/definitions/polygonMumbai.js +28 -0
- package/_cjs/chains/definitions/polygonMumbai.js.map +1 -0
- package/_cjs/chains/definitions/polygonZkEvm.js +27 -0
- package/_cjs/chains/definitions/polygonZkEvm.js.map +1 -0
- package/_cjs/chains/definitions/polygonZkEvmTestnet.js +28 -0
- package/_cjs/chains/definitions/polygonZkEvmTestnet.js.map +1 -0
- package/_cjs/chains/definitions/pulsechain.js +32 -0
- package/_cjs/chains/definitions/pulsechain.js.map +1 -0
- package/_cjs/chains/definitions/pulsechainV4.js +32 -0
- package/_cjs/chains/definitions/pulsechainV4.js.map +1 -0
- package/_cjs/chains/definitions/qMainnet.js +23 -0
- package/_cjs/chains/definitions/qMainnet.js.map +1 -0
- package/_cjs/chains/definitions/qTestnet.js +24 -0
- package/_cjs/chains/definitions/qTestnet.js.map +1 -0
- package/_cjs/chains/definitions/rollux.js +29 -0
- package/_cjs/chains/definitions/rollux.js.map +1 -0
- package/_cjs/chains/definitions/rolluxTestnet.js +32 -0
- package/_cjs/chains/definitions/rolluxTestnet.js.map +1 -0
- package/_cjs/chains/definitions/ronin.js +24 -0
- package/_cjs/chains/definitions/ronin.js.map +1 -0
- package/_cjs/chains/definitions/saigon.js +28 -0
- package/_cjs/chains/definitions/saigon.js.map +1 -0
- package/_cjs/chains/definitions/scroll.js +29 -0
- package/_cjs/chains/definitions/scroll.js.map +1 -0
- package/_cjs/chains/definitions/scrollSepolia.js +28 -0
- package/_cjs/chains/definitions/scrollSepolia.js.map +1 -0
- package/_cjs/chains/definitions/scrollTestnet.js +23 -0
- package/_cjs/chains/definitions/scrollTestnet.js.map +1 -0
- package/_cjs/chains/definitions/sepolia.js +33 -0
- package/_cjs/chains/definitions/sepolia.js.map +1 -0
- package/_cjs/chains/definitions/shardeumSphinx.js +22 -0
- package/_cjs/chains/definitions/shardeumSphinx.js.map +1 -0
- package/_cjs/chains/definitions/skale/brawl.js +23 -0
- package/_cjs/chains/definitions/skale/brawl.js.map +1 -0
- package/_cjs/chains/definitions/skale/calypso.js +30 -0
- package/_cjs/chains/definitions/skale/calypso.js.map +1 -0
- package/_cjs/chains/definitions/skale/calypsoTestnet.js +33 -0
- package/_cjs/chains/definitions/skale/calypsoTestnet.js.map +1 -0
- package/_cjs/chains/definitions/skale/chaosTestnet.js +33 -0
- package/_cjs/chains/definitions/skale/chaosTestnet.js.map +1 -0
- package/_cjs/chains/definitions/skale/cryptoBlades.js +25 -0
- package/_cjs/chains/definitions/skale/cryptoBlades.js.map +1 -0
- package/_cjs/chains/definitions/skale/cryptoColosseum.js +23 -0
- package/_cjs/chains/definitions/skale/cryptoColosseum.js.map +1 -0
- package/_cjs/chains/definitions/skale/europa.js +28 -0
- package/_cjs/chains/definitions/skale/europa.js.map +1 -0
- package/_cjs/chains/definitions/skale/europaTestnet.js +31 -0
- package/_cjs/chains/definitions/skale/europaTestnet.js.map +1 -0
- package/_cjs/chains/definitions/skale/exorde.js +23 -0
- package/_cjs/chains/definitions/skale/exorde.js.map +1 -0
- package/_cjs/chains/definitions/skale/humanProtocol.js +23 -0
- package/_cjs/chains/definitions/skale/humanProtocol.js.map +1 -0
- package/_cjs/chains/definitions/skale/nebula.js +28 -0
- package/_cjs/chains/definitions/skale/nebula.js.map +1 -0
- package/_cjs/chains/definitions/skale/nebulaTestnet.js +31 -0
- package/_cjs/chains/definitions/skale/nebulaTestnet.js.map +1 -0
- package/_cjs/chains/definitions/skale/razor.js +23 -0
- package/_cjs/chains/definitions/skale/razor.js.map +1 -0
- package/_cjs/chains/definitions/skale/titan.js +28 -0
- package/_cjs/chains/definitions/skale/titan.js.map +1 -0
- package/_cjs/chains/definitions/skale/titanTestnet.js +33 -0
- package/_cjs/chains/definitions/skale/titanTestnet.js.map +1 -0
- package/_cjs/chains/definitions/songbird.js +23 -0
- package/_cjs/chains/definitions/songbird.js.map +1 -0
- package/_cjs/chains/definitions/songbirdTestnet.js +24 -0
- package/_cjs/chains/definitions/songbirdTestnet.js.map +1 -0
- package/_cjs/chains/definitions/spicy.js +34 -0
- package/_cjs/chains/definitions/spicy.js.map +1 -0
- package/_cjs/chains/definitions/syscoin.js +29 -0
- package/_cjs/chains/definitions/syscoin.js.map +1 -0
- package/_cjs/chains/definitions/syscoinTestnet.js +29 -0
- package/_cjs/chains/definitions/syscoinTestnet.js.map +1 -0
- package/_cjs/chains/definitions/taikoJolnir.js +21 -0
- package/_cjs/chains/definitions/taikoJolnir.js.map +1 -0
- package/_cjs/chains/definitions/taikoTestnetSepolia.js +21 -0
- package/_cjs/chains/definitions/taikoTestnetSepolia.js.map +1 -0
- package/_cjs/chains/definitions/taraxa.js +21 -0
- package/_cjs/chains/definitions/taraxa.js.map +1 -0
- package/_cjs/chains/definitions/taraxaTestnet.js +22 -0
- package/_cjs/chains/definitions/taraxaTestnet.js.map +1 -0
- package/_cjs/chains/definitions/telos.js +29 -0
- package/_cjs/chains/definitions/telos.js.map +1 -0
- package/_cjs/chains/definitions/telosTestnet.js +24 -0
- package/_cjs/chains/definitions/telosTestnet.js.map +1 -0
- package/_cjs/chains/definitions/tenet.js +23 -0
- package/_cjs/chains/definitions/tenet.js.map +1 -0
- package/_cjs/chains/definitions/thunderTestnet.js +22 -0
- package/_cjs/chains/definitions/thunderTestnet.js.map +1 -0
- package/_cjs/chains/definitions/vechain.js +25 -0
- package/_cjs/chains/definitions/vechain.js.map +1 -0
- package/_cjs/chains/definitions/wanchain.js +30 -0
- package/_cjs/chains/definitions/wanchain.js.map +1 -0
- package/_cjs/chains/definitions/wanchainTestnet.js +28 -0
- package/_cjs/chains/definitions/wanchainTestnet.js.map +1 -0
- package/_cjs/chains/definitions/xdc.js +21 -0
- package/_cjs/chains/definitions/xdc.js.map +1 -0
- package/_cjs/chains/definitions/xdcTestnet.js +21 -0
- package/_cjs/chains/definitions/xdcTestnet.js.map +1 -0
- package/_cjs/chains/definitions/zetachainAthensTestnet.js +26 -0
- package/_cjs/chains/definitions/zetachainAthensTestnet.js.map +1 -0
- package/_cjs/chains/definitions/zhejiang.js +22 -0
- package/_cjs/chains/definitions/zhejiang.js.map +1 -0
- package/_cjs/chains/definitions/zkSync.js +34 -0
- package/_cjs/chains/definitions/zkSync.js.map +1 -0
- package/_cjs/chains/definitions/zkSyncTestnet.js +31 -0
- package/_cjs/chains/definitions/zkSyncTestnet.js.map +1 -0
- package/_cjs/chains/definitions/zora.js +32 -0
- package/_cjs/chains/definitions/zora.js.map +1 -0
- package/_cjs/chains/definitions/zoraSepolia.js +41 -0
- package/_cjs/chains/definitions/zoraSepolia.js.map +1 -0
- package/_cjs/chains/definitions/zoraTestnet.js +36 -0
- package/_cjs/chains/definitions/zoraTestnet.js.map +1 -0
- package/_cjs/chains/index.js +325 -0
- package/_cjs/chains/index.js.map +1 -0
- package/_cjs/chains/opStack/abis.js +77 -0
- package/_cjs/chains/opStack/abis.js.map +1 -0
- package/_cjs/chains/opStack/actions/estimateContractL1Fee.js +36 -0
- package/_cjs/chains/opStack/actions/estimateContractL1Fee.js.map +1 -0
- package/_cjs/chains/opStack/actions/estimateContractL1Gas.js +36 -0
- package/_cjs/chains/opStack/actions/estimateContractL1Gas.js.map +1 -0
- package/_cjs/chains/opStack/actions/estimateContractTotalFee.js +36 -0
- package/_cjs/chains/opStack/actions/estimateContractTotalFee.js.map +1 -0
- package/_cjs/chains/opStack/actions/estimateContractTotalGas.js +36 -0
- package/_cjs/chains/opStack/actions/estimateContractTotalGas.js.map +1 -0
- package/_cjs/chains/opStack/actions/estimateL1Fee.js +53 -0
- package/_cjs/chains/opStack/actions/estimateL1Fee.js.map +1 -0
- package/_cjs/chains/opStack/actions/estimateL1Gas.js +53 -0
- package/_cjs/chains/opStack/actions/estimateL1Gas.js.map +1 -0
- package/_cjs/chains/opStack/actions/estimateTotalFee.js +18 -0
- package/_cjs/chains/opStack/actions/estimateTotalFee.js.map +1 -0
- package/_cjs/chains/opStack/actions/estimateTotalGas.js +16 -0
- package/_cjs/chains/opStack/actions/estimateTotalGas.js.map +1 -0
- package/_cjs/chains/opStack/chainConfig.js +10 -0
- package/_cjs/chains/opStack/chainConfig.js.map +1 -0
- package/_cjs/chains/opStack/contracts.js +16 -0
- package/_cjs/chains/opStack/contracts.js.map +1 -0
- package/_cjs/chains/opStack/decorators/public.js +27 -0
- package/_cjs/chains/opStack/decorators/public.js.map +1 -0
- package/_cjs/chains/opStack/formatters.js +54 -0
- package/_cjs/chains/opStack/formatters.js.map +1 -0
- package/_cjs/chains/opStack/index.js +42 -0
- package/_cjs/chains/opStack/index.js.map +1 -0
- package/_cjs/chains/opStack/types.js +3 -0
- package/_cjs/chains/opStack/types.js.map +1 -0
- package/_cjs/chains/utils.js +12 -0
- package/_cjs/chains/utils.js.map +1 -0
- package/_cjs/chains/zksync/chainConfig.js +10 -0
- package/_cjs/chains/zksync/chainConfig.js.map +1 -0
- package/_cjs/chains/zksync/formatters.js +128 -0
- package/_cjs/chains/zksync/formatters.js.map +1 -0
- package/_cjs/chains/zksync/index.js +8 -0
- package/_cjs/chains/zksync/index.js.map +1 -0
- package/_cjs/chains/zksync/serializers.js +74 -0
- package/_cjs/chains/zksync/serializers.js.map +1 -0
- package/_cjs/chains/zksync/types.js +3 -0
- package/_cjs/chains/zksync/types.js.map +1 -0
- package/_cjs/clients/createClient.js +42 -0
- package/_cjs/clients/createClient.js.map +1 -0
- package/_cjs/clients/createPublicClient.js +17 -0
- package/_cjs/clients/createPublicClient.js.map +1 -0
- package/_cjs/clients/createTestClient.js +20 -0
- package/_cjs/clients/createTestClient.js.map +1 -0
- package/_cjs/clients/createWalletClient.js +18 -0
- package/_cjs/clients/createWalletClient.js.map +1 -0
- package/_cjs/clients/decorators/public.js +101 -0
- package/_cjs/clients/decorators/public.js.map +1 -0
- package/_cjs/clients/decorators/test.js +74 -0
- package/_cjs/clients/decorators/test.js.map +1 -0
- package/_cjs/clients/decorators/wallet.js +41 -0
- package/_cjs/clients/decorators/wallet.js.map +1 -0
- package/_cjs/clients/transports/createTransport.js +13 -0
- package/_cjs/clients/transports/createTransport.js.map +1 -0
- package/_cjs/clients/transports/custom.js +17 -0
- package/_cjs/clients/transports/custom.js.map +1 -0
- package/_cjs/clients/transports/fallback.js +122 -0
- package/_cjs/clients/transports/fallback.js.map +1 -0
- package/_cjs/clients/transports/http.js +59 -0
- package/_cjs/clients/transports/http.js.map +1 -0
- package/_cjs/clients/transports/webSocket.js +81 -0
- package/_cjs/clients/transports/webSocket.js.map +1 -0
- package/_cjs/constants/abis.js +1350 -0
- package/_cjs/constants/abis.js.map +1 -0
- package/_cjs/constants/address.js +5 -0
- package/_cjs/constants/address.js.map +1 -0
- package/_cjs/constants/bytes.js +5 -0
- package/_cjs/constants/bytes.js.map +1 -0
- package/_cjs/constants/contract.js +5 -0
- package/_cjs/constants/contract.js.map +1 -0
- package/_cjs/constants/contracts.js +5 -0
- package/_cjs/constants/contracts.js.map +1 -0
- package/_cjs/constants/number.js +101 -0
- package/_cjs/constants/number.js.map +1 -0
- package/_cjs/constants/solidity.js +35 -0
- package/_cjs/constants/solidity.js.map +1 -0
- package/_cjs/constants/strings.js +5 -0
- package/_cjs/constants/strings.js.map +1 -0
- package/_cjs/constants/unit.js +16 -0
- package/_cjs/constants/unit.js.map +1 -0
- package/_cjs/ens/index.js +20 -0
- package/_cjs/ens/index.js.map +1 -0
- package/_cjs/errors/abi.js +461 -0
- package/_cjs/errors/abi.js.map +1 -0
- package/_cjs/errors/account.js +23 -0
- package/_cjs/errors/account.js.map +1 -0
- package/_cjs/errors/address.js +17 -0
- package/_cjs/errors/address.js.map +1 -0
- package/_cjs/errors/base.js +83 -0
- package/_cjs/errors/base.js.map +1 -0
- package/_cjs/errors/block.js +22 -0
- package/_cjs/errors/block.js.map +1 -0
- package/_cjs/errors/ccip.js +69 -0
- package/_cjs/errors/ccip.js.map +1 -0
- package/_cjs/errors/chain.js +86 -0
- package/_cjs/errors/chain.js.map +1 -0
- package/_cjs/errors/contract.js +286 -0
- package/_cjs/errors/contract.js.map +1 -0
- package/_cjs/errors/cursor.js +29 -0
- package/_cjs/errors/cursor.js.map +1 -0
- package/_cjs/errors/data.js +31 -0
- package/_cjs/errors/data.js.map +1 -0
- package/_cjs/errors/encoding.js +65 -0
- package/_cjs/errors/encoding.js.map +1 -0
- package/_cjs/errors/ens.js +59 -0
- package/_cjs/errors/ens.js.map +1 -0
- package/_cjs/errors/estimateGas.js +49 -0
- package/_cjs/errors/estimateGas.js.map +1 -0
- package/_cjs/errors/fee.js +42 -0
- package/_cjs/errors/fee.js.map +1 -0
- package/_cjs/errors/log.js +17 -0
- package/_cjs/errors/log.js.map +1 -0
- package/_cjs/errors/node.js +262 -0
- package/_cjs/errors/node.js.map +1 -0
- package/_cjs/errors/request.js +107 -0
- package/_cjs/errors/request.js.map +1 -0
- package/_cjs/errors/rpc.js +448 -0
- package/_cjs/errors/rpc.js.map +1 -0
- package/_cjs/errors/transaction.js +225 -0
- package/_cjs/errors/transaction.js.map +1 -0
- package/_cjs/errors/transport.js +13 -0
- package/_cjs/errors/transport.js.map +1 -0
- package/_cjs/errors/version.js +1 -1
- package/_cjs/index.js +486 -0
- package/_cjs/index.js.map +1 -0
- package/_cjs/types/account.js +3 -0
- package/_cjs/types/account.js.map +1 -0
- package/_cjs/types/block.js +3 -0
- package/_cjs/types/block.js.map +1 -0
- package/_cjs/types/chain.js +3 -0
- package/_cjs/types/chain.js.map +1 -0
- package/_cjs/types/contract.js +3 -0
- package/_cjs/types/contract.js.map +1 -0
- package/_cjs/types/eip1193.js +24 -0
- package/_cjs/types/eip1193.js.map +1 -0
- package/_cjs/types/ens.js +3 -0
- package/_cjs/types/ens.js.map +1 -0
- package/_cjs/types/fee.js +3 -0
- package/_cjs/types/fee.js.map +1 -0
- package/_cjs/types/filter.js +3 -0
- package/_cjs/types/filter.js.map +1 -0
- package/_cjs/types/log.js +3 -0
- package/_cjs/types/log.js.map +1 -0
- package/_cjs/types/misc.js +3 -0
- package/_cjs/types/misc.js.map +1 -0
- package/_cjs/types/multicall.js +3 -0
- package/_cjs/types/multicall.js.map +1 -0
- package/_cjs/types/proof.js +3 -0
- package/_cjs/types/proof.js.map +1 -0
- package/_cjs/types/rpc.js +3 -0
- package/_cjs/types/rpc.js.map +1 -0
- package/_cjs/types/transaction.js +3 -0
- package/_cjs/types/transaction.js.map +1 -0
- package/_cjs/types/transport.js +3 -0
- package/_cjs/types/transport.js.map +1 -0
- package/_cjs/types/typedData.js +3 -0
- package/_cjs/types/typedData.js.map +1 -0
- package/_cjs/types/utils.js +3 -0
- package/_cjs/types/utils.js.map +1 -0
- package/_cjs/types/window.js +3 -0
- package/_cjs/types/window.js.map +1 -0
- package/_cjs/types/withdrawal.js +3 -0
- package/_cjs/types/withdrawal.js.map +1 -0
- package/_cjs/utils/abi/decodeAbiParameters.js +210 -0
- package/_cjs/utils/abi/decodeAbiParameters.js.map +1 -0
- package/_cjs/utils/abi/decodeDeployData.js +22 -0
- package/_cjs/utils/abi/decodeDeployData.js.map +1 -0
- package/_cjs/utils/abi/decodeErrorResult.js +30 -0
- package/_cjs/utils/abi/decodeErrorResult.js.map +1 -0
- package/_cjs/utils/abi/decodeEventLog.js +85 -0
- package/_cjs/utils/abi/decodeEventLog.js.map +1 -0
- package/_cjs/utils/abi/decodeFunctionData.js +28 -0
- package/_cjs/utils/abi/decodeFunctionData.js.map +1 -0
- package/_cjs/utils/abi/decodeFunctionResult.js +29 -0
- package/_cjs/utils/abi/decodeFunctionResult.js.map +1 -0
- package/_cjs/utils/abi/encodeAbiParameters.js +211 -0
- package/_cjs/utils/abi/encodeAbiParameters.js.map +1 -0
- package/_cjs/utils/abi/encodeDeployData.js +23 -0
- package/_cjs/utils/abi/encodeDeployData.js.map +1 -0
- package/_cjs/utils/abi/encodeErrorResult.js +33 -0
- package/_cjs/utils/abi/encodeErrorResult.js.map +1 -0
- package/_cjs/utils/abi/encodeEventTopics.js +53 -0
- package/_cjs/utils/abi/encodeEventTopics.js.map +1 -0
- package/_cjs/utils/abi/encodeFunctionData.js +34 -0
- package/_cjs/utils/abi/encodeFunctionData.js.map +1 -0
- package/_cjs/utils/abi/encodeFunctionResult.js +27 -0
- package/_cjs/utils/abi/encodeFunctionResult.js.map +1 -0
- package/_cjs/utils/abi/encodePacked.js +73 -0
- package/_cjs/utils/abi/encodePacked.js.map +1 -0
- package/_cjs/utils/abi/formatAbiItem.js +27 -0
- package/_cjs/utils/abi/formatAbiItem.js.map +1 -0
- package/_cjs/utils/abi/formatAbiItemWithArgs.js +17 -0
- package/_cjs/utils/abi/formatAbiItemWithArgs.js.map +1 -0
- package/_cjs/utils/abi/getAbiItem.js +84 -0
- package/_cjs/utils/abi/getAbiItem.js.map +1 -0
- package/_cjs/utils/accounts.js +8 -0
- package/_cjs/utils/accounts.js.map +1 -0
- package/_cjs/utils/address/getAddress.js +31 -0
- package/_cjs/utils/address/getAddress.js.map +1 -0
- package/_cjs/utils/address/getContractAddress.js +42 -0
- package/_cjs/utils/address/getContractAddress.js.map +1 -0
- package/_cjs/utils/address/isAddress.js +9 -0
- package/_cjs/utils/address/isAddress.js.map +1 -0
- package/_cjs/utils/address/isAddressEqual.js +14 -0
- package/_cjs/utils/address/isAddressEqual.js.map +1 -0
- package/_cjs/utils/buildRequest.js +93 -0
- package/_cjs/utils/buildRequest.js.map +1 -0
- package/_cjs/utils/ccip.js +121 -0
- package/_cjs/utils/ccip.js.map +1 -0
- package/_cjs/utils/chain/assertCurrentChain.js +12 -0
- package/_cjs/utils/chain/assertCurrentChain.js.map +1 -0
- package/_cjs/utils/chain/defineChain.js +13 -0
- package/_cjs/utils/chain/defineChain.js.map +1 -0
- package/_cjs/utils/chain/extractChain.js +8 -0
- package/_cjs/utils/chain/extractChain.js.map +1 -0
- package/_cjs/utils/chain/getChainContractAddress.js +26 -0
- package/_cjs/utils/chain/getChainContractAddress.js.map +1 -0
- package/_cjs/utils/cursor.js +134 -0
- package/_cjs/utils/cursor.js.map +1 -0
- package/_cjs/utils/data/concat.js +28 -0
- package/_cjs/utils/data/concat.js.map +1 -0
- package/_cjs/utils/data/isBytes.js +14 -0
- package/_cjs/utils/data/isBytes.js.map +1 -0
- package/_cjs/utils/data/isBytesEqual.js +13 -0
- package/_cjs/utils/data/isBytesEqual.js.map +1 -0
- package/_cjs/utils/data/isHex.js +12 -0
- package/_cjs/utils/data/isHex.js.map +1 -0
- package/_cjs/utils/data/pad.js +42 -0
- package/_cjs/utils/data/pad.js.map +1 -0
- package/_cjs/utils/data/size.js +11 -0
- package/_cjs/utils/data/size.js.map +1 -0
- package/_cjs/utils/data/slice.js +54 -0
- package/_cjs/utils/data/slice.js.map +1 -0
- package/_cjs/utils/data/trim.js +25 -0
- package/_cjs/utils/data/trim.js.map +1 -0
- package/_cjs/utils/encoding/fromBytes.js +56 -0
- package/_cjs/utils/encoding/fromBytes.js.map +1 -0
- package/_cjs/utils/encoding/fromHex.js +70 -0
- package/_cjs/utils/encoding/fromHex.js.map +1 -0
- package/_cjs/utils/encoding/fromRlp.js +67 -0
- package/_cjs/utils/encoding/fromRlp.js.map +1 -0
- package/_cjs/utils/encoding/toBytes.js +83 -0
- package/_cjs/utils/encoding/toBytes.js.map +1 -0
- package/_cjs/utils/encoding/toHex.js +79 -0
- package/_cjs/utils/encoding/toHex.js.map +1 -0
- package/_cjs/utils/encoding/toRlp.js +105 -0
- package/_cjs/utils/encoding/toRlp.js.map +1 -0
- package/_cjs/utils/ens/avatar/parseAvatarRecord.js +34 -0
- package/_cjs/utils/ens/avatar/parseAvatarRecord.js.map +1 -0
- package/_cjs/utils/ens/avatar/utils.js +186 -0
- package/_cjs/utils/ens/avatar/utils.js.map +1 -0
- package/_cjs/utils/ens/encodeLabelhash.js +8 -0
- package/_cjs/utils/ens/encodeLabelhash.js.map +1 -0
- package/_cjs/utils/ens/encodedLabelToLabelhash.js +18 -0
- package/_cjs/utils/ens/encodedLabelToLabelhash.js.map +1 -0
- package/_cjs/utils/ens/errors.js +24 -0
- package/_cjs/utils/ens/errors.js.map +1 -0
- package/_cjs/utils/ens/labelhash.js +15 -0
- package/_cjs/utils/ens/labelhash.js.map +1 -0
- package/_cjs/utils/ens/namehash.js +24 -0
- package/_cjs/utils/ens/namehash.js.map +1 -0
- package/_cjs/utils/ens/normalize.js +9 -0
- package/_cjs/utils/ens/normalize.js.map +1 -0
- package/_cjs/utils/ens/packetToBytes.js +27 -0
- package/_cjs/utils/ens/packetToBytes.js.map +1 -0
- package/_cjs/utils/errors/getCallError.js +20 -0
- package/_cjs/utils/errors/getCallError.js.map +1 -0
- package/_cjs/utils/errors/getContractError.js +39 -0
- package/_cjs/utils/errors/getContractError.js.map +1 -0
- package/_cjs/utils/errors/getEstimateGasError.js +20 -0
- package/_cjs/utils/errors/getEstimateGasError.js.map +1 -0
- package/_cjs/utils/errors/getNodeError.js +65 -0
- package/_cjs/utils/errors/getNodeError.js.map +1 -0
- package/_cjs/utils/errors/getTransactionError.js +20 -0
- package/_cjs/utils/errors/getTransactionError.js.map +1 -0
- package/_cjs/utils/filters/createFilterRequestScope.js +14 -0
- package/_cjs/utils/filters/createFilterRequestScope.js.map +1 -0
- package/_cjs/utils/formatters/block.js +32 -0
- package/_cjs/utils/formatters/block.js.map +1 -0
- package/_cjs/utils/formatters/extract.js +24 -0
- package/_cjs/utils/formatters/extract.js.map +1 -0
- package/_cjs/utils/formatters/feeHistory.js +13 -0
- package/_cjs/utils/formatters/feeHistory.js.map +1 -0
- package/_cjs/utils/formatters/formatter.js +25 -0
- package/_cjs/utils/formatters/formatter.js.map +1 -0
- package/_cjs/utils/formatters/log.js +18 -0
- package/_cjs/utils/formatters/log.js.map +1 -0
- package/_cjs/utils/formatters/proof.js +22 -0
- package/_cjs/utils/formatters/proof.js.map +1 -0
- package/_cjs/utils/formatters/transaction.js +66 -0
- package/_cjs/utils/formatters/transaction.js.map +1 -0
- package/_cjs/utils/formatters/transactionReceipt.js +47 -0
- package/_cjs/utils/formatters/transactionReceipt.js.map +1 -0
- package/_cjs/utils/formatters/transactionRequest.js +39 -0
- package/_cjs/utils/formatters/transactionRequest.js.map +1 -0
- package/_cjs/utils/getAction.js +8 -0
- package/_cjs/utils/getAction.js.map +1 -0
- package/_cjs/utils/hash/getEventSelector.js +10 -0
- package/_cjs/utils/hash/getEventSelector.js.map +1 -0
- package/_cjs/utils/hash/getEventSignature.js +9 -0
- package/_cjs/utils/hash/getEventSignature.js.map +1 -0
- package/_cjs/utils/hash/getFunctionSelector.js +11 -0
- package/_cjs/utils/hash/getFunctionSelector.js.map +1 -0
- package/_cjs/utils/hash/getFunctionSignature.js +15 -0
- package/_cjs/utils/hash/getFunctionSignature.js.map +1 -0
- package/_cjs/utils/hash/hashFunction.js +17 -0
- package/_cjs/utils/hash/hashFunction.js.map +1 -0
- package/_cjs/utils/hash/isHash.js +10 -0
- package/_cjs/utils/hash/isHash.js.map +1 -0
- package/_cjs/utils/hash/keccak256.js +16 -0
- package/_cjs/utils/hash/keccak256.js.map +1 -0
- package/_cjs/utils/hash/normalizeSignature.js +48 -0
- package/_cjs/utils/hash/normalizeSignature.js.map +1 -0
- package/_cjs/utils/index.js +213 -0
- package/_cjs/utils/index.js.map +1 -0
- package/_cjs/utils/observe.js +42 -0
- package/_cjs/utils/observe.js.map +1 -0
- package/_cjs/utils/poll.js +27 -0
- package/_cjs/utils/poll.js.map +1 -0
- package/_cjs/utils/promise/createBatchScheduler.js +49 -0
- package/_cjs/utils/promise/createBatchScheduler.js.map +1 -0
- package/_cjs/utils/promise/withCache.js +47 -0
- package/_cjs/utils/promise/withCache.js.map +1 -0
- package/_cjs/utils/promise/withRetry.js +29 -0
- package/_cjs/utils/promise/withRetry.js.map +1 -0
- package/_cjs/utils/promise/withTimeout.js +35 -0
- package/_cjs/utils/promise/withTimeout.js.map +1 -0
- package/_cjs/utils/regex.js +7 -0
- package/_cjs/utils/regex.js.map +1 -0
- package/_cjs/utils/rpc.js +154 -0
- package/_cjs/utils/rpc.js.map +1 -0
- package/_cjs/utils/signature/compactSignatureToHex.js +10 -0
- package/_cjs/utils/signature/compactSignatureToHex.js.map +1 -0
- package/_cjs/utils/signature/compactSignatureToSignature.js +15 -0
- package/_cjs/utils/signature/compactSignatureToSignature.js.map +1 -0
- package/_cjs/utils/signature/hashMessage.js +20 -0
- package/_cjs/utils/signature/hashMessage.js.map +1 -0
- package/_cjs/utils/signature/hashTypedData.js +124 -0
- package/_cjs/utils/signature/hashTypedData.js.map +1 -0
- package/_cjs/utils/signature/hexToCompactSignature.js +14 -0
- package/_cjs/utils/signature/hexToCompactSignature.js.map +1 -0
- package/_cjs/utils/signature/hexToSignature.js +12 -0
- package/_cjs/utils/signature/hexToSignature.js.map +1 -0
- package/_cjs/utils/signature/recoverAddress.js +10 -0
- package/_cjs/utils/signature/recoverAddress.js.map +1 -0
- package/_cjs/utils/signature/recoverMessageAddress.js +10 -0
- package/_cjs/utils/signature/recoverMessageAddress.js.map +1 -0
- package/_cjs/utils/signature/recoverPublicKey.js +21 -0
- package/_cjs/utils/signature/recoverPublicKey.js.map +1 -0
- package/_cjs/utils/signature/recoverTypedDataAddress.js +19 -0
- package/_cjs/utils/signature/recoverTypedDataAddress.js.map +1 -0
- package/_cjs/utils/signature/signatureToCompactSignature.js +17 -0
- package/_cjs/utils/signature/signatureToCompactSignature.js.map +1 -0
- package/_cjs/utils/signature/signatureToHex.js +11 -0
- package/_cjs/utils/signature/signatureToHex.js.map +1 -0
- package/_cjs/utils/signature/verifyMessage.js +11 -0
- package/_cjs/utils/signature/verifyMessage.js.map +1 -0
- package/_cjs/utils/signature/verifyTypedData.js +18 -0
- package/_cjs/utils/signature/verifyTypedData.js.map +1 -0
- package/_cjs/utils/stringify.js +9 -0
- package/_cjs/utils/stringify.js.map +1 -0
- package/_cjs/utils/transaction/assertRequest.js +28 -0
- package/_cjs/utils/transaction/assertRequest.js.map +1 -0
- package/_cjs/utils/transaction/assertTransaction.js +51 -0
- package/_cjs/utils/transaction/assertTransaction.js.map +1 -0
- package/_cjs/utils/transaction/getSerializedTransactionType.js +18 -0
- package/_cjs/utils/transaction/getSerializedTransactionType.js.map +1 -0
- package/_cjs/utils/transaction/getTransactionType.js +19 -0
- package/_cjs/utils/transaction/getTransactionType.js.map +1 -0
- package/_cjs/utils/transaction/parseTransaction.js +213 -0
- package/_cjs/utils/transaction/parseTransaction.js.map +1 -0
- package/_cjs/utils/transaction/serializeAccessList.js +26 -0
- package/_cjs/utils/transaction/serializeAccessList.js.map +1 -0
- package/_cjs/utils/transaction/serializeTransaction.js +123 -0
- package/_cjs/utils/transaction/serializeTransaction.js.map +1 -0
- package/_cjs/utils/typedData.js +75 -0
- package/_cjs/utils/typedData.js.map +1 -0
- package/_cjs/utils/uid.js +18 -0
- package/_cjs/utils/uid.js.map +1 -0
- package/_cjs/utils/unit/formatEther.js +10 -0
- package/_cjs/utils/unit/formatEther.js.map +1 -0
- package/_cjs/utils/unit/formatGwei.js +10 -0
- package/_cjs/utils/unit/formatGwei.js.map +1 -0
- package/_cjs/utils/unit/formatUnits.js +18 -0
- package/_cjs/utils/unit/formatUnits.js.map +1 -0
- package/_cjs/utils/unit/parseEther.js +10 -0
- package/_cjs/utils/unit/parseEther.js.map +1 -0
- package/_cjs/utils/unit/parseGwei.js +10 -0
- package/_cjs/utils/unit/parseGwei.js.map +1 -0
- package/_cjs/utils/unit/parseUnits.js +38 -0
- package/_cjs/utils/unit/parseUnits.js.map +1 -0
- package/_cjs/utils/wait.js +8 -0
- package/_cjs/utils/wait.js.map +1 -0
- package/_cjs/window/index.js +4 -0
- package/_cjs/window/index.js.map +1 -0
- package/_esm/actions/test/dumpState.js +26 -0
- package/_esm/actions/test/dumpState.js.map +1 -0
- package/_esm/actions/test/loadState.js +27 -0
- package/_esm/actions/test/loadState.js.map +1 -0
- package/_esm/chains/celo/formatters.js.map +1 -1
- package/_esm/chains/definitions/chiliz.js +23 -0
- package/_esm/chains/definitions/chiliz.js.map +1 -0
- package/_esm/chains/definitions/lukso.js +28 -0
- package/_esm/chains/definitions/lukso.js.map +1 -0
- package/_esm/chains/definitions/spicy.js +31 -0
- package/_esm/chains/definitions/spicy.js.map +1 -0
- package/_esm/chains/index.js +3 -0
- package/_esm/chains/index.js.map +1 -1
- package/_esm/chains/opStack/decorators/public.js +1 -1
- package/_esm/chains/opStack/index.js +1 -1
- package/_esm/clients/decorators/test.js +4 -0
- package/_esm/clients/decorators/test.js.map +1 -1
- package/_esm/constants/bytes.js +2 -0
- package/_esm/constants/bytes.js.map +1 -0
- package/_esm/constants/strings.js +2 -0
- package/_esm/constants/strings.js.map +1 -0
- package/_esm/errors/node.js +22 -11
- package/_esm/errors/node.js.map +1 -1
- package/_esm/errors/rpc.js +36 -18
- package/_esm/errors/rpc.js.map +1 -1
- package/_esm/errors/version.js +1 -1
- package/_esm/index.js +2 -0
- package/_esm/index.js.map +1 -1
- package/_esm/utils/formatters/transaction.js +19 -1
- package/_esm/utils/formatters/transaction.js.map +1 -1
- package/_esm/utils/signature/hashMessage.js +2 -1
- package/_esm/utils/signature/hashMessage.js.map +1 -1
- package/_esm/utils/transaction/serializeTransaction.js +20 -6
- package/_esm/utils/transaction/serializeTransaction.js.map +1 -1
- package/_types/actions/test/dumpState.d.ts +31 -0
- package/_types/actions/test/dumpState.d.ts.map +1 -0
- package/_types/actions/test/loadState.d.ts +34 -0
- package/_types/actions/test/loadState.d.ts.map +1 -0
- package/_types/chains/celo/chainConfig.d.ts +167 -137
- package/_types/chains/celo/chainConfig.d.ts.map +1 -1
- package/_types/chains/celo/formatters.d.ts +167 -137
- package/_types/chains/celo/formatters.d.ts.map +1 -1
- package/_types/chains/celo/types.d.ts +2 -0
- package/_types/chains/celo/types.d.ts.map +1 -1
- package/_types/chains/definitions/base.d.ts +129 -111
- package/_types/chains/definitions/base.d.ts.map +1 -1
- package/_types/chains/definitions/baseGoerli.d.ts +129 -111
- package/_types/chains/definitions/baseGoerli.d.ts.map +1 -1
- package/_types/chains/definitions/baseSepolia.d.ts +129 -111
- package/_types/chains/definitions/baseSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/celo.d.ts +167 -137
- package/_types/chains/definitions/celo.d.ts.map +1 -1
- package/_types/chains/definitions/celoAlfajores.d.ts +167 -137
- package/_types/chains/definitions/celoAlfajores.d.ts.map +1 -1
- package/_types/chains/definitions/celoCannoli.d.ts +167 -137
- package/_types/chains/definitions/celoCannoli.d.ts.map +1 -1
- package/_types/chains/definitions/chiliz.d.ts +35 -0
- package/_types/chains/definitions/chiliz.d.ts.map +1 -0
- package/_types/chains/definitions/lukso.d.ts +40 -0
- package/_types/chains/definitions/lukso.d.ts.map +1 -0
- package/_types/chains/definitions/optimism.d.ts +129 -111
- package/_types/chains/definitions/optimism.d.ts.map +1 -1
- package/_types/chains/definitions/optimismGoerli.d.ts +129 -111
- package/_types/chains/definitions/optimismGoerli.d.ts.map +1 -1
- package/_types/chains/definitions/optimismSepolia.d.ts +129 -111
- package/_types/chains/definitions/optimismSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/spicy.d.ts +36 -0
- package/_types/chains/definitions/spicy.d.ts.map +1 -0
- package/_types/chains/definitions/zkSync.d.ts +11 -0
- package/_types/chains/definitions/zkSync.d.ts.map +1 -1
- package/_types/chains/definitions/zkSyncTestnet.d.ts +11 -0
- package/_types/chains/definitions/zkSyncTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/zora.d.ts +129 -111
- package/_types/chains/definitions/zora.d.ts.map +1 -1
- package/_types/chains/definitions/zoraSepolia.d.ts +129 -111
- package/_types/chains/definitions/zoraSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/zoraTestnet.d.ts +129 -111
- package/_types/chains/definitions/zoraTestnet.d.ts.map +1 -1
- package/_types/chains/index.d.ts +5 -1
- package/_types/chains/index.d.ts.map +1 -1
- package/_types/chains/opStack/chainConfig.d.ts +125 -107
- package/_types/chains/opStack/chainConfig.d.ts.map +1 -1
- package/_types/chains/opStack/decorators/public.d.ts +18 -18
- package/_types/chains/opStack/formatters.d.ts +125 -107
- package/_types/chains/opStack/formatters.d.ts.map +1 -1
- package/_types/chains/opStack/index.d.ts +1 -1
- package/_types/chains/zksync/chainConfig.d.ts +11 -0
- package/_types/chains/zksync/chainConfig.d.ts.map +1 -1
- package/_types/chains/zksync/formatters.d.ts +11 -0
- package/_types/chains/zksync/formatters.d.ts.map +1 -1
- package/_types/clients/decorators/test.d.ts +41 -0
- package/_types/clients/decorators/test.d.ts.map +1 -1
- package/_types/constants/bytes.d.ts +2 -0
- package/_types/constants/bytes.d.ts.map +1 -0
- package/_types/constants/strings.d.ts +2 -0
- package/_types/constants/strings.d.ts.map +1 -0
- package/_types/errors/version.d.ts +1 -1
- package/_types/index.d.ts +2 -0
- package/_types/index.d.ts.map +1 -1
- package/_types/types/eip1193.d.ts +16 -0
- package/_types/types/eip1193.d.ts.map +1 -1
- package/_types/types/rpc.d.ts +2 -2
- package/_types/types/rpc.d.ts.map +1 -1
- package/_types/types/transaction.d.ts +10 -1
- package/_types/types/transaction.d.ts.map +1 -1
- package/_types/types/utils.d.ts +16 -0
- package/_types/types/utils.d.ts.map +1 -1
- package/_types/utils/formatters/transaction.d.ts +1 -1
- package/_types/utils/formatters/transaction.d.ts.map +1 -1
- package/_types/utils/formatters/transactionRequest.d.ts +1 -1
- package/_types/utils/signature/hashMessage.d.ts.map +1 -1
- package/_types/utils/transaction/serializeTransaction.d.ts.map +1 -1
- package/actions/test/dumpState.ts +44 -0
- package/actions/test/loadState.ts +47 -0
- package/chains/celo/formatters.ts +0 -1
- package/chains/celo/types.ts +2 -0
- package/chains/definitions/chiliz.ts +23 -0
- package/chains/definitions/lukso.ts +28 -0
- package/chains/definitions/spicy.ts +31 -0
- package/chains/index.ts +21 -3
- package/chains/opStack/decorators/public.ts +19 -19
- package/chains/opStack/index.ts +1 -1
- package/clients/decorators/test.ts +50 -0
- package/constants/bytes.ts +2 -0
- package/constants/strings.ts +1 -0
- package/errors/version.ts +1 -1
- package/index.ts +2 -0
- package/package.json +34 -11
- package/types/eip1193.ts +16 -0
- package/types/rpc.ts +10 -5
- package/types/transaction.ts +10 -1
- package/types/utils.ts +20 -0
- package/utils/formatters/transaction.ts +20 -3
- package/utils/signature/hashMessage.ts +2 -1
- package/utils/transaction/serializeTransaction.ts +18 -12
@@ -0,0 +1,53 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.estimateL1Fee = void 0;
|
4
|
+
const getChainId_js_1 = require("../../../actions/public/getChainId.js");
|
5
|
+
const readContract_js_1 = require("../../../actions/public/readContract.js");
|
6
|
+
const prepareTransactionRequest_js_1 = require("../../../actions/wallet/prepareTransactionRequest.js");
|
7
|
+
const number_js_1 = require("../../../constants/number.js");
|
8
|
+
const getChainContractAddress_js_1 = require("../../../utils/chain/getChainContractAddress.js");
|
9
|
+
const toHex_js_1 = require("../../../utils/encoding/toHex.js");
|
10
|
+
const assertRequest_js_1 = require("../../../utils/transaction/assertRequest.js");
|
11
|
+
const serializeTransaction_js_1 = require("../../../utils/transaction/serializeTransaction.js");
|
12
|
+
const abis_js_1 = require("../abis.js");
|
13
|
+
const contracts_js_1 = require("../contracts.js");
|
14
|
+
const stubSignature = {
|
15
|
+
r: (0, toHex_js_1.numberToHex)(number_js_1.maxInt256),
|
16
|
+
s: (0, toHex_js_1.numberToHex)(number_js_1.maxInt256),
|
17
|
+
v: 28n,
|
18
|
+
};
|
19
|
+
async function estimateL1Fee(client, args) {
|
20
|
+
const { chain = client.chain, gasPriceOracleAddress: gasPriceOracleAddress_, } = args;
|
21
|
+
const gasPriceOracleAddress = (() => {
|
22
|
+
if (gasPriceOracleAddress_)
|
23
|
+
return gasPriceOracleAddress_;
|
24
|
+
if (chain)
|
25
|
+
return (0, getChainContractAddress_js_1.getChainContractAddress)({
|
26
|
+
chain,
|
27
|
+
contract: 'gasPriceOracle',
|
28
|
+
});
|
29
|
+
return contracts_js_1.contracts.gasPriceOracle.address;
|
30
|
+
})();
|
31
|
+
const [request, chainId] = await Promise.all([
|
32
|
+
(0, prepareTransactionRequest_js_1.prepareTransactionRequest)(client, args),
|
33
|
+
(async () => {
|
34
|
+
if (chain)
|
35
|
+
return chain.id;
|
36
|
+
return (0, getChainId_js_1.getChainId)(client);
|
37
|
+
})(),
|
38
|
+
]);
|
39
|
+
(0, assertRequest_js_1.assertRequest)(request);
|
40
|
+
const transaction = (0, serializeTransaction_js_1.serializeTransaction)({
|
41
|
+
...request,
|
42
|
+
chainId,
|
43
|
+
type: 'eip1559',
|
44
|
+
}, stubSignature);
|
45
|
+
return (0, readContract_js_1.readContract)(client, {
|
46
|
+
abi: abis_js_1.gasPriceOracleAbi,
|
47
|
+
address: gasPriceOracleAddress,
|
48
|
+
functionName: 'getL1Fee',
|
49
|
+
args: [transaction],
|
50
|
+
});
|
51
|
+
}
|
52
|
+
exports.estimateL1Fee = estimateL1Fee;
|
53
|
+
//# sourceMappingURL=estimateL1Fee.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"estimateL1Fee.js","sourceRoot":"","sources":["../../../../chains/opStack/actions/estimateL1Fee.ts"],"names":[],"mappings":";;;AAEA,yEAAkE;AAClE,6EAGgD;AAChD,uGAI6D;AAG7D,4DAAwD;AAOxD,gGAAyF;AAEzF,+DAA8D;AAC9D,kFAGoD;AACpD,gGAG2D;AAC3D,wCAA8C;AAC9C,kDAA2C;AAwB3C,MAAM,aAAa,GAAG;IACpB,CAAC,EAAE,IAAA,sBAAW,EAAC,qBAAS,CAAC;IACzB,CAAC,EAAE,IAAA,sBAAW,EAAC,qBAAS,CAAC;IACzB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3
|
+
exports.estimateL1Gas = void 0;
|
4
|
+
const getChainId_js_1 = require("../../../actions/public/getChainId.js");
|
5
|
+
const readContract_js_1 = require("../../../actions/public/readContract.js");
|
6
|
+
const prepareTransactionRequest_js_1 = require("../../../actions/wallet/prepareTransactionRequest.js");
|
7
|
+
const number_js_1 = require("../../../constants/number.js");
|
8
|
+
const getChainContractAddress_js_1 = require("../../../utils/chain/getChainContractAddress.js");
|
9
|
+
const toHex_js_1 = require("../../../utils/encoding/toHex.js");
|
10
|
+
const assertRequest_js_1 = require("../../../utils/transaction/assertRequest.js");
|
11
|
+
const serializeTransaction_js_1 = require("../../../utils/transaction/serializeTransaction.js");
|
12
|
+
const abis_js_1 = require("../abis.js");
|
13
|
+
const contracts_js_1 = require("../contracts.js");
|
14
|
+
const stubSignature = {
|
15
|
+
r: (0, toHex_js_1.numberToHex)(number_js_1.maxInt256),
|
16
|
+
s: (0, toHex_js_1.numberToHex)(number_js_1.maxInt256),
|
17
|
+
v: 28n,
|
18
|
+
};
|
19
|
+
async function estimateL1Gas(client, args) {
|
20
|
+
const { chain = client.chain, gasPriceOracleAddress: gasPriceOracleAddress_, } = args;
|
21
|
+
const gasPriceOracleAddress = (() => {
|
22
|
+
if (gasPriceOracleAddress_)
|
23
|
+
return gasPriceOracleAddress_;
|
24
|
+
if (chain)
|
25
|
+
return (0, getChainContractAddress_js_1.getChainContractAddress)({
|
26
|
+
chain,
|
27
|
+
contract: 'gasPriceOracle',
|
28
|
+
});
|
29
|
+
return contracts_js_1.contracts.gasPriceOracle.address;
|
30
|
+
})();
|
31
|
+
const [request, chainId] = await Promise.all([
|
32
|
+
(0, prepareTransactionRequest_js_1.prepareTransactionRequest)(client, args),
|
33
|
+
(async () => {
|
34
|
+
if (chain)
|
35
|
+
return chain.id;
|
36
|
+
return (0, getChainId_js_1.getChainId)(client);
|
37
|
+
})(),
|
38
|
+
]);
|
39
|
+
(0, assertRequest_js_1.assertRequest)(request);
|
40
|
+
const transaction = (0, serializeTransaction_js_1.serializeTransaction)({
|
41
|
+
...request,
|
42
|
+
chainId,
|
43
|
+
type: 'eip1559',
|
44
|
+
}, stubSignature);
|
45
|
+
return (0, readContract_js_1.readContract)(client, {
|
46
|
+
abi: abis_js_1.gasPriceOracleAbi,
|
47
|
+
address: gasPriceOracleAddress,
|
48
|
+
functionName: 'getL1GasUsed',
|
49
|
+
args: [transaction],
|
50
|
+
});
|
51
|
+
}
|
52
|
+
exports.estimateL1Gas = estimateL1Gas;
|
53
|
+
//# sourceMappingURL=estimateL1Gas.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"estimateL1Gas.js","sourceRoot":"","sources":["../../../../chains/opStack/actions/estimateL1Gas.ts"],"names":[],"mappings":";;;AAEA,yEAAkE;AAClE,6EAGgD;AAChD,uGAI6D;AAG7D,4DAAwD;AAOxD,gGAAyF;AAEzF,+DAA8D;AAC9D,kFAGoD;AACpD,gGAG2D;AAC3D,wCAA8C;AAC9C,kDAA2C;AAwB3C,MAAM,aAAa,GAAG;IACpB,CAAC,EAAE,IAAA,sBAAW,EAAC,qBAAS,CAAC;IACzB,CAAC,EAAE,IAAA,sBAAW,EAAC,qBAAS,CAAC;IACzB,CAAC,EAAE,GAAG;CACsB,CAAA;AAwBvB,KAAK,UAAU,aAAa,CAKjC,MAA2C,EAC3C,IAA+D;IAE/D,MAAM,EACJ,KAAK,GAAG,MAAM,CAAC,KAAK,EACpB,qBAAqB,EAAE,sBAAsB,GAC9C,GAAG,IAAI,CAAA;IAER,MAAM,qBAAqB,GAAG,CAAC,GAAG,EAAE;QAClC,IAAI,sBAAsB;YAAE,OAAO,sBAAsB,CAAA;QACzD,IAAI,KAAK;YACP,OAAO,IAAA,oDAAuB,EAAC;gBAC7B,KAAK;gBACL,QAAQ,EAAE,gBAAgB;aAC3B,CAAC,CAAA;QACJ,OAAO,wBAAS,CAAC,cAAc,CAAC,OAAO,CAAA;IACzC,CAAC,CAAC,EAAE,CAAA;IAGJ,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAC3C,IAAA,wDAAyB,EACvB,MAAM,EACN,IAA2C,CAC5C;QACD,CAAC,KAAK,IAAI,EAAE;YACV,IAAI,KAAK;gBAAE,OAAO,KAAK,CAAC,EAAE,CAAA;YAC1B,OAAO,IAAA,0BAAU,EAAC,MAAM,CAAC,CAAA;QAC3B,CAAC,CAAC,EAAE;KACL,CAAC,CAAA;IAEF,IAAA,gCAAa,EAAC,OAAO,CAAC,CAAA;IAEtB,MAAM,WAAW,GAAG,IAAA,8CAAoB,EACtC;QACE,GAAG,OAAO;QACV,OAAO;QACP,IAAI,EAAE,SAAS;KAChB,EACD,aAAa,CACd,CAAA;IAED,OAAO,IAAA,8BAAY,EAAC,MAAM,EAAE;QAC1B,GAAG,EAAE,2BAAiB;QACtB,OAAO,EAAE,qBAAqB;QAC9B,YAAY,EAAE,cAAc;QAC5B,IAAI,EAAE,CAAC,WAAW,CAAC;KACpB,CAAC,CAAA;AACJ,CAAC;AApDD,sCAoDC"}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.estimateTotalFee = void 0;
|
4
|
+
const estimateGas_js_1 = require("../../../actions/public/estimateGas.js");
|
5
|
+
const getGasPrice_js_1 = require("../../../actions/public/getGasPrice.js");
|
6
|
+
const prepareTransactionRequest_js_1 = require("../../../actions/wallet/prepareTransactionRequest.js");
|
7
|
+
const estimateL1Fee_js_1 = require("./estimateL1Fee.js");
|
8
|
+
async function estimateTotalFee(client, args) {
|
9
|
+
const request = await (0, prepareTransactionRequest_js_1.prepareTransactionRequest)(client, args);
|
10
|
+
const [l1Fee, l2Gas, l2GasPrice] = await Promise.all([
|
11
|
+
(0, estimateL1Fee_js_1.estimateL1Fee)(client, request),
|
12
|
+
(0, estimateGas_js_1.estimateGas)(client, request),
|
13
|
+
(0, getGasPrice_js_1.getGasPrice)(client),
|
14
|
+
]);
|
15
|
+
return l1Fee + l2Gas * l2GasPrice;
|
16
|
+
}
|
17
|
+
exports.estimateTotalFee = estimateTotalFee;
|
18
|
+
//# sourceMappingURL=estimateTotalFee.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"estimateTotalFee.js","sourceRoot":"","sources":["../../../../chains/opStack/actions/estimateTotalFee.ts"],"names":[],"mappings":";;;AAAA,2EAI+C;AAC/C,2EAG+C;AAC/C,uGAI6D;AAO7D,yDAI2B;AAwCpB,KAAK,UAAU,gBAAgB,CAKpC,MAA2C,EAC3C,IAAkE;IAGlE,MAAM,OAAO,GAAG,MAAM,IAAA,wDAAyB,EAC7C,MAAM,EACN,IAA2C,CAC5C,CAAA;IAED,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,UAAU,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACnD,IAAA,gCAAa,EAAC,MAAM,EAAE,OAAkC,CAAC;QACzD,IAAA,4BAAW,EAAC,MAAM,EAAE,OAAgC,CAAC;QACrD,IAAA,4BAAW,EAAC,MAAM,CAAC;KACpB,CAAC,CAAA;IAEF,OAAO,KAAK,GAAG,KAAK,GAAG,UAAU,CAAA;AACnC,CAAC;AArBD,4CAqBC"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.estimateTotalGas = void 0;
|
4
|
+
const estimateGas_js_1 = require("../../../actions/public/estimateGas.js");
|
5
|
+
const prepareTransactionRequest_js_1 = require("../../../actions/wallet/prepareTransactionRequest.js");
|
6
|
+
const estimateL1Gas_js_1 = require("./estimateL1Gas.js");
|
7
|
+
async function estimateTotalGas(client, args) {
|
8
|
+
const request = await (0, prepareTransactionRequest_js_1.prepareTransactionRequest)(client, args);
|
9
|
+
const [l1Gas, l2Gas] = await Promise.all([
|
10
|
+
(0, estimateL1Gas_js_1.estimateL1Gas)(client, request),
|
11
|
+
(0, estimateGas_js_1.estimateGas)(client, request),
|
12
|
+
]);
|
13
|
+
return l1Gas + l2Gas;
|
14
|
+
}
|
15
|
+
exports.estimateTotalGas = estimateTotalGas;
|
16
|
+
//# sourceMappingURL=estimateTotalGas.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"estimateTotalGas.js","sourceRoot":"","sources":["../../../../chains/opStack/actions/estimateTotalGas.ts"],"names":[],"mappings":";;;AAAA,2EAI+C;AAC/C,uGAI6D;AAO7D,yDAI2B;AAuCpB,KAAK,UAAU,gBAAgB,CAKpC,MAA2C,EAC3C,IAAkE;IAGlE,MAAM,OAAO,GAAG,MAAM,IAAA,wDAAyB,EAC7C,MAAM,EACN,IAA2C,CAC5C,CAAA;IAED,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACvC,IAAA,gCAAa,EAAC,MAAM,EAAE,OAAkC,CAAC;QACzD,IAAA,4BAAW,EAAC,MAAM,EAAE,OAAgC,CAAC;KACtD,CAAC,CAAA;IAEF,OAAO,KAAK,GAAG,KAAK,CAAA;AACtB,CAAC;AApBD,4CAoBC"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.chainConfig = void 0;
|
4
|
+
const contracts_js_1 = require("./contracts.js");
|
5
|
+
const formatters_js_1 = require("./formatters.js");
|
6
|
+
exports.chainConfig = {
|
7
|
+
contracts: contracts_js_1.contracts,
|
8
|
+
formatters: formatters_js_1.formatters,
|
9
|
+
};
|
10
|
+
//# sourceMappingURL=chainConfig.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"chainConfig.js","sourceRoot":"","sources":["../../../chains/opStack/chainConfig.ts"],"names":[],"mappings":";;;AAAA,iDAA0C;AAC1C,mDAA4C;AAE/B,QAAA,WAAW,GAAG;IACzB,SAAS,EAAT,wBAAS;IACT,UAAU,EAAV,0BAAU;CACF,CAAA"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.contracts = void 0;
|
4
|
+
exports.contracts = {
|
5
|
+
gasPriceOracle: { address: '0x420000000000000000000000000000000000000F' },
|
6
|
+
l1Block: { address: '0x4200000000000000000000000000000000000015' },
|
7
|
+
l2CrossDomainMessenger: {
|
8
|
+
address: '0x4200000000000000000000000000000000000007',
|
9
|
+
},
|
10
|
+
l2Erc721Bridge: { address: '0x4200000000000000000000000000000000000014' },
|
11
|
+
l2StandardBridge: { address: '0x4200000000000000000000000000000000000010' },
|
12
|
+
l2ToL1MessagePasser: {
|
13
|
+
address: '0x4200000000000000000000000000000000000016',
|
14
|
+
},
|
15
|
+
};
|
16
|
+
//# sourceMappingURL=contracts.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../../../chains/opStack/contracts.ts"],"names":[],"mappings":";;;AAEa,QAAA,SAAS,GAAG;IACvB,cAAc,EAAE,EAAE,OAAO,EAAE,4CAA4C,EAAE;IACzE,OAAO,EAAE,EAAE,OAAO,EAAE,4CAA4C,EAAE;IAClE,sBAAsB,EAAE;QACtB,OAAO,EAAE,4CAA4C;KACtD;IACD,cAAc,EAAE,EAAE,OAAO,EAAE,4CAA4C,EAAE;IACzE,gBAAgB,EAAE,EAAE,OAAO,EAAE,4CAA4C,EAAE;IAC3E,mBAAmB,EAAE;QACnB,OAAO,EAAE,4CAA4C;KACtD;CACoC,CAAA"}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.publicActionsL2 = void 0;
|
4
|
+
const estimateContractL1Fee_js_1 = require("../actions/estimateContractL1Fee.js");
|
5
|
+
const estimateContractL1Gas_js_1 = require("../actions/estimateContractL1Gas.js");
|
6
|
+
const estimateContractTotalFee_js_1 = require("../actions/estimateContractTotalFee.js");
|
7
|
+
const estimateContractTotalGas_js_1 = require("../actions/estimateContractTotalGas.js");
|
8
|
+
const estimateL1Fee_js_1 = require("../actions/estimateL1Fee.js");
|
9
|
+
const estimateL1Gas_js_1 = require("../actions/estimateL1Gas.js");
|
10
|
+
const estimateTotalFee_js_1 = require("../actions/estimateTotalFee.js");
|
11
|
+
const estimateTotalGas_js_1 = require("../actions/estimateTotalGas.js");
|
12
|
+
function publicActionsL2() {
|
13
|
+
return (client) => {
|
14
|
+
return {
|
15
|
+
estimateContractL1Fee: (args) => (0, estimateContractL1Fee_js_1.estimateContractL1Fee)(client, args),
|
16
|
+
estimateContractL1Gas: (args) => (0, estimateContractL1Gas_js_1.estimateContractL1Gas)(client, args),
|
17
|
+
estimateContractTotalFee: (args) => (0, estimateContractTotalFee_js_1.estimateContractTotalFee)(client, args),
|
18
|
+
estimateContractTotalGas: (args) => (0, estimateContractTotalGas_js_1.estimateContractTotalGas)(client, args),
|
19
|
+
estimateL1Fee: (args) => (0, estimateL1Fee_js_1.estimateL1Fee)(client, args),
|
20
|
+
estimateL1Gas: (args) => (0, estimateL1Gas_js_1.estimateL1Gas)(client, args),
|
21
|
+
estimateTotalFee: (args) => (0, estimateTotalFee_js_1.estimateTotalFee)(client, args),
|
22
|
+
estimateTotalGas: (args) => (0, estimateTotalGas_js_1.estimateTotalGas)(client, args),
|
23
|
+
};
|
24
|
+
};
|
25
|
+
}
|
26
|
+
exports.publicActionsL2 = publicActionsL2;
|
27
|
+
//# sourceMappingURL=public.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"public.js","sourceRoot":"","sources":["../../../../chains/opStack/decorators/public.ts"],"names":[],"mappings":";;;AASA,kFAI4C;AAC5C,kFAI4C;AAC5C,wFAI+C;AAC/C,wFAI+C;AAC/C,kEAIoC;AACpC,kEAIoC;AACpC,wEAIuC;AACvC,wEAIuC;AA4QvC,SAAgB,eAAe;IAC7B,OAAO,CAIL,MAA2C,EACR,EAAE;QACrC,OAAO;YACL,qBAAqB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,gDAAqB,EAAC,MAAM,EAAE,IAAI,CAAC;YACpE,qBAAqB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,gDAAqB,EAAC,MAAM,EAAE,IAAI,CAAC;YACpE,wBAAwB,EAAE,CAAC,IAAI,EAAE,EAAE,CACjC,IAAA,sDAAwB,EAAC,MAAM,EAAE,IAAI,CAAC;YACxC,wBAAwB,EAAE,CAAC,IAAI,EAAE,EAAE,CACjC,IAAA,sDAAwB,EAAC,MAAM,EAAE,IAAI,CAAC;YACxC,aAAa,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,gCAAa,EAAC,MAAM,EAAE,IAAI,CAAC;YACpD,aAAa,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,gCAAa,EAAC,MAAM,EAAE,IAAI,CAAC;YACpD,gBAAgB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,sCAAgB,EAAC,MAAM,EAAE,IAAI,CAAC;YAC1D,gBAAgB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,sCAAgB,EAAC,MAAM,EAAE,IAAI,CAAC;SAC3D,CAAA;IACH,CAAC,CAAA;AACH,CAAC;AApBD,0CAoBC"}
|
@@ -0,0 +1,54 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.formatters = void 0;
|
4
|
+
const fromHex_js_1 = require("../../utils/encoding/fromHex.js");
|
5
|
+
const block_js_1 = require("../../utils/formatters/block.js");
|
6
|
+
const transaction_js_1 = require("../../utils/formatters/transaction.js");
|
7
|
+
const transactionReceipt_js_1 = require("../../utils/formatters/transactionReceipt.js");
|
8
|
+
exports.formatters = {
|
9
|
+
block: (0, block_js_1.defineBlock)({
|
10
|
+
format(args) {
|
11
|
+
const transactions = args.transactions?.map((transaction) => {
|
12
|
+
if (typeof transaction === 'string')
|
13
|
+
return transaction;
|
14
|
+
const formatted = (0, transaction_js_1.formatTransaction)(transaction);
|
15
|
+
if (formatted.typeHex === '0x7e') {
|
16
|
+
formatted.isSystemTx = transaction.isSystemTx;
|
17
|
+
formatted.mint = transaction.mint
|
18
|
+
? (0, fromHex_js_1.hexToBigInt)(transaction.mint)
|
19
|
+
: undefined;
|
20
|
+
formatted.sourceHash = transaction.sourceHash;
|
21
|
+
formatted.type = 'deposit';
|
22
|
+
}
|
23
|
+
return formatted;
|
24
|
+
});
|
25
|
+
return {
|
26
|
+
transactions,
|
27
|
+
stateRoot: args.stateRoot,
|
28
|
+
};
|
29
|
+
},
|
30
|
+
}),
|
31
|
+
transaction: (0, transaction_js_1.defineTransaction)({
|
32
|
+
format(args) {
|
33
|
+
const transaction = {};
|
34
|
+
if (args.type === '0x7e') {
|
35
|
+
transaction.isSystemTx = args.isSystemTx;
|
36
|
+
transaction.mint = args.mint ? (0, fromHex_js_1.hexToBigInt)(args.mint) : undefined;
|
37
|
+
transaction.sourceHash = args.sourceHash;
|
38
|
+
transaction.type = 'deposit';
|
39
|
+
}
|
40
|
+
return transaction;
|
41
|
+
},
|
42
|
+
}),
|
43
|
+
transactionReceipt: (0, transactionReceipt_js_1.defineTransactionReceipt)({
|
44
|
+
format(args) {
|
45
|
+
return {
|
46
|
+
l1GasPrice: args.l1GasPrice ? (0, fromHex_js_1.hexToBigInt)(args.l1GasPrice) : null,
|
47
|
+
l1GasUsed: args.l1GasUsed ? (0, fromHex_js_1.hexToBigInt)(args.l1GasUsed) : null,
|
48
|
+
l1Fee: args.l1Fee ? (0, fromHex_js_1.hexToBigInt)(args.l1Fee) : null,
|
49
|
+
l1FeeScalar: args.l1FeeScalar ? Number(args.l1FeeScalar) : null,
|
50
|
+
};
|
51
|
+
},
|
52
|
+
}),
|
53
|
+
};
|
54
|
+
//# sourceMappingURL=formatters.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"formatters.js","sourceR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CAAC,CAAC,CAAC,SAAS,CAAA;gBACjE,WAAW,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAA;gBACxC,WAAW,CAAC,IAAI,GAAG,SAAS,CAAA;aAC7B;YACD,OAAO,WAAW,CAAA;QACpB,CAAC;KACF,CAAC;IACF,kBAAkB,EAAgB,IAAA,gDAAwB,EAAC;QACzD,MAAM,CACJ,IAA2C;YAE3C,OAAO;gBACL,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,IAAA,wBAAW,EAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI;gBACjE,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAA,wBAAW,EAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI;gBAC9D,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAA,wBAAW,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"}
|
@@ -0,0 +1,42 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.zoraTestnet = exports.zoraSepolia = exports.zora = exports.optimismSepolia = exports.optimismGoerli = exports.optimism = exports.baseSepolia = exports.baseGoerli = exports.base = exports.publicActionsL2 = exports.chainConfig = exports.estimateTotalGas = exports.estimateTotalFee = exports.estimateL1Gas = exports.estimateL1Fee = exports.estimateContractTotalGas = exports.estimateContractTotalFee = exports.estimateContractL1Gas = exports.estimateContractL1Fee = void 0;
|
4
|
+
var estimateContractL1Fee_js_1 = require("./actions/estimateContractL1Fee.js");
|
5
|
+
Object.defineProperty(exports, "estimateContractL1Fee", { enumerable: true, get: function () { return estimateContractL1Fee_js_1.estimateContractL1Fee; } });
|
6
|
+
var estimateContractL1Gas_js_1 = require("./actions/estimateContractL1Gas.js");
|
7
|
+
Object.defineProperty(exports, "estimateContractL1Gas", { enumerable: true, get: function () { return estimateContractL1Gas_js_1.estimateContractL1Gas; } });
|
8
|
+
var estimateContractTotalFee_js_1 = require("./actions/estimateContractTotalFee.js");
|
9
|
+
Object.defineProperty(exports, "estimateContractTotalFee", { enumerable: true, get: function () { return estimateContractTotalFee_js_1.estimateContractTotalFee; } });
|
10
|
+
var estimateContractTotalGas_js_1 = require("./actions/estimateContractTotalGas.js");
|
11
|
+
Object.defineProperty(exports, "estimateContractTotalGas", { enumerable: true, get: function () { return estimateContractTotalGas_js_1.estimateContractTotalGas; } });
|
12
|
+
var estimateL1Fee_js_1 = require("./actions/estimateL1Fee.js");
|
13
|
+
Object.defineProperty(exports, "estimateL1Fee", { enumerable: true, get: function () { return estimateL1Fee_js_1.estimateL1Fee; } });
|
14
|
+
var estimateL1Gas_js_1 = require("./actions/estimateL1Gas.js");
|
15
|
+
Object.defineProperty(exports, "estimateL1Gas", { enumerable: true, get: function () { return estimateL1Gas_js_1.estimateL1Gas; } });
|
16
|
+
var estimateTotalFee_js_1 = require("./actions/estimateTotalFee.js");
|
17
|
+
Object.defineProperty(exports, "estimateTotalFee", { enumerable: true, get: function () { return estimateTotalFee_js_1.estimateTotalFee; } });
|
18
|
+
var estimateTotalGas_js_1 = require("./actions/estimateTotalGas.js");
|
19
|
+
Object.defineProperty(exports, "estimateTotalGas", { enumerable: true, get: function () { return estimateTotalGas_js_1.estimateTotalGas; } });
|
20
|
+
var chainConfig_js_1 = require("./chainConfig.js");
|
21
|
+
Object.defineProperty(exports, "chainConfig", { enumerable: true, get: function () { return chainConfig_js_1.chainConfig; } });
|
22
|
+
var public_js_1 = require("./decorators/public.js");
|
23
|
+
Object.defineProperty(exports, "publicActionsL2", { enumerable: true, get: function () { return public_js_1.publicActionsL2; } });
|
24
|
+
var base_js_1 = require("../definitions/base.js");
|
25
|
+
Object.defineProperty(exports, "base", { enumerable: true, get: function () { return base_js_1.base; } });
|
26
|
+
var baseGoerli_js_1 = require("../definitions/baseGoerli.js");
|
27
|
+
Object.defineProperty(exports, "baseGoerli", { enumerable: true, get: function () { return baseGoerli_js_1.baseGoerli; } });
|
28
|
+
var baseSepolia_js_1 = require("../definitions/baseSepolia.js");
|
29
|
+
Object.defineProperty(exports, "baseSepolia", { enumerable: true, get: function () { return baseSepolia_js_1.baseSepolia; } });
|
30
|
+
var optimism_js_1 = require("../definitions/optimism.js");
|
31
|
+
Object.defineProperty(exports, "optimism", { enumerable: true, get: function () { return optimism_js_1.optimism; } });
|
32
|
+
var optimismGoerli_js_1 = require("../definitions/optimismGoerli.js");
|
33
|
+
Object.defineProperty(exports, "optimismGoerli", { enumerable: true, get: function () { return optimismGoerli_js_1.optimismGoerli; } });
|
34
|
+
var optimismSepolia_js_1 = require("../definitions/optimismSepolia.js");
|
35
|
+
Object.defineProperty(exports, "optimismSepolia", { enumerable: true, get: function () { return optimismSepolia_js_1.optimismSepolia; } });
|
36
|
+
var zora_js_1 = require("../definitions/zora.js");
|
37
|
+
Object.defineProperty(exports, "zora", { enumerable: true, get: function () { return zora_js_1.zora; } });
|
38
|
+
var zoraSepolia_js_1 = require("../definitions/zoraSepolia.js");
|
39
|
+
Object.defineProperty(exports, "zoraSepolia", { enumerable: true, get: function () { return zoraSepolia_js_1.zoraSepolia; } });
|
40
|
+
var zoraTestnet_js_1 = require("../definitions/zoraTestnet.js");
|
41
|
+
Object.defineProperty(exports, "zoraTestnet", { enumerable: true, get: function () { return zoraTestnet_js_1.zoraTestnet; } });
|
42
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../chains/opStack/index.ts"],"names":[],"mappings":";;;AAAA,+EAK2C;AAJzC,iIAAA,qBAAqB,OAAA;AAKvB,+EAK2C;AAJzC,iIAAA,qBAAqB,OAAA;AAKvB,qFAK8C;AAJ5C,uIAAA,wBAAwB,OAAA;AAK1B,qFAK8C;AAJ5C,uIAAA,wBAAwB,OAAA;AAK1B,+DAKmC;AAJjC,iHAAA,aAAa,OAAA;AAKf,+DAKmC;AAJjC,iHAAA,aAAa,OAAA;AAKf,qEAKsC;AAJpC,uHAAA,gBAAgB,OAAA;AAKlB,qEAKsC;AAJpC,uHAAA,gBAAgB,OAAA;AAMlB,mDAA8C;AAArC,6GAAA,WAAW,OAAA;AAEpB,oDAAwD;AAA/C,4GAAA,eAAe,OAAA;AAExB,kDAA6C;AAApC,+FAAA,IAAI,OAAA;AACb,8DAAyD;AAAhD,2GAAA,UAAU,OAAA;AACnB,gEAA2D;AAAlD,6GAAA,WAAW,OAAA;AACpB,0DAAqD;AAA5C,uGAAA,QAAQ,OAAA;AACjB,sEAAiE;AAAxD,mHAAA,cAAc,OAAA;AACvB,wEAAmE;AAA1D,qHAAA,eAAe,OAAA;AACxB,kDAA6C;AAApC,+FAAA,IAAI,OAAA;AACb,gEAA2D;AAAlD,6GAAA,WAAW,OAAA;AACpB,gEAA2D;AAAlD,6GAAA,WAAW,OAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../chains/opStack/types.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.getChainContractAddress = exports.extractChain = exports.defineChain = exports.assertCurrentChain = void 0;
|
4
|
+
var assertCurrentChain_js_1 = require("../utils/chain/assertCurrentChain.js");
|
5
|
+
Object.defineProperty(exports, "assertCurrentChain", { enumerable: true, get: function () { return assertCurrentChain_js_1.assertCurrentChain; } });
|
6
|
+
var defineChain_js_1 = require("../utils/chain/defineChain.js");
|
7
|
+
Object.defineProperty(exports, "defineChain", { enumerable: true, get: function () { return defineChain_js_1.defineChain; } });
|
8
|
+
var extractChain_js_1 = require("../utils/chain/extractChain.js");
|
9
|
+
Object.defineProperty(exports, "extractChain", { enumerable: true, get: function () { return extractChain_js_1.extractChain; } });
|
10
|
+
var getChainContractAddress_js_1 = require("../utils/chain/getChainContractAddress.js");
|
11
|
+
Object.defineProperty(exports, "getChainContractAddress", { enumerable: true, get: function () { return getChainContractAddress_js_1.getChainContractAddress; } });
|
12
|
+
//# sourceMappingURL=utils.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../chains/utils.ts"],"names":[],"mappings":";;;AAAA,8EAI6C;AAD3C,2HAAA,kBAAkB,OAAA;AAEpB,gEAA2D;AAAlD,6GAAA,WAAW,OAAA;AACpB,kEAKuC;AADrC,+GAAA,YAAY,OAAA;AAEd,wFAGkD;AADhD,qIAAA,uBAAuB,OAAA"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.chainConfig = void 0;
|
4
|
+
const formatters_js_1 = require("./formatters.js");
|
5
|
+
const serializers_js_1 = require("./serializers.js");
|
6
|
+
exports.chainConfig = {
|
7
|
+
formatters: formatters_js_1.formatters,
|
8
|
+
serializers: serializers_js_1.serializers,
|
9
|
+
};
|
10
|
+
//# sourceMappingURL=chainConfig.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"chainConfig.js","sourceRoot":"","sources":["../../../chains/zksync/chainConfig.ts"],"names":[],"mappings":";;;AAAA,mDAA4C;AAC5C,qDAA8C;AAEjC,QAAA,WAAW,GAAG;IACzB,UAAU,EAAV,0BAAU;IACV,WAAW,EAAX,4BAAW;CACH,CAAA"}
|
@@ -0,0 +1,128 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.formatters = void 0;
|
4
|
+
const fromHex_js_1 = require("../../utils/encoding/fromHex.js");
|
5
|
+
const toBytes_js_1 = require("../../utils/encoding/toBytes.js");
|
6
|
+
const toHex_js_1 = require("../../utils/encoding/toHex.js");
|
7
|
+
const block_js_1 = require("../../utils/formatters/block.js");
|
8
|
+
const log_js_1 = require("../../utils/formatters/log.js");
|
9
|
+
const transaction_js_1 = require("../../utils/formatters/transaction.js");
|
10
|
+
const transactionReceipt_js_1 = require("../../utils/formatters/transactionReceipt.js");
|
11
|
+
const transactionRequest_js_1 = require("../../utils/formatters/transactionRequest.js");
|
12
|
+
exports.formatters = {
|
13
|
+
block: (0, block_js_1.defineBlock)({
|
14
|
+
format(args) {
|
15
|
+
const transactions = args.transactions?.map((transaction) => {
|
16
|
+
if (typeof transaction === 'string')
|
17
|
+
return transaction;
|
18
|
+
const formatted = exports.formatters.transaction.format(transaction);
|
19
|
+
if (formatted.typeHex === '0x71')
|
20
|
+
formatted.type = 'eip712';
|
21
|
+
else if (formatted.typeHex === '0xff')
|
22
|
+
formatted.type = 'priority';
|
23
|
+
return formatted;
|
24
|
+
});
|
25
|
+
return {
|
26
|
+
l1BatchNumber: args.l1BatchNumber
|
27
|
+
? (0, fromHex_js_1.hexToBigInt)(args.l1BatchNumber)
|
28
|
+
: null,
|
29
|
+
l1BatchTimestamp: args.l1BatchTimestamp
|
30
|
+
? (0, fromHex_js_1.hexToBigInt)(args.l1BatchTimestamp)
|
31
|
+
: null,
|
32
|
+
transactions,
|
33
|
+
};
|
34
|
+
},
|
35
|
+
}),
|
36
|
+
transaction: (0, transaction_js_1.defineTransaction)({
|
37
|
+
format(args) {
|
38
|
+
const transaction = {};
|
39
|
+
if (args.type === '0x71')
|
40
|
+
transaction.type = 'eip712';
|
41
|
+
else if (args.type === '0xff')
|
42
|
+
transaction.type = 'priority';
|
43
|
+
return {
|
44
|
+
...transaction,
|
45
|
+
l1BatchNumber: args.l1BatchNumber
|
46
|
+
? (0, fromHex_js_1.hexToBigInt)(args.l1BatchNumber)
|
47
|
+
: null,
|
48
|
+
l1BatchTxIndex: args.l1BatchTxIndex
|
49
|
+
? (0, fromHex_js_1.hexToBigInt)(args.l1BatchTxIndex)
|
50
|
+
: null,
|
51
|
+
};
|
52
|
+
},
|
53
|
+
}),
|
54
|
+
transactionReceipt: (0, transactionReceipt_js_1.defineTransactionReceipt)({
|
55
|
+
format(args) {
|
56
|
+
return {
|
57
|
+
l1BatchNumber: args.l1BatchNumber
|
58
|
+
? (0, fromHex_js_1.hexToBigInt)(args.l1BatchNumber)
|
59
|
+
: null,
|
60
|
+
l1BatchTxIndex: args.l1BatchTxIndex
|
61
|
+
? (0, fromHex_js_1.hexToBigInt)(args.l1BatchTxIndex)
|
62
|
+
: null,
|
63
|
+
logs: args.logs.map((log) => {
|
64
|
+
return {
|
65
|
+
...(0, log_js_1.formatLog)(log),
|
66
|
+
l1BatchNumber: log.l1BatchNumber
|
67
|
+
? (0, fromHex_js_1.hexToBigInt)(log.l1BatchNumber)
|
68
|
+
: null,
|
69
|
+
transactionLogIndex: (0, fromHex_js_1.hexToNumber)(log.transactionLogIndex),
|
70
|
+
logType: log.logType,
|
71
|
+
};
|
72
|
+
}),
|
73
|
+
l2ToL1Logs: args.l2ToL1Logs.map((l2ToL1Log) => {
|
74
|
+
return {
|
75
|
+
blockNumber: (0, fromHex_js_1.hexToBigInt)(l2ToL1Log.blockHash),
|
76
|
+
blockHash: l2ToL1Log.blockHash,
|
77
|
+
l1BatchNumber: (0, fromHex_js_1.hexToBigInt)(l2ToL1Log.l1BatchNumber),
|
78
|
+
transactionIndex: (0, fromHex_js_1.hexToBigInt)(l2ToL1Log.transactionIndex),
|
79
|
+
shardId: (0, fromHex_js_1.hexToBigInt)(l2ToL1Log.shardId),
|
80
|
+
isService: l2ToL1Log.isService,
|
81
|
+
sender: l2ToL1Log.sender,
|
82
|
+
key: l2ToL1Log.key,
|
83
|
+
value: l2ToL1Log.value,
|
84
|
+
transactionHash: l2ToL1Log.transactionHash,
|
85
|
+
logIndex: (0, fromHex_js_1.hexToBigInt)(l2ToL1Log.logIndex),
|
86
|
+
};
|
87
|
+
}),
|
88
|
+
};
|
89
|
+
},
|
90
|
+
}),
|
91
|
+
transactionRequest: (0, transactionRequest_js_1.defineTransactionRequest)({
|
92
|
+
exclude: [
|
93
|
+
'customSignature',
|
94
|
+
'factoryDeps',
|
95
|
+
'gasPerPubdata',
|
96
|
+
'paymaster',
|
97
|
+
'paymasterInput',
|
98
|
+
],
|
99
|
+
format(args) {
|
100
|
+
if (args.gasPerPubdata ||
|
101
|
+
(args.paymaster && args.paymasterInput) ||
|
102
|
+
args.factoryDeps ||
|
103
|
+
args.customSignature)
|
104
|
+
return {
|
105
|
+
eip712Meta: {
|
106
|
+
...(args.gasPerPubdata
|
107
|
+
? { gasPerPubdata: (0, toHex_js_1.toHex)(args.gasPerPubdata) }
|
108
|
+
: {}),
|
109
|
+
...(args.paymaster && args.paymasterInput
|
110
|
+
? {
|
111
|
+
paymasterParams: {
|
112
|
+
paymaster: args.paymaster,
|
113
|
+
paymasterInput: Array.from((0, toBytes_js_1.hexToBytes)(args.paymasterInput)),
|
114
|
+
},
|
115
|
+
}
|
116
|
+
: {}),
|
117
|
+
...(args.factoryDeps ? { factoryDeps: args.factoryDeps } : {}),
|
118
|
+
...(args.customSignature
|
119
|
+
? { customSignature: args.customSignature }
|
120
|
+
: {}),
|
121
|
+
},
|
122
|
+
type: args.type === 'eip712' ? '0x71' : '0xff',
|
123
|
+
};
|
124
|
+
return {};
|
125
|
+
},
|
126
|
+
}),
|
127
|
+
};
|
128
|
+
//# sourceMappingURL=formatters.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"formatters.js","sourceRoot":"","sources":["../../../chains/zksync/formatters.ts"],"names":[],"mappings":";;;AAEA,gEAA0E;AAC1E,gEAA4D;AAC5D,4DAAqD;AACrD,8DAA6D;AAC7D,0DAAyD;AACzD,0EAAyE;AACzE,wFAAuF;AACvF,wFAAuF;AAc1E,QAAA,UAAU,GAAG;IACxB,KAAK,EAAgB,IAAA,sBAAW,EAAC;QAC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C9D,GAAG,CAAC,IAAI,CAAC,eAAe;4BACtB,CAAC,CAAC,EAAE,eAAe,EAAE,IAAI,CAAC,eAAe,EAAE;4BAC3C,CAAC,CAAC,EAAE,CAAC;qBACR;oBACD,IAAI,EAAE,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM;iBAChB,CAAA;YAClC,OAAO,EAAiC,CAAA;QAC1C,CAAC;KACF,CAAC;CACgC,CAAA"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.serializeTransaction = exports.chainConfig = void 0;
|
4
|
+
var chainConfig_js_1 = require("./chainConfig.js");
|
5
|
+
Object.defineProperty(exports, "chainConfig", { enumerable: true, get: function () { return chainConfig_js_1.chainConfig; } });
|
6
|
+
var serializers_js_1 = require("./serializers.js");
|
7
|
+
Object.defineProperty(exports, "serializeTransaction", { enumerable: true, get: function () { return serializers_js_1.serializeTransaction; } });
|
8
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../chains/zksync/index.ts"],"names":[],"mappings":";;;AAAA,mDAA8C;AAArC,6GAAA,WAAW,OAAA;AAEpB,mDAAuD;AAA9C,sHAAA,oBAAoB,OAAA"}
|
@@ -0,0 +1,74 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.assertTransactionEIP712 = exports.serializers = exports.serializeTransaction = void 0;
|
4
|
+
const address_js_1 = require("../../errors/address.js");
|
5
|
+
const base_js_1 = require("../../errors/base.js");
|
6
|
+
const chain_js_1 = require("../../errors/chain.js");
|
7
|
+
const isAddress_js_1 = require("../../utils/address/isAddress.js");
|
8
|
+
const concat_js_1 = require("../../utils/data/concat.js");
|
9
|
+
const toHex_js_1 = require("../../utils/encoding/toHex.js");
|
10
|
+
const toRlp_js_1 = require("../../utils/encoding/toRlp.js");
|
11
|
+
const serializeTransaction_js_1 = require("../../utils/transaction/serializeTransaction.js");
|
12
|
+
const serializeTransaction = (tx, signature) => {
|
13
|
+
if (isEIP712(tx))
|
14
|
+
return serializeTransactionEIP712(tx);
|
15
|
+
return (0, serializeTransaction_js_1.serializeTransaction)(tx, signature);
|
16
|
+
};
|
17
|
+
exports.serializeTransaction = serializeTransaction;
|
18
|
+
exports.serializers = {
|
19
|
+
transaction: exports.serializeTransaction,
|
20
|
+
};
|
21
|
+
function serializeTransactionEIP712(transaction) {
|
22
|
+
const { chainId, gas, nonce, to, from, value, maxFeePerGas, maxPriorityFeePerGas, customSignature, factoryDeps, paymaster, paymasterInput, gasPerPubdata, data, } = transaction;
|
23
|
+
assertTransactionEIP712(transaction);
|
24
|
+
const serializedTransaction = [
|
25
|
+
nonce ? (0, toHex_js_1.toHex)(nonce) : '0x',
|
26
|
+
maxPriorityFeePerGas ? (0, toHex_js_1.toHex)(maxPriorityFeePerGas) : '0x',
|
27
|
+
maxFeePerGas ? (0, toHex_js_1.toHex)(maxFeePerGas) : '0x',
|
28
|
+
gas ? (0, toHex_js_1.toHex)(gas) : '0x',
|
29
|
+
to ?? '0x',
|
30
|
+
value ? (0, toHex_js_1.toHex)(value) : '0x',
|
31
|
+
data ?? '0x',
|
32
|
+
(0, toHex_js_1.toHex)(chainId),
|
33
|
+
(0, toHex_js_1.toHex)(''),
|
34
|
+
(0, toHex_js_1.toHex)(''),
|
35
|
+
(0, toHex_js_1.toHex)(chainId),
|
36
|
+
from ?? '0x',
|
37
|
+
gasPerPubdata ? (0, toHex_js_1.toHex)(gasPerPubdata) : '0x',
|
38
|
+
factoryDeps ?? [],
|
39
|
+
customSignature ?? '0x',
|
40
|
+
paymaster && paymasterInput ? [paymaster, paymasterInput] : [],
|
41
|
+
];
|
42
|
+
return (0, concat_js_1.concatHex)([
|
43
|
+
'0x71',
|
44
|
+
(0, toRlp_js_1.toRlp)(serializedTransaction),
|
45
|
+
]);
|
46
|
+
}
|
47
|
+
function isEIP712(transaction) {
|
48
|
+
if ('customSignature' in transaction ||
|
49
|
+
'paymaster' in transaction ||
|
50
|
+
'paymasterInput' in transaction ||
|
51
|
+
'gasPerPubdata' in transaction ||
|
52
|
+
'factoryDeps' in transaction)
|
53
|
+
return true;
|
54
|
+
return false;
|
55
|
+
}
|
56
|
+
function assertTransactionEIP712(transaction) {
|
57
|
+
const { chainId, to, from, paymaster, paymasterInput } = transaction;
|
58
|
+
if (chainId <= 0)
|
59
|
+
throw new chain_js_1.InvalidChainIdError({ chainId });
|
60
|
+
if (to && !(0, isAddress_js_1.isAddress)(to))
|
61
|
+
throw new address_js_1.InvalidAddressError({ address: to });
|
62
|
+
if (from && !(0, isAddress_js_1.isAddress)(from))
|
63
|
+
throw new address_js_1.InvalidAddressError({ address: from });
|
64
|
+
if (paymaster && !(0, isAddress_js_1.isAddress)(paymaster))
|
65
|
+
throw new address_js_1.InvalidAddressError({ address: paymaster });
|
66
|
+
if (paymaster && !paymasterInput) {
|
67
|
+
throw new base_js_1.BaseError('`paymasterInput` must be provided when `paymaster` is defined');
|
68
|
+
}
|
69
|
+
if (!paymaster && paymasterInput) {
|
70
|
+
throw new base_js_1.BaseError('`paymaster` must be provided when `paymasterInput` is defined');
|
71
|
+
}
|
72
|
+
}
|
73
|
+
exports.assertTransactionEIP712 = assertTransactionEIP712;
|
74
|
+
//# sourceMappingURL=serializers.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"serializers.js","sourceRoot":"","sources":["../../../chains/zksync/serializers.ts"],"names":[],"mappings":";;;AAAA,wDAA6D;AAC7D,kDAAgD;AAChD,oDAA2D;AAG3D,mEAA4D;AAC5D,0DAAsD;AACtD,4DAAqD;AACrD,4DAAqD;AACrD,6FAGwD;AAOjD,MAAM,oBAAoB,GAE7B,CAAC,EAAE,EAAE,SAAS,EAAE,EAAE;IACpB,IAAI,QAAQ,CAAC,EAAE,CAAC;Q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