Skip to content

TevmProvider

An ethers JsonRpcApiProvider using a tevm MemoryClient as it’s backend

TevmProvider

The TevmProvider class is an instance of an ethers provider using Tevm as it’s backend. The createMemoryProvider method can be used to create an in memory instance of tevm using a memoryClient as it’s backend.

Examples

import {TevmProvider} from '@tevm/ethers'
const provider = await TevmProvider.createMemoryProvider({
fork: {
url: 'https://mainnet.optimism.io',
},
})

Using with an http client

The constructor takes any instance of tevm including the httpClient.

import {createHttpClient} from '@tevm/http-client'
const provider = new TevmProvider(createHttpClient({url: 'https://localhost:8080'}))

Ethers provider support

You can use all the normal ethers apis to interact with tevm.

const provider = await TevmProvider.createMemoryProvider({
fork: {
url: 'https://mainnet.optimism.io',
},
})
console.log(
await provider.getBlockNumber()
) // 10

Tevm actions support

The entire tevm api exists on the tevm property. For example the tevm.script method can be used to run an arbitrary script.

import {TevmProvider} from '@tevm/ethers'
import {createScript} from 'tevm'
const provider = await TevmProvider.createMemoryProvider({
fork: {
url: 'https://mainnet.optimism.io',
},
})
const addContract = createScript({
name: 'AddContract',
humanReadableAbi: [
'function add(uint256 a, uint256 b) public pure returns (uint256)',
],
deployedBytecode: '0x608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063771602f71461002d575b5f80fd5b610047600480360381019061004291906100a9565b61005d565b60405161005491906100f6565b60405180910390f35b5f818361006a919061013c565b905092915050565b5f80fd5b5f819050919050565b61008881610076565b8114610092575f80fd5b50565b5f813590506100a38161007f565b92915050565b5f80604083850312156100bf576100be610072565b5b5f6100cc85828601610095565b92505060206100dd85828601610095565b9150509250929050565b6100f081610076565b82525050565b5f6020820190506101095f8301846100e7565b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61014682610076565b915061015183610076565b92508282019050808211156101695761016861010f565b5b9291505056fea2646970667358221220a8f4b7187c62760aefc097c1827799c61a6df322acc9d7575862a525f9aa59a364736f6c63430008170033',
bytecode: '0x608060405234801561000f575f80fd5b506101a58061001d5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063771602f71461002d575b5f80fd5b610047600480360381019061004291906100a9565b61005d565b60405161005491906100f6565b60405180910390f35b5f818361006a919061013c565b905092915050565b5f80fd5b5f819050919050565b61008881610076565b8114610092575f80fd5b50565b5f813590506100a38161007f565b92915050565b5f80604083850312156100bf576100be610072565b5b5f6100cc85828601610095565b92505060206100dd85828601610095565b9150509250929050565b6100f081610076565b82525050565b5f6020820190506101095f8301846100e7565b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61014682610076565b915061015183610076565b92508282019050808211156101695761016861010f565b5b9291505056fea2646970667358221220a8f4b7187c62760aefc097c1827799c61a6df322acc9d7575862a525f9aa59a364736f6c63430008170033',
} as const)
const result = await provider.tevm.script(addContract.read.add(390n, 30n))
console.log(result)
// createdAddresses: new Set(),
// data: 420n,
// executionGasUsed: 927n,
// gas: 16776288n,
// logs: [],
// rawData: '0x00000000000000000000000000000000000000000000000000000000000001a4',
// selfdestruct: new Set(),

Tevm JSON-RPC support

An ethers TevmProvider supports the tevm JSON-RPC methods. For example you can use tevm_account to set account

await provider.send('tevm_setAccount', {
address: `0x${'69'.repeat(20)}`,
nonce: toHex(1n),
balance: toHex(420n),
}),
console.log(await provider.send('tevm_getAccount', {
address: `0x${'69'.repeat(20)}`,
}))
// address: '0x6969696969696969696969696969696969696969',
// balance: toHex(420n),
// deployedBytecode: '0x00',
// nonce: toHex(1n),
// storageRoot: '0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421',

See

Tevm Clients Docs

Extends

  • JsonRpcApiProvider

Constructors

new TevmProvider()

new TevmProvider(memoryClient): TevmProvider

Parameters

memoryClient

An instance of a tevm Memory client

memoryClient._tevm: object & Eip1193RequestProvider & TevmActionsApi & object

memoryClient.account: undefined

The Account of the Client.

memoryClient.batch?

Flags for batch settings.

memoryClient.batch.multicall?: boolean | object

Toggle to enable eth_call multicall aggregation.

memoryClient.cacheTime: number

Time (in ms) that cached data will remain in memory.

memoryClient.call

Executes a new message call immediately without submitting a transaction to the network.

Example

import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const data = await client.call({
account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
})

memoryClient.ccipRead?: false | object

CCIP Read configuration.

memoryClient.chain: undefined

Chain for the client.

memoryClient.createBlockFilter

Creates a Filter to listen for new block hashes that can be used with getFilterChanges.

Example

import { createPublicClient, createBlockFilter, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const filter = await createBlockFilter(client)
// { id: "0x345a6572337856574a76364e457a4366", type: 'block' }

memoryClient.createContractEventFilter

Creates a Filter to retrieve event logs that can be used with getFilterChanges or getFilterLogs.

Example

import { createPublicClient, http, parseAbi } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const filter = await client.createContractEventFilter({
abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']),
})

memoryClient.createEventFilter

Creates a Filter to listen for new events that can be used with getFilterChanges.

Example

import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const filter = await client.createEventFilter({
address: '0xfba3912ca04dd458c843e2ee08967fc04f3579c2',
})

memoryClient.createPendingTransactionFilter

Creates a Filter to listen for new pending transaction hashes that can be used with getFilterChanges.

Example

import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const filter = await client.createPendingTransactionFilter()
// { id: "0x345a6572337856574a76364e457a4366", type: 'transaction' }

memoryClient.dropTransaction

Removes a transaction from the mempool.

Example

import { createTestClient, http } from 'viem'
import { foundry } from 'viem/chains'
const client = createTestClient({
mode: 'anvil',
chain: 'foundry',
transport: http(),
})
await client.dropTransaction({
hash: '0xe58dceb6b20b03965bb678e27d141e151d7d4efc2334c2d6a49b9fac523f7364'
})

memoryClient.dumpState

Serializes the current state (including contracts code, contract’s storage, accounts properties, etc.) into a savable data blob.

Example

import { createTestClient, http } from 'viem'
import { foundry } from 'viem/chains'
const client = createTestClient({
mode: 'anvil',
chain: 'foundry',
transport: http(),
})
await client.dumpState()

memoryClient.estimateContractGas

Estimates the gas required to successfully execute a contract write function call.

Remarks

Internally, uses a Public Client to call the estimateGas action with ABI-encoded data.

Example

import { createPublicClient, http, parseAbi } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const gas = await client.estimateContractGas({
address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
abi: parseAbi(['function mint() public']),
functionName: 'mint',
account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
})

memoryClient.estimateFeesPerGas

Returns an estimate for the fees per gas for a transaction to be included in the next block.

Example

import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const maxPriorityFeePerGas = await client.estimateFeesPerGas()
// { maxFeePerGas: ..., maxPriorityFeePerGas: ... }

memoryClient.estimateGas

Estimates the gas necessary to complete a transaction without submitting it to the network.

Example

import { createPublicClient, http, parseEther } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const gasEstimate = await client.estimateGas({
account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
value: parseEther('1'),
})

memoryClient.estimateMaxPriorityFeePerGas

Returns an estimate for the max priority fee per gas (in wei) for a transaction to be included in the next block.

Example

import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const maxPriorityFeePerGas = await client.estimateMaxPriorityFeePerGas()
// 10000000n

memoryClient.extend

memoryClient.getAutomine

Returns the automatic mining status of the node.

Example

import { createTestClient, http } from 'viem'
import { foundry } from 'viem/chains'
const client = createTestClient({
mode: 'anvil',
chain: 'foundry',
transport: http(),
})
const isAutomining = await client.getAutomine()

memoryClient.getBalance

Returns the balance of an address in wei.

Remarks

You can convert the balance to ether units with formatEther.

const balance = await getBalance(client, {
address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
blockTag: 'safe'
})
const balanceAsEther = formatEther(balance)
// "6.942"

Example

import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const balance = await client.getBalance({
address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
})
// 10000000000000000000000n (wei)

memoryClient.getBlobBaseFee

Returns the base fee per blob gas in wei.

Example

import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
import { getBlobBaseFee } from 'viem/public'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const blobBaseFee = await client.getBlobBaseFee()

memoryClient.getBlock

Returns information about a block at a block number, hash, or tag.

Example

import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const block = await client.getBlock()

memoryClient.getBlockNumber

Returns the number of the most recent block seen.

Example

import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const blockNumber = await client.getBlockNumber()
// 69420n

memoryClient.getBlockTransactionCount

Returns the number of Transactions at a block number, hash, or tag.

Example

import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const count = await client.getBlockTransactionCount()

memoryClient.getBytecode

Retrieves the bytecode at an address.

Example

import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const code = await client.getBytecode({
address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
})

memoryClient.getChainId

Returns the chain ID associated with the current network.

Example

import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const chainId = await client.getChainId()
// 1

memoryClient.getContractEvents

Returns a list of event logs emitted by a contract.

Example

import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
import { wagmiAbi } from './abi'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const logs = await client.getContractEvents(client, {
address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
abi: wagmiAbi,
eventName: 'Transfer'
})

memoryClient.getEnsAddress

Gets address for ENS name.

Remarks

Calls resolve(bytes, bytes) on ENS Universal Resolver Contract.

Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this.

Example

import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
import { normalize } from 'viem/ens'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const ensAddress = await client.getEnsAddress({
name: normalize('wevm.eth'),
})
// '0xd2135CfB216b74109775236E36d4b433F1DF507B'

memoryClient.getEnsAvatar

Gets the avatar of an ENS name.

Remarks

Calls getEnsText with key set to 'avatar'.

Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this.

Example

import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
import { normalize } from 'viem/ens'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const ensAvatar = await client.getEnsAvatar({
name: normalize('wevm.eth'),
})
// 'https://ipfs.io/ipfs/Qma8mnp6xV3J2cRNf3mTth5C8nV11CAnceVinc3y8jSbio'

memoryClient.getEnsName

Gets primary name for specified address.

Remarks

Calls reverse(bytes) on ENS Universal Resolver Contract to “reverse resolve” the address to the primary ENS name.

Example

import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const ensName = await client.getEnsName({
address: '0xd2135CfB216b74109775236E36d4b433F1DF507B',
})
// 'wevm.eth'

memoryClient.getEnsResolver

Gets resolver for ENS name.

Remarks

Calls findResolver(bytes) on ENS Universal Resolver Contract to retrieve the resolver of an ENS name.

Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this.

Example

import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
import { normalize } from 'viem/ens'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const resolverAddress = await client.getEnsResolver({
name: normalize('wevm.eth'),
})
// '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41'

memoryClient.getEnsText

Gets a text record for specified ENS name.

Remarks

Calls resolve(bytes, bytes) on ENS Universal Resolver Contract.

Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to normalize ENS names with UTS-46 normalization before passing them to getEnsAddress. You can use the built-in normalize function for this.

Example

import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
import { normalize } from 'viem/ens'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const twitterRecord = await client.getEnsText({
name: normalize('wevm.eth'),
key: 'com.twitter',
})
// 'wagmi_sh'

memoryClient.getFeeHistory

Returns a collection of historical gas information.

Example

import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const feeHistory = await client.getFeeHistory({
blockCount: 4,
rewardPercentiles: [25, 75],
})

memoryClient.getFilterChanges

Returns a list of logs or hashes based on a Filter since the last time it was called.

Remarks

A Filter can be created from the following actions:

Depending on the type of filter, the return value will be different:

  • If the filter was created with createContractEventFilter or createEventFilter, it returns a list of logs.
  • If the filter was created with createPendingTransactionFilter, it returns a list of transaction hashes.
  • If the filter was created with createBlockFilter, it returns a list of block hashes.

Examples

// Blocks
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const filter = await client.createBlockFilter()
const hashes = await client.getFilterChanges({ filter })
// Contract Events
import { createPublicClient, http, parseAbi } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const filter = await client.createContractEventFilter({
address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']),
eventName: 'Transfer',
})
const logs = await client.getFilterChanges({ filter })
// Raw Events
import { createPublicClient, http, parseAbiItem } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const filter = await client.createEventFilter({
address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'),
})
const logs = await client.getFilterChanges({ filter })
// Transactions
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const filter = await client.createPendingTransactionFilter()
const hashes = await client.getFilterChanges({ filter })

memoryClient.getFilterLogs

Returns a list of event logs since the filter was created.

Remarks

getFilterLogs is only compatible with event filters.

Example

import { createPublicClient, http, parseAbiItem } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const filter = await client.createEventFilter({
address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'),
})
const logs = await client.getFilterLogs({ filter })

memoryClient.getGasPrice

Returns the current price of gas (in wei).

Example

import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const gasPrice = await client.getGasPrice()

memoryClient.getLogs

Returns a list of event logs matching the provided parameters.

Example

import { createPublicClient, http, parseAbiItem } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const logs = await client.getLogs()

memoryClient.getProof

Returns the account and storage values of the specified account including the Merkle-proof.

Example

import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const block = await client.getProof({
address: '0x...',
storageKeys: ['0x...'],
})

memoryClient.getStorageAt

Returns the value from a storage slot at a given address.

Example

import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
import { getStorageAt } from 'viem/contract'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const code = await client.getStorageAt({
address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
slot: toHex(0),
})

memoryClient.getTransaction

Returns information about a Transaction given a hash or block identifier.

Example

import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const transaction = await client.getTransaction({
hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d',
})

memoryClient.getTransactionConfirmations

Returns the number of blocks passed (confirmations) since the transaction was processed on a block.

Example

import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const confirmations = await client.getTransactionConfirmations({
hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d',
})

memoryClient.getTransactionCount

Returns the number of Transactions an Account has broadcast / sent.

Example

import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const transactionCount = await client.getTransactionCount({
address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
})

memoryClient.getTransactionReceipt

Returns the Transaction Receipt given a Transaction hash.

Example

import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const transactionReceipt = await client.getTransactionReceipt({
hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d',
})

memoryClient.getTxpoolContent

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.

Example

import { createTestClient, http } from 'viem'
import { foundry } from 'viem/chains'
const client = createTestClient({
mode: 'anvil',
chain: 'foundry',
transport: http(),
})
const content = await client.getTxpoolContent()

memoryClient.getTxpoolStatus

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.

Example

import { createTestClient, http } from 'viem'
import { foundry } from 'viem/chains'
const client = createTestClient({
mode: 'anvil',
chain: 'foundry',
transport: http(),
})
const status = await client.getTxpoolStatus()

memoryClient.impersonateAccount

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.

Example

import { createTestClient, http } from 'viem'
import { foundry } from 'viem/chains'
const client = createTestClient({
mode: 'anvil',
chain: 'foundry',
transport: http(),
})
await client.impersonateAccount({
address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
})

memoryClient.increaseTime

Jump forward in time by the given amount of time, in seconds.

Example

import { createTestClient, http } from 'viem'
import { foundry } from 'viem/chains'
const client = createTestClient({
mode: 'anvil',
chain: 'foundry',
transport: http(),
})
await client.increaseTime({
seconds: 420,
})

memoryClient.inspectTxpool

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.

Example

import { createTestClient, http } from 'viem'
import { foundry } from 'viem/chains'
const client = createTestClient({
mode: 'anvil',
chain: 'foundry',
transport: http(),
})
const data = await client.inspectTxpool()

memoryClient.key: string

A key for the client.

memoryClient.loadState

Adds state previously dumped with dumpState to the current chain.

Example

import { createTestClient, http } from 'viem'
import { foundry } from 'viem/chains'
const client = createTestClient({
mode: 'anvil',
chain: 'foundry',
transport: http(),
})
await client.loadState({ state: '0x...' })

memoryClient.mine

Mine a specified number of blocks.

Example

import { createTestClient, http } from 'viem'
import { foundry } from 'viem/chains'
const client = createTestClient({
mode: 'anvil',
chain: 'foundry',
transport: http(),
})
await client.mine({ blocks: 1 })

memoryClient.multicall

Similar to readContract, but batches up multiple functions on a contract in a single RPC call via the multicall3 contract.

Example

import { createPublicClient, http, parseAbi } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const abi = parseAbi([
'function balanceOf(address) view returns (uint256)',
'function totalSupply() view returns (uint256)',
])
const result = await client.multicall({
contracts: [
{
address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
abi,
functionName: 'balanceOf',
args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'],
},
{
address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
abi,
functionName: 'totalSupply',
},
],
})
// [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }]

memoryClient.name: string

A name for the client.

memoryClient.pollingInterval: number

Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds.

memoryClient.prepareTransactionRequest

Prepares a transaction request for signing.

Examples

import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const request = await client.prepareTransactionRequest({
account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
to: '0x0000000000000000000000000000000000000000',
value: 1n,
})
// Account Hoisting
import { createWalletClient, http } from 'viem'
import { privateKeyToAccount } from 'viem/accounts'
import { mainnet } from 'viem/chains'
const client = createWalletClient({
account: privateKeyToAccount('0x…'),
chain: mainnet,
transport: custom(window.ethereum),
})
const request = await client.prepareTransactionRequest({
to: '0x0000000000000000000000000000000000000000',
value: 1n,
})

memoryClient.readContract

Calls a read-only function on a contract, and returns the response.

Remarks

A “read-only” function (constant function) on a Solidity contract is denoted by a view or pure keyword. They can only read the state of the contract, and cannot make any changes to it. Since read-only methods do not change the state of the contract, they do not require any gas to be executed, and can be called by any user without the need to pay for gas.

Internally, uses a Public Client to call the call action with ABI-encoded data.

Example

import { createPublicClient, http, parseAbi } from 'viem'
import { mainnet } from 'viem/chains'
import { readContract } from 'viem/contract'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const result = await client.readContract({
address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
abi: parseAbi(['function balanceOf(address) view returns (uint256)']),
functionName: 'balanceOf',
args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'],
})
// 424122n

memoryClient.removeBlockTimestampInterval

Removes setBlockTimestampInterval if it exists.

Example

import { createTestClient, http } from 'viem'
import { foundry } from 'viem/chains'
import { removeBlockTimestampInterval } from 'viem/test'
const client = createTestClient({
mode: 'anvil',
chain: 'foundry',
transport: http(),
})
await client.removeBlockTimestampInterval()

memoryClient.request: EIP1193RequestFn<[object, object, object, object, object]>

Request function wrapped with friendly error handling

memoryClient.reset

Resets fork back to its original state.

Example

import { createTestClient, http } from 'viem'
import { foundry } from 'viem/chains'
const client = createTestClient({
mode: 'anvil',
chain: 'foundry',
transport: http(),
})
await client.reset({ blockNumber: 69420n })

memoryClient.revert

Revert the state of the blockchain at the current block.

Example

import { createTestClient, http } from 'viem'
import { foundry } from 'viem/chains'
const client = createTestClient({
mode: 'anvil',
chain: 'foundry',
transport: http(),
})
await client.revert({ id: '0x…' })

memoryClient.sendRawTransaction

Sends a signed transaction to the network

Example

import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
import { sendRawTransaction } from 'viem/wallet'
const client = createWalletClient({
chain: mainnet,
transport: custom(window.ethereum),
})
const hash = await client.sendRawTransaction({
serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33'
})

memoryClient.sendUnsignedTransaction

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.

Example

import { createTestClient, http } from 'viem'
import { foundry } from 'viem/chains'
const client = createTestClient({
mode: 'anvil',
chain: 'foundry',
transport: http(),
})
const hash = await client.sendUnsignedTransaction({
from: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
value: 1000000000000000000n,
})

memoryClient.setAutomine

Enables or disables the automatic mining of new blocks with each new transaction submitted to the network.

Example

import { createTestClient, http } from 'viem'
import { foundry } from 'viem/chains'
const client = createTestClient({
mode: 'anvil',
chain: 'foundry',
transport: http(),
})
await client.setAutomine()

memoryClient.setBalance

Modifies the balance of an account.

Example

import { createTestClient, http, parseEther } from 'viem'
import { foundry } from 'viem/chains'
const client = createTestClient({
mode: 'anvil',
chain: 'foundry',
transport: http(),
})
await client.setBalance({
address: '0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC',
value: parseEther('1'),
})

memoryClient.setBlockGasLimit

Sets the block’s gas limit.

Example

import { createTestClient, http } from 'viem'
import { foundry } from 'viem/chains'
const client = createTestClient({
mode: 'anvil',
chain: 'foundry',
transport: http(),
})
await client.setBlockGasLimit({ gasLimit: 420_000n })

memoryClient.setBlockTimestampInterval

Similar to increaseTime, but sets a block timestamp interval. The timestamp of future blocks will be computed as lastBlock_timestamp + interval.

Example

import { createTestClient, http } from 'viem'
import { foundry } from 'viem/chains'
const client = createTestClient({
mode: 'anvil',
chain: 'foundry',
transport: http(),
})
await client.setBlockTimestampInterval({ interval: 5 })

memoryClient.setCode

Modifies the bytecode stored at an account’s address.

Example

import { createTestClient, http } from 'viem'
import { foundry } from 'viem/chains'
const client = createTestClient({
mode: 'anvil',
chain: 'foundry',
transport: http(),
})
await client.setCode({
address: '0xe846c6fcf817734ca4527b28ccb4aea2b6663c79',
bytecode: '0x60806040526000600355600019600955600c80546001600160a01b031916737a250d5630b4cf539739df…',
})

memoryClient.setCoinbase

Sets the coinbase address to be used in new blocks.

Example

import { createTestClient, http } from 'viem'
import { foundry } from 'viem/chains'
const client = createTestClient({
mode: 'anvil',
chain: 'foundry',
transport: http(),
})
await client.setCoinbase({
address: '0xe846c6fcf817734ca4527b28ccb4aea2b6663c79',
})

memoryClient.setIntervalMining

Sets the automatic mining interval (in seconds) of blocks. Setting the interval to 0 will disable automatic mining.

Example

import { createTestClient, http } from 'viem'
import { foundry } from 'viem/chains'
const client = createTestClient({
mode: 'anvil',
chain: 'foundry',
transport: http(),
})
await client.setIntervalMining({ interval: 5 })

memoryClient.setLoggingEnabled

Enable or disable logging on the test node network.

Example

import { createTestClient, http } from 'viem'
import { foundry } from 'viem/chains'
const client = createTestClient({
mode: 'anvil',
chain: 'foundry',
transport: http(),
})
await client.setLoggingEnabled()

memoryClient.setMinGasPrice

Change the minimum gas price accepted by the network (in wei).

Note: setMinGasPrice can only be used on clients that do not have EIP-1559 enabled.

Example

import { createTestClient, http, parseGwei } from 'viem'
import { foundry } from 'viem/chains'
const client = createTestClient({
mode: 'anvil',
chain: 'foundry',
transport: http(),
})
await client.setMinGasPrice({
gasPrice: parseGwei('20'),
})

memoryClient.setNextBlockBaseFeePerGas

Sets the next block’s base fee per gas.

Example

import { createTestClient, http, parseGwei } from 'viem'
import { foundry } from 'viem/chains'
const client = createTestClient({
mode: 'anvil',
chain: 'foundry',
transport: http(),
})
await client.setNextBlockBaseFeePerGas({
baseFeePerGas: parseGwei('20'),
})

memoryClient.setNextBlockTimestamp

Sets the next block’s timestamp.

Example

import { createTestClient, http } from 'viem'
import { foundry } from 'viem/chains'
const client = createTestClient({
mode: 'anvil',
chain: 'foundry',
transport: http(),
})
await client.setNextBlockTimestamp({ timestamp: 1671744314n })

memoryClient.setNonce

Modifies (overrides) the nonce of an account.

Example

import { createTestClient, http } from 'viem'
import { foundry } from 'viem/chains'
const client = createTestClient({
mode: 'anvil',
chain: 'foundry',
transport: http(),
})
await client.setNonce({
address: '0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC',
nonce: 420,
})

memoryClient.setRpcUrl

Sets the backend RPC URL.

Example

import { createTestClient, http } from 'viem'
import { foundry } from 'viem/chains'
const client = createTestClient({
mode: 'anvil',
chain: 'foundry',
transport: http(),
})
await client.setRpcUrl('https://eth-mainnet.g.alchemy.com/v2')

memoryClient.setStorageAt

Writes to a slot of an account’s storage.

Example

import { createTestClient, http } from 'viem'
import { foundry } from 'viem/chains'
const client = createTestClient({
mode: 'anvil',
chain: 'foundry',
transport: http(),
})
await client.setStorageAt({
address: '0xe846c6fcf817734ca4527b28ccb4aea2b6663c79',
index: 2,
value: '0x0000000000000000000000000000000000000000000000000000000000000069',
})

memoryClient.simulateContract

Simulates/validates a contract interaction. This is useful for retrieving return data and revert reasons of contract write functions.

Remarks

This function does not require gas to execute and does not change the state of the blockchain. It is almost identical to readContract, but also supports contract write functions.

Internally, uses a Public Client to call the call action with ABI-encoded data.

Example

import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const result = await client.simulateContract({
address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
abi: parseAbi(['function mint(uint32) view returns (uint32)']),
functionName: 'mint',
args: ['69420'],
account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
})

memoryClient.snapshot

Snapshot the state of the blockchain at the current block.

Example

import { createTestClient, http } from 'viem'
import { foundry } from 'viem/chains'
import { snapshot } from 'viem/test'
const client = createTestClient({
mode: 'anvil',
chain: 'foundry',
transport: http(),
})
await client.snapshot()

memoryClient.stopImpersonatingAccount

Stop impersonating an account after having previously used impersonateAccount.

Example

import { createTestClient, http } from 'viem'
import { foundry } from 'viem/chains'
import { stopImpersonatingAccount } from 'viem/test'
const client = createTestClient({
mode: 'anvil',
chain: 'foundry',
transport: http(),
})
await client.stopImpersonatingAccount({
address: '0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC',
})

memoryClient.tevmCall: CallHandler

memoryClient.tevmContract: ContractHandler

memoryClient.tevmDeploy: DeployHandler

memoryClient.tevmDumpState: DumpStateHandler

memoryClient.tevmForkUrl?: string

memoryClient.tevmGetAccount: GetAccountHandler

memoryClient.tevmLoadState: LoadStateHandler

memoryClient.tevmMine: MineHandler

memoryClient.tevmReady

memoryClient.tevmScript: ScriptHandler

memoryClient.tevmSetAccount: SetAccountHandler

memoryClient.transport: TransportConfig<string, EIP1193RequestFn> & Record<string, any>

The RPC transport

memoryClient.type: string

The type of client.

memoryClient.uid: string

A unique ID for the client.

memoryClient.uninstallFilter

Destroys a Filter that was created from one of the following Actions:

Example

import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
import { createPendingTransactionFilter, uninstallFilter } from 'viem/public'
const filter = await client.createPendingTransactionFilter()
const uninstalled = await client.uninstallFilter({ filter })
// true

memoryClient.verifyMessage

memoryClient.verifyTypedData

memoryClient.waitForTransactionReceipt

Waits for the Transaction to be included on a Block (one confirmation), and then returns the Transaction Receipt. If the Transaction reverts, then the action will throw an error.

Remarks

The waitForTransactionReceipt action additionally supports Replacement detection (e.g. sped up Transactions).

Transactions can be replaced when a user modifies their transaction in their wallet (to speed up or cancel). Transactions are replaced when they are sent from the same nonce.

There are 3 types of Transaction Replacement reasons:

  • repriced: The gas price has been modified (e.g. different maxFeePerGas)
  • cancelled: The Transaction has been cancelled (e.g. value === 0n)
  • replaced: The Transaction has been replaced (e.g. different value or data)

Example

import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const transactionReceipt = await client.waitForTransactionReceipt({
hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d',
})

memoryClient.watchBlockNumber

Watches and returns incoming block numbers.

Example

import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const unwatch = await client.watchBlockNumber({
onBlockNumber: (blockNumber) => console.log(blockNumber),
})

memoryClient.watchBlocks

Watches and returns information for incoming blocks.

Example

import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const unwatch = await client.watchBlocks({
onBlock: (block) => console.log(block),
})

memoryClient.watchContractEvent

Watches and returns emitted contract event logs.

Remarks

This Action will batch up all the event logs found within the pollingInterval, and invoke them via onLogs.

watchContractEvent will attempt to create an Event Filter 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 instead.

Example

import { createPublicClient, http, parseAbi } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const unwatch = client.watchContractEvent({
address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
abi: parseAbi(['event Transfer(address indexed from, address indexed to, uint256 value)']),
eventName: 'Transfer',
args: { from: '0xc961145a54C96E3aE9bAA048c4F4D6b04C13916b' },
onLogs: (logs) => console.log(logs),
})

memoryClient.watchEvent

Watches and returns emitted Event Logs.

Remarks

This Action will batch up all the Event Logs found within the pollingInterval, and invoke them via onLogs.

watchEvent will attempt to create an Event Filter 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 instead.

Example

import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const unwatch = client.watchEvent({
onLogs: (logs) => console.log(logs),
})

memoryClient.watchPendingTransactions

Watches and returns pending transaction hashes.

Remarks

This Action will batch up all the pending transactions found within the pollingInterval, and invoke them via onTransactions.

Example

import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http(),
})
const unwatch = await client.watchPendingTransactions({
onTransactions: (hashes) => console.log(hashes),
})

Returns

TevmProvider

Overrides

JsonRpcApiProvider.constructor

Source

extensions/ethers/src/TevmProvider.js:172

Properties

#private

private #private: any

Inherited from

JsonRpcApiProvider.#private

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/provider-jsonrpc.d.ts:212


#private

private #private: any

Inherited from

JsonRpcApiProvider.#private

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:253


tevm

tevm: object & Eip1193RequestProvider & TevmActionsApi & object

An instance of the TevmClient interface.

See

Tevm Client reference

Example

import {TevmProvider} from '@tevm/ethers'
import {createScript} from 'tevm'
const provider = await TevmProvider.createMemoryProvider({
fork: {
url: 'https://mainnet.optimism.io',
},
})
const addContract = createScript({
name: 'AddContract',
humanReadableAbi: [
'function add(uint256 a, uint256 b) public pure returns (uint256)',
],
deployedBytecode: '0x608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063771602f71461002d575b5f80fd5b610047600480360381019061004291906100a9565b61005d565b60405161005491906100f6565b60405180910390f35b5f818361006a919061013c565b905092915050565b5f80fd5b5f819050919050565b61008881610076565b8114610092575f80fd5b50565b5f813590506100a38161007f565b92915050565b5f80604083850312156100bf576100be610072565b5b5f6100cc85828601610095565b92505060206100dd85828601610095565b9150509250929050565b6100f081610076565b82525050565b5f6020820190506101095f8301846100e7565b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61014682610076565b915061015183610076565b92508282019050808211156101695761016861010f565b5b9291505056fea2646970667358221220a8f4b7187c62760aefc097c1827799c61a6df322acc9d7575862a525f9aa59a364736f6c63430008170033',
bytecode: '0x608060405234801561000f575f80fd5b506101a58061001d5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063771602f71461002d575b5f80fd5b610047600480360381019061004291906100a9565b61005d565b60405161005491906100f6565b60405180910390f35b5f818361006a919061013c565b905092915050565b5f80fd5b5f819050919050565b61008881610076565b8114610092575f80fd5b50565b5f813590506100a38161007f565b92915050565b5f80604083850312156100bf576100be610072565b5b5f6100cc85828601610095565b92505060206100dd85828601610095565b9150509250929050565b6100f081610076565b82525050565b5f6020820190506101095f8301846100e7565b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61014682610076565b915061015183610076565b92508282019050808211156101695761016861010f565b5b9291505056fea2646970667358221220a8f4b7187c62760aefc097c1827799c61a6df322acc9d7575862a525f9aa59a364736f6c63430008170033',
} as const)
const result = await provider.tevm.script(addContract.read.add(390n, 30n))
console.log(result)
// createdAddresses: new Set(),
// data: 420n,
// executionGasUsed: 927n,
// gas: 16776288n,
// logs: [],
// rawData: '0x00000000000000000000000000000000000000000000000000000000000001a4',
// selfdestruct: new Set(),

Type declaration

extend()

readonly extend: <TExtension>(decorator) => BaseClient<"fork" | "normal", object & TExtension>

Extends the base client with additional functionality. This enables optimal code splitting and extensibility

Type parameters

TExtension extends Record<string, any>

Parameters

decorator

Returns

BaseClient<"fork" | "normal", object & TExtension>

forkUrl?

optional readonly forkUrl: string

Fork url if the EVM is forked

Example
const client = createMemoryClient({ forkUrl: 'https://mainnet.infura.io/v3/your-api-key' })
console.log(client.forkUrl)
getReceiptsManager()

readonly getReceiptsManager: () => Promise<ReceiptsManager>

Interface for querying receipts and historical state

Returns

Promise<ReceiptsManager>

getTxPool()

readonly getTxPool: () => Promise<TxPool>

Gets the pool of pending transactions to be included in next block

Returns

Promise<TxPool>

getVm()

readonly getVm: () => Promise<Vm>

Internal instance of the VM. Can be used for lower level operations. Normally not recomended to use unless building libraries or extensions on top of Tevm.

Returns

Promise<Vm>

logger

readonly logger: Logger

The logger instance

miningConfig

readonly miningConfig: MiningConfig

The configuration for mining. Defaults to ‘auto'

  • 'auto’ will mine a block on every transaction
  • ’interval’ will mine a block every interval milliseconds
  • ’manual’ will not mine a block automatically and requires a manual call to mineBlock
mode

readonly mode: "fork" | "normal"

The mode the current client is running in fork mode will fetch and cache all state from the block forked from the provided URL normal mode will not fetch any state and will only run the EVM in memory

Example
let client = createMemoryClient()
console.log(client.mode) // 'normal'
client = createMemoryClient({ forkUrl: 'https://mainnet.infura.io/v3/your-api-key' })
console.log(client.mode) // 'fork'
ready()

readonly ready: () => Promise<true>

Returns promise that resulves when the client is ready The client is usable without calling this method but may have extra latency on the first call from initialization

Example
const client = createMemoryClient()
await client.ready()
Returns

Promise<true>

Type declaration

request

request: EIP1193RequestFn

send

send: TevmJsonRpcRequestHandler

sendBulk

sendBulk: TevmJsonRpcBulkRequestHandler

Source

extensions/ethers/src/TevmProvider.js:167

Accessors

_network

get _network(): Network

Gets the [[Network]] this provider has committed to. On each call, the network is detected, and if it has changed, the call will reject.

Returns

Network

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/provider-jsonrpc.d.ts:224


destroyed

get destroyed(): boolean

If this provider has been destroyed using the [[destroy]] method.

Once destroyed, all resources are reclaimed, internal event loops and timers are cleaned up and no further requests may be sent to the provider.

Returns

boolean

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:419


disableCcipRead

get disableCcipRead(): boolean

Prevent any CCIP-read operation, regardless of whether requested in a [[call]] using enableCcipRead.

set disableCcipRead(value): void

Parameters

value: boolean

Returns

boolean

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:282


paused

get paused(): boolean

Whether the provider is currently paused.

A paused provider will not emit any events, and generally should not make any requests to the network, but that is up to sub-classes to manage.

Setting paused = true is identical to calling .pause(false), which will buffer any events that occur while paused until the provider is unpaused.

set paused(pause): void

Parameters

pause: boolean

Returns

boolean

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:438


plugins

get plugins(): AbstractProviderPlugin[]

Returns all the registered plug-ins.

Returns

AbstractProviderPlugin[]

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:269


pollingInterval

get pollingInterval(): number

Returns

number

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:260


provider

get provider(): this

Returns this, to allow an AbstractProvider to implement the [[ContractRunner]] interface.

Returns

this

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:265


ready

get ready(): boolean

Returns true only if the [[_start]] has been called.

Returns

boolean

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/provider-jsonrpc.d.ts:270

Methods

_clearTimeout()

_clearTimeout(timerId): void

Clear a timer created using the [[_setTimeout]] method.

Parameters

timerId: number

Returns

void

Inherited from

JsonRpcApiProvider._clearTimeout

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:374


_detectNetwork()

_detectNetwork(): Promise<Network>

Sub-classes may override this; it detects the actual network that we are currently connected to.

Keep in mind that [[send]] may only be used once [[ready]], otherwise the _send primitive must be used instead.

Returns

Promise<Network>

Inherited from

JsonRpcApiProvider._detectNetwork

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/provider-jsonrpc.d.ts:245


_forEachSubscriber()

_forEachSubscriber(func): void

Perform %%func%% on each subscriber.

Parameters

func

Returns

void

Inherited from

JsonRpcApiProvider._forEachSubscriber

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:387


_getAddress()

_getAddress(address): string | Promise<string>

Returns or resolves to the address for %%address%%, resolving ENS names and [[Addressable]] objects and returning if already an address.

Parameters

address: AddressLike

Returns

string | Promise<string>

Inherited from

JsonRpcApiProvider._getAddress

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:332


_getBlockTag()

_getBlockTag(blockTag?): string | Promise<string>

Returns or resolves to a valid block tag for %%blockTag%%, resolving negative values and returning if already a valid block tag.

Parameters

blockTag?: BlockTag

Returns

string | Promise<string>

Inherited from

JsonRpcApiProvider._getBlockTag

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:337


_getFilter()

_getFilter(filter): PerformActionFilter | Promise<PerformActionFilter>

Returns or resolves to a filter for %%filter%%, resolving any ENS names or [[Addressable]] object and returning if already a valid filter.

Parameters

filter: Filter | FilterByBlockHash

Returns

PerformActionFilter | Promise<PerformActionFilter>

Inherited from

JsonRpcApiProvider._getFilter

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:343


_getOption()

_getOption<K>(key): JsonRpcApiProviderOptions[K]

Returns the value associated with the option %%key%%.

Sub-classes can use this to inquire about configuration options.

Type parameters

K extends keyof JsonRpcApiProviderOptions

Parameters

key: K

Returns

JsonRpcApiProviderOptions[K]

Inherited from

JsonRpcApiProvider._getOption

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/provider-jsonrpc.d.ts:219


_getProvider()

_getProvider(chainId): AbstractProvider

Parameters

chainId: number

Returns

AbstractProvider

Inherited from

JsonRpcApiProvider._getProvider

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:364


_getSubscriber()

_getSubscriber(sub): Subscriber

Return a Subscriber that will manage the %%sub%%.

Sub-classes may override this to modify the behavior of subscription management.

Parameters

sub: Subscription

Returns

Subscriber

Inherited from

JsonRpcApiProvider._getSubscriber

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/provider-jsonrpc.d.ts:266


_getTransactionRequest()

_getTransactionRequest(_request): PerformActionTransaction | Promise<PerformActionTransaction>

Returns or resovles to a transaction for %%request%%, resolving any ENS names or [[Addressable]] and returning if already a valid transaction.

Parameters

_request: TransactionRequest

Returns

PerformActionTransaction | Promise<PerformActionTransaction>

Inherited from

JsonRpcApiProvider._getTransactionRequest

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:349


_perform()

_perform(req): Promise<any>

Resolves to the non-normalized value by performing %%req%%.

Sub-classes may override this to modify behavior of actions, and should generally call super._perform as a fallback.

Parameters

req: PerformActionRequest

Returns

Promise<any>

Inherited from

JsonRpcApiProvider._perform

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/provider-jsonrpc.d.ts:237


_recoverSubscriber()

_recoverSubscriber(oldSub, newSub): void

If a [[Subscriber]] fails and needs to replace itself, this method may be used.

For example, this is used for providers when using the eth_getFilterChanges method, which can return null if state filters are not supported by the backend, allowing the Subscriber to swap in a [[PollingEventSubscriber]].

Parameters

oldSub: Subscriber

newSub: Subscriber

Returns

void

Inherited from

JsonRpcApiProvider._recoverSubscriber

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:402


_send()

_send(payload): Promise<(JsonRpcResult | JsonRpcError)[]>

Sends a JSON-RPC %%payload%% (or a batch) to the underlying tevm instance.

Parameters

payload: JsonRpcPayload | JsonRpcPayload[]

Returns

Promise<(JsonRpcResult | JsonRpcError)[]>

Overrides

JsonRpcApiProvider._send

Source

extensions/ethers/src/TevmProvider.js:186


_setTimeout()

_setTimeout(_func, timeout?): number

Create a timer that will execute %%func%% after at least %%timeout%% (in ms). If %%timeout%% is unspecified, then %%func%% will execute in the next event loop.

Pausing the provider will pause any associated timers.

Parameters

_func

timeout?: number

Returns

number

Inherited from

JsonRpcApiProvider._setTimeout

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:383


_start()

_start(): void

Sub-classes MUST call this. Until [[_start]] has been called, no calls will be passed to [[_send]] from [[send]]. If it is overridden, then super._start() MUST be called.

Calling it multiple times is safe and has no effect.

Returns

void

Inherited from

JsonRpcApiProvider._start

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/provider-jsonrpc.d.ts:253


_waitUntilReady()

_waitUntilReady(): Promise<void>

Resolves once the [[_start]] has been called. This can be used in sub-classes to defer sending data until the connection has been established.

Returns

Promise<void>

Inherited from

JsonRpcApiProvider._waitUntilReady

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/provider-jsonrpc.d.ts:259


_wrapBlock()

_wrapBlock(value, network): Block

Provides the opportunity for a sub-class to wrap a block before returning it, to add additional properties or an alternate sub-class of [[Block]].

Parameters

value: BlockParams

network: Network

Returns

Block

Inherited from

JsonRpcApiProvider._wrapBlock

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:293


_wrapLog()

_wrapLog(value, network): Log

Provides the opportunity for a sub-class to wrap a log before returning it, to add additional properties or an alternate sub-class of [[Log]].

Parameters

value: LogParams

network: Network

Returns

Log

Inherited from

JsonRpcApiProvider._wrapLog

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:299


_wrapTransactionReceipt()

_wrapTransactionReceipt(value, network): TransactionReceipt

Provides the opportunity for a sub-class to wrap a transaction receipt before returning it, to add additional properties or an alternate sub-class of [[TransactionReceipt]].

Parameters

value: TransactionReceiptParams

network: Network

Returns

TransactionReceipt

Inherited from

JsonRpcApiProvider._wrapTransactionReceipt

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:305


_wrapTransactionResponse()

_wrapTransactionResponse(tx, network): TransactionResponse

Provides the opportunity for a sub-class to wrap a transaction response before returning it, to add additional properties or an alternate sub-class of [[TransactionResponse]].

Parameters

tx: TransactionResponseParams

network: Network

Returns

TransactionResponse

Inherited from

JsonRpcApiProvider._wrapTransactionResponse

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:311


addListener()

addListener(event, listener): Promise<TevmProvider>

Parameters

event: ProviderEvent

listener: Listener

Returns

Promise<TevmProvider>

Inherited from

JsonRpcApiProvider.addListener

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:410


attachPlugin()

attachPlugin(plugin): this

Attach a new plug-in.

Parameters

plugin: AbstractProviderPlugin

Returns

this

Inherited from

JsonRpcApiProvider.attachPlugin

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:273


broadcastTransaction()

broadcastTransaction(signedTx): Promise<TransactionResponse>

Parameters

signedTx: string

Returns

Promise<TransactionResponse>

Inherited from

JsonRpcApiProvider.broadcastTransaction

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:358


call()

call(_tx): Promise<string>

Parameters

_tx: TransactionRequest

Returns

Promise<string>

Inherited from

JsonRpcApiProvider.call

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:353


ccipReadFetch()

ccipReadFetch(tx, calldata, urls): Promise<null | string>

Resolves to the data for executing the CCIP-read operations.

Parameters

tx: PerformActionTransaction

calldata: string

urls: string[]

Returns

Promise<null | string>

Inherited from

JsonRpcApiProvider.ccipReadFetch

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:287


destroy()

destroy(): void

Returns

void

Inherited from

JsonRpcApiProvider.destroy

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/provider-jsonrpc.d.ts:320


emit()

emit(event, …args): Promise<boolean>

Parameters

event: ProviderEvent

• …args: any[]

Returns

Promise<boolean>

Inherited from

JsonRpcApiProvider.emit

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:405


estimateGas()

estimateGas(_tx): Promise<bigint>

Parameters

_tx: TransactionRequest

Returns

Promise<bigint>

Inherited from

JsonRpcApiProvider.estimateGas

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:352


getAvatar()

getAvatar(name): Promise<null | string>

Parameters

name: string

Returns

Promise<null | string>

Inherited from

JsonRpcApiProvider.getAvatar

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:366


getBalance()

getBalance(address, blockTag?): Promise<bigint>

Parameters

address: AddressLike

blockTag?: BlockTag

Returns

Promise<bigint>

Inherited from

JsonRpcApiProvider.getBalance

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:354


getBlock()

getBlock(block, prefetchTxs?): Promise<null | Block>

Parameters

block: BlockTag

prefetchTxs?: boolean

Returns

Promise<null | Block>

Inherited from

JsonRpcApiProvider.getBlock

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:359


getBlockNumber()

getBlockNumber(): Promise<number>

Returns

Promise<number>

Inherited from

JsonRpcApiProvider.getBlockNumber

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:326


getCode()

getCode(address, blockTag?): Promise<string>

Parameters

address: AddressLike

blockTag?: BlockTag

Returns

Promise<string>

Inherited from

JsonRpcApiProvider.getCode

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:356


getFeeData()

getFeeData(): Promise<FeeData>

Returns

Promise<FeeData>

Inherited from

JsonRpcApiProvider.getFeeData

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:351


getLogs()

getLogs(_filter): Promise<Log[]>

Parameters

_filter: Filter | FilterByBlockHash

Returns

Promise<Log[]>

Inherited from

JsonRpcApiProvider.getLogs

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:363


getNetwork()

getNetwork(): Promise<Network>

Returns

Promise<Network>

Inherited from

JsonRpcApiProvider.getNetwork

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:350


getPlugin()

getPlugin<T>(name): null | T

Get a plugin by name.

Type parameters

T extends AbstractProviderPlugin = AbstractProviderPlugin

Parameters

name: string

Returns

null | T

Inherited from

JsonRpcApiProvider.getPlugin

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:277


getResolver()

getResolver(name): Promise<null | EnsResolver>

Parameters

name: string

Returns

Promise<null | EnsResolver>

Inherited from

JsonRpcApiProvider.getResolver

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:365


getRpcError()

getRpcError(payload, _error): Error

Returns an ethers-style Error for the given JSON-RPC error %%payload%%, coalescing the various strings and error shapes that different nodes return, coercing them into a machine-readable standardized error.

Parameters

payload: JsonRpcPayload

_error: JsonRpcError

Returns

Error

Inherited from

JsonRpcApiProvider.getRpcError

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/provider-jsonrpc.d.ts:291


getRpcRequest()

getRpcRequest(req): null | object

Returns the request method and arguments required to perform %%req%%.

Parameters

req: PerformActionRequest

Returns

null | object

Inherited from

JsonRpcApiProvider.getRpcRequest

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/provider-jsonrpc.d.ts:281


getRpcTransaction()

getRpcTransaction(tx): JsonRpcTransactionRequest

Returns %%tx%% as a normalized JSON-RPC transaction request, which has all values hexlified and any numeric values converted to Quantity values.

Parameters

tx: TransactionRequest

Returns

JsonRpcTransactionRequest

Inherited from

JsonRpcApiProvider.getRpcTransaction

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/provider-jsonrpc.d.ts:276


getSigner()

getSigner(address?): Promise<JsonRpcSigner>

Resolves to the [[Signer]] account for %%address%% managed by the client.

If the %%address%% is a number, it is used as an index in the the accounts from [[listAccounts]].

This can only be used on clients which manage accounts (such as Geth with imported account or MetaMask).

Throws if the account doesn’t exist.

Parameters

address?: string | number

Returns

Promise<JsonRpcSigner>

Inherited from

JsonRpcApiProvider.getSigner

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/provider-jsonrpc.d.ts:318


getStorage()

getStorage(address, _position, blockTag?): Promise<string>

Parameters

address: AddressLike

_position: BigNumberish

blockTag?: BlockTag

Returns

Promise<string>

Inherited from

JsonRpcApiProvider.getStorage

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:357


getTransaction()

getTransaction(hash): Promise<null | TransactionResponse>

Parameters

hash: string

Returns

Promise<null | TransactionResponse>

Inherited from

JsonRpcApiProvider.getTransaction

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:360


getTransactionCount()

getTransactionCount(address, blockTag?): Promise<number>

Parameters

address: AddressLike

blockTag?: BlockTag

Returns

Promise<number>

Inherited from

JsonRpcApiProvider.getTransactionCount

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:355


getTransactionReceipt()

getTransactionReceipt(hash): Promise<null | TransactionReceipt>

Parameters

hash: string

Returns

Promise<null | TransactionReceipt>

Inherited from

JsonRpcApiProvider.getTransactionReceipt

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:361


getTransactionResult()

getTransactionResult(hash): Promise<null | string>

Parameters

hash: string

Returns

Promise<null | string>

Inherited from

JsonRpcApiProvider.getTransactionResult

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:362


listAccounts()

listAccounts(): Promise<JsonRpcSigner[]>

Returns

Promise<JsonRpcSigner[]>

Inherited from

JsonRpcApiProvider.listAccounts

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/provider-jsonrpc.d.ts:319


listenerCount()

listenerCount(event?): Promise<number>

Parameters

event?: ProviderEvent

Returns

Promise<number>

Inherited from

JsonRpcApiProvider.listenerCount

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:406


listeners()

listeners(event?): Promise<Listener[]>

Parameters

event?: ProviderEvent

Returns

Promise<Listener[]>

Inherited from

JsonRpcApiProvider.listeners

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:407


lookupAddress()

lookupAddress(address): Promise<null | string>

Parameters

address: string

Returns

Promise<null | string>

Inherited from

JsonRpcApiProvider.lookupAddress

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:368


off()

off(event, listener?): Promise<TevmProvider>

Parameters

event: ProviderEvent

listener?: Listener

Returns

Promise<TevmProvider>

Inherited from

JsonRpcApiProvider.off

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:408


on()

on(event, listener): Promise<TevmProvider>

Parameters

event: ProviderEvent

listener: Listener

Returns

Promise<TevmProvider>

Inherited from

JsonRpcApiProvider.on

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:403


once()

once(event, listener): Promise<TevmProvider>

Parameters

event: ProviderEvent

listener: Listener

Returns

Promise<TevmProvider>

Inherited from

JsonRpcApiProvider.once

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:404


pause()

pause(dropWhilePaused?): void

Pause the provider. If %%dropWhilePaused%%, any events that occur while paused are dropped, otherwise all events will be emitted once the provider is unpaused.

Parameters

dropWhilePaused?: boolean

Returns

void

Inherited from

JsonRpcApiProvider.pause

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:445


removeAllListeners()

removeAllListeners(event?): Promise<TevmProvider>

Parameters

event?: ProviderEvent

Returns

Promise<TevmProvider>

Inherited from

JsonRpcApiProvider.removeAllListeners

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:409


removeListener()

removeListener(event, listener): Promise<TevmProvider>

Parameters

event: ProviderEvent

listener: Listener

Returns

Promise<TevmProvider>

Inherited from

JsonRpcApiProvider.removeListener

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:411


resolveName()

resolveName(name): Promise<null | string>

Parameters

name: string

Returns

Promise<null | string>

Inherited from

JsonRpcApiProvider.resolveName

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:367


resume()

resume(): void

Resume the provider.

Returns

void

Inherited from

JsonRpcApiProvider.resume

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:449


send()

send(method, params): Promise<any>

Requests the %%method%% with %%params%% via the JSON-RPC protocol over the underlying channel. This can be used to call methods on the backend that do not have a high-level API within the Provider API.

This method queues requests according to the batch constraints in the options, assigns the request a unique ID.

Do NOT override this method in sub-classes; instead override [[_send]] or force the options values in the call to the constructor to modify this method’s behavior.

Parameters

method: string

params: any[] | Record<string, any>

Returns

Promise<any>

Inherited from

JsonRpcApiProvider.send

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/provider-jsonrpc.d.ts:305


waitForBlock()

waitForBlock(blockTag?): Promise<Block>

Parameters

blockTag?: BlockTag

Returns

Promise<Block>

Inherited from

JsonRpcApiProvider.waitForBlock

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:370


waitForTransaction()

waitForTransaction(hash, _confirms?, timeout?): Promise<null | TransactionReceipt>

Parameters

hash: string

_confirms?: null | number

timeout?: null | number

Returns

Promise<null | TransactionReceipt>

Inherited from

JsonRpcApiProvider.waitForTransaction

Source

node_modules/.pnpm/ethers@6.10.0/node_modules/ethers/lib.esm/providers/abstract-provider.d.ts:369


createMemoryProvider()

static readonly createMemoryProvider(options): Promise<TevmProvider>

Creates a new TevmProvider instance with a TevmMemoryClient.

Parameters

options: BaseClientOptions

Options to create a new TevmProvider.

Returns

Promise<TevmProvider>

A new TevmProvider instance.

See

Tevm Clients Docs

Example

import { TevmProvider } from '@tevm/ethers'
const provider = await TevmProvider.createMemoryProvider()
const blockNumber = await provider.getBlockNumber()

Source

extensions/ethers/src/TevmProvider.js:123