viem 0.3.1 → 0.3.2
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/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/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
@@ -59,41 +59,577 @@ import type { TestClient, TestClientMode } from '../createTestClient.js'
|
|
59
59
|
import type { Transport } from '../transports/index.js'
|
60
60
|
|
61
61
|
export type TestActions = {
|
62
|
+
/**
|
63
|
+
* Removes a transaction from the mempool.
|
64
|
+
*
|
65
|
+
* - Docs: https://viem.sh/docs/actions/test/dropTransaction.html
|
66
|
+
*
|
67
|
+
* @param args - {@link DropTransactionParameters}
|
68
|
+
*
|
69
|
+
* @example
|
70
|
+
* import { createTestClient, http } from 'viem'
|
71
|
+
* import { foundry } from 'viem/chains'
|
72
|
+
*
|
73
|
+
* const client = createTestClient({
|
74
|
+
* mode: 'anvil',
|
75
|
+
* chain: 'foundry',
|
76
|
+
* transport: http(),
|
77
|
+
* })
|
78
|
+
* await client.dropTransaction({
|
79
|
+
* hash: '0xe58dceb6b20b03965bb678e27d141e151d7d4efc2334c2d6a49b9fac523f7364'
|
80
|
+
* })
|
81
|
+
*/
|
62
82
|
dropTransaction: (args: DropTransactionParameters) => Promise<void>
|
83
|
+
/**
|
84
|
+
* Returns the automatic mining status of the node.
|
85
|
+
*
|
86
|
+
* - Docs: https://viem.sh/docs/actions/test/getAutomine.html
|
87
|
+
*
|
88
|
+
* @returns Whether or not the node is auto mining. {@link GetAutomineReturnType}
|
89
|
+
*
|
90
|
+
* @example
|
91
|
+
* import { createTestClient, http } from 'viem'
|
92
|
+
* import { foundry } from 'viem/chains'
|
93
|
+
*
|
94
|
+
* const client = createTestClient({
|
95
|
+
* mode: 'anvil',
|
96
|
+
* chain: 'foundry',
|
97
|
+
* transport: http(),
|
98
|
+
* })
|
99
|
+
* const isAutomining = await client.getAutomine()
|
100
|
+
*/
|
63
101
|
getAutomine: () => Promise<GetAutomineReturnType>
|
102
|
+
/**
|
103
|
+
* 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.
|
104
|
+
*
|
105
|
+
* - Docs: https://viem.sh/docs/actions/test/getTxpoolContent.html
|
106
|
+
*
|
107
|
+
* @returns Transaction pool content. {@link GetTxpoolContentReturnType}
|
108
|
+
*
|
109
|
+
* @example
|
110
|
+
* import { createTestClient, http } from 'viem'
|
111
|
+
* import { foundry } from 'viem/chains'
|
112
|
+
*
|
113
|
+
* const client = createTestClient({
|
114
|
+
* mode: 'anvil',
|
115
|
+
* chain: 'foundry',
|
116
|
+
* transport: http(),
|
117
|
+
* })
|
118
|
+
* const content = await client.getTxpoolContent()
|
119
|
+
*/
|
64
120
|
getTxpoolContent: () => Promise<GetTxpoolContentReturnType>
|
121
|
+
/**
|
122
|
+
* 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.
|
123
|
+
*
|
124
|
+
* - Docs: https://viem.sh/docs/actions/test/getTxpoolStatus.html
|
125
|
+
*
|
126
|
+
* @returns Transaction pool status. {@link GetTxpoolStatusReturnType}
|
127
|
+
*
|
128
|
+
* @example
|
129
|
+
* import { createTestClient, http } from 'viem'
|
130
|
+
* import { foundry } from 'viem/chains'
|
131
|
+
*
|
132
|
+
* const client = createTestClient({
|
133
|
+
* mode: 'anvil',
|
134
|
+
* chain: 'foundry',
|
135
|
+
* transport: http(),
|
136
|
+
* })
|
137
|
+
* const status = await client.getTxpoolStatus()
|
138
|
+
*/
|
65
139
|
getTxpoolStatus: () => Promise<GetTxpoolStatusReturnType>
|
140
|
+
/**
|
141
|
+
* 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.
|
142
|
+
*
|
143
|
+
* - Docs: https://viem.sh/docs/actions/test/impersonateAccount.html
|
144
|
+
*
|
145
|
+
* @param args - {@link ImpersonateAccountParameters}
|
146
|
+
*
|
147
|
+
* @example
|
148
|
+
* import { createTestClient, http } from 'viem'
|
149
|
+
* import { foundry } from 'viem/chains'
|
150
|
+
*
|
151
|
+
* const client = createTestClient({
|
152
|
+
* mode: 'anvil',
|
153
|
+
* chain: 'foundry',
|
154
|
+
* transport: http(),
|
155
|
+
* })
|
156
|
+
* await client.impersonateAccount({
|
157
|
+
* address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
|
158
|
+
* })
|
159
|
+
*/
|
66
160
|
impersonateAccount: (args: ImpersonateAccountParameters) => Promise<void>
|
161
|
+
/**
|
162
|
+
* Jump forward in time by the given amount of time, in seconds.
|
163
|
+
*
|
164
|
+
* - Docs: https://viem.sh/docs/actions/test/increaseTime.html
|
165
|
+
*
|
166
|
+
* @param args – {@link IncreaseTimeParameters}
|
167
|
+
*
|
168
|
+
* @example
|
169
|
+
* import { createTestClient, http } from 'viem'
|
170
|
+
* import { foundry } from 'viem/chains'
|
171
|
+
*
|
172
|
+
* const client = createTestClient({
|
173
|
+
* mode: 'anvil',
|
174
|
+
* chain: 'foundry',
|
175
|
+
* transport: http(),
|
176
|
+
* })
|
177
|
+
* await client.increaseTime({
|
178
|
+
* seconds: 420,
|
179
|
+
* })
|
180
|
+
*/
|
67
181
|
increaseTime: (args: IncreaseTimeParameters) => Promise<Quantity>
|
182
|
+
/**
|
183
|
+
* 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.
|
184
|
+
*
|
185
|
+
* - Docs: https://viem.sh/docs/actions/test/inspectTxpool.html
|
186
|
+
*
|
187
|
+
* @returns Transaction pool inspection data. {@link InspectTxpoolReturnType}
|
188
|
+
*
|
189
|
+
* @example
|
190
|
+
* import { createTestClient, http } from 'viem'
|
191
|
+
* import { foundry } from 'viem/chains'
|
192
|
+
*
|
193
|
+
* const client = createTestClient({
|
194
|
+
* mode: 'anvil',
|
195
|
+
* chain: 'foundry',
|
196
|
+
* transport: http(),
|
197
|
+
* })
|
198
|
+
* const data = await client.inspectTxpool()
|
199
|
+
*/
|
68
200
|
inspectTxpool: () => Promise<InspectTxpoolReturnType>
|
201
|
+
/**
|
202
|
+
* Mine a specified number of blocks.
|
203
|
+
*
|
204
|
+
* - Docs: https://viem.sh/docs/actions/test/mine.html
|
205
|
+
*
|
206
|
+
* @param client - Client to use
|
207
|
+
* @param args – {@link MineParameters}
|
208
|
+
*
|
209
|
+
* @example
|
210
|
+
* import { createTestClient, http } from 'viem'
|
211
|
+
* import { foundry } from 'viem/chains'
|
212
|
+
*
|
213
|
+
* const client = createTestClient({
|
214
|
+
* mode: 'anvil',
|
215
|
+
* chain: 'foundry',
|
216
|
+
* transport: http(),
|
217
|
+
* })
|
218
|
+
* await client.mine({ blocks: 1 })
|
219
|
+
*/
|
69
220
|
mine: (args: MineParameters) => Promise<void>
|
221
|
+
/**
|
222
|
+
* Removes [`setBlockTimestampInterval`](https://viem.sh/docs/actions/test/setBlockTimestampInterval.html) if it exists.
|
223
|
+
*
|
224
|
+
* - Docs: https://viem.sh/docs/actions/test/removeBlockTimestampInterval.html
|
225
|
+
*
|
226
|
+
* @example
|
227
|
+
* import { createTestClient, http } from 'viem'
|
228
|
+
* import { foundry } from 'viem/chains'
|
229
|
+
* import { removeBlockTimestampInterval } from 'viem/test'
|
230
|
+
*
|
231
|
+
* const client = createTestClient({
|
232
|
+
* mode: 'anvil',
|
233
|
+
* chain: 'foundry',
|
234
|
+
* transport: http(),
|
235
|
+
* })
|
236
|
+
* await client.removeBlockTimestampInterval()
|
237
|
+
*/
|
70
238
|
removeBlockTimestampInterval: () => Promise<void>
|
239
|
+
/**
|
240
|
+
* Resets fork back to its original state.
|
241
|
+
*
|
242
|
+
* - Docs: https://viem.sh/docs/actions/test/reset.html
|
243
|
+
*
|
244
|
+
* @param args – {@link ResetParameters}
|
245
|
+
*
|
246
|
+
* @example
|
247
|
+
* import { createTestClient, http } from 'viem'
|
248
|
+
* import { foundry } from 'viem/chains'
|
249
|
+
*
|
250
|
+
* const client = createTestClient({
|
251
|
+
* mode: 'anvil',
|
252
|
+
* chain: 'foundry',
|
253
|
+
* transport: http(),
|
254
|
+
* })
|
255
|
+
* await client.reset({ blockNumber: 69420n })
|
256
|
+
*/
|
71
257
|
reset: (args?: ResetParameters) => Promise<void>
|
258
|
+
/**
|
259
|
+
* Revert the state of the blockchain at the current block.
|
260
|
+
*
|
261
|
+
* - Docs: https://viem.sh/docs/actions/test/revert.html
|
262
|
+
*
|
263
|
+
* @param args – {@link RevertParameters}
|
264
|
+
*
|
265
|
+
* @example
|
266
|
+
* import { createTestClient, http } from 'viem'
|
267
|
+
* import { foundry } from 'viem/chains'
|
268
|
+
*
|
269
|
+
* const client = createTestClient({
|
270
|
+
* mode: 'anvil',
|
271
|
+
* chain: 'foundry',
|
272
|
+
* transport: http(),
|
273
|
+
* })
|
274
|
+
* await client.revert({ id: '0x…' })
|
275
|
+
*/
|
72
276
|
revert: (args: RevertParameters) => Promise<void>
|
277
|
+
/**
|
278
|
+
* 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.
|
279
|
+
*
|
280
|
+
* - Docs: https://viem.sh/docs/actions/test/getTxpoolContent.html
|
281
|
+
*
|
282
|
+
* @param args – {@link SendUnsignedTransactionParameters}
|
283
|
+
* @returns The transaction hash. {@link SendUnsignedTransactionReturnType}
|
284
|
+
*
|
285
|
+
* @example
|
286
|
+
* import { createTestClient, http } from 'viem'
|
287
|
+
* import { foundry } from 'viem/chains'
|
288
|
+
*
|
289
|
+
* const client = createTestClient({
|
290
|
+
* mode: 'anvil',
|
291
|
+
* chain: 'foundry',
|
292
|
+
* transport: http(),
|
293
|
+
* })
|
294
|
+
* const hash = await client.sendUnsignedTransaction({
|
295
|
+
* from: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
|
296
|
+
* to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
|
297
|
+
* value: 1000000000000000000n,
|
298
|
+
* })
|
299
|
+
*/
|
73
300
|
sendUnsignedTransaction: (
|
74
301
|
args: SendUnsignedTransactionParameters,
|
75
302
|
) => Promise<SendUnsignedTransactionReturnType>
|
303
|
+
/**
|
304
|
+
* Enables or disables the automatic mining of new blocks with each new transaction submitted to the network.
|
305
|
+
*
|
306
|
+
* - Docs: https://viem.sh/docs/actions/test/setAutomine.html
|
307
|
+
*
|
308
|
+
* @example
|
309
|
+
* import { createTestClient, http } from 'viem'
|
310
|
+
* import { foundry } from 'viem/chains'
|
311
|
+
*
|
312
|
+
* const client = createTestClient({
|
313
|
+
* mode: 'anvil',
|
314
|
+
* chain: 'foundry',
|
315
|
+
* transport: http(),
|
316
|
+
* })
|
317
|
+
* await client.setAutomine()
|
318
|
+
*/
|
76
319
|
setAutomine: (args: boolean) => Promise<void>
|
320
|
+
/**
|
321
|
+
* Modifies the balance of an account.
|
322
|
+
*
|
323
|
+
* - Docs: https://viem.sh/docs/actions/test/setBalance.html
|
324
|
+
*
|
325
|
+
* @param args – {@link SetBalanceParameters}
|
326
|
+
*
|
327
|
+
* @example
|
328
|
+
* import { createTestClient, http, parseEther } from 'viem'
|
329
|
+
* import { foundry } from 'viem/chains'
|
330
|
+
*
|
331
|
+
* const client = createTestClient({
|
332
|
+
* mode: 'anvil',
|
333
|
+
* chain: 'foundry',
|
334
|
+
* transport: http(),
|
335
|
+
* })
|
336
|
+
* await client.setBalance({
|
337
|
+
* address: '0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC',
|
338
|
+
* value: parseEther('1'),
|
339
|
+
* })
|
340
|
+
*/
|
77
341
|
setBalance: (args: SetBalanceParameters) => Promise<void>
|
342
|
+
/**
|
343
|
+
* Sets the block's gas limit.
|
344
|
+
*
|
345
|
+
* - Docs: https://viem.sh/docs/actions/test/setBlockGasLimit.html
|
346
|
+
*
|
347
|
+
* @param args – {@link SetBlockGasLimitParameters}
|
348
|
+
*
|
349
|
+
* @example
|
350
|
+
* import { createTestClient, http } from 'viem'
|
351
|
+
* import { foundry } from 'viem/chains'
|
352
|
+
*
|
353
|
+
* const client = createTestClient({
|
354
|
+
* mode: 'anvil',
|
355
|
+
* chain: 'foundry',
|
356
|
+
* transport: http(),
|
357
|
+
* })
|
358
|
+
* await client.setBlockGasLimit({ gasLimit: 420_000n })
|
359
|
+
*/
|
78
360
|
setBlockGasLimit: (args: SetBlockGasLimitParameters) => Promise<void>
|
361
|
+
/**
|
362
|
+
* 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`.
|
363
|
+
*
|
364
|
+
* - Docs: https://viem.sh/docs/actions/test/setBlockTimestampInterval.html
|
365
|
+
*
|
366
|
+
* @param args – {@link SetBlockTimestampIntervalParameters}
|
367
|
+
*
|
368
|
+
* @example
|
369
|
+
* import { createTestClient, http } from 'viem'
|
370
|
+
* import { foundry } from 'viem/chains'
|
371
|
+
*
|
372
|
+
* const client = createTestClient({
|
373
|
+
* mode: 'anvil',
|
374
|
+
* chain: 'foundry',
|
375
|
+
* transport: http(),
|
376
|
+
* })
|
377
|
+
* await client.setBlockTimestampInterval({ interval: 5 })
|
378
|
+
*/
|
79
379
|
setBlockTimestampInterval: (
|
80
380
|
args: SetBlockTimestampIntervalParameters,
|
81
381
|
) => Promise<void>
|
382
|
+
/**
|
383
|
+
* Modifies the bytecode stored at an account's address.
|
384
|
+
*
|
385
|
+
* - Docs: https://viem.sh/docs/actions/test/setCode.html
|
386
|
+
*
|
387
|
+
* @param args – {@link SetCodeParameters}
|
388
|
+
*
|
389
|
+
* @example
|
390
|
+
* import { createTestClient, http } from 'viem'
|
391
|
+
* import { foundry } from 'viem/chains'
|
392
|
+
*
|
393
|
+
* const client = createTestClient({
|
394
|
+
* mode: 'anvil',
|
395
|
+
* chain: 'foundry',
|
396
|
+
* transport: http(),
|
397
|
+
* })
|
398
|
+
* await client.setCode({
|
399
|
+
* address: '0xe846c6fcf817734ca4527b28ccb4aea2b6663c79',
|
400
|
+
* bytecode: '0x60806040526000600355600019600955600c80546001600160a01b031916737a250d5630b4cf539739df…',
|
401
|
+
* })
|
402
|
+
*/
|
82
403
|
setCode: (args: SetCodeParameters) => Promise<void>
|
404
|
+
/**
|
405
|
+
* Sets the coinbase address to be used in new blocks.
|
406
|
+
*
|
407
|
+
* - Docs: https://viem.sh/docs/actions/test/setCoinbase.html
|
408
|
+
*
|
409
|
+
* @param args – {@link SetCoinbaseParameters}
|
410
|
+
*
|
411
|
+
* @example
|
412
|
+
* import { createTestClient, http } from 'viem'
|
413
|
+
* import { foundry } from 'viem/chains'
|
414
|
+
*
|
415
|
+
* const client = createTestClient({
|
416
|
+
* mode: 'anvil',
|
417
|
+
* chain: 'foundry',
|
418
|
+
* transport: http(),
|
419
|
+
* })
|
420
|
+
* await client.setCoinbase({
|
421
|
+
* address: '0xe846c6fcf817734ca4527b28ccb4aea2b6663c79',
|
422
|
+
* })
|
423
|
+
*/
|
83
424
|
setCoinbase: (args: SetCoinbaseParameters) => Promise<void>
|
425
|
+
/**
|
426
|
+
* Sets the automatic mining interval (in seconds) of blocks. Setting the interval to 0 will disable automatic mining.
|
427
|
+
*
|
428
|
+
* - Docs: https://viem.sh/docs/actions/test/setIntervalMining.html
|
429
|
+
*
|
430
|
+
* @param args – {@link SetIntervalMiningParameters}
|
431
|
+
*
|
432
|
+
* @example
|
433
|
+
* import { createTestClient, http } from 'viem'
|
434
|
+
* import { foundry } from 'viem/chains'
|
435
|
+
*
|
436
|
+
* const client = createTestClient({
|
437
|
+
* mode: 'anvil',
|
438
|
+
* chain: 'foundry',
|
439
|
+
* transport: http(),
|
440
|
+
* })
|
441
|
+
* await client.setIntervalMining({ interval: 5 })
|
442
|
+
*/
|
84
443
|
setIntervalMining: (args: SetIntervalMiningParameters) => Promise<void>
|
444
|
+
/**
|
445
|
+
* Enable or disable logging on the test node network.
|
446
|
+
*
|
447
|
+
* - Docs: https://viem.sh/docs/actions/test/setLoggingEnabled.html
|
448
|
+
*
|
449
|
+
* @param client - Client to use
|
450
|
+
*
|
451
|
+
* @example
|
452
|
+
* import { createTestClient, http } from 'viem'
|
453
|
+
* import { foundry } from 'viem/chains'
|
454
|
+
*
|
455
|
+
* const client = createTestClient({
|
456
|
+
* mode: 'anvil',
|
457
|
+
* chain: 'foundry',
|
458
|
+
* transport: http(),
|
459
|
+
* })
|
460
|
+
* await client.setLoggingEnabled()
|
461
|
+
*/
|
85
462
|
setLoggingEnabled: (args: boolean) => Promise<void>
|
463
|
+
/**
|
464
|
+
* Change the minimum gas price accepted by the network (in wei).
|
465
|
+
*
|
466
|
+
* - Docs: https://viem.sh/docs/actions/test/setMinGasPrice.html
|
467
|
+
*
|
468
|
+
* Note: `setMinGasPrice` can only be used on clients that do not have EIP-1559 enabled.
|
469
|
+
*
|
470
|
+
* @param args – {@link SetBlockGasLimitParameters}
|
471
|
+
*
|
472
|
+
* @example
|
473
|
+
* import { createTestClient, http, parseGwei } from 'viem'
|
474
|
+
* import { foundry } from 'viem/chains'
|
475
|
+
*
|
476
|
+
* const client = createTestClient({
|
477
|
+
* mode: 'anvil',
|
478
|
+
* chain: 'foundry',
|
479
|
+
* transport: http(),
|
480
|
+
* })
|
481
|
+
* await client.setMinGasPrice({
|
482
|
+
* gasPrice: parseGwei('20'),
|
483
|
+
* })
|
484
|
+
*/
|
86
485
|
setMinGasPrice: (args: SetMinGasPriceParameters) => Promise<void>
|
486
|
+
/**
|
487
|
+
* Sets the next block's base fee per gas.
|
488
|
+
*
|
489
|
+
* - Docs: https://viem.sh/docs/actions/test/setNextBlockBaseFeePerGas.html
|
490
|
+
*
|
491
|
+
* @param args – {@link SetNextBlockBaseFeePerGasParameters}
|
492
|
+
*
|
493
|
+
* @example
|
494
|
+
* import { createTestClient, http, parseGwei } from 'viem'
|
495
|
+
* import { foundry } from 'viem/chains'
|
496
|
+
*
|
497
|
+
* const client = createTestClient({
|
498
|
+
* mode: 'anvil',
|
499
|
+
* chain: 'foundry',
|
500
|
+
* transport: http(),
|
501
|
+
* })
|
502
|
+
* await client.setNextBlockBaseFeePerGas({
|
503
|
+
* baseFeePerGas: parseGwei('20'),
|
504
|
+
* })
|
505
|
+
*/
|
87
506
|
setNextBlockBaseFeePerGas: (
|
88
507
|
args: SetNextBlockBaseFeePerGasParameters,
|
89
508
|
) => Promise<void>
|
509
|
+
/**
|
510
|
+
* Sets the next block's timestamp.
|
511
|
+
*
|
512
|
+
* - Docs: https://viem.sh/docs/actions/test/setNextBlockTimestamp.html
|
513
|
+
*
|
514
|
+
* @param args – {@link SetNextBlockTimestampParameters}
|
515
|
+
*
|
516
|
+
* @example
|
517
|
+
* import { createTestClient, http } from 'viem'
|
518
|
+
* import { foundry } from 'viem/chains'
|
519
|
+
*
|
520
|
+
* const client = createTestClient({
|
521
|
+
* mode: 'anvil',
|
522
|
+
* chain: 'foundry',
|
523
|
+
* transport: http(),
|
524
|
+
* })
|
525
|
+
* await client.setNextBlockTimestamp({ timestamp: 1671744314n })
|
526
|
+
*/
|
90
527
|
setNextBlockTimestamp: (
|
91
528
|
args: SetNextBlockTimestampParameters,
|
92
529
|
) => Promise<void>
|
530
|
+
/**
|
531
|
+
* Modifies (overrides) the nonce of an account.
|
532
|
+
*
|
533
|
+
* - Docs: https://viem.sh/docs/actions/test/setNonce.html
|
534
|
+
*
|
535
|
+
* @param args – {@link SetNonceParameters}
|
536
|
+
*
|
537
|
+
* @example
|
538
|
+
* import { createTestClient, http } from 'viem'
|
539
|
+
* import { foundry } from 'viem/chains'
|
540
|
+
*
|
541
|
+
* const client = createTestClient({
|
542
|
+
* mode: 'anvil',
|
543
|
+
* chain: 'foundry',
|
544
|
+
* transport: http(),
|
545
|
+
* })
|
546
|
+
* await client.setNonce({
|
547
|
+
* address: '0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC',
|
548
|
+
* nonce: 420,
|
549
|
+
* })
|
550
|
+
*/
|
93
551
|
setNonce: (args: SetNonceParameters) => Promise<void>
|
552
|
+
/**
|
553
|
+
* Sets the backend RPC URL.
|
554
|
+
*
|
555
|
+
* - Docs: https://viem.sh/docs/actions/test/setRpcUrl.html
|
556
|
+
*
|
557
|
+
* @param jsonRpcUrl – RPC URL
|
558
|
+
*
|
559
|
+
* @example
|
560
|
+
* import { createTestClient, http } from 'viem'
|
561
|
+
* import { foundry } from 'viem/chains'
|
562
|
+
*
|
563
|
+
* const client = createTestClient({
|
564
|
+
* mode: 'anvil',
|
565
|
+
* chain: 'foundry',
|
566
|
+
* transport: http(),
|
567
|
+
* })
|
568
|
+
* await client.setRpcUrl('https://eth-mainnet.g.alchemy.com/v2')
|
569
|
+
*/
|
94
570
|
setRpcUrl: (args: string) => Promise<void>
|
571
|
+
/**
|
572
|
+
* Writes to a slot of an account's storage.
|
573
|
+
*
|
574
|
+
* - Docs: https://viem.sh/docs/actions/test/setStorageAt.html
|
575
|
+
*
|
576
|
+
* @param args – {@link SetStorageAtParameters}
|
577
|
+
*
|
578
|
+
* @example
|
579
|
+
* import { createTestClient, http } from 'viem'
|
580
|
+
* import { foundry } from 'viem/chains'
|
581
|
+
*
|
582
|
+
* const client = createTestClient({
|
583
|
+
* mode: 'anvil',
|
584
|
+
* chain: 'foundry',
|
585
|
+
* transport: http(),
|
586
|
+
* })
|
587
|
+
* await client.setStorageAt({
|
588
|
+
* address: '0xe846c6fcf817734ca4527b28ccb4aea2b6663c79',
|
589
|
+
* index: 2,
|
590
|
+
* value: '0x0000000000000000000000000000000000000000000000000000000000000069',
|
591
|
+
* })
|
592
|
+
*/
|
95
593
|
setStorageAt: (args: SetStorageAtParameters) => Promise<void>
|
594
|
+
/**
|
595
|
+
* Snapshot the state of the blockchain at the current block.
|
596
|
+
*
|
597
|
+
* - Docs: https://viem.sh/docs/actions/test/snapshot.html
|
598
|
+
*
|
599
|
+
* @example
|
600
|
+
* import { createTestClient, http } from 'viem'
|
601
|
+
* import { foundry } from 'viem/chains'
|
602
|
+
* import { snapshot } from 'viem/test'
|
603
|
+
*
|
604
|
+
* const client = createTestClient({
|
605
|
+
* mode: 'anvil',
|
606
|
+
* chain: 'foundry',
|
607
|
+
* transport: http(),
|
608
|
+
* })
|
609
|
+
* await client.snapshot()
|
610
|
+
*/
|
96
611
|
snapshot: () => Promise<Quantity>
|
612
|
+
/**
|
613
|
+
* Stop impersonating an account after having previously used [`impersonateAccount`](https://viem.sh/docs/actions/test/impersonateAccount).
|
614
|
+
*
|
615
|
+
* - Docs: https://viem.sh/docs/actions/test/stopImpersonatingAccount.html
|
616
|
+
*
|
617
|
+
* @param args – {@link StopImpersonatingAccountParameters}
|
618
|
+
*
|
619
|
+
* @example
|
620
|
+
* import { createTestClient, http } from 'viem'
|
621
|
+
* import { foundry } from 'viem/chains'
|
622
|
+
* import { stopImpersonatingAccount } from 'viem/test'
|
623
|
+
*
|
624
|
+
* const client = createTestClient({
|
625
|
+
* mode: 'anvil',
|
626
|
+
* chain: 'foundry',
|
627
|
+
* transport: http(),
|
628
|
+
* })
|
629
|
+
* await client.stopImpersonatingAccount({
|
630
|
+
* address: '0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC',
|
631
|
+
* })
|
632
|
+
*/
|
97
633
|
stopImpersonatingAccount: (
|
98
634
|
args: StopImpersonatingAccountParameters,
|
99
635
|
) => Promise<void>
|