TevmJsonRpcRequestHandler
TevmJsonRpcRequestHandler: <
TRequest
>(request
) =>Promise
<JsonRpcReturnTypeFromMethod
<TRequest
["method"
]>>
Typesafe request handler for JSON-RPC requests. Most users will want to use the higher level
and more feature-rich actions
api
Type Parameters
• TRequest extends TevmJsonRpcRequest
| EthJsonRpcRequest
| AnvilJsonRpcRequest
| DebugJsonRpcRequest
Parameters
• request: TRequest
Returns
Promise
<JsonRpcReturnTypeFromMethod
<TRequest
["method"
]>>
Example
tevm_* methods
tevm_call
request - CallJsonRpcRequest response - CallJsonRpcResponse
tevm_getAccount
request - GetAccountJsonRpcRequest response - GetAccountJsonRpcResponse
tevm_setAccount
request - SetAccountJsonRpcRequest response - SetAccountJsonRpcResponse
debug_* methods
debug_traceCall
request - DebugTraceCallJsonRpcRequest response - DebugTraceCallJsonRpcResponse
eth_* methods
eth_blockNumber
request - EthBlockNumberJsonRpcRequest response - EthBlockNumberJsonRpcResponse
eth_chainId
request - EthChainIdJsonRpcRequest response - EthChainIdJsonRpcResponse
eth_getCode
request - EthGetCodeJsonRpcRequest response - EthGetCodeJsonRpcResponse
eth_getStorageAt
request - EthGetStorageAtJsonRpcRequest response - EthGetStorageAtJsonRpcResponse
eth_gasPrice
request - EthGasPriceJsonRpcRequest response - EthGasPriceJsonRpcResponse
eth_getBalance
request - EthGetBalanceJsonRpcRequest response - EthGetBalanceJsonRpcResponse
eth_createAccessList
Creates an access list for a transaction. Returns list of addresses and storage keys that the transaction plans to access.
request - EthCreateAccessListJsonRpcRequest response - EthCreateAccessListJsonRpcResponse
Defined in
packages/actions/src/tevm-request-handler/TevmJsonRpcRequestHandler.ts:102