viem 0.3.1 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/actions/ens/getEnsAddress.js.map +1 -1
- package/dist/cjs/actions/ens/getEnsAvatar.js.map +1 -1
- package/dist/cjs/actions/ens/getEnsName.js.map +1 -1
- package/dist/cjs/actions/ens/getEnsResolver.js.map +1 -1
- package/dist/cjs/actions/ens/getEnsText.js.map +1 -1
- package/dist/cjs/actions/getContract.js.map +1 -1
- package/dist/cjs/actions/public/estimateContractGas.js.map +1 -1
- package/dist/cjs/actions/public/getBalance.js.map +1 -1
- package/dist/cjs/actions/public/getFilterChanges.js.map +1 -1
- package/dist/cjs/actions/public/getFilterLogs.js.map +1 -1
- package/dist/cjs/actions/public/readContract.js.map +1 -1
- package/dist/cjs/actions/public/simulateContract.js.map +1 -1
- package/dist/cjs/actions/public/uninstallFilter.js.map +1 -1
- package/dist/cjs/actions/public/waitForTransactionReceipt.js.map +1 -1
- package/dist/cjs/actions/public/watchContractEvent.js.map +1 -1
- package/dist/cjs/actions/public/watchEvent.js.map +1 -1
- package/dist/cjs/actions/public/watchPendingTransactions.js.map +1 -1
- package/dist/cjs/actions/test/dropTransaction.js.map +1 -1
- package/dist/cjs/actions/test/getAutomine.js.map +1 -1
- package/dist/cjs/actions/test/getTxpoolContent.js.map +1 -1
- package/dist/cjs/actions/test/getTxpoolStatus.js.map +1 -1
- package/dist/cjs/actions/test/impersonateAccount.js.map +1 -1
- package/dist/cjs/actions/test/increaseTime.js.map +1 -1
- package/dist/cjs/actions/test/inspectTxpool.js.map +1 -1
- package/dist/cjs/actions/test/mine.js.map +1 -1
- package/dist/cjs/actions/test/removeBlockTimestampInterval.js.map +1 -1
- package/dist/cjs/actions/test/reset.js.map +1 -1
- package/dist/cjs/actions/test/revert.js.map +1 -1
- package/dist/cjs/actions/test/sendUnsignedTransaction.js.map +1 -1
- package/dist/cjs/actions/test/setAutomine.js.map +1 -1
- package/dist/cjs/actions/test/setBalance.js.map +1 -1
- package/dist/cjs/actions/test/setBlockGasLimit.js.map +1 -1
- package/dist/cjs/actions/test/setBlockTimestampInterval.js.map +1 -1
- package/dist/cjs/actions/test/setCode.js.map +1 -1
- package/dist/cjs/actions/test/setCoinbase.js.map +1 -1
- package/dist/cjs/actions/test/setIntervalMining.js.map +1 -1
- package/dist/cjs/actions/test/setLoggingEnabled.js.map +1 -1
- package/dist/cjs/actions/test/setMinGasPrice.js.map +1 -1
- package/dist/cjs/actions/test/setNextBlockBaseFeePerGas.js.map +1 -1
- package/dist/cjs/actions/test/setNextBlockTimestamp.js.map +1 -1
- package/dist/cjs/actions/test/setNonce.js.map +1 -1
- package/dist/cjs/actions/test/setRpcUrl.js.map +1 -1
- package/dist/cjs/actions/test/setStorageAt.js.map +1 -1
- package/dist/cjs/actions/test/snapshot.js.map +1 -1
- package/dist/cjs/actions/test/stopImpersonatingAccount.js.map +1 -1
- package/dist/cjs/actions/wallet/addChain.js.map +1 -1
- package/dist/cjs/actions/wallet/getAddresses.js.map +1 -1
- package/dist/cjs/actions/wallet/getPermissions.js.map +1 -1
- package/dist/cjs/actions/wallet/requestAddresses.js.map +1 -1
- package/dist/cjs/actions/wallet/requestPermissions.js.map +1 -1
- package/dist/cjs/actions/wallet/sendTransaction.js.map +1 -1
- package/dist/cjs/actions/wallet/signMessage.js.map +1 -1
- package/dist/cjs/actions/wallet/signTypedData.js.map +1 -1
- package/dist/cjs/actions/wallet/switchChain.js.map +1 -1
- package/dist/cjs/actions/wallet/watchAsset.js.map +1 -1
- package/dist/cjs/actions/wallet/writeContract.js.map +1 -1
- package/dist/cjs/clients/createPublicClient.js.map +1 -1
- package/dist/cjs/clients/createTestClient.js.map +1 -1
- package/dist/cjs/clients/createWalletClient.js.map +1 -1
- package/dist/cjs/clients/decorators/test.js.map +1 -1
- package/dist/cjs/clients/decorators/wallet.js.map +1 -1
- package/dist/cjs/errors/version.js +1 -1
- package/dist/cjs/utils/rpc.js +3 -6
- package/dist/cjs/utils/rpc.js.map +1 -1
- package/dist/cjs/utils/transaction/serializeTransaction.js +13 -15
- package/dist/cjs/utils/transaction/serializeTransaction.js.map +1 -1
- package/dist/esm/actions/ens/getEnsAddress.js.map +1 -1
- package/dist/esm/actions/ens/getEnsAvatar.js.map +1 -1
- package/dist/esm/actions/ens/getEnsName.js.map +1 -1
- package/dist/esm/actions/ens/getEnsResolver.js.map +1 -1
- package/dist/esm/actions/ens/getEnsText.js.map +1 -1
- package/dist/esm/actions/getContract.js.map +1 -1
- package/dist/esm/actions/public/estimateContractGas.js.map +1 -1
- package/dist/esm/actions/public/getBalance.js.map +1 -1
- package/dist/esm/actions/public/getFilterChanges.js.map +1 -1
- package/dist/esm/actions/public/getFilterLogs.js.map +1 -1
- package/dist/esm/actions/public/readContract.js.map +1 -1
- package/dist/esm/actions/public/simulateContract.js.map +1 -1
- package/dist/esm/actions/public/uninstallFilter.js.map +1 -1
- package/dist/esm/actions/public/waitForTransactionReceipt.js.map +1 -1
- package/dist/esm/actions/public/watchContractEvent.js.map +1 -1
- package/dist/esm/actions/public/watchEvent.js.map +1 -1
- package/dist/esm/actions/public/watchPendingTransactions.js.map +1 -1
- package/dist/esm/actions/test/dropTransaction.js.map +1 -1
- package/dist/esm/actions/test/getAutomine.js.map +1 -1
- package/dist/esm/actions/test/getTxpoolContent.js.map +1 -1
- package/dist/esm/actions/test/getTxpoolStatus.js.map +1 -1
- package/dist/esm/actions/test/impersonateAccount.js.map +1 -1
- package/dist/esm/actions/test/increaseTime.js.map +1 -1
- package/dist/esm/actions/test/inspectTxpool.js.map +1 -1
- package/dist/esm/actions/test/mine.js.map +1 -1
- package/dist/esm/actions/test/removeBlockTimestampInterval.js.map +1 -1
- package/dist/esm/actions/test/reset.js.map +1 -1
- package/dist/esm/actions/test/revert.js.map +1 -1
- package/dist/esm/actions/test/sendUnsignedTransaction.js.map +1 -1
- package/dist/esm/actions/test/setAutomine.js.map +1 -1
- package/dist/esm/actions/test/setBalance.js.map +1 -1
- package/dist/esm/actions/test/setBlockGasLimit.js.map +1 -1
- package/dist/esm/actions/test/setBlockTimestampInterval.js.map +1 -1
- package/dist/esm/actions/test/setCode.js.map +1 -1
- package/dist/esm/actions/test/setCoinbase.js.map +1 -1
- package/dist/esm/actions/test/setIntervalMining.js.map +1 -1
- package/dist/esm/actions/test/setLoggingEnabled.js.map +1 -1
- package/dist/esm/actions/test/setMinGasPrice.js.map +1 -1
- package/dist/esm/actions/test/setNextBlockBaseFeePerGas.js.map +1 -1
- package/dist/esm/actions/test/setNextBlockTimestamp.js.map +1 -1
- package/dist/esm/actions/test/setNonce.js.map +1 -1
- package/dist/esm/actions/test/setRpcUrl.js.map +1 -1
- package/dist/esm/actions/test/setStorageAt.js.map +1 -1
- package/dist/esm/actions/test/snapshot.js.map +1 -1
- package/dist/esm/actions/test/stopImpersonatingAccount.js.map +1 -1
- package/dist/esm/actions/wallet/addChain.js.map +1 -1
- package/dist/esm/actions/wallet/getAddresses.js.map +1 -1
- package/dist/esm/actions/wallet/getPermissions.js.map +1 -1
- package/dist/esm/actions/wallet/requestAddresses.js.map +1 -1
- package/dist/esm/actions/wallet/requestPermissions.js.map +1 -1
- package/dist/esm/actions/wallet/sendTransaction.js.map +1 -1
- package/dist/esm/actions/wallet/signMessage.js.map +1 -1
- package/dist/esm/actions/wallet/signTypedData.js.map +1 -1
- package/dist/esm/actions/wallet/switchChain.js.map +1 -1
- package/dist/esm/actions/wallet/watchAsset.js.map +1 -1
- package/dist/esm/actions/wallet/writeContract.js.map +1 -1
- package/dist/esm/clients/createPublicClient.js.map +1 -1
- package/dist/esm/clients/createTestClient.js.map +1 -1
- package/dist/esm/clients/createWalletClient.js.map +1 -1
- package/dist/esm/clients/decorators/test.js.map +1 -1
- package/dist/esm/clients/decorators/wallet.js.map +1 -1
- package/dist/esm/errors/version.js +1 -1
- package/dist/esm/utils/rpc.js +1 -1
- package/dist/esm/utils/rpc.js.map +1 -1
- package/dist/esm/utils/transaction/serializeTransaction.js +13 -15
- package/dist/esm/utils/transaction/serializeTransaction.js.map +1 -1
- package/dist/types/actions/ens/getEnsAddress.d.ts +0 -1
- package/dist/types/actions/ens/getEnsAddress.d.ts.map +1 -1
- package/dist/types/actions/ens/getEnsAvatar.d.ts +0 -1
- package/dist/types/actions/ens/getEnsAvatar.d.ts.map +1 -1
- package/dist/types/actions/ens/getEnsName.d.ts +0 -1
- package/dist/types/actions/ens/getEnsName.d.ts.map +1 -1
- package/dist/types/actions/ens/getEnsResolver.d.ts +0 -1
- package/dist/types/actions/ens/getEnsResolver.d.ts.map +1 -1
- package/dist/types/actions/ens/getEnsText.d.ts +0 -1
- package/dist/types/actions/ens/getEnsText.d.ts.map +1 -1
- package/dist/types/actions/getContract.d.ts +104 -2
- package/dist/types/actions/getContract.d.ts.map +1 -1
- package/dist/types/actions/public/estimateContractGas.d.ts +0 -1
- package/dist/types/actions/public/estimateContractGas.d.ts.map +1 -1
- package/dist/types/actions/public/getBalance.d.ts +0 -1
- package/dist/types/actions/public/getBalance.d.ts.map +1 -1
- package/dist/types/actions/public/getFilterChanges.d.ts +0 -1
- package/dist/types/actions/public/getFilterChanges.d.ts.map +1 -1
- package/dist/types/actions/public/getFilterLogs.d.ts +0 -1
- package/dist/types/actions/public/getFilterLogs.d.ts.map +1 -1
- package/dist/types/actions/public/readContract.d.ts +2 -3
- package/dist/types/actions/public/readContract.d.ts.map +1 -1
- package/dist/types/actions/public/simulateContract.d.ts +1 -2
- package/dist/types/actions/public/simulateContract.d.ts.map +1 -1
- package/dist/types/actions/public/uninstallFilter.d.ts +0 -1
- package/dist/types/actions/public/uninstallFilter.d.ts.map +1 -1
- package/dist/types/actions/public/waitForTransactionReceipt.d.ts +0 -1
- package/dist/types/actions/public/waitForTransactionReceipt.d.ts.map +1 -1
- package/dist/types/actions/public/watchContractEvent.d.ts +0 -1
- package/dist/types/actions/public/watchContractEvent.d.ts.map +1 -1
- package/dist/types/actions/public/watchEvent.d.ts +0 -1
- package/dist/types/actions/public/watchEvent.d.ts.map +1 -1
- package/dist/types/actions/public/watchPendingTransactions.d.ts +0 -1
- package/dist/types/actions/public/watchPendingTransactions.d.ts.map +1 -1
- package/dist/types/actions/test/dropTransaction.d.ts +22 -0
- package/dist/types/actions/test/dropTransaction.d.ts.map +1 -1
- package/dist/types/actions/test/getAutomine.d.ts +20 -0
- package/dist/types/actions/test/getAutomine.d.ts.map +1 -1
- package/dist/types/actions/test/getTxpoolContent.d.ts +22 -0
- package/dist/types/actions/test/getTxpoolContent.d.ts.map +1 -1
- package/dist/types/actions/test/getTxpoolStatus.d.ts +20 -0
- package/dist/types/actions/test/getTxpoolStatus.d.ts.map +1 -1
- package/dist/types/actions/test/impersonateAccount.d.ts +22 -0
- package/dist/types/actions/test/impersonateAccount.d.ts.map +1 -1
- package/dist/types/actions/test/increaseTime.d.ts +22 -0
- package/dist/types/actions/test/increaseTime.d.ts.map +1 -1
- package/dist/types/actions/test/inspectTxpool.d.ts +20 -0
- package/dist/types/actions/test/inspectTxpool.d.ts.map +1 -1
- package/dist/types/actions/test/mine.d.ts +20 -0
- package/dist/types/actions/test/mine.d.ts.map +1 -1
- package/dist/types/actions/test/removeBlockTimestampInterval.d.ts +19 -0
- package/dist/types/actions/test/removeBlockTimestampInterval.d.ts.map +1 -1
- package/dist/types/actions/test/reset.d.ts +20 -0
- package/dist/types/actions/test/reset.d.ts.map +1 -1
- package/dist/types/actions/test/revert.d.ts +20 -0
- package/dist/types/actions/test/revert.d.ts.map +1 -1
- package/dist/types/actions/test/sendUnsignedTransaction.d.ts +25 -0
- package/dist/types/actions/test/sendUnsignedTransaction.d.ts.map +1 -1
- package/dist/types/actions/test/setAutomine.d.ts +19 -0
- package/dist/types/actions/test/setAutomine.d.ts.map +1 -1
- package/dist/types/actions/test/setBalance.d.ts +23 -0
- package/dist/types/actions/test/setBalance.d.ts.map +1 -1
- package/dist/types/actions/test/setBlockGasLimit.d.ts +20 -0
- package/dist/types/actions/test/setBlockGasLimit.d.ts.map +1 -1
- package/dist/types/actions/test/setBlockTimestampInterval.d.ts +20 -0
- package/dist/types/actions/test/setBlockTimestampInterval.d.ts.map +1 -1
- package/dist/types/actions/test/setCode.d.ts +23 -0
- package/dist/types/actions/test/setCode.d.ts.map +1 -1
- package/dist/types/actions/test/setCoinbase.d.ts +22 -0
- package/dist/types/actions/test/setCoinbase.d.ts.map +1 -1
- package/dist/types/actions/test/setIntervalMining.d.ts +20 -0
- package/dist/types/actions/test/setIntervalMining.d.ts.map +1 -1
- package/dist/types/actions/test/setLoggingEnabled.d.ts +19 -0
- package/dist/types/actions/test/setLoggingEnabled.d.ts.map +1 -1
- package/dist/types/actions/test/setMinGasPrice.d.ts +24 -0
- package/dist/types/actions/test/setMinGasPrice.d.ts.map +1 -1
- package/dist/types/actions/test/setNextBlockBaseFeePerGas.d.ts +22 -0
- package/dist/types/actions/test/setNextBlockBaseFeePerGas.d.ts.map +1 -1
- package/dist/types/actions/test/setNextBlockTimestamp.d.ts +20 -0
- package/dist/types/actions/test/setNextBlockTimestamp.d.ts.map +1 -1
- package/dist/types/actions/test/setNonce.d.ts +23 -0
- package/dist/types/actions/test/setNonce.d.ts.map +1 -1
- package/dist/types/actions/test/setRpcUrl.d.ts +20 -0
- package/dist/types/actions/test/setRpcUrl.d.ts.map +1 -1
- package/dist/types/actions/test/setStorageAt.d.ts +24 -0
- package/dist/types/actions/test/setStorageAt.d.ts.map +1 -1
- package/dist/types/actions/test/snapshot.d.ts +19 -0
- package/dist/types/actions/test/snapshot.d.ts.map +1 -1
- package/dist/types/actions/test/stopImpersonatingAccount.d.ts +22 -0
- package/dist/types/actions/test/stopImpersonatingAccount.d.ts.map +1 -1
- package/dist/types/actions/wallet/addChain.d.ts +20 -0
- package/dist/types/actions/wallet/addChain.d.ts.map +1 -1
- package/dist/types/actions/wallet/deployContract.d.ts +1 -1
- package/dist/types/actions/wallet/getAddresses.d.ts +20 -0
- package/dist/types/actions/wallet/getAddresses.d.ts.map +1 -1
- package/dist/types/actions/wallet/getPermissions.d.ts +20 -0
- package/dist/types/actions/wallet/getPermissions.d.ts.map +1 -1
- package/dist/types/actions/wallet/requestAddresses.d.ts +24 -0
- package/dist/types/actions/wallet/requestAddresses.d.ts.map +1 -1
- package/dist/types/actions/wallet/requestPermissions.d.ts +26 -3
- package/dist/types/actions/wallet/requestPermissions.d.ts.map +1 -1
- package/dist/types/actions/wallet/sendTransaction.d.ts +45 -0
- package/dist/types/actions/wallet/sendTransaction.d.ts.map +1 -1
- package/dist/types/actions/wallet/signMessage.d.ts +46 -0
- package/dist/types/actions/wallet/signMessage.d.ts.map +1 -1
- package/dist/types/actions/wallet/signTypedData.d.ts +98 -0
- package/dist/types/actions/wallet/signTypedData.d.ts.map +1 -1
- package/dist/types/actions/wallet/switchChain.d.ts +21 -0
- package/dist/types/actions/wallet/switchChain.d.ts.map +1 -1
- package/dist/types/actions/wallet/watchAsset.d.ts +28 -0
- package/dist/types/actions/wallet/watchAsset.d.ts.map +1 -1
- package/dist/types/actions/wallet/writeContract.d.ts +50 -0
- package/dist/types/actions/wallet/writeContract.d.ts.map +1 -1
- package/dist/types/clients/createPublicClient.d.ts +17 -1
- package/dist/types/clients/createPublicClient.d.ts.map +1 -1
- package/dist/types/clients/createTestClient.d.ts +20 -0
- package/dist/types/clients/createTestClient.d.ts.map +1 -1
- package/dist/types/clients/createWalletClient.d.ts +34 -1
- package/dist/types/clients/createWalletClient.d.ts.map +1 -1
- package/dist/types/clients/decorators/public.d.ts +37 -37
- package/dist/types/clients/decorators/test.d.ts +536 -0
- package/dist/types/clients/decorators/test.d.ts.map +1 -1
- package/dist/types/clients/decorators/wallet.d.ts +389 -2
- package/dist/types/clients/decorators/wallet.d.ts.map +1 -1
- package/dist/types/errors/version.d.ts +1 -1
- package/dist/types/utils/rpc.d.ts +1 -1
- package/dist/types/utils/rpc.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/actions/ens/getEnsAddress.ts +0 -1
- package/src/actions/ens/getEnsAvatar.ts +0 -1
- package/src/actions/ens/getEnsName.ts +0 -1
- package/src/actions/ens/getEnsResolver.ts +0 -1
- package/src/actions/ens/getEnsText.ts +0 -1
- package/src/actions/getContract.ts +104 -2
- package/src/actions/public/estimateContractGas.ts +0 -1
- package/src/actions/public/getBalance.ts +0 -1
- package/src/actions/public/getFilterChanges.ts +0 -1
- package/src/actions/public/getFilterLogs.ts +0 -1
- package/src/actions/public/readContract.ts +2 -3
- package/src/actions/public/simulateContract.ts +1 -2
- package/src/actions/public/uninstallFilter.ts +0 -1
- package/src/actions/public/waitForTransactionReceipt.ts +0 -1
- package/src/actions/public/watchContractEvent.ts +0 -1
- package/src/actions/public/watchEvent.ts +0 -1
- package/src/actions/public/watchPendingTransactions.ts +0 -1
- package/src/actions/test/dropTransaction.ts +22 -0
- package/src/actions/test/getAutomine.ts +20 -0
- package/src/actions/test/getTxpoolContent.ts +22 -0
- package/src/actions/test/getTxpoolStatus.ts +20 -0
- package/src/actions/test/impersonateAccount.ts +22 -0
- package/src/actions/test/increaseTime.ts +22 -0
- package/src/actions/test/inspectTxpool.ts +20 -0
- package/src/actions/test/mine.ts +20 -0
- package/src/actions/test/removeBlockTimestampInterval.ts +19 -0
- package/src/actions/test/reset.ts +20 -0
- package/src/actions/test/revert.ts +20 -0
- package/src/actions/test/sendUnsignedTransaction.ts +25 -0
- package/src/actions/test/setAutomine.ts +19 -0
- package/src/actions/test/setBalance.ts +23 -0
- package/src/actions/test/setBlockGasLimit.ts +20 -0
- package/src/actions/test/setBlockTimestampInterval.ts +20 -0
- package/src/actions/test/setCode.ts +23 -0
- package/src/actions/test/setCoinbase.ts +22 -0
- package/src/actions/test/setIntervalMining.ts +20 -0
- package/src/actions/test/setLoggingEnabled.ts +19 -0
- package/src/actions/test/setMinGasPrice.ts +24 -0
- package/src/actions/test/setNextBlockBaseFeePerGas.ts +22 -0
- package/src/actions/test/setNextBlockTimestamp.ts +20 -0
- package/src/actions/test/setNonce.ts +23 -0
- package/src/actions/test/setRpcUrl.ts +20 -0
- package/src/actions/test/setStorageAt.ts +24 -0
- package/src/actions/test/snapshot.ts +19 -0
- package/src/actions/test/stopImpersonatingAccount.ts +22 -0
- package/src/actions/wallet/addChain.ts +20 -0
- package/src/actions/wallet/deployContract.ts +1 -1
- package/src/actions/wallet/getAddresses.ts +20 -0
- package/src/actions/wallet/getPermissions.ts +20 -0
- package/src/actions/wallet/requestAddresses.ts +24 -0
- package/src/actions/wallet/requestPermissions.ts +31 -6
- package/src/actions/wallet/sendTransaction.ts +45 -0
- package/src/actions/wallet/signMessage.ts +46 -0
- package/src/actions/wallet/signTypedData.ts +98 -0
- package/src/actions/wallet/switchChain.ts +24 -1
- package/src/actions/wallet/watchAsset.ts +28 -0
- package/src/actions/wallet/writeContract.ts +50 -0
- package/src/clients/createPublicClient.ts +17 -1
- package/src/clients/createTestClient.ts +20 -0
- package/src/clients/createWalletClient.ts +34 -1
- package/src/clients/decorators/public.ts +37 -37
- package/src/clients/decorators/test.ts +536 -0
- package/src/clients/decorators/wallet.ts +389 -2
- package/src/errors/version.ts +1 -1
- package/src/utils/rpc.ts +2 -2
- package/src/utils/transaction/serializeTransaction.ts +13 -15
@@ -26,7 +26,6 @@ export type WatchContractEventReturnType = () => void;
|
|
26
26
|
*
|
27
27
|
* - Docs: https://viem.sh/docs/contract/watchContractEvent.html
|
28
28
|
*
|
29
|
-
* @remarks
|
30
29
|
* This Action will batch up all the event logs found within the [`pollingInterval`](https://viem.sh/docs/contract/watchContractEvent.html#pollinginterval-optional), and invoke them via [`onLogs`](https://viem.sh/docs/contract/watchContractEvent.html#onLogs).
|
31
30
|
*
|
32
31
|
* `watchContractEvent` will attempt to create an [Event Filter](https://viem.sh/docs/contract/createContractEventFilter) and listen to changes to the Filter per polling interval, however, if the RPC Provider does not support Filters (e.g. `eth_newFilter`), then `watchContractEvent` will fall back to using [`getLogs`](https://viem.sh/docs/actions/public/getLogs) instead.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"watchContractEvent.d.ts","sourceRoot":"","sources":["../../../../src/actions/public/watchContractEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AACrE,OAAO,KAAK,EACV,OAAO,EACP,KAAK,EACL,YAAY,EACZ,cAAc,EAEd,GAAG,EACJ,MAAM,sBAAsB,CAAA;AAa7B,MAAM,MAAM,eAAe,CACzB,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,GAAG,SAAS,OAAO,EAAE,EAC1D,UAAU,SAAS,MAAM,GAAG,MAAM,IAChC,IAAI,SAAS,GAAG,GAChB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,eAAe,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,EAAE,GACxD,GAAG,EAAE,CAAA;AACT,MAAM,MAAM,QAAQ,CAClB,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,GAAG,SAAS,OAAO,EAAE,EAC1D,UAAU,SAAS,MAAM,GAAG,MAAM,IAChC,CAAC,IAAI,EAAE,eAAe,CAAC,IAAI,EAAE,UAAU,CAAC,KAAK,IAAI,CAAA;AAErD,MAAM,MAAM,4BAA4B,CACtC,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,GAAG,SAAS,OAAO,EAAE,EAC1D,UAAU,SAAS,MAAM,GAAG,MAAM,IAChC;IACF,mCAAmC;IACnC,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,EAAE,CAAA;IAC7B,oBAAoB;IACpB,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,CAAA;IACjB,IAAI,CAAC,EAAE,YAAY,CAAC,IAAI,EAAE,UAAU,CAAC,CAAA;IACrC,0EAA0E;IAC1E,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,sBAAsB;IACtB,SAAS,CAAC,EAAE,cAAc,CAAC,IAAI,EAAE,UAAU,CAAC,CAAA;IAC5C,sFAAsF;IACtF,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;IAChC,6DAA6D;IAC7D,MAAM,EAAE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC,CAAA;IAClC,8EAA8E;IAC9E,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB,CAAA;AAED,MAAM,MAAM,4BAA4B,GAAG,MAAM,IAAI,CAAA;AAErD
|
1
|
+
{"version":3,"file":"watchContractEvent.d.ts","sourceRoot":"","sources":["../../../../src/actions/public/watchContractEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AACrE,OAAO,KAAK,EACV,OAAO,EACP,KAAK,EACL,YAAY,EACZ,cAAc,EAEd,GAAG,EACJ,MAAM,sBAAsB,CAAA;AAa7B,MAAM,MAAM,eAAe,CACzB,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,GAAG,SAAS,OAAO,EAAE,EAC1D,UAAU,SAAS,MAAM,GAAG,MAAM,IAChC,IAAI,SAAS,GAAG,GAChB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,eAAe,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,EAAE,GACxD,GAAG,EAAE,CAAA;AACT,MAAM,MAAM,QAAQ,CAClB,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,GAAG,SAAS,OAAO,EAAE,EAC1D,UAAU,SAAS,MAAM,GAAG,MAAM,IAChC,CAAC,IAAI,EAAE,eAAe,CAAC,IAAI,EAAE,UAAU,CAAC,KAAK,IAAI,CAAA;AAErD,MAAM,MAAM,4BAA4B,CACtC,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,GAAG,SAAS,OAAO,EAAE,EAC1D,UAAU,SAAS,MAAM,GAAG,MAAM,IAChC;IACF,mCAAmC;IACnC,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,EAAE,CAAA;IAC7B,oBAAoB;IACpB,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,CAAA;IACjB,IAAI,CAAC,EAAE,YAAY,CAAC,IAAI,EAAE,UAAU,CAAC,CAAA;IACrC,0EAA0E;IAC1E,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,sBAAsB;IACtB,SAAS,CAAC,EAAE,cAAc,CAAC,IAAI,EAAE,UAAU,CAAC,CAAA;IAC5C,sFAAsF;IACtF,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;IAChC,6DAA6D;IAC7D,MAAM,EAAE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC,CAAA;IAClC,8EAA8E;IAC9E,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB,CAAA;AAED,MAAM,MAAM,4BAA4B,GAAG,MAAM,IAAI,CAAA;AAErD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,SAAS,KAAK,GAAG,SAAS,EAChC,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,EACrC,UAAU,SAAS,MAAM,EAEzB,MAAM,EAAE,YAAY,CAAC,SAAS,EAAE,MAAM,CAAC,EACvC,EACE,GAAG,EACH,OAAO,EACP,IAAI,EACJ,KAAY,EACZ,SAAS,EACT,OAAO,EACP,MAAM,EACN,eAAwC,GACzC,EAAE,4BAA4B,CAAC,IAAI,EAAE,UAAU,CAAC,GAChD,4BAA4B,CAoF9B"}
|
@@ -36,7 +36,6 @@ export type WatchEventReturnType = () => void;
|
|
36
36
|
* - **RPC Provider does not support `eth_newFilter`:**
|
37
37
|
* - Calls [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) for each block between the polling interval.
|
38
38
|
*
|
39
|
-
* @remarks
|
40
39
|
* This Action will batch up all the Event Logs found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchEvent.html#pollinginterval-optional), and invoke them via [`onLogs`](https://viem.sh/docs/actions/public/watchEvent.html#onLogs).
|
41
40
|
*
|
42
41
|
* `watchEvent` will attempt to create an [Event Filter](https://viem.sh/docs/actions/public/createEventFilter.html) and listen to changes to the Filter per polling interval, however, if the RPC Provider does not support Filters (e.g. `eth_newFilter`), then `watchEvent` will fall back to using [`getLogs`](https://viem.sh/docs/actions/public/getLogs) instead.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"watchEvent.d.ts","sourceRoot":"","sources":["../../../../src/actions/public/watchEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AACvC,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AACrE,OAAO,KAAK,EACV,OAAO,EACP,KAAK,EAEL,GAAG,EACH,iBAAiB,EACjB,4BAA4B,EAC7B,MAAM,sBAAsB,CAAA;AAU7B,MAAM,MAAM,eAAe,CACzB,SAAS,SAAS,QAAQ,GAAG,SAAS,GAAG,SAAS,EAClD,UAAU,SAAS,MAAM,GAAG,SAAS,GAAG,iBAAiB,CAAC,SAAS,CAAC,IAClE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,EAAE,CAAA;AAC7D,MAAM,MAAM,QAAQ,CAClB,SAAS,SAAS,QAAQ,GAAG,SAAS,GAAG,SAAS,EAClD,UAAU,SAAS,MAAM,GAAG,SAAS,GAAG,iBAAiB,CAAC,SAAS,CAAC,IAClE,CAAC,IAAI,EAAE,eAAe,CAAC,SAAS,EAAE,UAAU,CAAC,KAAK,IAAI,CAAA;AAE1D,MAAM,MAAM,oBAAoB,CAC9B,SAAS,SAAS,QAAQ,GAAG,SAAS,GAAG,SAAS,EAClD,UAAU,SAAS,MAAM,GAAG,SAAS,GAAG,iBAAiB,CAAC,SAAS,CAAC,IAClE;IACF,mCAAmC;IACnC,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,EAAE,CAAA;IAC7B;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,sFAAsF;IACtF,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;IAChC,6DAA6D;IAC7D,MAAM,EAAE,QAAQ,CAAC,SAAS,EAAE,UAAU,CAAC,CAAA;IACvC,8EAA8E;IAC9E,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB,GAAG,CACA;IACE,KAAK,EAAE,SAAS,CAAA;IAChB,IAAI,CAAC,EAAE,4BAA4B,CAAC,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAA;CAC7D,GACD;IACE,KAAK,CAAC,EAAE,KAAK,CAAA;IACb,IAAI,CAAC,EAAE,KAAK,CAAA;CACb,CACJ,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG,MAAM,IAAI,CAAA;AAE7C
|
1
|
+
{"version":3,"file":"watchEvent.d.ts","sourceRoot":"","sources":["../../../../src/actions/public/watchEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AACvC,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AACrE,OAAO,KAAK,EACV,OAAO,EACP,KAAK,EAEL,GAAG,EACH,iBAAiB,EACjB,4BAA4B,EAC7B,MAAM,sBAAsB,CAAA;AAU7B,MAAM,MAAM,eAAe,CACzB,SAAS,SAAS,QAAQ,GAAG,SAAS,GAAG,SAAS,EAClD,UAAU,SAAS,MAAM,GAAG,SAAS,GAAG,iBAAiB,CAAC,SAAS,CAAC,IAClE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,EAAE,CAAA;AAC7D,MAAM,MAAM,QAAQ,CAClB,SAAS,SAAS,QAAQ,GAAG,SAAS,GAAG,SAAS,EAClD,UAAU,SAAS,MAAM,GAAG,SAAS,GAAG,iBAAiB,CAAC,SAAS,CAAC,IAClE,CAAC,IAAI,EAAE,eAAe,CAAC,SAAS,EAAE,UAAU,CAAC,KAAK,IAAI,CAAA;AAE1D,MAAM,MAAM,oBAAoB,CAC9B,SAAS,SAAS,QAAQ,GAAG,SAAS,GAAG,SAAS,EAClD,UAAU,SAAS,MAAM,GAAG,SAAS,GAAG,iBAAiB,CAAC,SAAS,CAAC,IAClE;IACF,mCAAmC;IACnC,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,EAAE,CAAA;IAC7B;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,sFAAsF;IACtF,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;IAChC,6DAA6D;IAC7D,MAAM,EAAE,QAAQ,CAAC,SAAS,EAAE,UAAU,CAAC,CAAA;IACvC,8EAA8E;IAC9E,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB,GAAG,CACA;IACE,KAAK,EAAE,SAAS,CAAA;IAChB,IAAI,CAAC,EAAE,4BAA4B,CAAC,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAA;CAC7D,GACD;IACE,KAAK,CAAC,EAAE,KAAK,CAAA;IACb,IAAI,CAAC,EAAE,KAAK,CAAA;CACb,CACJ,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG,MAAM,IAAI,CAAA;AAE7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,UAAU,CACxB,MAAM,SAAS,KAAK,GAAG,SAAS,EAChC,SAAS,SAAS,QAAQ,GAAG,SAAS,EACtC,UAAU,SAAS,MAAM,GAAG,SAAS,EAErC,MAAM,EAAE,YAAY,CAAC,SAAS,EAAE,MAAM,CAAC,EACvC,EACE,OAAO,EACP,IAAI,EACJ,KAAY,EACZ,KAAK,EACL,OAAO,EACP,MAAM,EACN,eAAwC,GACzC,EAAE,oBAAoB,CAAC,SAAS,CAAC,GACjC,oBAAoB,CAgFtB"}
|
@@ -47,7 +47,6 @@ export type WatchPendingTransactionsReturnType = () => void;
|
|
47
47
|
* - Calls [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getFilterChanges) on a polling interval.
|
48
48
|
* - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newPendingTransactions"` event.
|
49
49
|
*
|
50
|
-
* @remarks
|
51
50
|
* This Action will batch up all the pending transactions found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchPendingTransactions.html#pollinginterval-optional), and invoke them via [`onTransactions`](https://viem.sh/docs/actions/public/watchPendingTransactions.html#ontransactions).
|
52
51
|
*
|
53
52
|
* @param client - Client to use
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"watchPendingTransactions.d.ts","sourceRoot":"","sources":["../../../../src/actions/public/watchPendingTransactions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AACrE,OAAO,KAAK,EACV,KAAK,EAEL,kBAAkB,EAClB,IAAI,EACL,MAAM,sBAAsB,CAAA;AAO7B,MAAM,MAAM,uBAAuB,GAAG,IAAI,EAAE,CAAA;AAC5C,MAAM,MAAM,gBAAgB,GAAG,CAAC,YAAY,EAAE,uBAAuB,KAAK,IAAI,CAAA;AAE9E,KAAK,WAAW,GAAG;IACjB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IACf;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB,CAAA;AAED,MAAM,MAAM,kCAAkC,CAC5C,UAAU,SAAS,SAAS,GAAG,SAAS,IACtC;IACF,sFAAsF;IACtF,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;IAChC,+DAA+D;IAC/D,cAAc,EAAE,gBAAgB,CAAA;CACjC,GAAG,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,SAAS,WAAW,GAEvD;IACE,KAAK,CAAC,EAAE,KAAK,CAAA;IACb;;;OAGG;IACH,IAAI,CAAC,EAAE,KAAK,CAAA;IACZ,eAAe,CAAC,EAAE,KAAK,CAAA;CACxB,GACD,CAAC,WAAW,GAAG;IACb;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,CAAA;CACZ,CAAC,GACN,WAAW,GAAG;IACZ,IAAI,CAAC,EAAE,IAAI,CAAA;CACZ,CAAC,CAAA;AAEN,MAAM,MAAM,kCAAkC,GAAG,MAAM,IAAI,CAAA;AAE3D
|
1
|
+
{"version":3,"file":"watchPendingTransactions.d.ts","sourceRoot":"","sources":["../../../../src/actions/public/watchPendingTransactions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AACrE,OAAO,KAAK,EACV,KAAK,EAEL,kBAAkB,EAClB,IAAI,EACL,MAAM,sBAAsB,CAAA;AAO7B,MAAM,MAAM,uBAAuB,GAAG,IAAI,EAAE,CAAA;AAC5C,MAAM,MAAM,gBAAgB,GAAG,CAAC,YAAY,EAAE,uBAAuB,KAAK,IAAI,CAAA;AAE9E,KAAK,WAAW,GAAG;IACjB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IACf;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB,CAAA;AAED,MAAM,MAAM,kCAAkC,CAC5C,UAAU,SAAS,SAAS,GAAG,SAAS,IACtC;IACF,sFAAsF;IACtF,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;IAChC,+DAA+D;IAC/D,cAAc,EAAE,gBAAgB,CAAA;CACjC,GAAG,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,SAAS,WAAW,GAEvD;IACE,KAAK,CAAC,EAAE,KAAK,CAAA;IACb;;;OAGG;IACH,IAAI,CAAC,EAAE,KAAK,CAAA;IACZ,eAAe,CAAC,EAAE,KAAK,CAAA;CACxB,GACD,CAAC,WAAW,GAAG;IACb;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,CAAA;CACZ,CAAC,GACN,WAAW,GAAG;IACZ,IAAI,CAAC,EAAE,IAAI,CAAA;CACZ,CAAC,CAAA;AAEN,MAAM,MAAM,kCAAkC,GAAG,MAAM,IAAI,CAAA;AAE3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,wBAAwB,CACtC,UAAU,SAAS,SAAS,EAC5B,MAAM,SAAS,KAAK,GAAG,SAAS,EAEhC,MAAM,EAAE,YAAY,CAAC,UAAU,EAAE,MAAM,CAAC,EACxC,EACE,KAAY,EACZ,OAAO,EACP,cAAc,EACd,IAAI,EAAE,KAAK,EACX,eAAwC,GACzC,EAAE,kCAAkC,CAAC,UAAU,CAAC,cA6ElD"}
|
@@ -4,5 +4,27 @@ export type DropTransactionParameters = {
|
|
4
4
|
/** The hash of the transaction to drop. */
|
5
5
|
hash: Hash;
|
6
6
|
};
|
7
|
+
/**
|
8
|
+
* Removes a transaction from the mempool.
|
9
|
+
*
|
10
|
+
* - Docs: https://viem.sh/docs/actions/test/dropTransaction.html
|
11
|
+
*
|
12
|
+
* @param client - Client to use
|
13
|
+
* @param parameters - {@link DropTransactionParameters}
|
14
|
+
*
|
15
|
+
* @example
|
16
|
+
* import { createTestClient, http } from 'viem'
|
17
|
+
* import { foundry } from 'viem/chains'
|
18
|
+
* import { dropTransaction } from 'viem/test'
|
19
|
+
*
|
20
|
+
* const client = createTestClient({
|
21
|
+
* mode: 'anvil',
|
22
|
+
* chain: 'foundry',
|
23
|
+
* transport: http(),
|
24
|
+
* })
|
25
|
+
* await dropTransaction(client, {
|
26
|
+
* hash: '0xe58dceb6b20b03965bb678e27d141e151d7d4efc2334c2d6a49b9fac523f7364'
|
27
|
+
* })
|
28
|
+
*/
|
7
29
|
export declare function dropTransaction<TChain extends Chain | undefined>(client: TestClient<TestClientMode, Transport, TChain>, { hash }: DropTransactionParameters): Promise<void>;
|
8
30
|
//# sourceMappingURL=dropTransaction.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"dropTransaction.d.ts","sourceRoot":"","sources":["../../../../src/actions/test/dropTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,SAAS,EACV,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAEvD,MAAM,MAAM,yBAAyB,GAAG;IACtC,2CAA2C;IAC3C,IAAI,EAAE,IAAI,CAAA;CACX,CAAA;AAED,wBAAsB,eAAe,CAAC,MAAM,SAAS,KAAK,GAAG,SAAS,EACpE,MAAM,EAAE,UAAU,CAAC,cAAc,EAAE,SAAS,EAAE,MAAM,CAAC,EACrD,EAAE,IAAI,EAAE,EAAE,yBAAyB,iBAMpC"}
|
1
|
+
{"version":3,"file":"dropTransaction.d.ts","sourceRoot":"","sources":["../../../../src/actions/test/dropTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,SAAS,EACV,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAEvD,MAAM,MAAM,yBAAyB,GAAG;IACtC,2CAA2C;IAC3C,IAAI,EAAE,IAAI,CAAA;CACX,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,eAAe,CAAC,MAAM,SAAS,KAAK,GAAG,SAAS,EACpE,MAAM,EAAE,UAAU,CAAC,cAAc,EAAE,SAAS,EAAE,MAAM,CAAC,EACrD,EAAE,IAAI,EAAE,EAAE,yBAAyB,iBAMpC"}
|
@@ -1,5 +1,25 @@
|
|
1
1
|
import type { TestClient, TestClientMode, Transport } from '../../clients/index.js';
|
2
2
|
import type { Chain } from '../../types/index.js';
|
3
3
|
export type GetAutomineReturnType = boolean;
|
4
|
+
/**
|
5
|
+
* Returns the automatic mining status of the node.
|
6
|
+
*
|
7
|
+
* - Docs: https://viem.sh/docs/actions/test/getAutomine.html
|
8
|
+
*
|
9
|
+
* @param client - Client to use
|
10
|
+
* @returns Whether or not the node is auto mining. {@link GetAutomineReturnType}
|
11
|
+
*
|
12
|
+
* @example
|
13
|
+
* import { createTestClient, http } from 'viem'
|
14
|
+
* import { foundry } from 'viem/chains'
|
15
|
+
* import { getAutomine } from 'viem/test'
|
16
|
+
*
|
17
|
+
* const client = createTestClient({
|
18
|
+
* mode: 'anvil',
|
19
|
+
* chain: 'foundry',
|
20
|
+
* transport: http(),
|
21
|
+
* })
|
22
|
+
* const isAutomining = await getAutomine(client)
|
23
|
+
*/
|
4
24
|
export declare function getAutomine<TChain extends Chain | undefined>(client: TestClient<TestClientMode, Transport, TChain>): Promise<GetAutomineReturnType>;
|
5
25
|
//# sourceMappingURL=getAutomine.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getAutomine.d.ts","sourceRoot":"","sources":["../../../../src/actions/test/getAutomine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,SAAS,EACV,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAEjD,MAAM,MAAM,qBAAqB,GAAG,OAAO,CAAA;AAE3C,wBAAsB,WAAW,CAAC,MAAM,SAAS,KAAK,GAAG,SAAS,EAChE,MAAM,EAAE,UAAU,CAAC,cAAc,EAAE,SAAS,EAAE,MAAM,CAAC,GACpD,OAAO,CAAC,qBAAqB,CAAC,CAIhC"}
|
1
|
+
{"version":3,"file":"getAutomine.d.ts","sourceRoot":"","sources":["../../../../src/actions/test/getAutomine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,SAAS,EACV,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAEjD,MAAM,MAAM,qBAAqB,GAAG,OAAO,CAAA;AAE3C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,WAAW,CAAC,MAAM,SAAS,KAAK,GAAG,SAAS,EAChE,MAAM,EAAE,UAAU,CAAC,cAAc,EAAE,SAAS,EAAE,MAAM,CAAC,GACpD,OAAO,CAAC,qBAAqB,CAAC,CAIhC"}
|
@@ -2,8 +2,30 @@ import type { Address } from 'abitype';
|
|
2
2
|
import type { TestClient, TestClientMode, Transport } from '../../clients/index.js';
|
3
3
|
import type { Chain, RpcTransaction } from '../../types/index.js';
|
4
4
|
export type GetTxpoolContentReturnType = {
|
5
|
+
/** Pending transactions in the pool */
|
5
6
|
pending: Record<Address, Record<string, RpcTransaction>>;
|
7
|
+
/** Queued transactions in the pool */
|
6
8
|
queued: Record<Address, Record<string, RpcTransaction>>;
|
7
9
|
};
|
10
|
+
/**
|
11
|
+
* Returns the details of all transactions currently pending for inclusion in the next block(s), as well as the ones that are being scheduled for future execution only.
|
12
|
+
*
|
13
|
+
* - Docs: https://viem.sh/docs/actions/test/getTxpoolContent.html
|
14
|
+
*
|
15
|
+
* @param client - Client to use
|
16
|
+
* @returns Transaction pool content. {@link GetTxpoolContentReturnType}
|
17
|
+
*
|
18
|
+
* @example
|
19
|
+
* import { createTestClient, http } from 'viem'
|
20
|
+
* import { foundry } from 'viem/chains'
|
21
|
+
* import { getTxpoolContent } from 'viem/test'
|
22
|
+
*
|
23
|
+
* const client = createTestClient({
|
24
|
+
* mode: 'anvil',
|
25
|
+
* chain: 'foundry',
|
26
|
+
* transport: http(),
|
27
|
+
* })
|
28
|
+
* const content = await getTxpoolContent(client)
|
29
|
+
*/
|
8
30
|
export declare function getTxpoolContent<TChain extends Chain | undefined>(client: TestClient<TestClientMode, Transport, TChain>): Promise<GetTxpoolContentReturnType>;
|
9
31
|
//# sourceMappingURL=getTxpoolContent.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getTxpoolContent.d.ts","sourceRoot":"","sources":["../../../../src/actions/test/getTxpoolContent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,SAAS,EACV,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAEjE,MAAM,MAAM,0BAA0B,GAAG;IACvC,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CAAA;IACxD,MAAM,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CAAA;CACxD,CAAA;AAED,wBAAsB,gBAAgB,CAAC,MAAM,SAAS,KAAK,GAAG,SAAS,EACrE,MAAM,EAAE,UAAU,CAAC,cAAc,EAAE,SAAS,EAAE,MAAM,CAAC,GACpD,OAAO,CAAC,0BAA0B,CAAC,CAIrC"}
|
1
|
+
{"version":3,"file":"getTxpoolContent.d.ts","sourceRoot":"","sources":["../../../../src/actions/test/getTxpoolContent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,SAAS,EACV,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAEjE,MAAM,MAAM,0BAA0B,GAAG;IACvC,uCAAuC;IACvC,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CAAA;IACxD,sCAAsC;IACtC,MAAM,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CAAA;CACxD,CAAA;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,gBAAgB,CAAC,MAAM,SAAS,KAAK,GAAG,SAAS,EACrE,MAAM,EAAE,UAAU,CAAC,cAAc,EAAE,SAAS,EAAE,MAAM,CAAC,GACpD,OAAO,CAAC,0BAA0B,CAAC,CAIrC"}
|
@@ -4,5 +4,25 @@ export type GetTxpoolStatusReturnType = {
|
|
4
4
|
pending: number;
|
5
5
|
queued: number;
|
6
6
|
};
|
7
|
+
/**
|
8
|
+
* Returns a summary of all the transactions currently pending for inclusion in the next block(s), as well as the ones that are being scheduled for future execution only.
|
9
|
+
*
|
10
|
+
* - Docs: https://viem.sh/docs/actions/test/getTxpoolStatus.html
|
11
|
+
*
|
12
|
+
* @param client - Client to use
|
13
|
+
* @returns Transaction pool status. {@link GetTxpoolStatusReturnType}
|
14
|
+
*
|
15
|
+
* @example
|
16
|
+
* import { createTestClient, http } from 'viem'
|
17
|
+
* import { foundry } from 'viem/chains'
|
18
|
+
* import { getTxpoolStatus } from 'viem/test'
|
19
|
+
*
|
20
|
+
* const client = createTestClient({
|
21
|
+
* mode: 'anvil',
|
22
|
+
* chain: 'foundry',
|
23
|
+
* transport: http(),
|
24
|
+
* })
|
25
|
+
* const status = await getTxpoolStatus(client)
|
26
|
+
*/
|
7
27
|
export declare function getTxpoolStatus<TChain extends Chain | undefined>(client: TestClient<TestClientMode, Transport, TChain>): Promise<GetTxpoolStatusReturnType>;
|
8
28
|
//# sourceMappingURL=getTxpoolStatus.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getTxpoolStatus.d.ts","sourceRoot":"","sources":["../../../../src/actions/test/getTxpoolStatus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,SAAS,EACV,MAAM,wBAAwB,CAAA;AAG/B,MAAM,MAAM,yBAAyB,GAAG;IACtC,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED,wBAAsB,eAAe,CAAC,MAAM,SAAS,KAAK,GAAG,SAAS,EACpE,MAAM,EAAE,UAAU,CAAC,cAAc,EAAE,SAAS,EAAE,MAAM,CAAC,GACpD,OAAO,CAAC,yBAAyB,CAAC,CAQpC"}
|
1
|
+
{"version":3,"file":"getTxpoolStatus.d.ts","sourceRoot":"","sources":["../../../../src/actions/test/getTxpoolStatus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,SAAS,EACV,MAAM,wBAAwB,CAAA;AAG/B,MAAM,MAAM,yBAAyB,GAAG;IACtC,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,eAAe,CAAC,MAAM,SAAS,KAAK,GAAG,SAAS,EACpE,MAAM,EAAE,UAAU,CAAC,cAAc,EAAE,SAAS,EAAE,MAAM,CAAC,GACpD,OAAO,CAAC,yBAAyB,CAAC,CAQpC"}
|
@@ -4,5 +4,27 @@ export type ImpersonateAccountParameters = {
|
|
4
4
|
/** The account to impersonate. */
|
5
5
|
address: Address;
|
6
6
|
};
|
7
|
+
/**
|
8
|
+
* Impersonate an account or contract address. This lets you send transactions from that account even if you don't have access to its private key.
|
9
|
+
*
|
10
|
+
* - Docs: https://viem.sh/docs/actions/test/impersonateAccount.html
|
11
|
+
*
|
12
|
+
* @param client - Client to use
|
13
|
+
* @param parameters - {@link ImpersonateAccountParameters}
|
14
|
+
*
|
15
|
+
* @example
|
16
|
+
* import { createTestClient, http } from 'viem'
|
17
|
+
* import { foundry } from 'viem/chains'
|
18
|
+
* import { impersonateAccount } from 'viem/test'
|
19
|
+
*
|
20
|
+
* const client = createTestClient({
|
21
|
+
* mode: 'anvil',
|
22
|
+
* chain: 'foundry',
|
23
|
+
* transport: http(),
|
24
|
+
* })
|
25
|
+
* const content = await impersonateAccount(client, {
|
26
|
+
* address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
|
27
|
+
* })
|
28
|
+
*/
|
7
29
|
export declare function impersonateAccount<TChain extends Chain | undefined>(client: TestClient<TestClientMode, Transport, TChain>, { address }: ImpersonateAccountParameters): Promise<void>;
|
8
30
|
//# sourceMappingURL=impersonateAccount.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"impersonateAccount.d.ts","sourceRoot":"","sources":["../../../../src/actions/test/impersonateAccount.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,SAAS,EACV,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAE1D,MAAM,MAAM,4BAA4B,GAAG;IACzC,kCAAkC;IAClC,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,wBAAsB,kBAAkB,CAAC,MAAM,SAAS,KAAK,GAAG,SAAS,EACvE,MAAM,EAAE,UAAU,CAAC,cAAc,EAAE,SAAS,EAAE,MAAM,CAAC,EACrD,EAAE,OAAO,EAAE,EAAE,4BAA4B,iBAM1C"}
|
1
|
+
{"version":3,"file":"impersonateAccount.d.ts","sourceRoot":"","sources":["../../../../src/actions/test/impersonateAccount.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,SAAS,EACV,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAE1D,MAAM,MAAM,4BAA4B,GAAG;IACzC,kCAAkC;IAClC,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,kBAAkB,CAAC,MAAM,SAAS,KAAK,GAAG,SAAS,EACvE,MAAM,EAAE,UAAU,CAAC,cAAc,EAAE,SAAS,EAAE,MAAM,CAAC,EACrD,EAAE,OAAO,EAAE,EAAE,4BAA4B,iBAM1C"}
|
@@ -4,5 +4,27 @@ export type IncreaseTimeParameters = {
|
|
4
4
|
/** The amount of seconds to jump forward in time. */
|
5
5
|
seconds: number;
|
6
6
|
};
|
7
|
+
/**
|
8
|
+
* Jump forward in time by the given amount of time, in seconds.
|
9
|
+
*
|
10
|
+
* - Docs: https://viem.sh/docs/actions/test/increaseTime.html
|
11
|
+
*
|
12
|
+
* @param client - Client to use
|
13
|
+
* @param parameters – {@link IncreaseTimeParameters}
|
14
|
+
*
|
15
|
+
* @example
|
16
|
+
* import { createTestClient, http } from 'viem'
|
17
|
+
* import { foundry } from 'viem/chains'
|
18
|
+
* import { increaseTime } from 'viem/test'
|
19
|
+
*
|
20
|
+
* const client = createTestClient({
|
21
|
+
* mode: 'anvil',
|
22
|
+
* chain: 'foundry',
|
23
|
+
* transport: http(),
|
24
|
+
* })
|
25
|
+
* await increaseTime(client, {
|
26
|
+
* seconds: 420,
|
27
|
+
* })
|
28
|
+
*/
|
7
29
|
export declare function increaseTime<TChain extends Chain | undefined>(client: TestClient<TestClientMode, Transport, TChain>, { seconds }: IncreaseTimeParameters): Promise<`0x${string}`>;
|
8
30
|
//# sourceMappingURL=increaseTime.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"increaseTime.d.ts","sourceRoot":"","sources":["../../../../src/actions/test/increaseTime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,SAAS,EACV,MAAM,wBAAwB,CAAA;AAG/B,MAAM,MAAM,sBAAsB,GAAG;IACnC,qDAAqD;IACrD,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,wBAAsB,YAAY,CAAC,MAAM,SAAS,KAAK,GAAG,SAAS,EACjE,MAAM,EAAE,UAAU,CAAC,cAAc,EAAE,SAAS,EAAE,MAAM,CAAC,EACrD,EAAE,OAAO,EAAE,EAAE,sBAAsB,0BAMpC"}
|
1
|
+
{"version":3,"file":"increaseTime.d.ts","sourceRoot":"","sources":["../../../../src/actions/test/increaseTime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,SAAS,EACV,MAAM,wBAAwB,CAAA;AAG/B,MAAM,MAAM,sBAAsB,GAAG;IACnC,qDAAqD;IACrD,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,YAAY,CAAC,MAAM,SAAS,KAAK,GAAG,SAAS,EACjE,MAAM,EAAE,UAAU,CAAC,cAAc,EAAE,SAAS,EAAE,MAAM,CAAC,EACrD,EAAE,OAAO,EAAE,EAAE,sBAAsB,0BAMpC"}
|
@@ -4,5 +4,25 @@ export type InspectTxpoolReturnType = {
|
|
4
4
|
pending: Record<Address, Record<string, string>>;
|
5
5
|
queued: Record<Address, Record<string, string>>;
|
6
6
|
};
|
7
|
+
/**
|
8
|
+
* Returns a summary of all the transactions currently pending for inclusion in the next block(s), as well as the ones that are being scheduled for future execution only.
|
9
|
+
*
|
10
|
+
* - Docs: https://viem.sh/docs/actions/test/inspectTxpool.html
|
11
|
+
*
|
12
|
+
* @param client - Client to use
|
13
|
+
* @returns Transaction pool inspection data. {@link InspectTxpoolReturnType}
|
14
|
+
*
|
15
|
+
* @example
|
16
|
+
* import { createTestClient, http } from 'viem'
|
17
|
+
* import { foundry } from 'viem/chains'
|
18
|
+
* import { inspectTxpool } from 'viem/test'
|
19
|
+
*
|
20
|
+
* const client = createTestClient({
|
21
|
+
* mode: 'anvil',
|
22
|
+
* chain: 'foundry',
|
23
|
+
* transport: http(),
|
24
|
+
* })
|
25
|
+
* const data = await inspectTxpool(client)
|
26
|
+
*/
|
7
27
|
export declare function inspectTxpool<TChain extends Chain | undefined>(client: TestClient<TestClientMode, Transport, TChain>): Promise<InspectTxpoolReturnType>;
|
8
28
|
//# sourceMappingURL=inspectTxpool.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"inspectTxpool.d.ts","sourceRoot":"","sources":["../../../../src/actions/test/inspectTxpool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,SAAS,EACV,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAE1D,MAAM,MAAM,uBAAuB,GAAG;IACpC,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IAChD,MAAM,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;CAChD,CAAA;AAED,wBAAsB,aAAa,CAAC,MAAM,SAAS,KAAK,GAAG,SAAS,EAClE,MAAM,EAAE,UAAU,CAAC,cAAc,EAAE,SAAS,EAAE,MAAM,CAAC,GACpD,OAAO,CAAC,uBAAuB,CAAC,CAIlC"}
|
1
|
+
{"version":3,"file":"inspectTxpool.d.ts","sourceRoot":"","sources":["../../../../src/actions/test/inspectTxpool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,SAAS,EACV,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAE1D,MAAM,MAAM,uBAAuB,GAAG;IACpC,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IAChD,MAAM,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;CAChD,CAAA;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,aAAa,CAAC,MAAM,SAAS,KAAK,GAAG,SAAS,EAClE,MAAM,EAAE,UAAU,CAAC,cAAc,EAAE,SAAS,EAAE,MAAM,CAAC,GACpD,OAAO,CAAC,uBAAuB,CAAC,CAIlC"}
|
@@ -6,5 +6,25 @@ export type MineParameters = {
|
|
6
6
|
/** Interval between each block in seconds. */
|
7
7
|
interval?: number;
|
8
8
|
};
|
9
|
+
/**
|
10
|
+
* Mine a specified number of blocks.
|
11
|
+
*
|
12
|
+
* - Docs: https://viem.sh/docs/actions/test/mine.html
|
13
|
+
*
|
14
|
+
* @param client - Client to use
|
15
|
+
* @param parameters – {@link MineParameters}
|
16
|
+
*
|
17
|
+
* @example
|
18
|
+
* import { createTestClient, http } from 'viem'
|
19
|
+
* import { foundry } from 'viem/chains'
|
20
|
+
* import { mine } from 'viem/test'
|
21
|
+
*
|
22
|
+
* const client = createTestClient({
|
23
|
+
* mode: 'anvil',
|
24
|
+
* chain: 'foundry',
|
25
|
+
* transport: http(),
|
26
|
+
* })
|
27
|
+
* await mine(client, { blocks: 1 })
|
28
|
+
*/
|
9
29
|
export declare function mine<TChain extends Chain | undefined>(client: TestClient<TestClientMode, Transport, TChain>, { blocks, interval }: MineParameters): Promise<void>;
|
10
30
|
//# sourceMappingURL=mine.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"mine.d.ts","sourceRoot":"","sources":["../../../../src/actions/test/mine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,SAAS,EACV,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAGjD,MAAM,MAAM,cAAc,GAAG;IAC3B,gCAAgC;IAChC,MAAM,EAAE,MAAM,CAAA;IACd,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,wBAAsB,IAAI,CAAC,MAAM,SAAS,KAAK,GAAG,SAAS,EACzD,MAAM,EAAE,UAAU,CAAC,cAAc,EAAE,SAAS,EAAE,MAAM,CAAC,EACrD,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,cAAc,iBAMrC"}
|
1
|
+
{"version":3,"file":"mine.d.ts","sourceRoot":"","sources":["../../../../src/actions/test/mine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,SAAS,EACV,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAGjD,MAAM,MAAM,cAAc,GAAG;IAC3B,gCAAgC;IAChC,MAAM,EAAE,MAAM,CAAA;IACd,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,IAAI,CAAC,MAAM,SAAS,KAAK,GAAG,SAAS,EACzD,MAAM,EAAE,UAAU,CAAC,cAAc,EAAE,SAAS,EAAE,MAAM,CAAC,EACrD,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,cAAc,iBAMrC"}
|
@@ -1,4 +1,23 @@
|
|
1
1
|
import type { Chain } from '@wagmi/chains';
|
2
2
|
import type { TestClient, TestClientMode, Transport } from '../../clients/index.js';
|
3
|
+
/**
|
4
|
+
* Removes [`setBlockTimestampInterval`](https://viem.sh/docs/actions/test/setBlockTimestampInterval.html) if it exists.
|
5
|
+
*
|
6
|
+
* - Docs: https://viem.sh/docs/actions/test/removeBlockTimestampInterval.html
|
7
|
+
*
|
8
|
+
* @param client - Client to use
|
9
|
+
*
|
10
|
+
* @example
|
11
|
+
* import { createTestClient, http } from 'viem'
|
12
|
+
* import { foundry } from 'viem/chains'
|
13
|
+
* import { removeBlockTimestampInterval } from 'viem/test'
|
14
|
+
*
|
15
|
+
* const client = createTestClient({
|
16
|
+
* mode: 'anvil',
|
17
|
+
* chain: 'foundry',
|
18
|
+
* transport: http(),
|
19
|
+
* })
|
20
|
+
* await removeBlockTimestampInterval(client)
|
21
|
+
*/
|
3
22
|
export declare function removeBlockTimestampInterval<TChain extends Chain | undefined>(client: TestClient<TestClientMode, Transport, TChain>): Promise<void>;
|
4
23
|
//# sourceMappingURL=removeBlockTimestampInterval.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"removeBlockTimestampInterval.d.ts","sourceRoot":"","sources":["../../../../src/actions/test/removeBlockTimestampInterval.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,SAAS,EACV,MAAM,wBAAwB,CAAA;AAE/B,wBAAsB,4BAA4B,CAChD,MAAM,SAAS,KAAK,GAAG,SAAS,EAChC,MAAM,EAAE,UAAU,CAAC,cAAc,EAAE,SAAS,EAAE,MAAM,CAAC,iBAItD"}
|
1
|
+
{"version":3,"file":"removeBlockTimestampInterval.d.ts","sourceRoot":"","sources":["../../../../src/actions/test/removeBlockTimestampInterval.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,SAAS,EACV,MAAM,wBAAwB,CAAA;AAE/B;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,4BAA4B,CAChD,MAAM,SAAS,KAAK,GAAG,SAAS,EAChC,MAAM,EAAE,UAAU,CAAC,cAAc,EAAE,SAAS,EAAE,MAAM,CAAC,iBAItD"}
|
@@ -6,5 +6,25 @@ export type ResetParameters = {
|
|
6
6
|
/** The JSON RPC URL. */
|
7
7
|
jsonRpcUrl?: string;
|
8
8
|
};
|
9
|
+
/**
|
10
|
+
* Resets fork back to its original state.
|
11
|
+
*
|
12
|
+
* - Docs: https://viem.sh/docs/actions/test/reset.html
|
13
|
+
*
|
14
|
+
* @param client - Client to use
|
15
|
+
* @param parameters – {@link ResetParameters}
|
16
|
+
*
|
17
|
+
* @example
|
18
|
+
* import { createTestClient, http } from 'viem'
|
19
|
+
* import { foundry } from 'viem/chains'
|
20
|
+
* import { reset } from 'viem/test'
|
21
|
+
*
|
22
|
+
* const client = createTestClient({
|
23
|
+
* mode: 'anvil',
|
24
|
+
* chain: 'foundry',
|
25
|
+
* transport: http(),
|
26
|
+
* })
|
27
|
+
* await reset(client, { blockNumber: 69420n })
|
28
|
+
*/
|
9
29
|
export declare function reset<TChain extends Chain | undefined>(client: TestClient<TestClientMode, Transport, TChain>, { blockNumber, jsonRpcUrl }?: ResetParameters): Promise<void>;
|
10
30
|
//# sourceMappingURL=reset.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"reset.d.ts","sourceRoot":"","sources":["../../../../src/actions/test/reset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,SAAS,EACV,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAEjD,MAAM,MAAM,eAAe,GAAG;IAC5B,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,wBAAwB;IACxB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,CAAA;AAED,wBAAsB,KAAK,CAAC,MAAM,SAAS,KAAK,GAAG,SAAS,EAC1D,MAAM,EAAE,UAAU,CAAC,cAAc,EAAE,SAAS,EAAE,MAAM,CAAC,EACrD,EAAE,WAAW,EAAE,UAAU,EAAE,GAAE,eAAoB,iBAMlD"}
|
1
|
+
{"version":3,"file":"reset.d.ts","sourceRoot":"","sources":["../../../../src/actions/test/reset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,SAAS,EACV,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAEjD,MAAM,MAAM,eAAe,GAAG;IAC5B,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,wBAAwB;IACxB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,CAAA;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,KAAK,CAAC,MAAM,SAAS,KAAK,GAAG,SAAS,EAC1D,MAAM,EAAE,UAAU,CAAC,cAAc,EAAE,SAAS,EAAE,MAAM,CAAC,EACrD,EAAE,WAAW,EAAE,UAAU,EAAE,GAAE,eAAoB,iBAMlD"}
|
@@ -4,5 +4,25 @@ export type RevertParameters = {
|
|
4
4
|
/** The snapshot ID to revert to. */
|
5
5
|
id: Quantity;
|
6
6
|
};
|
7
|
+
/**
|
8
|
+
* Revert the state of the blockchain at the current block.
|
9
|
+
*
|
10
|
+
* - Docs: https://viem.sh/docs/actions/test/revert.html
|
11
|
+
*
|
12
|
+
* @param client - Client to use
|
13
|
+
* @param parameters – {@link RevertParameters}
|
14
|
+
*
|
15
|
+
* @example
|
16
|
+
* import { createTestClient, http } from 'viem'
|
17
|
+
* import { foundry } from 'viem/chains'
|
18
|
+
* import { revert } from 'viem/test'
|
19
|
+
*
|
20
|
+
* const client = createTestClient({
|
21
|
+
* mode: 'anvil',
|
22
|
+
* chain: 'foundry',
|
23
|
+
* transport: http(),
|
24
|
+
* })
|
25
|
+
* await revert(client, { id: '0x…' })
|
26
|
+
*/
|
7
27
|
export declare function revert<TChain extends Chain | undefined>(client: TestClient<TestClientMode, Transport, TChain>, { id }: RevertParameters): Promise<void>;
|
8
28
|
//# sourceMappingURL=revert.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"revert.d.ts","sourceRoot":"","sources":["../../../../src/actions/test/revert.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,SAAS,EACV,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAE3D,MAAM,MAAM,gBAAgB,GAAG;IAC7B,oCAAoC;IACpC,EAAE,EAAE,QAAQ,CAAA;CACb,CAAA;AAED,wBAAsB,MAAM,CAAC,MAAM,SAAS,KAAK,GAAG,SAAS,EAC3D,MAAM,EAAE,UAAU,CAAC,cAAc,EAAE,SAAS,EAAE,MAAM,CAAC,EACrD,EAAE,EAAE,EAAE,EAAE,gBAAgB,iBAMzB"}
|
1
|
+
{"version":3,"file":"revert.d.ts","sourceRoot":"","sources":["../../../../src/actions/test/revert.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,SAAS,EACV,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAE3D,MAAM,MAAM,gBAAgB,GAAG;IAC7B,oCAAoC;IACpC,EAAE,EAAE,QAAQ,CAAA;CACb,CAAA;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,MAAM,CAAC,MAAM,SAAS,KAAK,GAAG,SAAS,EAC3D,MAAM,EAAE,UAAU,CAAC,cAAc,EAAE,SAAS,EAAE,MAAM,CAAC,EACrD,EAAE,EAAE,EAAE,EAAE,gBAAgB,iBAMzB"}
|
@@ -2,5 +2,30 @@ import type { TestClient, TestClientMode, Transport } from '../../clients/index.
|
|
2
2
|
import type { Chain, Hash, TransactionRequest } from '../../types/index.js';
|
3
3
|
export type SendUnsignedTransactionParameters = TransactionRequest;
|
4
4
|
export type SendUnsignedTransactionReturnType = Hash;
|
5
|
+
/**
|
6
|
+
* Returns the details of all transactions currently pending for inclusion in the next block(s), as well as the ones that are being scheduled for future execution only.
|
7
|
+
*
|
8
|
+
* - Docs: https://viem.sh/docs/actions/test/getTxpoolContent.html
|
9
|
+
*
|
10
|
+
* @param client - Client to use
|
11
|
+
* @param parameters – {@link SendUnsignedTransactionParameters}
|
12
|
+
* @returns The transaction hash. {@link SendUnsignedTransactionReturnType}
|
13
|
+
*
|
14
|
+
* @example
|
15
|
+
* import { createTestClient, http } from 'viem'
|
16
|
+
* import { foundry } from 'viem/chains'
|
17
|
+
* import { sendUnsignedTransaction } from 'viem/test'
|
18
|
+
*
|
19
|
+
* const client = createTestClient({
|
20
|
+
* mode: 'anvil',
|
21
|
+
* chain: 'foundry',
|
22
|
+
* transport: http(),
|
23
|
+
* })
|
24
|
+
* const hash = await sendUnsignedTransaction(client, {
|
25
|
+
* from: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
|
26
|
+
* to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
|
27
|
+
* value: 1000000000000000000n,
|
28
|
+
* })
|
29
|
+
*/
|
5
30
|
export declare function sendUnsignedTransaction<TChain extends Chain | undefined>(client: TestClient<TestClientMode, Transport, TChain>, request: SendUnsignedTransactionParameters): Promise<SendUnsignedTransactionReturnType>;
|
6
31
|
//# sourceMappingURL=sendUnsignedTransaction.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"sendUnsignedTransaction.d.ts","sourceRoot":"","sources":["../../../../src/actions/test/sendUnsignedTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,SAAS,EACV,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAG3E,MAAM,MAAM,iCAAiC,GAAG,kBAAkB,CAAA;AAElE,MAAM,MAAM,iCAAiC,GAAG,IAAI,CAAA;AAEpD,wBAAsB,uBAAuB,CAC3C,MAAM,SAAS,KAAK,GAAG,SAAS,EAEhC,MAAM,EAAE,UAAU,CAAC,cAAc,EAAE,SAAS,EAAE,MAAM,CAAC,EACrD,OAAO,EAAE,iCAAiC,GACzC,OAAO,CAAC,iCAAiC,CAAC,CAO5C"}
|
1
|
+
{"version":3,"file":"sendUnsignedTransaction.d.ts","sourceRoot":"","sources":["../../../../src/actions/test/sendUnsignedTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,SAAS,EACV,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAG3E,MAAM,MAAM,iCAAiC,GAAG,kBAAkB,CAAA;AAElE,MAAM,MAAM,iCAAiC,GAAG,IAAI,CAAA;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAsB,uBAAuB,CAC3C,MAAM,SAAS,KAAK,GAAG,SAAS,EAEhC,MAAM,EAAE,UAAU,CAAC,cAAc,EAAE,SAAS,EAAE,MAAM,CAAC,EACrD,OAAO,EAAE,iCAAiC,GACzC,OAAO,CAAC,iCAAiC,CAAC,CAO5C"}
|
@@ -1,4 +1,23 @@
|
|
1
1
|
import type { TestClient, TestClientMode, Transport } from '../../clients/index.js';
|
2
2
|
import type { Chain } from '../../types/index.js';
|
3
|
+
/**
|
4
|
+
* Enables or disables the automatic mining of new blocks with each new transaction submitted to the network.
|
5
|
+
*
|
6
|
+
* - Docs: https://viem.sh/docs/actions/test/setAutomine.html
|
7
|
+
*
|
8
|
+
* @param client - Client to use
|
9
|
+
*
|
10
|
+
* @example
|
11
|
+
* import { createTestClient, http } from 'viem'
|
12
|
+
* import { foundry } from 'viem/chains'
|
13
|
+
* import { setAutomine } from 'viem/test'
|
14
|
+
*
|
15
|
+
* const client = createTestClient({
|
16
|
+
* mode: 'anvil',
|
17
|
+
* chain: 'foundry',
|
18
|
+
* transport: http(),
|
19
|
+
* })
|
20
|
+
* await setAutomine(client)
|
21
|
+
*/
|
3
22
|
export declare function setAutomine<TChain extends Chain | undefined>(client: TestClient<TestClientMode, Transport, TChain>, enabled: boolean): Promise<void>;
|
4
23
|
//# sourceMappingURL=setAutomine.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"setAutomine.d.ts","sourceRoot":"","sources":["../../../../src/actions/test/setAutomine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,SAAS,EACV,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAEjD,wBAAsB,WAAW,CAAC,MAAM,SAAS,KAAK,GAAG,SAAS,EAChE,MAAM,EAAE,UAAU,CAAC,cAAc,EAAE,SAAS,EAAE,MAAM,CAAC,EACrD,OAAO,EAAE,OAAO,iBAMjB"}
|
1
|
+
{"version":3,"file":"setAutomine.d.ts","sourceRoot":"","sources":["../../../../src/actions/test/setAutomine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,SAAS,EACV,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAEjD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,WAAW,CAAC,MAAM,SAAS,KAAK,GAAG,SAAS,EAChE,MAAM,EAAE,UAAU,CAAC,cAAc,EAAE,SAAS,EAAE,MAAM,CAAC,EACrD,OAAO,EAAE,OAAO,iBAMjB"}
|
@@ -6,5 +6,28 @@ export type SetBalanceParameters = {
|
|
6
6
|
/** Amount (in wei) to set */
|
7
7
|
value: bigint;
|
8
8
|
};
|
9
|
+
/**
|
10
|
+
* Modifies the balance of an account.
|
11
|
+
*
|
12
|
+
* - Docs: https://viem.sh/docs/actions/test/setBalance.html
|
13
|
+
*
|
14
|
+
* @param client - Client to use
|
15
|
+
* @param parameters – {@link SetBalanceParameters}
|
16
|
+
*
|
17
|
+
* @example
|
18
|
+
* import { createTestClient, http, parseEther } from 'viem'
|
19
|
+
* import { foundry } from 'viem/chains'
|
20
|
+
* import { setBalance } from 'viem/test'
|
21
|
+
*
|
22
|
+
* const client = createTestClient({
|
23
|
+
* mode: 'anvil',
|
24
|
+
* chain: 'foundry',
|
25
|
+
* transport: http(),
|
26
|
+
* })
|
27
|
+
* await setBalance(client, {
|
28
|
+
* address: '0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC',
|
29
|
+
* value: parseEther('1'),
|
30
|
+
* })
|
31
|
+
*/
|
9
32
|
export declare function setBalance<TChain extends Chain | undefined>(client: TestClient<TestClientMode, Transport, TChain>, { address, value }: SetBalanceParameters): Promise<void>;
|
10
33
|
//# sourceMappingURL=setBalance.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"setBalance.d.ts","sourceRoot":"","sources":["../../../../src/actions/test/setBalance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,SAAS,EACV,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAG1D,MAAM,MAAM,oBAAoB,GAAG;IACjC,2BAA2B;IAC3B,OAAO,EAAE,OAAO,CAAA;IAChB,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,wBAAsB,UAAU,CAAC,MAAM,SAAS,KAAK,GAAG,SAAS,EAC/D,MAAM,EAAE,UAAU,CAAC,cAAc,EAAE,SAAS,EAAE,MAAM,CAAC,EACrD,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,oBAAoB,iBAMzC"}
|
1
|
+
{"version":3,"file":"setBalance.d.ts","sourceRoot":"","sources":["../../../../src/actions/test/setBalance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,SAAS,EACV,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAG1D,MAAM,MAAM,oBAAoB,GAAG;IACjC,2BAA2B;IAC3B,OAAO,EAAE,OAAO,CAAA;IAChB,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,UAAU,CAAC,MAAM,SAAS,KAAK,GAAG,SAAS,EAC/D,MAAM,EAAE,UAAU,CAAC,cAAc,EAAE,SAAS,EAAE,MAAM,CAAC,EACrD,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,oBAAoB,iBAMzC"}
|
@@ -4,5 +4,25 @@ export type SetBlockGasLimitParameters = {
|
|
4
4
|
/** Gas limit (in wei). */
|
5
5
|
gasLimit: bigint;
|
6
6
|
};
|
7
|
+
/**
|
8
|
+
* Sets the block's gas limit.
|
9
|
+
*
|
10
|
+
* - Docs: https://viem.sh/docs/actions/test/setBlockGasLimit.html
|
11
|
+
*
|
12
|
+
* @param client - Client to use
|
13
|
+
* @param parameters – {@link SetBlockGasLimitParameters}
|
14
|
+
*
|
15
|
+
* @example
|
16
|
+
* import { createTestClient, http } from 'viem'
|
17
|
+
* import { foundry } from 'viem/chains'
|
18
|
+
* import { setBlockGasLimit } from 'viem/test'
|
19
|
+
*
|
20
|
+
* const client = createTestClient({
|
21
|
+
* mode: 'anvil',
|
22
|
+
* chain: 'foundry',
|
23
|
+
* transport: http(),
|
24
|
+
* })
|
25
|
+
* await setBlockGasLimit(client, { gasLimit: 420_000n })
|
26
|
+
*/
|
7
27
|
export declare function setBlockGasLimit<TChain extends Chain | undefined>(client: TestClient<TestClientMode, Transport, TChain>, { gasLimit }: SetBlockGasLimitParameters): Promise<void>;
|
8
28
|
//# sourceMappingURL=setBlockGasLimit.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"setBlockGasLimit.d.ts","sourceRoot":"","sources":["../../../../src/actions/test/setBlockGasLimit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,SAAS,EACV,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAGjD,MAAM,MAAM,0BAA0B,GAAG;IACvC,0BAA0B;IAC1B,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,wBAAsB,gBAAgB,CAAC,MAAM,SAAS,KAAK,GAAG,SAAS,EACrE,MAAM,EAAE,UAAU,CAAC,cAAc,EAAE,SAAS,EAAE,MAAM,CAAC,EACrD,EAAE,QAAQ,EAAE,EAAE,0BAA0B,iBAMzC"}
|
1
|
+
{"version":3,"file":"setBlockGasLimit.d.ts","sourceRoot":"","sources":["../../../../src/actions/test/setBlockGasLimit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,SAAS,EACV,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAGjD,MAAM,MAAM,0BAA0B,GAAG;IACvC,0BAA0B;IAC1B,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,gBAAgB,CAAC,MAAM,SAAS,KAAK,GAAG,SAAS,EACrE,MAAM,EAAE,UAAU,CAAC,cAAc,EAAE,SAAS,EAAE,MAAM,CAAC,EACrD,EAAE,QAAQ,EAAE,EAAE,0BAA0B,iBAMzC"}
|
@@ -4,5 +4,25 @@ export type SetBlockTimestampIntervalParameters = {
|
|
4
4
|
/** The interval (in seconds). */
|
5
5
|
interval: number;
|
6
6
|
};
|
7
|
+
/**
|
8
|
+
* Similar to [`increaseTime`](https://viem.sh/docs/actions/test/increaseTime), but sets a block timestamp `interval`. The timestamp of future blocks will be computed as `lastBlock_timestamp` + `interval`.
|
9
|
+
*
|
10
|
+
* - Docs: https://viem.sh/docs/actions/test/setBlockTimestampInterval.html
|
11
|
+
*
|
12
|
+
* @param client - Client to use
|
13
|
+
* @param parameters – {@link SetBlockTimestampIntervalParameters}
|
14
|
+
*
|
15
|
+
* @example
|
16
|
+
* import { createTestClient, http } from 'viem'
|
17
|
+
* import { foundry } from 'viem/chains'
|
18
|
+
* import { setBlockTimestampInterval } from 'viem/test'
|
19
|
+
*
|
20
|
+
* const client = createTestClient({
|
21
|
+
* mode: 'anvil',
|
22
|
+
* chain: 'foundry',
|
23
|
+
* transport: http(),
|
24
|
+
* })
|
25
|
+
* await setBlockTimestampInterval(client, { interval: 5 })
|
26
|
+
*/
|
7
27
|
export declare function setBlockTimestampInterval<TChain extends Chain | undefined>(client: TestClient<TestClientMode, Transport, TChain>, { interval }: SetBlockTimestampIntervalParameters): Promise<void>;
|
8
28
|
//# sourceMappingURL=setBlockTimestampInterval.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"setBlockTimestampInterval.d.ts","sourceRoot":"","sources":["../../../../src/actions/test/setBlockTimestampInterval.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,SAAS,EACV,MAAM,wBAAwB,CAAA;AAE/B,MAAM,MAAM,mCAAmC,GAAG;IAChD,iCAAiC;IACjC,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,wBAAsB,yBAAyB,CAC7C,MAAM,SAAS,KAAK,GAAG,SAAS,EAEhC,MAAM,EAAE,UAAU,CAAC,cAAc,EAAE,SAAS,EAAE,MAAM,CAAC,EACrD,EAAE,QAAQ,EAAE,EAAE,mCAAmC,iBAMlD"}
|
1
|
+
{"version":3,"file":"setBlockTimestampInterval.d.ts","sourceRoot":"","sources":["../../../../src/actions/test/setBlockTimestampInterval.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,SAAS,EACV,MAAM,wBAAwB,CAAA;AAE/B,MAAM,MAAM,mCAAmC,GAAG;IAChD,iCAAiC;IACjC,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,yBAAyB,CAC7C,MAAM,SAAS,KAAK,GAAG,SAAS,EAEhC,MAAM,EAAE,UAAU,CAAC,cAAc,EAAE,SAAS,EAAE,MAAM,CAAC,EACrD,EAAE,QAAQ,EAAE,EAAE,mCAAmC,iBAMlD"}
|