viem 0.0.1-alpha.25 → 0.0.1-alpha.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{call-ac509982.d.ts → call-3476b8ee.d.ts} +4 -5
- package/dist/{chain-f16512e8.d.ts → chain-42de87e5.d.ts} +1 -14
- package/dist/{chain-c4ccb458.d.ts → chain-b0cfb141.d.ts} +1 -1
- package/dist/chains.d.ts +3 -3
- package/dist/chains.js +46 -46
- package/dist/chains.mjs +1 -1
- package/dist/{chunk-LEPQJNVO.mjs → chunk-BSAB6UH4.mjs} +2 -2
- package/dist/{chunk-LEPQJNVO.mjs.map → chunk-BSAB6UH4.mjs.map} +0 -0
- package/dist/{chunk-THMRUG4D.js → chunk-DSQO3E4F.js} +257 -398
- package/dist/chunk-DSQO3E4F.js.map +1 -0
- package/dist/{chunk-CD2XJOBJ.js → chunk-LINNE4N4.js} +136 -91
- package/dist/chunk-LINNE4N4.js.map +1 -0
- package/dist/{chunk-KSAO4Y4Q.mjs → chunk-PRG3BBPZ.mjs} +293 -434
- package/dist/chunk-PRG3BBPZ.mjs.map +1 -0
- package/dist/{chunk-2Y3UZMSP.mjs → chunk-QSIX64VZ.mjs} +61 -16
- package/dist/chunk-QSIX64VZ.mjs.map +1 -0
- package/dist/{chunk-NUXMGPMK.js → chunk-YTG4YXMB.js} +14 -14
- package/dist/{chunk-NUXMGPMK.js.map → chunk-YTG4YXMB.js.map} +0 -0
- package/dist/{contract-9e76e561.d.ts → contract-9dd2f98b.d.ts} +1 -1
- package/dist/contract.d.ts +21 -15
- package/dist/contract.js +6 -4
- package/dist/contract.mjs +5 -3
- package/dist/{createClient-68ee4bb4.d.ts → createClient-6689596e.d.ts} +10 -4
- package/dist/{createPublicClient-b732194e.d.ts → createPublicClient-fd558574.d.ts} +3 -3
- package/dist/{createTestClient-dedf321e.d.ts → createTestClient-bc1d9028.d.ts} +3 -3
- package/dist/{createWalletClient-75813d83.d.ts → createWalletClient-4df88244.d.ts} +3 -3
- package/dist/{decodeErrorResult-0b934d23.d.ts → decodeErrorResult-ac835649.d.ts} +2 -2
- package/dist/{eip1193-6f9ba163.d.ts → eip1193-617a05ae.d.ts} +2 -2
- package/dist/ens.d.ts +8 -8
- package/dist/ens.js +21 -21
- package/dist/ens.mjs +2 -2
- package/dist/{getAbiItem-c8e6e7d4.d.ts → getAbiItem-d2e8bd76.d.ts} +2 -2
- package/dist/index.d.ts +44 -21
- package/dist/index.js +54 -32
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +43 -21
- package/dist/index.mjs.map +1 -1
- package/dist/public.d.ts +13 -12
- package/dist/public.js +3 -3
- package/dist/public.mjs +2 -2
- package/dist/{readContract-4f6e2692.d.ts → readContract-c460f23a.d.ts} +3 -3
- package/dist/{rpc-a5a7f376.d.ts → rpc-8c10fc98.d.ts} +3 -5
- package/dist/{sendTransaction-e713f90c.d.ts → sendTransaction-7ce442c0.d.ts} +3 -3
- package/dist/test.d.ts +4 -4
- package/dist/test.js +13 -13
- package/dist/test.mjs +1 -1
- package/dist/{transactionReceipt-2a86c7c7.d.ts → transactionReceipt-44dbf122.d.ts} +1 -1
- package/dist/{transactionRequest-c7794f5e.d.ts → transactionRequest-f437b4ba.d.ts} +1 -1
- package/dist/utils/index.d.ts +14 -11
- package/dist/utils/index.js +2 -2
- package/dist/utils/index.mjs +1 -1
- package/dist/wallet.d.ts +6 -6
- package/dist/wallet.js +3 -3
- package/dist/wallet.mjs +2 -2
- package/dist/{watchEvent-c346c12d.d.ts → watchEvent-569c9976.d.ts} +3 -3
- package/dist/window.d.ts +2 -2
- package/package.json +4 -4
- package/public/package.json +4 -0
- package/test/package.json +4 -0
- package/dist/chunk-2Y3UZMSP.mjs.map +0 -1
- package/dist/chunk-CD2XJOBJ.js.map +0 -1
- package/dist/chunk-KSAO4Y4Q.mjs.map +0 -1
- package/dist/chunk-THMRUG4D.js.map +0 -1
- package/src/_test/abis.ts +0 -1420
- package/src/_test/bench.ts +0 -15
- package/src/_test/constants.ts +0 -63
- package/src/_test/globalSetup.ts +0 -11
- package/src/_test/index.ts +0 -25
- package/src/_test/setup.ts +0 -8
- package/src/_test/utils.ts +0 -155
- package/src/actions/ens/getEnsAddress.bench.ts +0 -26
- package/src/actions/ens/getEnsAddress.test.ts +0 -97
- package/src/actions/ens/getEnsAddress.ts +0 -122
- package/src/actions/ens/getEnsName.bench.ts +0 -30
- package/src/actions/ens/getEnsName.test.ts +0 -101
- package/src/actions/ens/getEnsName.ts +0 -106
- package/src/actions/ens/index.test.ts +0 -12
- package/src/actions/ens/index.ts +0 -3
- package/src/actions/index.test.ts +0 -81
- package/src/actions/index.ts +0 -182
- package/src/actions/public/call.bench.ts +0 -48
- package/src/actions/public/call.test.ts +0 -99
- package/src/actions/public/call.ts +0 -97
- package/src/actions/public/createBlockFilter.bench.ts +0 -11
- package/src/actions/public/createBlockFilter.test.ts +0 -9
- package/src/actions/public/createBlockFilter.ts +0 -14
- package/src/actions/public/createContractEventFilter.test.ts +0 -119
- package/src/actions/public/createContractEventFilter.ts +0 -69
- package/src/actions/public/createEventFilter.test.ts +0 -277
- package/src/actions/public/createEventFilter.ts +0 -93
- package/src/actions/public/createPendingTransactionFilter.bench.ts +0 -11
- package/src/actions/public/createPendingTransactionFilter.test.ts +0 -9
- package/src/actions/public/createPendingTransactionFilter.ts +0 -14
- package/src/actions/public/estimateGas.bench.ts +0 -46
- package/src/actions/public/estimateGas.test.ts +0 -92
- package/src/actions/public/estimateGas.ts +0 -61
- package/src/actions/public/getBalance.test.ts +0 -83
- package/src/actions/public/getBalance.ts +0 -37
- package/src/actions/public/getBlock.bench.ts +0 -28
- package/src/actions/public/getBlock.test.ts +0 -575
- package/src/actions/public/getBlock.ts +0 -65
- package/src/actions/public/getBlockNumber.bench.ts +0 -28
- package/src/actions/public/getBlockNumber.test.ts +0 -27
- package/src/actions/public/getBlockNumber.ts +0 -32
- package/src/actions/public/getBlockTransactionCount.bench.ts +0 -15
- package/src/actions/public/getBlockTransactionCount.test.ts +0 -57
- package/src/actions/public/getBlockTransactionCount.ts +0 -52
- package/src/actions/public/getBytecode.test.ts +0 -27
- package/src/actions/public/getBytecode.ts +0 -32
- package/src/actions/public/getChainId.bench.ts +0 -15
- package/src/actions/public/getChainId.test.ts +0 -8
- package/src/actions/public/getChainId.ts +0 -7
- package/src/actions/public/getFeeHistory.bench.ts +0 -18
- package/src/actions/public/getFeeHistory.test.ts +0 -137
- package/src/actions/public/getFeeHistory.ts +0 -44
- package/src/actions/public/getFilterChanges.bench.ts +0 -13
- package/src/actions/public/getFilterChanges.test.ts +0 -383
- package/src/actions/public/getFilterChanges.ts +0 -23
- package/src/actions/public/getFilterLogs.test.ts +0 -297
- package/src/actions/public/getFilterLogs.ts +0 -20
- package/src/actions/public/getGasPrice.bench.ts +0 -19
- package/src/actions/public/getGasPrice.test.ts +0 -8
- package/src/actions/public/getGasPrice.ts +0 -15
- package/src/actions/public/getLogs.test.ts +0 -306
- package/src/actions/public/getLogs.ts +0 -84
- package/src/actions/public/getStorageAt.test.ts +0 -34
- package/src/actions/public/getStorageAt.ts +0 -32
- package/src/actions/public/getTransaction.bench.ts +0 -33
- package/src/actions/public/getTransaction.test.ts +0 -311
- package/src/actions/public/getTransaction.ts +0 -95
- package/src/actions/public/getTransactionConfirmations.test.ts +0 -69
- package/src/actions/public/getTransactionConfirmations.ts +0 -38
- package/src/actions/public/getTransactionCount.test.ts +0 -56
- package/src/actions/public/getTransactionCount.ts +0 -34
- package/src/actions/public/getTransactionReceipt.bench.ts +0 -33
- package/src/actions/public/getTransactionReceipt.test.ts +0 -179
- package/src/actions/public/getTransactionReceipt.ts +0 -34
- package/src/actions/public/index.test.ts +0 -43
- package/src/actions/public/index.ts +0 -146
- package/src/actions/public/multicall.test.ts +0 -452
- package/src/actions/public/multicall.ts +0 -108
- package/src/actions/public/readContract.test.ts +0 -328
- package/src/actions/public/readContract.ts +0 -73
- package/src/actions/public/simulateContract.bench.ts +0 -41
- package/src/actions/public/simulateContract.test.ts +0 -410
- package/src/actions/public/simulateContract.ts +0 -91
- package/src/actions/public/uninstallFilter.bench.ts +0 -13
- package/src/actions/public/uninstallFilter.test.ts +0 -65
- package/src/actions/public/uninstallFilter.ts +0 -17
- package/src/actions/public/waitForTransactionReceipt.test.ts +0 -322
- package/src/actions/public/waitForTransactionReceipt.ts +0 -170
- package/src/actions/public/watchBlockNumber.test.ts +0 -166
- package/src/actions/public/watchBlockNumber.ts +0 -79
- package/src/actions/public/watchBlocks.test.ts +0 -210
- package/src/actions/public/watchBlocks.ts +0 -114
- package/src/actions/public/watchContractEvent.test.ts +0 -305
- package/src/actions/public/watchContractEvent.ts +0 -108
- package/src/actions/public/watchEvent.test.ts +0 -195
- package/src/actions/public/watchEvent.ts +0 -95
- package/src/actions/public/watchPendingTransactions.test.ts +0 -116
- package/src/actions/public/watchPendingTransactions.ts +0 -74
- package/src/actions/test/dropTransaction.test.ts +0 -34
- package/src/actions/test/dropTransaction.ts +0 -17
- package/src/actions/test/getAutomine.test.ts +0 -14
- package/src/actions/test/getAutomine.ts +0 -11
- package/src/actions/test/getTxpoolContent.test.ts +0 -45
- package/src/actions/test/getTxpoolContent.ts +0 -7
- package/src/actions/test/getTxpoolStatus.test.ts +0 -41
- package/src/actions/test/getTxpoolStatus.ts +0 -12
- package/src/actions/test/impersonateAccount.test.ts +0 -26
- package/src/actions/test/impersonateAccount.ts +0 -17
- package/src/actions/test/increaseTime.test.ts +0 -18
- package/src/actions/test/increaseTime.ts +0 -17
- package/src/actions/test/index.test.ts +0 -38
- package/src/actions/test/index.ts +0 -77
- package/src/actions/test/inspectTxpool.test.ts +0 -50
- package/src/actions/test/inspectTxpool.ts +0 -7
- package/src/actions/test/mine.test.ts +0 -20
- package/src/actions/test/mine.ts +0 -16
- package/src/actions/test/removeBlockTimestampInterval.test.ts +0 -23
- package/src/actions/test/removeBlockTimestampInterval.ts +0 -7
- package/src/actions/test/reset.test.ts +0 -19
- package/src/actions/test/reset.ts +0 -18
- package/src/actions/test/revert.test.ts +0 -39
- package/src/actions/test/revert.ts +0 -14
- package/src/actions/test/sendUnsignedTransaction.test.ts +0 -52
- package/src/actions/test/sendUnsignedTransaction.ts +0 -19
- package/src/actions/test/setAutomine.test.ts +0 -14
- package/src/actions/test/setAutomine.ts +0 -8
- package/src/actions/test/setBalance.test.ts +0 -29
- package/src/actions/test/setBalance.ts +0 -20
- package/src/actions/test/setBlockGasLimit.test.ts +0 -21
- package/src/actions/test/setBlockGasLimit.ts +0 -17
- package/src/actions/test/setBlockTimestampInterval.test.ts +0 -23
- package/src/actions/test/setBlockTimestampInterval.ts +0 -16
- package/src/actions/test/setCode.test.ts +0 -26
- package/src/actions/test/setCode.ts +0 -19
- package/src/actions/test/setCoinbase.test.ts +0 -11
- package/src/actions/test/setCoinbase.ts +0 -17
- package/src/actions/test/setIntervalMining.test.ts +0 -30
- package/src/actions/test/setIntervalMining.ts +0 -16
- package/src/actions/test/setLoggingEnabled.test.ts +0 -10
- package/src/actions/test/setLoggingEnabled.ts +0 -8
- package/src/actions/test/setMinGasPrice.test.ts +0 -22
- package/src/actions/test/setMinGasPrice.ts +0 -17
- package/src/actions/test/setNextBlockBaseFeePerGas.test.ts +0 -23
- package/src/actions/test/setNextBlockBaseFeePerGas.ts +0 -17
- package/src/actions/test/setNextBlockTimestamp.test.ts +0 -19
- package/src/actions/test/setNextBlockTimestamp.ts +0 -17
- package/src/actions/test/setNonce.test.ts +0 -28
- package/src/actions/test/setNonce.ts +0 -20
- package/src/actions/test/setRpcUrl.test.ts +0 -9
- package/src/actions/test/setRpcUrl.ts +0 -8
- package/src/actions/test/setStorageAt.test.ts +0 -36
- package/src/actions/test/setStorageAt.ts +0 -26
- package/src/actions/test/snapshot.test.ts +0 -18
- package/src/actions/test/snapshot.ts +0 -7
- package/src/actions/test/stopImpersonatingAccount.test.ts +0 -29
- package/src/actions/test/stopImpersonatingAccount.ts +0 -17
- package/src/actions/wallet/addChain.test.ts +0 -14
- package/src/actions/wallet/addChain.ts +0 -21
- package/src/actions/wallet/deployContract.test.ts +0 -55
- package/src/actions/wallet/deployContract.ts +0 -38
- package/src/actions/wallet/getAccounts.test.ts +0 -22
- package/src/actions/wallet/getAccounts.ts +0 -7
- package/src/actions/wallet/getPermissions.test.ts +0 -24
- package/src/actions/wallet/getPermissions.ts +0 -9
- package/src/actions/wallet/index.test.ts +0 -21
- package/src/actions/wallet/index.ts +0 -36
- package/src/actions/wallet/requestAccounts.test.ts +0 -13
- package/src/actions/wallet/requestAccounts.ts +0 -7
- package/src/actions/wallet/requestPermissions.test.ts +0 -26
- package/src/actions/wallet/requestPermissions.ts +0 -19
- package/src/actions/wallet/sendTransaction.bench.ts +0 -57
- package/src/actions/wallet/sendTransaction.test.ts +0 -440
- package/src/actions/wallet/sendTransaction.ts +0 -77
- package/src/actions/wallet/signMessage.test.ts +0 -61
- package/src/actions/wallet/signMessage.ts +0 -35
- package/src/actions/wallet/switchChain.test.ts +0 -21
- package/src/actions/wallet/switchChain.ts +0 -19
- package/src/actions/wallet/watchAsset.test.ts +0 -40
- package/src/actions/wallet/watchAsset.ts +0 -16
- package/src/actions/wallet/writeContract.test.ts +0 -84
- package/src/actions/wallet/writeContract.ts +0 -47
- package/src/chains.test.ts +0 -439
- package/src/chains.ts +0 -99
- package/src/clients/createClient.test.ts +0 -295
- package/src/clients/createClient.ts +0 -81
- package/src/clients/createPublicClient.test.ts +0 -165
- package/src/clients/createPublicClient.ts +0 -49
- package/src/clients/createTestClient.test.ts +0 -145
- package/src/clients/createTestClient.ts +0 -72
- package/src/clients/createWalletClient.test.ts +0 -121
- package/src/clients/createWalletClient.ts +0 -54
- package/src/clients/index.test.ts +0 -19
- package/src/clients/index.ts +0 -31
- package/src/clients/transports/createTransport.test.ts +0 -58
- package/src/clients/transports/createTransport.ts +0 -48
- package/src/clients/transports/custom.test.ts +0 -98
- package/src/clients/transports/custom.ts +0 -34
- package/src/clients/transports/fallback.test.ts +0 -257
- package/src/clients/transports/fallback.ts +0 -50
- package/src/clients/transports/http.test.ts +0 -109
- package/src/clients/transports/http.ts +0 -51
- package/src/clients/transports/index.test.ts +0 -15
- package/src/clients/transports/index.ts +0 -17
- package/src/clients/transports/webSocket.test.ts +0 -164
- package/src/clients/transports/webSocket.ts +0 -118
- package/src/constants/abis.test.ts +0 -53
- package/src/constants/abis.ts +0 -44
- package/src/constants/index.test.ts +0 -14
- package/src/constants/index.ts +0 -3
- package/src/constants/solidity.test.ts +0 -41
- package/src/constants/solidity.ts +0 -35
- package/src/contract.test.ts +0 -31
- package/src/contract.ts +0 -68
- package/src/ens.test.ts +0 -15
- package/src/ens.ts +0 -8
- package/src/errors/abi.test.ts +0 -81
- package/src/errors/abi.ts +0 -254
- package/src/errors/address.test.ts +0 -14
- package/src/errors/address.ts +0 -9
- package/src/errors/base.test.ts +0 -114
- package/src/errors/base.ts +0 -57
- package/src/errors/block.test.ts +0 -24
- package/src/errors/block.ts +0 -18
- package/src/errors/chain.test.ts +0 -46
- package/src/errors/chain.ts +0 -33
- package/src/errors/contract.test.ts +0 -233
- package/src/errors/contract.ts +0 -178
- package/src/errors/data.ts +0 -20
- package/src/errors/encoding.ts +0 -60
- package/src/errors/index.ts +0 -82
- package/src/errors/log.ts +0 -8
- package/src/errors/request.test.ts +0 -330
- package/src/errors/request.ts +0 -163
- package/src/errors/rpc.test.ts +0 -87
- package/src/errors/rpc.ts +0 -113
- package/src/errors/transaction.test.ts +0 -83
- package/src/errors/transaction.ts +0 -54
- package/src/errors/transport.test.ts +0 -11
- package/src/errors/transport.ts +0 -12
- package/src/index.test.ts +0 -116
- package/src/index.ts +0 -132
- package/src/public.test.ts +0 -36
- package/src/public.ts +0 -76
- package/src/test.test.ts +0 -38
- package/src/test.ts +0 -52
- package/src/types/block.ts +0 -71
- package/src/types/chain.ts +0 -6
- package/src/types/contract.ts +0 -497
- package/src/types/eip1193.ts +0 -1041
- package/src/types/fee.ts +0 -47
- package/src/types/filter.ts +0 -8
- package/src/types/formatter.ts +0 -23
- package/src/types/index.ts +0 -84
- package/src/types/log.ts +0 -22
- package/src/types/misc.ts +0 -5
- package/src/types/multicall.ts +0 -82
- package/src/types/rpc.ts +0 -35
- package/src/types/transaction.ts +0 -145
- package/src/types/utils.ts +0 -88
- package/src/types/window.ts +0 -9
- package/src/utils/abi/decodeAbi.bench.ts +0 -135
- package/src/utils/abi/decodeAbi.test.ts +0 -1614
- package/src/utils/abi/decodeAbi.ts +0 -300
- package/src/utils/abi/decodeDeployData.test.ts +0 -151
- package/src/utils/abi/decodeDeployData.ts +0 -44
- package/src/utils/abi/decodeErrorResult.test.ts +0 -230
- package/src/utils/abi/decodeErrorResult.ts +0 -45
- package/src/utils/abi/decodeEventLog.test.ts +0 -542
- package/src/utils/abi/decodeEventLog.ts +0 -107
- package/src/utils/abi/decodeFunctionData.test.ts +0 -138
- package/src/utils/abi/decodeFunctionData.ts +0 -32
- package/src/utils/abi/decodeFunctionResult.test.ts +0 -333
- package/src/utils/abi/decodeFunctionResult.ts +0 -57
- package/src/utils/abi/encodeAbi.bench.ts +0 -163
- package/src/utils/abi/encodeAbi.test.ts +0 -1447
- package/src/utils/abi/encodeAbi.ts +0 -273
- package/src/utils/abi/encodeDeployData.test.ts +0 -124
- package/src/utils/abi/encodeDeployData.ts +0 -40
- package/src/utils/abi/encodeErrorResult.test.ts +0 -192
- package/src/utils/abi/encodeErrorResult.ts +0 -47
- package/src/utils/abi/encodeEventTopics.test.ts +0 -345
- package/src/utils/abi/encodeEventTopics.ts +0 -75
- package/src/utils/abi/encodeFunctionData.test.ts +0 -138
- package/src/utils/abi/encodeFunctionData.ts +0 -42
- package/src/utils/abi/encodeFunctionResult.test.ts +0 -279
- package/src/utils/abi/encodeFunctionResult.ts +0 -41
- package/src/utils/abi/formatAbiItem.test.ts +0 -335
- package/src/utils/abi/formatAbiItem.ts +0 -41
- package/src/utils/abi/formatAbiItemWithArgs.test.ts +0 -291
- package/src/utils/abi/formatAbiItemWithArgs.ts +0 -27
- package/src/utils/abi/getAbiItem.test.ts +0 -547
- package/src/utils/abi/getAbiItem.ts +0 -95
- package/src/utils/abi/index.test.ts +0 -24
- package/src/utils/abi/index.ts +0 -48
- package/src/utils/address/getAddress.bench.ts +0 -22
- package/src/utils/address/getAddress.test.ts +0 -46
- package/src/utils/address/getAddress.ts +0 -28
- package/src/utils/address/getContractAddress.bench.ts +0 -20
- package/src/utils/address/getContractAddress.test.ts +0 -78
- package/src/utils/address/getContractAddress.ts +0 -59
- package/src/utils/address/index.test.ts +0 -17
- package/src/utils/address/index.ts +0 -16
- package/src/utils/address/isAddress.test.ts +0 -10
- package/src/utils/address/isAddress.ts +0 -10
- package/src/utils/address/isAddressEqual.test.ts +0 -55
- package/src/utils/address/isAddressEqual.ts +0 -6
- package/src/utils/buildRequest.test.ts +0 -365
- package/src/utils/buildRequest.ts +0 -45
- package/src/utils/chain.test.ts +0 -43
- package/src/utils/chain.ts +0 -8
- package/src/utils/contract/extractFunctionParts.test.ts +0 -109
- package/src/utils/contract/extractFunctionParts.ts +0 -27
- package/src/utils/contract/getContractError.test.ts +0 -282
- package/src/utils/contract/getContractError.ts +0 -58
- package/src/utils/contract/index.test.ts +0 -15
- package/src/utils/contract/index.ts +0 -8
- package/src/utils/data/concat.test.ts +0 -35
- package/src/utils/data/concat.ts +0 -34
- package/src/utils/data/index.test.ts +0 -23
- package/src/utils/data/index.ts +0 -13
- package/src/utils/data/isBytes.test.ts +0 -9
- package/src/utils/data/isBytes.ts +0 -7
- package/src/utils/data/isHex.test.ts +0 -13
- package/src/utils/data/isHex.ts +0 -5
- package/src/utils/data/pad.bench.ts +0 -30
- package/src/utils/data/pad.test.ts +0 -367
- package/src/utils/data/pad.ts +0 -53
- package/src/utils/data/size.test.ts +0 -18
- package/src/utils/data/size.ts +0 -13
- package/src/utils/data/slice.test.ts +0 -203
- package/src/utils/data/slice.ts +0 -60
- package/src/utils/data/trim.bench.ts +0 -34
- package/src/utils/data/trim.test.ts +0 -175
- package/src/utils/data/trim.ts +0 -33
- package/src/utils/encoding/decodeBytes.bench.ts +0 -40
- package/src/utils/encoding/decodeBytes.test.ts +0 -144
- package/src/utils/encoding/decodeBytes.ts +0 -63
- package/src/utils/encoding/decodeHex.bench.ts +0 -24
- package/src/utils/encoding/decodeHex.test.ts +0 -167
- package/src/utils/encoding/decodeHex.ts +0 -76
- package/src/utils/encoding/decodeRlp.bench.ts +0 -34
- package/src/utils/encoding/decodeRlp.test.ts +0 -350
- package/src/utils/encoding/decodeRlp.ts +0 -121
- package/src/utils/encoding/encodeBytes.bench.ts +0 -29
- package/src/utils/encoding/encodeBytes.test.ts +0 -676
- package/src/utils/encoding/encodeBytes.ts +0 -59
- package/src/utils/encoding/encodeHex.bench.ts +0 -49
- package/src/utils/encoding/encodeHex.test.ts +0 -232
- package/src/utils/encoding/encodeHex.ts +0 -104
- package/src/utils/encoding/encodeRlp.bench.ts +0 -54
- package/src/utils/encoding/encodeRlp.test.ts +0 -254
- package/src/utils/encoding/encodeRlp.ts +0 -48
- package/src/utils/encoding/index.test.ts +0 -32
- package/src/utils/encoding/index.ts +0 -36
- package/src/utils/ens/index.test.ts +0 -14
- package/src/utils/ens/index.ts +0 -7
- package/src/utils/ens/labelhash.test.ts +0 -55
- package/src/utils/ens/labelhash.ts +0 -16
- package/src/utils/ens/namehash.test.ts +0 -65
- package/src/utils/ens/namehash.ts +0 -28
- package/src/utils/ens/normalize.bench.ts +0 -14
- package/src/utils/ens/normalize.test.ts +0 -35
- package/src/utils/ens/normalize.ts +0 -14
- package/src/utils/ens/packetToBytes.test.ts +0 -11
- package/src/utils/ens/packetToBytes.ts +0 -29
- package/src/utils/formatters/block.bench.ts +0 -51
- package/src/utils/formatters/block.test.ts +0 -115
- package/src/utils/formatters/block.ts +0 -37
- package/src/utils/formatters/extract.test.ts +0 -14
- package/src/utils/formatters/extract.ts +0 -18
- package/src/utils/formatters/feeHistory.test.ts +0 -66
- package/src/utils/formatters/feeHistory.ts +0 -12
- package/src/utils/formatters/format.test.ts +0 -93
- package/src/utils/formatters/format.ts +0 -90
- package/src/utils/formatters/index.test.ts +0 -27
- package/src/utils/formatters/index.ts +0 -34
- package/src/utils/formatters/log.test.ts +0 -79
- package/src/utils/formatters/log.ts +0 -12
- package/src/utils/formatters/transaction.test.ts +0 -271
- package/src/utils/formatters/transaction.ts +0 -63
- package/src/utils/formatters/transactionReceipt.bench.ts +0 -73
- package/src/utils/formatters/transactionReceipt.test.ts +0 -151
- package/src/utils/formatters/transactionReceipt.ts +0 -63
- package/src/utils/formatters/transactionRequest.bench.ts +0 -29
- package/src/utils/formatters/transactionRequest.test.ts +0 -237
- package/src/utils/formatters/transactionRequest.ts +0 -56
- package/src/utils/hash/getEventSignature.test.ts +0 -61
- package/src/utils/hash/getEventSignature.ts +0 -4
- package/src/utils/hash/getFunctionSignature.test.ts +0 -22
- package/src/utils/hash/getFunctionSignature.ts +0 -5
- package/src/utils/hash/hashFunction.test.ts +0 -65
- package/src/utils/hash/hashFunction.ts +0 -12
- package/src/utils/hash/index.test.ts +0 -13
- package/src/utils/hash/index.ts +0 -5
- package/src/utils/hash/keccak256.test.ts +0 -59
- package/src/utils/hash/keccak256.ts +0 -21
- package/src/utils/index.test.ts +0 -111
- package/src/utils/index.ts +0 -142
- package/src/utils/observe.test.ts +0 -176
- package/src/utils/observe.ts +0 -66
- package/src/utils/poll.test.ts +0 -127
- package/src/utils/poll.ts +0 -42
- package/src/utils/promise/index.test.ts +0 -14
- package/src/utils/promise/index.ts +0 -3
- package/src/utils/promise/withCache.test.ts +0 -97
- package/src/utils/promise/withCache.ts +0 -73
- package/src/utils/promise/withRetry.test.ts +0 -231
- package/src/utils/promise/withRetry.ts +0 -61
- package/src/utils/promise/withTimeout.test.ts +0 -37
- package/src/utils/promise/withTimeout.ts +0 -39
- package/src/utils/rpc.test.ts +0 -990
- package/src/utils/rpc.ts +0 -294
- package/src/utils/stringify.test.ts +0 -13
- package/src/utils/stringify.ts +0 -5
- package/src/utils/uid.ts +0 -14
- package/src/utils/unit/constants.test.ts +0 -22
- package/src/utils/unit/constants.ts +0 -12
- package/src/utils/unit/formatEther.test.ts +0 -75
- package/src/utils/unit/formatEther.ts +0 -6
- package/src/utils/unit/formatGwei.test.ts +0 -32
- package/src/utils/unit/formatGwei.ts +0 -6
- package/src/utils/unit/formatUnit.bench.ts +0 -21
- package/src/utils/unit/formatUnit.test.ts +0 -40
- package/src/utils/unit/formatUnit.ts +0 -16
- package/src/utils/unit/index.test.ts +0 -28
- package/src/utils/unit/index.ts +0 -7
- package/src/utils/unit/parseEther.test.ts +0 -126
- package/src/utils/unit/parseEther.ts +0 -6
- package/src/utils/unit/parseGwei.test.ts +0 -50
- package/src/utils/unit/parseGwei.ts +0 -6
- package/src/utils/unit/parseUnit.bench.ts +0 -21
- package/src/utils/unit/parseUnit.test.ts +0 -54
- package/src/utils/unit/parseUnit.ts +0 -27
- package/src/utils/wait.ts +0 -3
- package/src/wallet.test.ts +0 -19
- package/src/wallet.ts +0 -23
- package/src/window.ts +0 -1
@@ -6,161 +6,15 @@ var __publicField = (obj, key, value) => {
|
|
6
6
|
};
|
7
7
|
|
8
8
|
// package.json
|
9
|
-
var
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
"bench:ci": "CI=true vitest bench --no-threads",
|
17
|
-
build: "tsup",
|
18
|
-
changeset: "changeset",
|
19
|
-
"changeset:release": "pnpm build && changeset publish",
|
20
|
-
"changeset:version": "changeset version && pnpm install --lockfile-only",
|
21
|
-
"contracts:build": "wagmi generate",
|
22
|
-
dev: "DEV=true tsup",
|
23
|
-
"dev:docs": "pnpm -r --filter site dev",
|
24
|
-
format: "rome format src/ test/ --write",
|
25
|
-
lint: "rome check .",
|
26
|
-
"lint:fix": "pnpm lint --apply-suggested",
|
27
|
-
playground: "pnpm --filter playground-dev dev",
|
28
|
-
postinstall: "pnpm dev && pnpm contracts:build",
|
29
|
-
preinstall: "npx only-allow pnpm",
|
30
|
-
prepublishOnly: "pnpm ts-node scripts/generate-package-json.ts",
|
31
|
-
prepare: "npx simple-git-hooks",
|
32
|
-
test: "vitest dev --no-threads",
|
33
|
-
"test:ci": "CI=true vitest --coverage --no-threads",
|
34
|
-
"test:ui": "vitest dev --ui --no-threads",
|
35
|
-
"ts-node": "node --loader esbuild-register/loader -r esbuild-register",
|
36
|
-
typecheck: "tsc --noEmit"
|
37
|
-
},
|
38
|
-
files: [
|
39
|
-
"/chains",
|
40
|
-
"/contract",
|
41
|
-
"/dist",
|
42
|
-
"/ens",
|
43
|
-
"/src",
|
44
|
-
"/types",
|
45
|
-
"/utils",
|
46
|
-
"/wallet",
|
47
|
-
"/window"
|
48
|
-
],
|
49
|
-
exports: {
|
50
|
-
".": {
|
51
|
-
types: "./dist/index.d.ts",
|
52
|
-
module: "./dist/index.mjs",
|
53
|
-
default: "./dist/index.js"
|
54
|
-
},
|
55
|
-
"./chains": {
|
56
|
-
types: "./dist/chains.d.ts",
|
57
|
-
module: "./dist/chains.mjs",
|
58
|
-
default: "./dist/chains.js"
|
59
|
-
},
|
60
|
-
"./contract": {
|
61
|
-
types: "./dist/contract.d.ts",
|
62
|
-
module: "./dist/contract.mjs",
|
63
|
-
default: "./dist/contract.js"
|
64
|
-
},
|
65
|
-
"./ens": {
|
66
|
-
types: "./dist/ens.d.ts",
|
67
|
-
module: "./dist/ens.mjs",
|
68
|
-
default: "./dist/ens.js"
|
69
|
-
},
|
70
|
-
"./public": {
|
71
|
-
types: "./dist/public.d.ts",
|
72
|
-
module: "./dist/public.mjs",
|
73
|
-
default: "./dist/public.js"
|
74
|
-
},
|
75
|
-
"./test": {
|
76
|
-
types: "./dist/test.d.ts",
|
77
|
-
module: "./dist/test.mjs",
|
78
|
-
default: "./dist/test.js"
|
79
|
-
},
|
80
|
-
"./utils": {
|
81
|
-
types: "./dist/utils/index.d.ts",
|
82
|
-
module: "./dist/utils/index.mjs",
|
83
|
-
default: "./dist/utils/index.js"
|
84
|
-
},
|
85
|
-
"./wallet": {
|
86
|
-
types: "./dist/wallet.d.ts",
|
87
|
-
module: "./dist/wallet.mjs",
|
88
|
-
default: "./dist/wallet.js"
|
89
|
-
},
|
90
|
-
"./window": {
|
91
|
-
types: "./dist/window.d.ts",
|
92
|
-
module: "./dist/window.mjs",
|
93
|
-
default: "./dist/window.js"
|
94
|
-
},
|
95
|
-
"./package.json": "./package.json"
|
96
|
-
},
|
97
|
-
main: "dist/index.js",
|
98
|
-
module: "dist/index.mjs",
|
99
|
-
types: "dist/index.d.ts",
|
100
|
-
sideEffects: false,
|
101
|
-
dependencies: {
|
102
|
-
"@noble/hashes": "^1.1.2",
|
103
|
-
"@wagmi/chains": "~0.2.8",
|
104
|
-
abitype: "~0.3.0",
|
105
|
-
"idna-uts46-hx": "^4.1.2",
|
106
|
-
"isomorphic-unfetch": "^4.0.2",
|
107
|
-
"isomorphic-ws": "^5.0.0",
|
108
|
-
ws: "^8.12.0"
|
109
|
-
},
|
110
|
-
devDependencies: {
|
111
|
-
"@actions/core": "^1.10.0",
|
112
|
-
"@actions/github": "^5.1.1",
|
113
|
-
"@adraffy/ens-normalize": "^1.8.9",
|
114
|
-
"@changesets/changelog-github": "^0.4.5",
|
115
|
-
"@changesets/cli": "^2.23.2",
|
116
|
-
"@types/dedent": "^0.7.0",
|
117
|
-
"@types/fs-extra": "^9.0.13",
|
118
|
-
"@types/node": "^17.0.45",
|
119
|
-
"@types/ws": "^8.5.4",
|
120
|
-
"@vitest/coverage-c8": "^0.24.3",
|
121
|
-
"@vitest/ui": "^0.19.1",
|
122
|
-
"@wagmi/cli": "^0.1.6",
|
123
|
-
bundlewatch: "^0.3.3",
|
124
|
-
dedent: "^0.7.0",
|
125
|
-
esbuild: "^0.16.17",
|
126
|
-
"esbuild-register": "^3.4.2",
|
127
|
-
ethers: "^5.7.2",
|
128
|
-
"ethers@6": "npm:ethers@^6.0.2",
|
129
|
-
execa: "^6.1.0",
|
130
|
-
"fs-extra": "^10.1.0",
|
131
|
-
rome: "^11.0.0",
|
132
|
-
"simple-git-hooks": "^2.8.1",
|
133
|
-
tsup: "^6.6.0",
|
134
|
-
typescript: "^4.9.4",
|
135
|
-
vite: "^3.2.5",
|
136
|
-
vitest: "^0.25.8",
|
137
|
-
web3: "^1.8.1"
|
138
|
-
},
|
139
|
-
license: "MIT",
|
140
|
-
repository: "wagmi-dev/viem",
|
141
|
-
authors: [
|
142
|
-
"awkweb.eth",
|
143
|
-
"jxom.eth"
|
144
|
-
],
|
145
|
-
keywords: [
|
146
|
-
"eth",
|
147
|
-
"ethereum",
|
148
|
-
"dapps",
|
149
|
-
"wallet",
|
150
|
-
"web3"
|
151
|
-
],
|
152
|
-
"simple-git-hooks": {
|
153
|
-
"pre-commit": "pnpm format & pnpm lint:fix"
|
154
|
-
},
|
155
|
-
pnpm: {
|
156
|
-
patchedDependencies: {
|
157
|
-
"vitepress@1.0.0-alpha.34": "patches/vitepress@1.0.0-alpha.34.patch"
|
158
|
-
}
|
159
|
-
}
|
160
|
-
};
|
9
|
+
var name = "viem";
|
10
|
+
var version = "0.0.1-alpha.26";
|
11
|
+
|
12
|
+
// src/errors/utils.ts
|
13
|
+
var getContractAddress = (address) => address;
|
14
|
+
var getUrl = (url) => url;
|
15
|
+
var getVersion = () => `${name}@${version}`;
|
161
16
|
|
162
17
|
// src/errors/base.ts
|
163
|
-
var version = process.env.TEST ? "1.0.2" : package_default.version;
|
164
18
|
var BaseError = class extends Error {
|
165
19
|
constructor(shortMessage, args = {}) {
|
166
20
|
const details = args.cause instanceof BaseError ? args.cause.details : _optionalChain([args, 'access', _2 => _2.cause, 'optionalAccess', _3 => _3.message]) ? args.cause.message : args.details;
|
@@ -171,7 +25,7 @@ var BaseError = class extends Error {
|
|
171
25
|
...args.metaMessages ? [...args.metaMessages, ""] : [],
|
172
26
|
...docsPath5 ? [`Docs: https://viem.sh${docsPath5}`] : [],
|
173
27
|
...details ? [`Details: ${details}`] : [],
|
174
|
-
`Version:
|
28
|
+
`Version: ${getVersion()}`
|
175
29
|
].join("\n");
|
176
30
|
super(message);
|
177
31
|
__publicField(this, "details");
|
@@ -575,8 +429,7 @@ var ContractFunctionExecutionError = class extends BaseError {
|
|
575
429
|
docsPath: docsPath5,
|
576
430
|
metaMessages: [
|
577
431
|
...cause.metaMessages ? [...cause.metaMessages, " "] : [],
|
578
|
-
contractAddress && `Contract: ${
|
579
|
-
process.env.TEST ? "0x0000000000000000000000000000000000000000" : contractAddress}`,
|
432
|
+
contractAddress && `Contract: ${getContractAddress(contractAddress)}`,
|
580
433
|
functionWithParams && `Function: ${functionWithParams}`,
|
581
434
|
formattedArgs && formattedArgs !== "()" && `Arguments: ${[...Array(_nullishCoalesce(_optionalChain([functionName, 'optionalAccess', _4 => _4.length]), () => ( 0))).keys()].map(() => " ").join("")}${formattedArgs}`,
|
582
435
|
sender && `Sender: ${sender}`
|
@@ -745,17 +598,22 @@ var FilterTypeNotSupportedError = class extends BaseError {
|
|
745
598
|
|
746
599
|
// src/errors/request.ts
|
747
600
|
var RequestError = class extends BaseError {
|
748
|
-
constructor(err, {
|
601
|
+
constructor(err, {
|
602
|
+
docsPath: docsPath5,
|
603
|
+
metaMessages,
|
604
|
+
shortMessage
|
605
|
+
}) {
|
749
606
|
super(shortMessage, {
|
750
607
|
cause: err,
|
751
|
-
docsPath: docsPath5
|
608
|
+
docsPath: docsPath5,
|
609
|
+
metaMessages
|
752
610
|
});
|
753
611
|
this.name = err.name;
|
754
612
|
}
|
755
613
|
};
|
756
614
|
var RpcRequestError = class extends RequestError {
|
757
615
|
constructor(err, { docsPath: docsPath5, shortMessage }) {
|
758
|
-
super(err, { docsPath: docsPath5, shortMessage });
|
616
|
+
super(err, { docsPath: docsPath5, metaMessages: err.metaMessages, shortMessage });
|
759
617
|
__publicField(this, "code");
|
760
618
|
this.code = err.code;
|
761
619
|
this.name = err.name;
|
@@ -875,24 +733,27 @@ var HttpRequestError = class extends BaseError {
|
|
875
733
|
constructor({
|
876
734
|
body,
|
877
735
|
details,
|
736
|
+
headers,
|
878
737
|
status,
|
879
738
|
url
|
880
739
|
}) {
|
881
|
-
super(
|
882
|
-
|
883
|
-
|
884
|
-
|
885
|
-
`
|
886
|
-
`URL: ${url}`,
|
740
|
+
super("HTTP request failed.", {
|
741
|
+
details,
|
742
|
+
metaMessages: [
|
743
|
+
status && `Status: ${status}`,
|
744
|
+
`URL: ${getUrl(url)}`,
|
887
745
|
`Request body: ${stringify(body)}`
|
888
|
-
].
|
889
|
-
|
890
|
-
details
|
891
|
-
}
|
892
|
-
);
|
746
|
+
].filter(Boolean)
|
747
|
+
});
|
893
748
|
__publicField(this, "name", "HttpRequestError");
|
749
|
+
__publicField(this, "body");
|
750
|
+
__publicField(this, "headers");
|
894
751
|
__publicField(this, "status");
|
752
|
+
__publicField(this, "url");
|
753
|
+
this.body = body;
|
754
|
+
this.headers = headers;
|
895
755
|
this.status = status;
|
756
|
+
this.url = url;
|
896
757
|
}
|
897
758
|
};
|
898
759
|
var WebSocketRequestError = class extends BaseError {
|
@@ -901,17 +762,10 @@ var WebSocketRequestError = class extends BaseError {
|
|
901
762
|
details,
|
902
763
|
url
|
903
764
|
}) {
|
904
|
-
super(
|
905
|
-
|
906
|
-
|
907
|
-
|
908
|
-
`URL: ${url}`,
|
909
|
-
`Request body: ${stringify(body)}`
|
910
|
-
].join("\n"),
|
911
|
-
{
|
912
|
-
details
|
913
|
-
}
|
914
|
-
);
|
765
|
+
super("WebSocket request failed.", {
|
766
|
+
details,
|
767
|
+
metaMessages: [`URL: ${getUrl(url)}`, `Request body: ${stringify(body)}`]
|
768
|
+
});
|
915
769
|
__publicField(this, "name", "WebSocketRequestError");
|
916
770
|
}
|
917
771
|
};
|
@@ -921,18 +775,11 @@ var RpcError = class extends BaseError {
|
|
921
775
|
error,
|
922
776
|
url
|
923
777
|
}) {
|
924
|
-
super(
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
`Request body: ${stringify(body)}`
|
930
|
-
].join("\n"),
|
931
|
-
{
|
932
|
-
cause: error,
|
933
|
-
details: error.message
|
934
|
-
}
|
935
|
-
);
|
778
|
+
super("RPC Request failed.", {
|
779
|
+
cause: error,
|
780
|
+
details: error.message,
|
781
|
+
metaMessages: [`URL: ${getUrl(url)}`, `Request body: ${stringify(body)}`]
|
782
|
+
});
|
936
783
|
__publicField(this, "code");
|
937
784
|
__publicField(this, "name", "RpcError");
|
938
785
|
this.code = error.code;
|
@@ -943,17 +790,10 @@ var TimeoutError = class extends BaseError {
|
|
943
790
|
body,
|
944
791
|
url
|
945
792
|
}) {
|
946
|
-
super(
|
947
|
-
|
948
|
-
|
949
|
-
|
950
|
-
`URL: ${url}`,
|
951
|
-
`Request body: ${stringify(body)}`
|
952
|
-
].join("\n"),
|
953
|
-
{
|
954
|
-
details: "The request timed out."
|
955
|
-
}
|
956
|
-
);
|
793
|
+
super("The request took too long to respond.", {
|
794
|
+
details: "The request timed out.",
|
795
|
+
metaMessages: [`URL: ${getUrl(url)}`, `Request body: ${stringify(body)}`]
|
796
|
+
});
|
957
797
|
__publicField(this, "name", "TimeoutError");
|
958
798
|
}
|
959
799
|
};
|
@@ -1420,9 +1260,9 @@ var paramsRegex = /((function|event)\s)?(.*)(\((.*)\))/;
|
|
1420
1260
|
function extractFunctionParts(def) {
|
1421
1261
|
const parts = def.match(paramsRegex);
|
1422
1262
|
const type = _optionalChain([parts, 'optionalAccess', _6 => _6[2]]) || void 0;
|
1423
|
-
const
|
1263
|
+
const name2 = _optionalChain([parts, 'optionalAccess', _7 => _7[3]]);
|
1424
1264
|
const params = _optionalChain([parts, 'optionalAccess', _8 => _8[5]]) || void 0;
|
1425
|
-
return { type, name, params };
|
1265
|
+
return { type, name: name2, params };
|
1426
1266
|
}
|
1427
1267
|
function extractFunctionName(def) {
|
1428
1268
|
return extractFunctionParts(def).name;
|
@@ -1485,11 +1325,11 @@ function keccak256(value, to_) {
|
|
1485
1325
|
// src/utils/hash/hashFunction.ts
|
1486
1326
|
var hash = (value) => keccak256(encodeBytes(value));
|
1487
1327
|
function hashFunction(def) {
|
1488
|
-
const
|
1328
|
+
const name2 = extractFunctionName(def);
|
1489
1329
|
const params = extractFunctionParams(def);
|
1490
1330
|
if (!params || params.length === 0)
|
1491
1331
|
return hash(def.replace(/ /g, ""));
|
1492
|
-
return hash(`${
|
1332
|
+
return hash(`${name2}(${params.map(({ type }) => type).join(",")})`);
|
1493
1333
|
}
|
1494
1334
|
|
1495
1335
|
// src/utils/hash/getEventSignature.ts
|
@@ -1521,7 +1361,7 @@ function getAddress(address) {
|
|
1521
1361
|
}
|
1522
1362
|
|
1523
1363
|
// src/utils/address/getContractAddress.ts
|
1524
|
-
function
|
1364
|
+
function getContractAddress2(opts) {
|
1525
1365
|
if (opts.opcode === "CREATE2")
|
1526
1366
|
return getCreate2Address(opts);
|
1527
1367
|
return getCreateAddress(opts);
|
@@ -1908,7 +1748,7 @@ function decodeString(data, { position }) {
|
|
1908
1748
|
return { consumed: 32, value };
|
1909
1749
|
}
|
1910
1750
|
function decodeTuple(data, { param, position }) {
|
1911
|
-
const hasUnnamedChild = param.components.length === 0 || param.components.some(({ name }) => !
|
1751
|
+
const hasUnnamedChild = param.components.length === 0 || param.components.some(({ name: name2 }) => !name2);
|
1912
1752
|
let value = hasUnnamedChild ? [] : {};
|
1913
1753
|
let consumed = 0;
|
1914
1754
|
if (hasDynamicChild(param)) {
|
@@ -2011,7 +1851,7 @@ function decodeEventLog({
|
|
2011
1851
|
throw new AbiEventSignatureNotFoundError(signature, {
|
2012
1852
|
docsPath: "/docs/contract/decodeEventLog"
|
2013
1853
|
});
|
2014
|
-
const { name, inputs } = abiItem;
|
1854
|
+
const { name: name2, inputs } = abiItem;
|
2015
1855
|
const isUnnamed = _optionalChain([inputs, 'optionalAccess', _22 => _22.some, 'call', _23 => _23((x) => !("name" in x && x.name))]);
|
2016
1856
|
let args = isUnnamed ? [] : {};
|
2017
1857
|
for (let i = 0; i < inputs.length; i++) {
|
@@ -2041,7 +1881,7 @@ function decodeEventLog({
|
|
2041
1881
|
}
|
2042
1882
|
}
|
2043
1883
|
return {
|
2044
|
-
eventName:
|
1884
|
+
eventName: name2,
|
2045
1885
|
args: Object.values(args).length > 0 ? args : void 0
|
2046
1886
|
};
|
2047
1887
|
}
|
@@ -2069,8 +1909,8 @@ function decodeFunctionData({ abi, data }) {
|
|
2069
1909
|
}
|
2070
1910
|
|
2071
1911
|
// src/utils/abi/getAbiItem.ts
|
2072
|
-
function getAbiItem({ abi, args = [], name }) {
|
2073
|
-
const abiItems = abi.filter((x) => "name" in x && x.name ===
|
1912
|
+
function getAbiItem({ abi, args = [], name: name2 }) {
|
1913
|
+
const abiItems = abi.filter((x) => "name" in x && x.name === name2);
|
2074
1914
|
if (abiItems.length === 0)
|
2075
1915
|
return void 0;
|
2076
1916
|
if (abiItems.length === 1)
|
@@ -2300,42 +2140,175 @@ function formatAbiItemWithArgs({
|
|
2300
2140
|
).join(", ")})`;
|
2301
2141
|
}
|
2302
2142
|
|
2143
|
+
// src/utils/promise/withCache.ts
|
2144
|
+
var promiseCache = /* @__PURE__ */ new Map();
|
2145
|
+
var responseCache = /* @__PURE__ */ new Map();
|
2146
|
+
function getCache(cacheKey) {
|
2147
|
+
const buildCache = (cacheKey2, cache) => ({
|
2148
|
+
clear: () => cache.delete(cacheKey2),
|
2149
|
+
get: () => cache.get(cacheKey2),
|
2150
|
+
set: (data) => cache.set(cacheKey2, data)
|
2151
|
+
});
|
2152
|
+
const promise = buildCache(cacheKey, promiseCache);
|
2153
|
+
const response = buildCache(
|
2154
|
+
cacheKey,
|
2155
|
+
responseCache
|
2156
|
+
);
|
2157
|
+
return {
|
2158
|
+
clear: () => {
|
2159
|
+
promise.clear();
|
2160
|
+
response.clear();
|
2161
|
+
},
|
2162
|
+
promise,
|
2163
|
+
response
|
2164
|
+
};
|
2165
|
+
}
|
2166
|
+
async function withCache(fn, { cacheKey, maxAge = Infinity }) {
|
2167
|
+
const cache = getCache(cacheKey);
|
2168
|
+
const response = cache.response.get();
|
2169
|
+
if (response && maxAge > 0) {
|
2170
|
+
const age = (/* @__PURE__ */ new Date()).getTime() - response.created.getTime();
|
2171
|
+
if (age < maxAge)
|
2172
|
+
return response.data;
|
2173
|
+
}
|
2174
|
+
let promise = cache.promise.get();
|
2175
|
+
if (!promise) {
|
2176
|
+
promise = fn();
|
2177
|
+
cache.promise.set(promise);
|
2178
|
+
}
|
2179
|
+
const data = await promise;
|
2180
|
+
cache.promise.clear();
|
2181
|
+
cache.response.set({ created: /* @__PURE__ */ new Date(), data });
|
2182
|
+
return data;
|
2183
|
+
}
|
2184
|
+
|
2185
|
+
// src/utils/wait.ts
|
2186
|
+
async function wait(time) {
|
2187
|
+
return new Promise((res) => setTimeout(res, time));
|
2188
|
+
}
|
2189
|
+
|
2190
|
+
// src/utils/promise/withRetry.ts
|
2191
|
+
function withRetry(fn, {
|
2192
|
+
delay: delay_ = 100,
|
2193
|
+
retryCount = 2,
|
2194
|
+
shouldRetry = () => true
|
2195
|
+
} = {}) {
|
2196
|
+
return new Promise((resolve, reject) => {
|
2197
|
+
const attemptRetry = async ({ count = 0 } = {}) => {
|
2198
|
+
const retry = async ({ error }) => {
|
2199
|
+
const delay = typeof delay_ === "function" ? delay_({ count, error }) : delay_;
|
2200
|
+
if (delay)
|
2201
|
+
await wait(delay);
|
2202
|
+
attemptRetry({ count: count + 1 });
|
2203
|
+
};
|
2204
|
+
try {
|
2205
|
+
const data = await fn();
|
2206
|
+
resolve(data);
|
2207
|
+
} catch (err) {
|
2208
|
+
if (count < retryCount && await shouldRetry({ count, error: err }))
|
2209
|
+
return retry({ error: err });
|
2210
|
+
reject(err);
|
2211
|
+
}
|
2212
|
+
};
|
2213
|
+
attemptRetry();
|
2214
|
+
});
|
2215
|
+
}
|
2216
|
+
|
2217
|
+
// src/utils/promise/withTimeout.ts
|
2218
|
+
function withTimeout(fn, {
|
2219
|
+
errorInstance,
|
2220
|
+
timeout,
|
2221
|
+
signal
|
2222
|
+
}) {
|
2223
|
+
return new Promise((resolve, reject) => {
|
2224
|
+
;
|
2225
|
+
(async () => {
|
2226
|
+
let timeoutId;
|
2227
|
+
try {
|
2228
|
+
const controller = new AbortController();
|
2229
|
+
if (timeout > 0) {
|
2230
|
+
timeoutId = setTimeout(() => {
|
2231
|
+
if (signal) {
|
2232
|
+
controller.abort();
|
2233
|
+
} else {
|
2234
|
+
reject(errorInstance);
|
2235
|
+
}
|
2236
|
+
}, timeout);
|
2237
|
+
}
|
2238
|
+
resolve(await fn({ signal: _optionalChain([controller, 'optionalAccess', _32 => _32.signal]) }));
|
2239
|
+
} catch (err) {
|
2240
|
+
if (err.name === "AbortError")
|
2241
|
+
reject(errorInstance);
|
2242
|
+
reject(err);
|
2243
|
+
} finally {
|
2244
|
+
clearTimeout(timeoutId);
|
2245
|
+
}
|
2246
|
+
})();
|
2247
|
+
});
|
2248
|
+
}
|
2249
|
+
|
2303
2250
|
// src/utils/buildRequest.ts
|
2304
|
-
|
2305
|
-
|
2306
|
-
|
2307
|
-
|
2308
|
-
|
2309
|
-
|
2310
|
-
|
2311
|
-
|
2312
|
-
|
2313
|
-
|
2314
|
-
|
2315
|
-
|
2316
|
-
|
2317
|
-
|
2318
|
-
|
2319
|
-
|
2320
|
-
|
2321
|
-
|
2322
|
-
|
2323
|
-
|
2324
|
-
|
2325
|
-
|
2326
|
-
|
2327
|
-
|
2328
|
-
|
2329
|
-
|
2330
|
-
|
2331
|
-
|
2332
|
-
|
2333
|
-
|
2334
|
-
|
2335
|
-
|
2336
|
-
|
2251
|
+
var isDeterministicError = (error) => {
|
2252
|
+
if (error instanceof UnknownRpcError)
|
2253
|
+
return false;
|
2254
|
+
if ("code" in error)
|
2255
|
+
return error.code !== -32603 && error.code !== -32005;
|
2256
|
+
if (error instanceof HttpRequestError && error.status)
|
2257
|
+
return error.status !== 408 && error.status !== 413 && error.status !== 429 && error.status !== 500;
|
2258
|
+
return true;
|
2259
|
+
};
|
2260
|
+
function buildRequest(request, {
|
2261
|
+
retryDelay = 150,
|
2262
|
+
retryCount = 3
|
2263
|
+
} = {}) {
|
2264
|
+
return async (args) => withRetry(
|
2265
|
+
async () => {
|
2266
|
+
try {
|
2267
|
+
return await request(args);
|
2268
|
+
} catch (err_) {
|
2269
|
+
let err = err_;
|
2270
|
+
if (err.code === -32700)
|
2271
|
+
throw new ParseRpcError(err);
|
2272
|
+
if (err.code === -32600)
|
2273
|
+
throw new InvalidRequestRpcError(err);
|
2274
|
+
if (err.code === -32601)
|
2275
|
+
throw new MethodNotFoundRpcError(err);
|
2276
|
+
if (err.code === -32602)
|
2277
|
+
throw new InvalidParamsRpcError(err);
|
2278
|
+
if (err.code === -32603)
|
2279
|
+
throw new InternalRpcError(err);
|
2280
|
+
if (err.code === -32e3)
|
2281
|
+
throw new InvalidInputRpcError(err);
|
2282
|
+
if (err.code === -32001)
|
2283
|
+
throw new ResourceNotFoundRpcError(err);
|
2284
|
+
if (err.code === -32002)
|
2285
|
+
throw new ResourceUnavailableRpcError(err);
|
2286
|
+
if (err.code === -32003)
|
2287
|
+
throw new TransactionRejectedRpcError(err);
|
2288
|
+
if (err.code === -32004)
|
2289
|
+
throw new MethodNotSupportedRpcError(err);
|
2290
|
+
if (err.code === -32005)
|
2291
|
+
throw new LimitExceededRpcError(err);
|
2292
|
+
if (err.code === -32006)
|
2293
|
+
throw new JsonRpcVersionUnsupportedError(err);
|
2294
|
+
if (err_ instanceof BaseError)
|
2295
|
+
throw err_;
|
2296
|
+
throw new UnknownRpcError(err);
|
2297
|
+
}
|
2298
|
+
},
|
2299
|
+
{
|
2300
|
+
delay: ({ count, error }) => {
|
2301
|
+
if (error && error instanceof HttpRequestError) {
|
2302
|
+
const retryAfter = _optionalChain([error, 'optionalAccess', _33 => _33.headers, 'optionalAccess', _34 => _34.get, 'call', _35 => _35("Retry-After")]);
|
2303
|
+
if (_optionalChain([retryAfter, 'optionalAccess', _36 => _36.match, 'call', _37 => _37(/\d/)]))
|
2304
|
+
return parseInt(retryAfter) * 1e3;
|
2305
|
+
}
|
2306
|
+
return ~~(1 << count) * retryDelay;
|
2307
|
+
},
|
2308
|
+
retryCount,
|
2309
|
+
shouldRetry: ({ error }) => !isDeterministicError(error)
|
2337
2310
|
}
|
2338
|
-
|
2311
|
+
);
|
2339
2312
|
}
|
2340
2313
|
|
2341
2314
|
// src/utils/chain.ts
|
@@ -2362,7 +2335,7 @@ function defineFormatter({
|
|
2362
2335
|
}
|
2363
2336
|
return {
|
2364
2337
|
...formatted,
|
2365
|
-
..._optionalChain([formatOverride, 'optionalCall',
|
2338
|
+
..._optionalChain([formatOverride, 'optionalCall', _38 => _38(data)])
|
2366
2339
|
};
|
2367
2340
|
};
|
2368
2341
|
}
|
@@ -2402,7 +2375,7 @@ var defineTransaction = defineFormatter({ format: formatTransaction });
|
|
2402
2375
|
|
2403
2376
|
// src/utils/formatters/block.ts
|
2404
2377
|
function formatBlock(block) {
|
2405
|
-
const transactions = _optionalChain([block, 'access',
|
2378
|
+
const transactions = _optionalChain([block, 'access', _39 => _39.transactions, 'optionalAccess', _40 => _40.map, 'call', _41 => _41((transaction) => {
|
2406
2379
|
if (typeof transaction === "string")
|
2407
2380
|
return transaction;
|
2408
2381
|
return formatTransaction(transaction);
|
@@ -2428,7 +2401,7 @@ function extract(value, { formatter }) {
|
|
2428
2401
|
return {};
|
2429
2402
|
const keys = Object.keys(formatter({}));
|
2430
2403
|
return keys.reduce((data, key) => {
|
2431
|
-
if (_optionalChain([value, 'optionalAccess',
|
2404
|
+
if (_optionalChain([value, 'optionalAccess', _42 => _42.hasOwnProperty, 'call', _43 => _43(key)])) {
|
2432
2405
|
;
|
2433
2406
|
data[key] = value[key];
|
2434
2407
|
}
|
@@ -2442,7 +2415,7 @@ function formatFeeHistory(feeHistory) {
|
|
2442
2415
|
baseFeePerGas: feeHistory.baseFeePerGas.map((value) => BigInt(value)),
|
2443
2416
|
gasUsedRatio: feeHistory.gasUsedRatio,
|
2444
2417
|
oldestBlock: BigInt(feeHistory.oldestBlock),
|
2445
|
-
reward: _optionalChain([feeHistory, 'access',
|
2418
|
+
reward: _optionalChain([feeHistory, 'access', _44 => _44.reward, 'optionalAccess', _45 => _45.map, 'call', _46 => _46(
|
2446
2419
|
(reward) => reward.map((value) => BigInt(value))
|
2447
2420
|
)])
|
2448
2421
|
};
|
@@ -2500,116 +2473,6 @@ var defineTransactionRequest = defineFormatter({
|
|
2500
2473
|
var _isomorphicunfetch = require('isomorphic-unfetch'); var _isomorphicunfetch2 = _interopRequireDefault(_isomorphicunfetch);
|
2501
2474
|
var _isomorphicws = require('isomorphic-ws'); var _isomorphicws2 = _interopRequireDefault(_isomorphicws);
|
2502
2475
|
|
2503
|
-
// src/utils/promise/withCache.ts
|
2504
|
-
var promiseCache = /* @__PURE__ */ new Map();
|
2505
|
-
var responseCache = /* @__PURE__ */ new Map();
|
2506
|
-
function getCache(cacheKey) {
|
2507
|
-
const buildCache = (cacheKey2, cache) => ({
|
2508
|
-
clear: () => cache.delete(cacheKey2),
|
2509
|
-
get: () => cache.get(cacheKey2),
|
2510
|
-
set: (data) => cache.set(cacheKey2, data)
|
2511
|
-
});
|
2512
|
-
const promise = buildCache(cacheKey, promiseCache);
|
2513
|
-
const response = buildCache(
|
2514
|
-
cacheKey,
|
2515
|
-
responseCache
|
2516
|
-
);
|
2517
|
-
return {
|
2518
|
-
clear: () => {
|
2519
|
-
promise.clear();
|
2520
|
-
response.clear();
|
2521
|
-
},
|
2522
|
-
promise,
|
2523
|
-
response
|
2524
|
-
};
|
2525
|
-
}
|
2526
|
-
async function withCache(fn, { cacheKey, maxAge = Infinity }) {
|
2527
|
-
const cache = getCache(cacheKey);
|
2528
|
-
const response = cache.response.get();
|
2529
|
-
if (response && maxAge > 0) {
|
2530
|
-
const age = (/* @__PURE__ */ new Date()).getTime() - response.created.getTime();
|
2531
|
-
if (age < maxAge)
|
2532
|
-
return response.data;
|
2533
|
-
}
|
2534
|
-
let promise = cache.promise.get();
|
2535
|
-
if (!promise) {
|
2536
|
-
promise = fn();
|
2537
|
-
cache.promise.set(promise);
|
2538
|
-
}
|
2539
|
-
const data = await promise;
|
2540
|
-
cache.promise.clear();
|
2541
|
-
cache.response.set({ created: /* @__PURE__ */ new Date(), data });
|
2542
|
-
return data;
|
2543
|
-
}
|
2544
|
-
|
2545
|
-
// src/utils/wait.ts
|
2546
|
-
async function wait(time) {
|
2547
|
-
return new Promise((res) => setTimeout(res, time));
|
2548
|
-
}
|
2549
|
-
|
2550
|
-
// src/utils/promise/withRetry.ts
|
2551
|
-
function withRetry(fn, {
|
2552
|
-
delay: delay_ = 100,
|
2553
|
-
retryCount = 2,
|
2554
|
-
shouldRetryOnResponse = () => false,
|
2555
|
-
shouldRetryOnError = () => false
|
2556
|
-
} = {}) {
|
2557
|
-
return new Promise((resolve, reject) => {
|
2558
|
-
const attemptRetry = async ({ count = 0 } = {}) => {
|
2559
|
-
const retry = async ({ data } = {}) => {
|
2560
|
-
const delay = typeof delay_ === "function" ? delay_({ count, data }) : delay_;
|
2561
|
-
if (delay)
|
2562
|
-
await wait(delay);
|
2563
|
-
attemptRetry({ count: count + 1 });
|
2564
|
-
};
|
2565
|
-
try {
|
2566
|
-
const data = await fn();
|
2567
|
-
if (count < retryCount && await shouldRetryOnResponse({ count, data }))
|
2568
|
-
return retry({ data });
|
2569
|
-
resolve(data);
|
2570
|
-
} catch (err) {
|
2571
|
-
if (count < retryCount && await shouldRetryOnError({ count, error: err }))
|
2572
|
-
return retry();
|
2573
|
-
reject(err);
|
2574
|
-
}
|
2575
|
-
};
|
2576
|
-
attemptRetry();
|
2577
|
-
});
|
2578
|
-
}
|
2579
|
-
|
2580
|
-
// src/utils/promise/withTimeout.ts
|
2581
|
-
function withTimeout(fn, {
|
2582
|
-
errorInstance,
|
2583
|
-
timeout,
|
2584
|
-
signal
|
2585
|
-
}) {
|
2586
|
-
return new Promise((resolve, reject) => {
|
2587
|
-
;
|
2588
|
-
(async () => {
|
2589
|
-
let timeoutId;
|
2590
|
-
try {
|
2591
|
-
const controller = new AbortController();
|
2592
|
-
if (timeout > 0) {
|
2593
|
-
timeoutId = setTimeout(() => {
|
2594
|
-
if (signal) {
|
2595
|
-
controller.abort();
|
2596
|
-
} else {
|
2597
|
-
reject(errorInstance);
|
2598
|
-
}
|
2599
|
-
}, timeout);
|
2600
|
-
}
|
2601
|
-
resolve(await fn({ signal: _optionalChain([controller, 'optionalAccess', _41 => _41.signal]) }));
|
2602
|
-
} catch (err) {
|
2603
|
-
if (err.name === "AbortError")
|
2604
|
-
reject(errorInstance);
|
2605
|
-
reject(err);
|
2606
|
-
} finally {
|
2607
|
-
clearTimeout(timeoutId);
|
2608
|
-
}
|
2609
|
-
})();
|
2610
|
-
});
|
2611
|
-
}
|
2612
|
-
|
2613
2476
|
// src/utils/stringify.ts
|
2614
2477
|
function stringify(value) {
|
2615
2478
|
return JSON.stringify(
|
@@ -2622,12 +2485,10 @@ function stringify(value) {
|
|
2622
2485
|
var id = 0;
|
2623
2486
|
async function http(url, {
|
2624
2487
|
body,
|
2625
|
-
retryDelay = 100,
|
2626
|
-
retryCount = 2,
|
2627
2488
|
timeout = 0
|
2628
2489
|
}) {
|
2629
|
-
|
2630
|
-
|
2490
|
+
try {
|
2491
|
+
const response = await withTimeout(
|
2631
2492
|
async ({ signal }) => {
|
2632
2493
|
const response2 = await _isomorphicunfetch2.default.call(void 0, url, {
|
2633
2494
|
headers: {
|
@@ -2644,42 +2505,39 @@ async function http(url, {
|
|
2644
2505
|
timeout,
|
2645
2506
|
signal: true
|
2646
2507
|
}
|
2647
|
-
)
|
2648
|
-
|
2649
|
-
|
2650
|
-
|
2651
|
-
|
2652
|
-
|
2653
|
-
return ~~((Math.random() + 0.5) * (1 << count)) * retryDelay;
|
2654
|
-
},
|
2655
|
-
retryCount,
|
2656
|
-
shouldRetryOnResponse: async ({ data: data2 }) => {
|
2657
|
-
if (data2.status >= 500)
|
2658
|
-
return true;
|
2659
|
-
if ([408, 413, 429].includes(data2.status))
|
2660
|
-
return true;
|
2661
|
-
return false;
|
2662
|
-
}
|
2508
|
+
);
|
2509
|
+
let data;
|
2510
|
+
if (_optionalChain([response, 'access', _47 => _47.headers, 'access', _48 => _48.get, 'call', _49 => _49("Content-Type"), 'optionalAccess', _50 => _50.startsWith, 'call', _51 => _51("application/json")])) {
|
2511
|
+
data = await response.json();
|
2512
|
+
} else {
|
2513
|
+
data = await response.text();
|
2663
2514
|
}
|
2664
|
-
|
2665
|
-
|
2666
|
-
|
2667
|
-
|
2668
|
-
|
2669
|
-
|
2670
|
-
|
2671
|
-
|
2515
|
+
if (!response.ok) {
|
2516
|
+
throw new HttpRequestError({
|
2517
|
+
body,
|
2518
|
+
details: stringify(data.error) || response.statusText,
|
2519
|
+
headers: response.headers,
|
2520
|
+
status: response.status,
|
2521
|
+
url
|
2522
|
+
});
|
2523
|
+
}
|
2524
|
+
if (data.error) {
|
2525
|
+
throw new RpcError({ body, error: data.error, url });
|
2526
|
+
}
|
2527
|
+
return data;
|
2528
|
+
} catch (err) {
|
2529
|
+
if (err instanceof HttpRequestError)
|
2530
|
+
throw err;
|
2531
|
+
if (err instanceof RpcError)
|
2532
|
+
throw err;
|
2533
|
+
if (err instanceof TimeoutError)
|
2534
|
+
throw err;
|
2672
2535
|
throw new HttpRequestError({
|
2673
2536
|
body,
|
2674
|
-
details:
|
2675
|
-
status: response.status,
|
2537
|
+
details: err.message,
|
2676
2538
|
url
|
2677
2539
|
});
|
2678
2540
|
}
|
2679
|
-
if (data.error) {
|
2680
|
-
throw new RpcError({ body, error: data.error, url });
|
2681
|
-
}
|
2682
|
-
return data;
|
2683
2541
|
}
|
2684
2542
|
var sockets = /* @__PURE__ */ new Map();
|
2685
2543
|
async function getSocket(url_) {
|
@@ -3004,5 +2862,6 @@ function parseGwei(ether, unit = "wei") {
|
|
3004
2862
|
|
3005
2863
|
|
3006
2864
|
|
3007
|
-
|
3008
|
-
|
2865
|
+
|
2866
|
+
exports.BaseError = BaseError; exports.AbiConstructorNotFoundError = AbiConstructorNotFoundError; exports.AbiConstructorParamsNotFoundError = AbiConstructorParamsNotFoundError; exports.AbiDecodingDataSizeInvalidError = AbiDecodingDataSizeInvalidError; exports.AbiDecodingZeroDataError = AbiDecodingZeroDataError; exports.AbiEncodingArrayLengthMismatchError = AbiEncodingArrayLengthMismatchError; exports.AbiEncodingLengthMismatchError = AbiEncodingLengthMismatchError; exports.AbiErrorInputsNotFoundError = AbiErrorInputsNotFoundError; exports.AbiErrorNotFoundError = AbiErrorNotFoundError; exports.AbiErrorSignatureNotFoundError = AbiErrorSignatureNotFoundError; exports.AbiEventNotFoundError = AbiEventNotFoundError; exports.AbiFunctionNotFoundError = AbiFunctionNotFoundError; exports.AbiFunctionOutputsNotFoundError = AbiFunctionOutputsNotFoundError; exports.AbiFunctionSignatureNotFoundError = AbiFunctionSignatureNotFoundError; exports.InvalidAbiEncodingTypeError = InvalidAbiEncodingTypeError; exports.InvalidAbiDecodingTypeError = InvalidAbiDecodingTypeError; exports.InvalidArrayError = InvalidArrayError; exports.InvalidDefinitionTypeError = InvalidDefinitionTypeError; exports.InvalidAddressError = InvalidAddressError; exports.BlockNotFoundError = BlockNotFoundError; exports.ChainDoesNotSupportContract = ChainDoesNotSupportContract; exports.multicall3Abi = multicall3Abi; exports.panicReasons = panicReasons; exports.ContractFunctionExecutionError = ContractFunctionExecutionError; exports.ContractFunctionRevertedError = ContractFunctionRevertedError; exports.ContractFunctionZeroDataError = ContractFunctionZeroDataError; exports.RawContractError = RawContractError; exports.SizeExceedsPaddingSizeError = SizeExceedsPaddingSizeError; exports.DataLengthTooLongError = DataLengthTooLongError; exports.DataLengthTooShortError = DataLengthTooShortError; exports.InvalidBytesBooleanError = InvalidBytesBooleanError; exports.InvalidHexBooleanError = InvalidHexBooleanError; exports.InvalidHexValueError = InvalidHexValueError; exports.OffsetOutOfBoundsError = OffsetOutOfBoundsError; exports.FilterTypeNotSupportedError = FilterTypeNotSupportedError; exports.RequestError = RequestError; exports.RpcRequestError = RpcRequestError; exports.ParseRpcError = ParseRpcError; exports.InvalidRequestRpcError = InvalidRequestRpcError; exports.MethodNotFoundRpcError = MethodNotFoundRpcError; exports.InvalidParamsRpcError = InvalidParamsRpcError; exports.InternalRpcError = InternalRpcError; exports.InvalidInputRpcError = InvalidInputRpcError; exports.ResourceNotFoundRpcError = ResourceNotFoundRpcError; exports.ResourceUnavailableRpcError = ResourceUnavailableRpcError; exports.TransactionRejectedRpcError = TransactionRejectedRpcError; exports.MethodNotSupportedRpcError = MethodNotSupportedRpcError; exports.LimitExceededRpcError = LimitExceededRpcError; exports.JsonRpcVersionUnsupportedError = JsonRpcVersionUnsupportedError; exports.UnknownRpcError = UnknownRpcError; exports.HttpRequestError = HttpRequestError; exports.WebSocketRequestError = WebSocketRequestError; exports.RpcError = RpcError; exports.TimeoutError = TimeoutError; exports.InvalidGasArgumentsError = InvalidGasArgumentsError; exports.TransactionNotFoundError = TransactionNotFoundError; exports.TransactionReceiptNotFoundError = TransactionReceiptNotFoundError; exports.WaitForTransactionReceiptTimeoutError = WaitForTransactionReceiptTimeoutError; exports.UrlRequiredError = UrlRequiredError; exports.concat = concat; exports.isBytes = isBytes; exports.isHex = isHex; exports.pad = pad; exports.padHex = padHex; exports.padBytes = padBytes; exports.trim = trim; exports.size = size; exports.slice = slice; exports.sliceBytes = sliceBytes; exports.sliceHex = sliceHex; exports.boolToHex = boolToHex; exports.bytesToHex = bytesToHex; exports.encodeHex = encodeHex; exports.numberToHex = numberToHex; exports.stringToHex = stringToHex; exports.boolToBytes = boolToBytes; exports.encodeBytes = encodeBytes; exports.hexToBytes = hexToBytes; exports.numberToBytes = numberToBytes; exports.stringToBytes = stringToBytes; exports.encodeRlp = encodeRlp; exports.decodeHex = decodeHex; exports.hexToBigInt = hexToBigInt; exports.hexToBool = hexToBool; exports.hexToNumber = hexToNumber; exports.hexToString = hexToString; exports.decodeBytes = decodeBytes; exports.bytesToBigint = bytesToBigint; exports.bytesToBool = bytesToBool; exports.bytesToNumber = bytesToNumber; exports.bytesToString = bytesToString; exports.decodeRlp = decodeRlp; exports.extractFunctionParts = extractFunctionParts; exports.extractFunctionName = extractFunctionName; exports.extractFunctionParams = extractFunctionParams; exports.extractFunctionType = extractFunctionType; exports.getContractError = getContractError; exports.keccak256 = keccak256; exports.getEventSignature = getEventSignature; exports.getFunctionSignature = getFunctionSignature; exports.checksumAddress = checksumAddress; exports.getAddress = getAddress; exports.getContractAddress = getContractAddress2; exports.getCreateAddress = getCreateAddress; exports.getCreate2Address = getCreate2Address; exports.isAddress = isAddress; exports.isAddressEqual = isAddressEqual; exports.encodeAbi = encodeAbi; exports.decodeAbi = decodeAbi; exports.formatAbiItem = formatAbiItem; exports.decodeErrorResult = decodeErrorResult; exports.decodeEventLog = decodeEventLog; exports.decodeFunctionData = decodeFunctionData; exports.getAbiItem = getAbiItem; exports.decodeFunctionResult = decodeFunctionResult; exports.encodeDeployData = encodeDeployData; exports.encodeErrorResult = encodeErrorResult; exports.encodeEventTopics = encodeEventTopics; exports.encodeFunctionData = encodeFunctionData; exports.encodeFunctionResult = encodeFunctionResult; exports.formatAbiItemWithArgs = formatAbiItemWithArgs; exports.getCache = getCache; exports.withCache = withCache; exports.wait = wait; exports.isDeterministicError = isDeterministicError; exports.buildRequest = buildRequest; exports.defineChain = defineChain; exports.format = format3; exports.defineFormatter = defineFormatter; exports.transactionType = transactionType; exports.formatTransaction = formatTransaction; exports.defineTransaction = defineTransaction; exports.formatBlock = formatBlock; exports.defineBlock = defineBlock; exports.extract = extract; exports.formatFeeHistory = formatFeeHistory; exports.formatLog = formatLog; exports.formatTransactionReceipt = formatTransactionReceipt; exports.defineTransactionReceipt = defineTransactionReceipt; exports.formatTransactionRequest = formatTransactionRequest; exports.defineTransactionRequest = defineTransactionRequest; exports.stringify = stringify; exports.getSocket = getSocket; exports.rpc = rpc; exports.etherUnits = etherUnits; exports.gweiUnits = gweiUnits; exports.weiUnits = weiUnits; exports.formatUnit = formatUnit; exports.formatEther = formatEther; exports.formatGwei = formatGwei; exports.parseUnit = parseUnit; exports.parseEther = parseEther; exports.parseGwei = parseGwei;
|
2867
|
+
//# sourceMappingURL=chunk-DSQO3E4F.js.map
|