Skip to content

anvilResetJsonRpcProcedure

anvilResetJsonRpcProcedure(node): AnvilResetProcedure

Request handler for anvil_reset JSON-RPC requests. If the node is forked, anvil_reset will reset to the forked block.

Parameters

node: TevmNode<"fork" | "normal", object>

Returns

AnvilResetProcedure

Example

const node = createTevmNode()
const resetProcedure = anvilResetJsonRpcProcedure(node)
const result = await resetProcedure({ method: 'anvil_reset', params: [], id: 1, jsonrpc: '2.0' })
console.log(result) // { result: null, method: 'anvil_reset', jsonrpc: '2.0', id: 1 }

Defined in

packages/actions/src/anvil/anvilResetProcedure.js:15