import { Address as Address$1, Hex as Hex$1, Abi as Abi$1, ContractFunctionName, EncodeFunctionDataParameters, ContractConstructorArgs, EncodeDeployDataParameters, DecodeFunctionResultReturnType } from '@tevm/utils'; import { TevmState } from '@tevm/state'; import { GetAccountError, SetAccountError, CallError, ContractError, ScriptError, DumpStateError, LoadStateError } from '@tevm/errors'; /** * The base parameters shared across all actions */ type BaseParams = { /** * Whether to throw on errors or return errors as value on the 'errors' property * Defaults to `true` */ readonly throwOnFail?: TThrowOnFail; }; /** * Tevm params to set an account in the vm state * all fields are optional except address * @example * const accountParams: import('tevm/api').SetAccountParams = { * account: '0x...', * nonce: 5n, * balance: 9000000000000n, * storageRoot: '0x....', * deployedBytecode: '0x....' * } */ type SetAccountParams = BaseParams & { /** * Address of account */ readonly address: Address$1; /** * Nonce to set account to */ readonly nonce?: bigint; /** * Balance to set account to */ readonly balance?: bigint; /** * Contract bytecode to set account to */ readonly deployedBytecode?: Hex$1; /** * Storage root to set account to */ readonly storageRoot?: Hex$1; /** * key-value mapping to override all slots in the account storage before executing the calls */ readonly state?: Record; /** * key-value mapping to override individual slots in the account storage before executing the calls */ readonly stateDiff?: Record; }; /** * A valid [Ethereum JSON ABI](https://docs.soliditylang.org/en/latest/abi-spec.html#json) */ type Abi = Abi$1; /** * An ethereum address represented as a hex string * @see https://abitype.dev/config#addresstype for configuration options to change type to being a string if preferred */ type Address = Address$1; /** * Header information of an ethereum block */ type Block = { /** * The block number (height) in the blockchain. */ readonly number: bigint; /** * The address of the miner or validator who mined or validated the block. */ readonly coinbase: Address; /** * The timestamp at which the block was mined or validated. */ readonly timestamp: bigint; /** * The difficulty level of the block (relevant in PoW chains). */ readonly difficulty: bigint; /** * The gas limit for the block, i.e., the maximum amount of gas that can be used by the transactions in the block. */ readonly gasLimit: bigint; /** * (Optional) The base fee per gas in the block, introduced in EIP-1559 for dynamic transaction fee calculation. */ readonly baseFeePerGas?: bigint; /** * The gas price for the block; may be undefined in blocks after EIP-1559. */ readonly blobGasPrice?: bigint; }; type BlockTag = 'latest' | 'earliest' | 'pending' | 'safe' | 'finalized'; type BlockParam = BlockTag | Hex$1 | bigint; /** * A hex string * @example * const hex: Hex = '0x1234ff' */ type Hex = `0x${string}`; type EmptyParams = readonly [] | {} | undefined | never; /** * Generic log information */ type Log = { readonly address: Address; readonly topics: Hex[]; readonly data: Hex; }; /** * A transaction request object */ type TransactionParams = { readonly from: Address; readonly to?: Address; readonly gas?: Hex; readonly gasPrice?: Hex; readonly value?: Hex; readonly input: Hex; readonly nonce?: Hex; }; /** * The type returned by block related * json rpc procedures */ type BlockResult = { /** * The block number (height) in the blockchain. */ readonly number: Hex; /** * The hex stringhash of the block. */ readonly hash: Hex; /** * The hex stringhash of the parent block. */ readonly parentHash: Hex; readonly nonce: Hex; /** * The hex stringhash of the uncles of the block. */ readonly sha3Uncles: Hex; readonly logsBloom: Hex; readonly transactionsRoot: Hex; readonly stateRoot: Hex; readonly miner: Hex; readonly difficulty: Hex; readonly totalDifficulty: Hex; readonly extraData: Hex; readonly size: Hex; readonly gasLimit: Hex; readonly gasUsed: Hex; readonly timestamp: Hex; readonly transactions: TIncludeTransactions extends true ? Array : Hex[]; readonly uncles: Hex[]; }; /** * FilterLog type for eth JSON-RPC procedures */ type FilterLog = { readonly address: Hex; readonly blockHash: Hex; readonly blockNumber: bigint; readonly data: Hex; readonly logIndex: bigint; readonly removed: boolean; readonly topics: readonly Hex[]; readonly transactionHash: Hex; readonly transactionIndex: bigint; }; /** * An event filter optionsobject */ type FilterParams = { readonly fromBlock?: BlockParam; readonly toBlock?: BlockParam; readonly address?: Address; readonly topics?: ReadonlyArray; }; /** * The type returned by transaction related * json rpc procedures */ type TransactionResult = { readonly blockHash: Hex; readonly blockNumber: Hex; readonly from: Hex; readonly gas: Hex; readonly gasPrice: Hex; readonly hash: Hex; readonly data: Hex; readonly nonce: Hex; readonly to: Hex; readonly transactionIndex: Hex; readonly value: Hex; readonly v: Hex; readonly r: Hex; readonly s: Hex; }; /** * Transaction receipt result type for eth JSON-RPC procedures */ type TransactionReceiptResult = { readonly blockHash: Hex; readonly blockNumber: bigint; readonly contractAddress: Hex; readonly cumulativeGasUsed: bigint; readonly from: Hex; readonly gasUsed: bigint; readonly logs: readonly FilterLog[]; readonly logsBloom: Hex; readonly status: Hex; readonly to: Hex; readonly transactionHash: Hex; readonly transactionIndex: bigint; readonly blobGasUsed?: bigint; readonly blobGasPrice?: bigint; }; type TraceType = 'CALL' | 'DELEGATECALL' | 'STATICCALL' | 'CREATE' | 'CREATE2' | 'SELFDESTRUCT' | 'REWARD'; type TraceCall = { type: TraceType; from: Address; to: Address; gas?: bigint; gasUsed?: bigint; input: Hex; output: Hex; calls?: TraceCall[]; value?: bigint; }; type TraceResult = { type: TraceType; from: Address; to: Address; value: bigint; gas: bigint; gasUsed: bigint; input: Hex; output: Hex; calls?: TraceCall[]; }; /** * Represents a configuration for a forked or proxied network */ type NetworkConfig = { /** * The URL to the RPC endpoint */ url: string; /** * the block tag to fork from */ blockTag: BlockParam; }; /** * The fields of this optional object customize the block as part of which the call is simulated. The object contains the following fields: * This option cannot be used when `createTransaction` is set to `true` * Setting the block number to past block will not run in the context of that blocks state. To do that fork that block number first. */ type BlockOverrideSet = { /** * Fake block number */ number?: bigint; /** * Fake difficulty. Note post-merge difficulty should be 0. * not included as an option atm */ /** * Fake block timestamp */ time?: bigint; /** * Block gas capacity */ gasLimit?: bigint; /** * Block fee recipient */ coinbase?: Address$1; /** * Fake PrevRandao value * Not included as an option atm */ /** * Block base fee (see EIP-1559) */ baseFee?: bigint; /** * Block blob base fee (see EIP-4844) */ blobBaseFee?: bigint; }; /** * The state override set is an optional address-to-state mapping, where each entry specifies some state to be ephemerally overridden prior to executing the call. Each address maps to an object containing: * This option cannot be used when `createTransaction` is set to `true` * * The goal of the state override set is manyfold: * It can be used by DApps to reduce the amount of contract code needed to be deployed on chain. Code that simply returns internal state or does pre-defined validations can be kept off chain and fed to the node on-demand. * It can be used for smart contract analysis by extending the code deployed on chain with custom methods and invoking them. This avoids having to download and reconstruct the entire state in a sandbox to run custom code against. * It can be used to debug smart contracts in an already deployed large suite of contracts by selectively overriding some code or state and seeing how execution changes. Specialized tooling will probably be necessary. * @example * ```ts * { * "0xd9c9cd5f6779558b6e0ed4e6acf6b1947e7fa1f3": { * "balance": "0xde0b6b3a7640000" * }, * "0xebe8efa441b9302a0d7eaecc277c09d20d684540": { * "code": "0x...", * "state": { * "0x...": "0x..." * } * } * } * ``` */ type StateOverrideSet = { [address: Address]: { /** * Fake balance to set for the account before executing the call. */ balance?: bigint; /** * Fake nonce to set for the account before executing the call. */ nonce?: bigint; /** * Fake code to set for the account before executing the call. */ code?: Hex$1; /** * Fake key-value mapping to override all slots in the account storage before executing the calls */ state?: Record; /** * Fake key-value mapping to override individual slots in the account storage before executing the calls */ stateDiff?: Record; }; }; /** * Tevm params to get an account * @example * const getAccountParams: import('@tevm/api').GetAccountParams = { * address: '0x...', * } */ type GetAccountParams = BaseParams & { /** * Address of account */ readonly address: Address; /** * If true the handler will return the contract storage * It only returns storage that happens to be cached in the vm * In fork mode if storage hasn't yet been cached it will not be returned * This defaults to false * Be aware that this can be very expensive if a contract has a lot of storage */ readonly returnStorage?: boolean; }; /** * Properties shared accross call-like params */ type BaseCallParams = BaseParams & { /** * Whether to return a complete trace with the call * Defaults to `false` */ readonly createTrace?: boolean; /** * Whether to return an access list * Defaults to `false` */ readonly createAccessList?: boolean; /** * Whether or not to update the state or run call in a dry-run. Defaults to `never` * - `on-success`: Only update the state if the call is successful * - `always`: Always include tx even if it reverted * - `never`: Never include tx * - `true`: alias for `on-success` * - `false`: alias for `never` * Always will still not include the transaction if it's not valid to be included in * the chain such as the gas limit being too low. */ readonly createTransaction?: 'on-success' | 'always' | 'never' | boolean; /** * The block number or block tag to execute the call at. Defaults to `latest` */ readonly blockTag?: BlockParam; /** * Set caller to msg.value of less than msg.value * Defaults to false exceipt for when running scripts * where it is set to true */ readonly skipBalance?: boolean; /** * The gas limit for the call. * Defaults to 0xffffff (16_777_215n) */ readonly gas?: bigint; /** * The gas price for the call. */ readonly gasPrice?: bigint; /** * Refund counter. Defaults to `0` */ readonly gasRefund?: bigint; /** * The from address for the call. Defaults to the zero address. * It is also possible to set the `origin` and `caller` addresses seperately using * those options. Otherwise both are set to the `from` address */ readonly from?: Address; /** * The address where the call originated from. Defaults to the zero address. * This defaults to `from` address if set otherwise it defaults to the zero address */ readonly origin?: Address; /** * The address that ran this code (`msg.sender`). Defaults to the zero address. * This defaults to `from` address if set otherwise it defaults to the zero address */ readonly caller?: Address; /** * The value in ether that is being sent to `opts.address`. Defaults to `0` */ readonly value?: bigint; /** * The call depth. Defaults to `0` */ readonly depth?: number; /** * Addresses to selfdestruct. Defaults to the empty set. */ readonly selfdestruct?: Set
; /** * The address of the account that is executing this code (`address(this)`). Defaults to the zero address. */ readonly to?: Address; /** * Versioned hashes for each blob in a blob transaction */ readonly blobVersionedHashes?: Hex[]; /** * The state override set is an optional address-to-state mapping, where each entry specifies some state to be ephemerally overridden prior to executing the call. Each address maps to an object containing: * This option cannot be used when `createTransaction` is set to `true` * * The goal of the state override set is manyfold: * It can be used by DApps to reduce the amount of contract code needed to be deployed on chain. Code that simply returns internal state or does pre-defined validations can be kept off chain and fed to the node on-demand. * It can be used for smart contract analysis by extending the code deployed on chain with custom methods and invoking them. This avoids having to download and reconstruct the entire state in a sandbox to run custom code against. * It can be used to debug smart contracts in an already deployed large suite of contracts by selectively overriding some code or state and seeing how execution changes. Specialized tooling will probably be necessary. * @example * ```ts * { * "0xd9c9cd5f6779558b6e0ed4e6acf6b1947e7fa1f3": { * "balance": "0xde0b6b3a7640000" * }, * "0xebe8efa441b9302a0d7eaecc277c09d20d684540": { * "code": "0x...", * "state": { * "0x...": "0x..." * } * } * } * ``` */ readonly stateOverrideSet?: StateOverrideSet; /** * The fields of this optional object customize the block as part of which the call is simulated. The object contains the following fields: * This option cannot be used when `createTransaction` is set to `true` * Setting the block number to past block will not run in the context of that blocks state. To do that fork that block number first. */ readonly blockOverrideSet?: BlockOverrideSet; }; /** * Tevm params to execute a call on the vm * Call is the lowest level method to interact with the vm * and other messages such as contract and script are using call * under the hood * @example * const callParams: import('@tevm/api').CallParams = { * data: '0x...', * bytecode: '0x...', * gasLimit: 420n, * } */ type CallParams = BaseCallParams & { /** * An optional CREATE2 salt. */ readonly salt?: Hex; /** * The input data. */ readonly data?: Hex; /** * The EVM code to run. */ readonly deployedBytecode?: Hex; }; /** * Tevm params to execute a call on a contract */ type ContractParams = ContractFunctionName, TThrowOnFail extends boolean = boolean> = EncodeFunctionDataParameters & BaseCallParams & { /** * The address to call. */ readonly to: Address; }; /** * Tevm params for deploying and running a script */ type ScriptParams = ContractFunctionName, TThrowOnFail extends boolean = boolean> = EncodeFunctionDataParameters & BaseCallParams & { /** * The EVM code to run. */ readonly deployedBytecode: Hex$1; }; /** * Params taken by `eth_accounts` handler (no params) */ type EthAccountsParams = EmptyParams; /** * Based on the JSON-RPC request for `eth_blockNumber` procedure (no params) */ type EthBlockNumberParams = EmptyParams; /** * Based on the JSON-RPC request for `eth_call` procedure */ type EthCallParams = { /** * The address from which the transaction is sent. Defaults to zero address */ readonly from?: Address; /** * The address to which the transaction is addressed. Defaults to zero address */ readonly to?: Address; /** * The integer of gas provided for the transaction execution */ readonly gas?: bigint; /** * The integer of gasPrice used for each paid gas */ readonly gasPrice?: bigint; /** * The integer of value sent with this transaction */ readonly value?: bigint; /** * The hash of the method signature and encoded parameters. For more information, see the Contract ABI description in the Solidity documentation * Defaults to zero data */ readonly data?: Hex; /** * The block number hash or block tag */ readonly blockTag?: BlockParam; /** * The state override set to provide different state values while executing the call */ readonly stateOverrideSet?: StateOverrideSet; /** * The block override set to provide different block values while executing the call */ readonly blockOverride?: BlockOverrideSet; }; /** * Based on the JSON-RPC request for `eth_chainId` procedure */ type EthChainIdParams = EmptyParams; /** * Based on the JSON-RPC request for `eth_coinbase` procedure */ type EthCoinbaseParams = EmptyParams; /** * Based on the JSON-RPC request for `eth_estimateGas` procedure * This type is a placeholder */ type EthEstimateGasParams = CallParams; /** * Based on the JSON-RPC request for `eth_hashrate` procedure */ type EthHashrateParams = EmptyParams; /** * Based on the JSON-RPC request for `eth_gasPrice` procedure */ type EthGasPriceParams = EmptyParams; /** *Based on the JSON-RPC request for `eth_getBalance` procedure */ type EthGetBalanceParams = { address: Address; blockTag?: BlockParam; }; /** * Based on the JSON-RPC request for `eth_getBlockByHash` procedure */ type EthGetBlockByHashParams = { readonly blockHash: Hex; readonly fullTransactionObjects: boolean; }; /** * Based on the JSON-RPC request for `eth_getBlockByNumber` procedure */ type EthGetBlockByNumberParams = { readonly blockTag?: BlockParam; readonly fullTransactionObjects: boolean; }; /** * Based on the JSON-RPC request for `eth_getBlockTransactionCountByHash` procedure */ type EthGetBlockTransactionCountByHashParams = { hash: Hex; }; /** * Based on the JSON-RPC request for `eth_getBlockTransactionCountByNumber` procedure */ type EthGetBlockTransactionCountByNumberParams = { readonly blockTag?: BlockParam; }; /** * Based on the JSON-RPC request for `eth_getCode` procedure */ type EthGetCodeParams = { readonly address: Address; readonly blockTag?: BlockParam; }; /** * Based on the JSON-RPC request for `eth_getFilterChanges` procedure */ type EthGetFilterChangesParams = { readonly filterId: Hex; }; /** * Based on the JSON-RPC request for `eth_getFilterLogs` procedure */ type EthGetFilterLogsParams = { readonly filterId: Hex; }; /** * Based on the JSON-RPC request for `eth_getLogs` procedure */ type EthGetLogsParams = { readonly filterParams: FilterParams; }; /** * Based on the JSON-RPC request for `eth_getStorageAt` procedure */ type EthGetStorageAtParams = { readonly address: Address; readonly position: Hex; readonly blockTag?: BlockParam; }; /** * Based on the JSON-RPC request for `eth_getTransactionCount` procedure */ type EthGetTransactionCountParams = { readonly address: Address; readonly blockTag?: BlockParam; }; /** * Based on the JSON-RPC request for `eth_getUncleCountByBlockHash` procedure */ type EthGetUncleCountByBlockHashParams = { readonly hash: Hex; }; /** * Based on the JSON-RPC request for `eth_getUncleCountByBlockNumber` procedure */ type EthGetUncleCountByBlockNumberParams = { readonly blockTag?: BlockParam; }; /** * Based on the JSON-RPC request for `eth_getTransactionByHash` procedure */ type EthGetTransactionByHashParams = { readonly data: Hex; }; /** * Based on the JSON-RPC request for `eth_getTransactionByBlockHashAndIndex` procedure */ type EthGetTransactionByBlockHashAndIndexParams = { readonly blockTag?: Hex; readonly index: Hex; }; /** * Based on the JSON-RPC request for `eth_getTransactionByBlockNumberAndIndex` procedure */ type EthGetTransactionByBlockNumberAndIndexParams = { readonly blockTag?: BlockParam; readonly index: Hex; }; /** * Based on the JSON-RPC request for `eth_getTransactionReceipt` procedure */ type EthGetTransactionReceiptParams = { readonly hash: Hex; }; /** * Based on the JSON-RPC request for `eth_getUncleByBlockHashAndIndex` procedure */ type EthGetUncleByBlockHashAndIndexParams = { readonly blockHash: Hex; readonly uncleIndex: Hex; }; /** * Based on the JSON-RPC request for `eth_getUncleByBlockNumberAndIndex` procedure */ type EthGetUncleByBlockNumberAndIndexParams = { readonly blockTag?: BlockParam; readonly uncleIndex: Hex; }; /** * Based on the JSON-RPC request for `eth_mining` procedure */ type EthMiningParams = EmptyParams; /** * Based on the JSON-RPC request for `eth_protocolVersion` procedure */ type EthProtocolVersionParams = EmptyParams; /** * Based on the JSON-RPC request for `eth_sendRawTransaction` procedure * This type is a placeholder */ type EthSendRawTransactionParams = { readonly data: Hex; }; /** * Based on the JSON-RPC request for `eth_sendTransaction` procedure * This type is a placeholder * @experimental */ type EthSendTransactionParams = CallParams; /** * Based on the JSON-RPC request for `eth_sign` procedure * @experimental */ type EthSignParams = { readonly address: Address; readonly data: Hex; }; /** * Based on the JSON-RPC request for `eth_signTransaction` procedure * @experimental */ type EthSignTransactionParams = { /** * The address from which the transaction is sent from */ readonly from: Address; /** * The address the transaction is directed to. Optional if * creating a contract */ readonly to?: Address; /** * The gas provded for transaction execution. It will return unused gas. * Default value is 90000 */ readonly gas?: bigint; /** * Integer of the gasPrice used for each paid gas, in Wei. * If not provided tevm will default to the eth_gasPrice value */ readonly gasPrice?: bigint; /** * Integer of the value sent with this transaction, in Wei. */ readonly value?: bigint; /** * The compiled code of a contract OR the hash of the invoked method signature and encoded parameters. * Optional if creating a contract. */ readonly data?: Hex; /** * Integer of a nonce. This allows to overwrite your own pending transactions that use the same nonce. */ readonly nonce?: bigint; }; /** * Based on the JSON-RPC request for `eth_syncing` procedure (no params) */ type EthSyncingParams = EmptyParams; /** * Based on the JSON-RPC request for `eth_newFilter` procedure */ type EthNewFilterParams = FilterParams; /** * Based on the JSON-RPC request for `eth_newBlockFilter` procedure (no params) */ type EthNewBlockFilterParams = EmptyParams; /** * Based on the JSON-RPC request for `eth_newPendingTransactionFilter` procedure */ type EthNewPendingTransactionFilterParams = EmptyParams; /** * Based on the JSON-RPC request for `eth_uninstallFilter` procedure */ type EthUninstallFilterParams = { readonly filterId: Hex; }; type EthParams = EthAccountsParams | EthAccountsParams | EthBlockNumberParams | EthCallParams | EthChainIdParams | EthCoinbaseParams | EthEstimateGasParams | EthHashrateParams | EthGasPriceParams | EthGetBalanceParams | EthGetBlockByHashParams | EthGetBlockByNumberParams | EthGetBlockTransactionCountByHashParams | EthGetBlockTransactionCountByNumberParams | EthGetCodeParams | EthGetFilterChangesParams | EthGetFilterLogsParams | EthGetLogsParams | EthGetStorageAtParams | EthGetTransactionCountParams | EthGetUncleCountByBlockHashParams | EthGetUncleCountByBlockNumberParams | EthGetTransactionByHashParams | EthGetTransactionByBlockHashAndIndexParams | EthGetTransactionByBlockNumberAndIndexParams | EthGetTransactionReceiptParams | EthGetUncleByBlockHashAndIndexParams | EthGetUncleByBlockNumberAndIndexParams | EthMiningParams | EthProtocolVersionParams | EthSendRawTransactionParams | EthSendTransactionParams | EthSignParams | EthSignTransactionParams | EthSyncingParams | EthNewFilterParams | EthNewBlockFilterParams | EthNewPendingTransactionFilterParams | EthUninstallFilterParams; /*** * TODO I didn't update any of these jsdocs */ /** * Params fro `anvil_impersonateAccount` handler */ type AnvilImpersonateAccountParams = { /** * The address to impersonate */ readonly address: Address; }; /** * Params for `anvil_stopImpersonatingAccount` handler */ type AnvilStopImpersonatingAccountParams = { /** * The address to stop impersonating */ readonly address: Address; }; /** * Params for `anvil_autoImpersonateAccount` handler * Not included atm because tevm_call supports it and i was getting methodNotFound errors trying it in anvil */ /** * Params for `anvil_getAutomine` handler */ type AnvilGetAutomineParams = {} | undefined | never; /** * Params for `anvil_mine` handler */ type AnvilMineParams = { /** * Number of blocks to mine. Defaults to 1 */ readonly blockCount?: number; /** * mineing interval */ readonly interval?: number; }; /** * Params for `anvil_reset` handler */ type AnvilResetParams = { readonly fork: { /** * The url to fork if forking */ readonly url?: string; /** * The block number */ readonly block?: BlockTag | Hex | BigInt; }; }; /** * Params for `anvil_dropTransaction` handler */ type AnvilDropTransactionParams = { /** * The transaction hash */ readonly transactionHash: Hex; }; /** * Params for `anvil_setBalance` handler */ type AnvilSetBalanceParams = { /** * The address to set the balance for */ readonly address: Address; /** * The balance to set */ readonly balance: Hex | BigInt; }; /** * Params for `anvil_setCode` handler */ type AnvilSetCodeParams = { /** * The address to set the code for */ readonly address: Address; /** * The code to set */ readonly code: Hex; }; /** * Params for `anvil_setNonce` handler */ type AnvilSetNonceParams = { /** * The address to set the nonce for */ readonly address: Address; /** * The nonce to set */ readonly nonce: BigInt; }; /** * Params for `anvil_setStorageAt` handler */ type AnvilSetStorageAtParams = { /** * The address to set the storage for */ readonly address: Address; /** * The position in storage to set */ readonly position: Hex | BigInt; /** * The value to set */ readonly value: Hex | BigInt; }; /** * Params for `anvil_setChainId` handler */ type AnvilSetChainIdParams = { /** * The chain id to set */ readonly chainId: number; }; /** * Params for `anvil_dumpState` handler */ type AnvilDumpStateParams = {} | undefined | never; /** * Params for `anvil_loadState` handler */ type AnvilLoadStateParams = { /** * The state to load */ readonly state: Record; }; /** * Config params for trace calls */ type TraceParams = { /** * The type of tracer * Currently only callTracer supported */ readonly tracer: 'callTracer' | 'prestateTracer'; /** * A duration string of decimal numbers that overrides the default timeout of 5 seconds for JavaScript-based tracing calls. Max timeout is "10s". Valid time units are "ns", "us", "ms", "s" each with optional fraction, such as "300ms" or "2s45ms". * @example "10s" */ readonly timeout?: string; /** * object to specify configurations for the tracer */ readonly tracerConfig?: {}; }; /** * Params taken by `debug_traceTransaction` handler */ type DebugTraceTransactionParams = BaseParams & TraceParams & { /** * The transaction hash */ readonly transactionHash: Hex; }; /** * Params taken by `debug_traceCall` handler */ type DebugTraceCallParams = TraceParams & EthCallParams; /** * params for `tevm_loadState` method. Takes a {@link TevmState} to load into state. */ type LoadStateParams = BaseParams & { readonly state: TevmState; }; /** * Tevm params to mine 1 or more blocks * @example * const mineParams: import('@tevm/actions-types').MineParams = { * blockCount: 5, * } */ type MineParams = BaseParams & { /** * Number of blocks to mine. Defaults to 1 */ readonly blockCount?: number; /** * Interval between block timestamps. Defaults to 1 */ readonly interval?: number; }; /** * Wraps tevm_call to deploy a contract * Unlike most call actions `createTransaction` defaults to true */ type DeployParams] extends [never] ? false : true : true, TAllArgs = ContractConstructorArgs> = Omit, 'to'> & { /** * An optional CREATE2 salt. */ readonly salt?: Hex; } & EncodeDeployDataParameters; /** * Gets the state of a specific ethereum address * @example * const res = tevm.getAccount({address: '0x123...'}) * console.log(res.deployedBytecode) * console.log(res.nonce) * console.log(res.balance) */ type GetAccountHandler = (params: GetAccountParams) => Promise; /** * Sets the state of a specific ethereum address * @example * import {parseEther} from 'tevm' * * await tevm.setAccount({ * address: '0x123...', * deployedBytecode: '0x6080604...', * balance: parseEther('1.0') * }) */ type SetAccountHandler = (params: SetAccountParams) => Promise; /** * Executes a call against the VM. It is similar to `eth_call` but has more * options for controlling the execution environment * * See `contract` and `script` which executes calls specifically against deployed contracts * or undeployed scripts * @example * const res = tevm.call({ * to: '0x123...', * data: '0x123...', * from: '0x123...', * gas: 1000000, * gasPrice: 1n, * skipBalance: true, * } * */ type CallHandler = (action: CallParams) => Promise; /** * Handler for contract tevm procedure * It's API resuses the viem `contractRead`/`contractWrite` API to encode abi, functionName, and args */ type ContractHandler = = ContractFunctionName>(action: ContractParams) => Promise>; /** * Executes scripts against the Tevm EVM. By default the script is sandboxed * and the state is reset after each execution unless the `persist` option is set * to true. * @example * ```typescript * const res = tevm.script({ * deployedBytecode: '0x6080604...', * abi: [...], * function: 'run', * args: ['hello world'] * }) * ``` * Contract handlers provide a more ergonomic way to execute scripts * @example * ```typescript * ipmort {MyScript} from './MyScript.s.sol' * * const res = tevm.script( * MyScript.read.run('hello world') * ) * ``` */ type ScriptHandler = = ContractFunctionName>(params: ScriptParams) => Promise>; type AnvilImpersonateAccountResult = null; type AnvilStopImpersonatingAccountResult = null; type AnvilGetAutomineResult = boolean; type AnvilMineResult = null; type AnvilResetResult = null; type AnvilDropTransactionResult = null; type AnvilSetBalanceResult = null; type AnvilSetCodeResult = null; type AnvilSetNonceResult = null; type AnvilSetStorageAtResult = null; type AnvilSetChainIdResult = null; type AnvilDumpStateResult = Hex; type AnvilLoadStateResult = null; type AnvilImpersonateAccountHandler = (params: AnvilImpersonateAccountParams) => Promise; type AnvilStopImpersonatingAccountHandler = (params: AnvilStopImpersonatingAccountParams) => Promise; type AnvilGetAutomineHandler = (params: AnvilGetAutomineParams) => Promise; type AnvilMineHandler = (params: AnvilMineParams) => Promise; type AnvilResetHandler = (params: AnvilResetParams) => Promise; type AnvilDropTransactionHandler = (params: AnvilDropTransactionParams) => Promise; type AnvilSetBalanceHandler = (params: AnvilSetBalanceParams) => Promise; type AnvilSetCodeHandler = (params: AnvilSetCodeParams) => Promise; type AnvilSetNonceHandler = (params: AnvilSetNonceParams) => Promise; type AnvilSetStorageAtHandler = (params: AnvilSetStorageAtParams) => Promise; type AnvilSetChainIdHandler = (params: AnvilSetChainIdParams) => Promise; type AnvilDumpStateHandler = (params: AnvilDumpStateParams) => Promise; type AnvilLoadStateHandler = (params: AnvilLoadStateParams) => Promise; /** * Result of GetAccount Action */ type GetAccountResult = { /** * Description of the exception, if any occurred */ errors?: ErrorType[]; /** * Address of account */ address: Address; /** * Nonce to set account to */ nonce: bigint; /** * Balance to set account to */ balance: bigint; /** * Contract bytecode to set account to */ deployedBytecode: Hex; /** * Storage root to set account to */ storageRoot: Hex; /** * Code hash to set account to */ codeHash: Hex; /** * True if account is a contract */ isContract: boolean; /** * True if account is empty */ isEmpty: boolean; /** * Contract storage for the account * only included if `returnStorage` is set to true in the request */ storage?: { [key: Hex]: Hex; }; }; /** * Result of SetAccount Action */ type SetAccountResult = { /** * Description of the exception, if any occurred */ errors?: ErrorType[]; }; type StructLog = { readonly depth: number; readonly gas: bigint; readonly gasCost: bigint; readonly op: string; readonly pc: number; readonly stack: Array; readonly error?: { error: string; errorType: string; }; }; type DebugTraceTransactionResult = TraceResult; type DebugTraceCallResult = { failed: boolean; gas: bigint; returnValue: Hex; structLogs: Array; }; /** * Result of a Tevm VM Call method */ type CallResult = { /** * The call trace if tracing is enabled on call */ trace?: DebugTraceCallResult; /** * The access list if enabled on call * Mapping of addresses to storage slots */ accessList?: Record>; /** * Preimages mapping of the touched accounts from the tx (see `reportPreimages` option) */ preimages?: Record; /** * The returned tx hash if the call was included in the chain * Will not be defined if the call was not included in the chain * Whether a call is included in the chain depends on if the * `createTransaction` option and the result of the call */ txHash?: Hex; /** * Amount of gas left */ gas?: bigint; /** * Amount of gas the code used to run */ executionGasUsed: bigint; /** * Array of logs that the contract emitted */ logs?: Log[]; /** * The gas refund counter as a uint256 */ gasRefund?: bigint; /** * Amount of blob gas consumed by the transaction */ blobGasUsed?: bigint; /** * Address of created account during transaction, if any */ createdAddress?: Address; /** * A set of accounts to selfdestruct */ selfdestruct?: Set
; /** * Map of addresses which were created (used in EIP 6780) * Note the addresses are not actually created til the tx is mined */ createdAddresses?: Set
; /** * Encoded return value from the contract as hex string */ rawData: Hex; /** * Description of the exception, if any occurred */ errors?: ErrorType[]; /** * Priority fee set by the transaction. */ priorityFee?: bigint; /** * The base fee of the transaction */ baseFee?: bigint; /** * L1 fee that should be paid for the tx * Only included when an op-stack common is provided * @see [OP-Stack docs](https://docs.optimism.io/stack/transactions/fees) */ l1Fee?: bigint; /** * Amount of L1 gas used to publish the transaction. * Only included when an op-stack common is provided * @see [OP-Stack docs](https://docs.optimism.io/stack/transactions/fees) */ l1GasUsed?: bigint; /** * Current blob base fee known by the l2 chain. * @see [OP-Stack docs](https://docs.optimism.io/stack/transactions/fees) */ l1BlobFee?: bigint; /** * Latest known L1 base fee known by the l2 chain. * Only included when an op-stack common is provided * @see [OP-Stack docs](https://docs.optimism.io/stack/transactions/fees) */ l1BaseFee?: bigint; /** * The amount of gas used in this transaction, which is paid for * This contains the gas units that have been used on execution, plus the upfront cost, * which consists of calldata cost, intrinsic cost and optionally the access list costs * Does not include l1 fees */ totalGasSpent?: bigint; /** * The amount of ether used by this transaction. Does not include l1 fees */ amountSpent?: bigint; /** * The value that accrues to the miner by this transaction */ minerValue?: bigint; }; type ContractResult = ContractFunctionName, ErrorType = ContractError> = (Omit & { errors?: never; /** * The parsed data */ data: DecodeFunctionResultReturnType; }) | (CallResult & { data?: never; }); type ScriptResult = ContractFunctionName, TErrorType = ScriptError> = ContractResult; /*** * TODO I didn't update any of these jsdocs * TODO some of these types are not deserialized and/or don't match viem types and will * need to be updated as t hey are implemented */ type EthAccountsResult = Array
; /** * JSON-RPC response for `eth_blockNumber` procedure */ type EthBlockNumberResult = bigint; /** * JSON-RPC response for `eth_call` procedure */ type EthCallResult = Hex; /** * JSON-RPC response for `eth_chainId` procedure */ type EthChainIdResult = bigint; /** * JSON-RPC response for `eth_coinbase` procedure */ type EthCoinbaseResult = Address; /** * JSON-RPC response for `eth_estimateGas` procedure */ type EthEstimateGasResult = bigint; /** * JSON-RPC response for `eth_hashrate` procedure */ type EthHashrateResult = Hex; /** * JSON-RPC response for `eth_gasPrice` procedure */ type EthGasPriceResult = bigint; /** * JSON-RPC response for `eth_getBalance` procedure */ type EthGetBalanceResult = bigint; /** * JSON-RPC response for `eth_getBlockByHash` procedure */ type EthGetBlockByHashResult = BlockResult; /** * JSON-RPC response for `eth_getBlockByNumber` procedure */ type EthGetBlockByNumberResult = BlockResult; /** * JSON-RPC response for `eth_getBlockTransactionCountByHash` procedure */ type EthGetBlockTransactionCountByHashResult = Hex; /** * JSON-RPC response for `eth_getBlockTransactionCountByNumber` procedure */ type EthGetBlockTransactionCountByNumberResult = Hex; /** * JSON-RPC response for `eth_getCode` procedure */ type EthGetCodeResult = Hex; /** * JSON-RPC response for `eth_getFilterChanges` procedure */ type EthGetFilterChangesResult = Array; /** * JSON-RPC response for `eth_getFilterLogs` procedure */ type EthGetFilterLogsResult = Array; /** * JSON-RPC response for `eth_getLogs` procedure */ type EthGetLogsResult = Array; /** * JSON-RPC response for `eth_getStorageAt` procedure */ type EthGetStorageAtResult = Hex; /** * JSON-RPC response for `eth_getTransactionCount` procedure */ type EthGetTransactionCountResult = Hex; /** * JSON-RPC response for `eth_getUncleCountByBlockHash` procedure */ type EthGetUncleCountByBlockHashResult = Hex; /** * JSON-RPC response for `eth_getUncleCountByBlockNumber` procedure */ type EthGetUncleCountByBlockNumberResult = Hex; /** * JSON-RPC response for `eth_getTransactionByHash` procedure */ type EthGetTransactionByHashResult = TransactionResult; /** * JSON-RPC response for `eth_getTransactionByBlockHashAndIndex` procedure */ type EthGetTransactionByBlockHashAndIndexResult = TransactionResult; /** * JSON-RPC response for `eth_getTransactionByBlockNumberAndIndex` procedure */ type EthGetTransactionByBlockNumberAndIndexResult = TransactionResult; /** * JSON-RPC response for `eth_getTransactionReceipt` procedure */ type EthGetTransactionReceiptResult = TransactionReceiptResult | null; /** * JSON-RPC response for `eth_getUncleByBlockHashAndIndex` procedure */ type EthGetUncleByBlockHashAndIndexResult = Hex; /** * JSON-RPC response for `eth_getUncleByBlockNumberAndIndex` procedure */ type EthGetUncleByBlockNumberAndIndexResult = Hex; /** * JSON-RPC response for `eth_mining` procedure */ type EthMiningResult = boolean; /** * JSON-RPC response for `eth_protocolVersion` procedure */ type EthProtocolVersionResult = Hex; /** * JSON-RPC response for `eth_sendRawTransaction` procedure */ type EthSendRawTransactionResult = Hex; /** * JSON-RPC response for `eth_sendTransaction` procedure */ type EthSendTransactionResult = Hex; /** * JSON-RPC response for `eth_sign` procedure */ type EthSignResult = Hex; /** * JSON-RPC response for `eth_signTransaction` procedure */ type EthSignTransactionResult = Hex; /** * JSON-RPC response for `eth_syncing` procedure */ type EthSyncingResult = boolean | { startingBlock: Hex; currentBlock: Hex; highestBlock: Hex; headedBytecodebytes?: Hex; healedBytecodes?: Hex; healedTrienodes?: Hex; healingBytecode?: Hex; healingTrienodes?: Hex; syncedBytecodeBytes?: Hex; syncedBytecodes?: Hex; syncedStorage?: Hex; syncedStorageBytes?: Hex; pulledStates: Hex; knownStates: Hex; }; /** * JSON-RPC response for `eth_newFilter` procedure */ type EthNewFilterResult = Hex; /** * JSON-RPC response for `eth_newBlockFilter` procedure */ type EthNewBlockFilterResult = Hex; /** * JSON-RPC response for `eth_newPendingTransactionFilter` procedure */ type EthNewPendingTransactionFilterResult = Hex; /** * JSON-RPC response for `eth_uninstallFilter` procedure */ type EthUninstallFilterResult = boolean; /** * Result of the dumpState method */ type DumpStateResult = { /** * The serialized tevm state */ state: TevmState; /** * Description of the exception, if any occurred */ errors?: ErrorType[]; }; /** * Result of LoadState Method */ type LoadStateResult = { /** * Description of the exception, if any occurred */ errors?: ErrorType[]; }; /** * Result of Mine Method */ type MineResult = { blockHashes: Array; errors?: undefined; } | { blockHashes?: undefined; /** * Description of the exception, if any occurred */ errors?: Error[]; }; type DeployResult = CallResult; type DebugTraceTransactionHandler = (params: DebugTraceTransactionParams) => Promise; type DebugTraceCallHandler = (params: DebugTraceCallParams) => Promise; type EthAccountsHandler = (request?: EthAccountsParams) => Promise; type EthBlockNumberHandler = (request?: EthBlockNumberParams) => Promise; type EthCallHandler = (request: EthCallParams) => Promise; type EthChainIdHandler = (request?: EthChainIdParams) => Promise; type EthCoinbaseHandler = (request: EthCoinbaseParams) => Promise; type EthEstimateGasHandler = (request: EthEstimateGasParams) => Promise; type EthHashrateHandler = (request?: EthHashrateParams) => Promise; type EthGasPriceHandler = (request?: EthGasPriceParams) => Promise; type EthGetBalanceHandler = (request: EthGetBalanceParams) => Promise; type EthGetBlockByHashHandler = (request: EthGetBlockByHashParams) => Promise; type EthGetBlockByNumberHandler = (request: EthGetBlockByNumberParams) => Promise; type EthGetBlockTransactionCountByHashHandler = (request: EthGetBlockTransactionCountByHashParams) => Promise; type EthGetBlockTransactionCountByNumberHandler = (request: EthGetBlockTransactionCountByNumberParams) => Promise; type EthGetCodeHandler = (request: EthGetCodeParams) => Promise; type EthGetFilterChangesHandler = (request: EthGetFilterChangesParams) => Promise; type EthGetFilterLogsHandler = (request: EthGetFilterLogsParams) => Promise; type EthGetLogsHandler = (request: EthGetLogsParams) => Promise; type EthGetStorageAtHandler = (request: EthGetStorageAtParams) => Promise; type EthGetTransactionCountHandler = (request: EthGetTransactionCountParams) => Promise; type EthGetUncleCountByBlockHashHandler = (request: EthGetUncleCountByBlockHashParams) => Promise; type EthGetUncleCountByBlockNumberHandler = (request: EthGetUncleCountByBlockNumberParams) => Promise; type EthGetTransactionByHashHandler = (request: EthGetTransactionByHashParams) => Promise; type EthGetTransactionByBlockHashAndIndexHandler = (request: EthGetTransactionByBlockHashAndIndexParams) => Promise; type EthGetTransactionByBlockNumberAndIndexHandler = (request: EthGetTransactionByBlockNumberAndIndexParams) => Promise; type EthGetTransactionReceiptHandler = (request: EthGetTransactionReceiptParams) => Promise; type EthGetUncleByBlockHashAndIndexHandler = (request: EthGetUncleByBlockHashAndIndexParams) => Promise; type EthGetUncleByBlockNumberAndIndexHandler = (request: EthGetUncleByBlockNumberAndIndexParams) => Promise; type EthMiningHandler = (request: EthMiningParams) => Promise; type EthProtocolVersionHandler = (request: EthProtocolVersionParams) => Promise; type EthSendRawTransactionHandler = (request: EthSendRawTransactionParams) => Promise; type EthSendTransactionHandler = (request: EthSendTransactionParams) => Promise; type EthSignHandler = (request: EthSignParams) => Promise; type EthSignTransactionHandler = (request: EthSignTransactionParams) => Promise; type EthSyncingHandler = (request: EthSyncingParams) => Promise; type EthNewFilterHandler = (request: EthNewFilterParams) => Promise; type EthNewBlockFilterHandler = (request: EthNewBlockFilterParams) => Promise; type EthNewPendingTransactionFilterHandler = (request: EthNewPendingTransactionFilterParams) => Promise; type EthUninstallFilterHandler = (request: EthUninstallFilterParams) => Promise; /** * Dumps the current state of the VM into a JSON-seralizable object * * State can be dumped as follows * @example * ```typescript * const {state} = await tevm.dumpState() * fs.writeFileSync('state.json', JSON.stringify(state)) * ``` * * And then loaded as follows * @example * ```typescript * const state = JSON.parse(fs.readFileSync('state.json')) * await tevm.loadState({state}) * ``` */ type DumpStateHandler = (params?: BaseParams) => Promise; /** * Loads a previously dumped state into the VM * * State can be dumped as follows * @example * ```typescript * const {state} = await tevm.dumpState() * fs.writeFileSync('state.json', JSON.stringify(state)) * ``` * * And then loaded as follows * @example * ```typescript * const state = JSON.parse(fs.readFileSync('state.json')) * await tevm.loadState({state}) * ``` */ type LoadStateHandler = (params: LoadStateParams) => Promise; /** * Mines a block including all transactions in the mempool * @example * const res = tevmClient.mine({blocks: 2, interval: 2}) * console.log(res.errors) // undefined */ type MineHandler = (params?: MineParams) => Promise; type DeployHandler = ] extends [never] ? false : true : true, TAllArgs = ContractConstructorArgs>(action: DeployParams) => Promise; export type { Abi, Address, AnvilDropTransactionHandler, AnvilDropTransactionParams, AnvilDropTransactionResult, AnvilDumpStateHandler, AnvilDumpStateParams, AnvilDumpStateResult, AnvilGetAutomineHandler, AnvilGetAutomineParams, AnvilGetAutomineResult, AnvilImpersonateAccountHandler, AnvilImpersonateAccountParams, AnvilImpersonateAccountResult, AnvilLoadStateHandler, AnvilLoadStateParams, AnvilLoadStateResult, AnvilMineHandler, AnvilMineParams, AnvilMineResult, AnvilResetHandler, AnvilResetParams, AnvilResetResult, AnvilSetBalanceHandler, AnvilSetBalanceParams, AnvilSetBalanceResult, AnvilSetChainIdHandler, AnvilSetChainIdParams, AnvilSetChainIdResult, AnvilSetCodeHandler, AnvilSetCodeParams, AnvilSetCodeResult, AnvilSetNonceHandler, AnvilSetNonceParams, AnvilSetNonceResult, AnvilSetStorageAtHandler, AnvilSetStorageAtParams, AnvilSetStorageAtResult, AnvilStopImpersonatingAccountHandler, AnvilStopImpersonatingAccountParams, AnvilStopImpersonatingAccountResult, BaseCallParams, Block, BlockOverrideSet, BlockParam, BlockResult, BlockTag, CallHandler, CallParams, CallResult, ContractHandler, ContractParams, ContractResult, DebugTraceCallHandler, DebugTraceCallParams, DebugTraceCallResult, DebugTraceTransactionHandler, DebugTraceTransactionParams, DebugTraceTransactionResult, DeployHandler, DeployParams, DeployResult, DumpStateHandler, DumpStateResult, EmptyParams, EthAccountsHandler, EthAccountsParams, EthAccountsResult, EthBlockNumberHandler, EthBlockNumberParams, EthBlockNumberResult, EthCallHandler, EthCallParams, EthCallResult, EthChainIdHandler, EthChainIdParams, EthChainIdResult, EthCoinbaseHandler, EthCoinbaseParams, EthCoinbaseResult, EthEstimateGasHandler, EthEstimateGasParams, EthEstimateGasResult, EthGasPriceHandler, EthGasPriceParams, EthGasPriceResult, EthGetBalanceHandler, EthGetBalanceParams, EthGetBalanceResult, EthGetBlockByHashHandler, EthGetBlockByHashParams, EthGetBlockByHashResult, EthGetBlockByNumberHandler, EthGetBlockByNumberParams, EthGetBlockByNumberResult, EthGetBlockTransactionCountByHashHandler, EthGetBlockTransactionCountByHashParams, EthGetBlockTransactionCountByHashResult, EthGetBlockTransactionCountByNumberHandler, EthGetBlockTransactionCountByNumberParams, EthGetBlockTransactionCountByNumberResult, EthGetCodeHandler, EthGetCodeParams, EthGetCodeResult, EthGetFilterChangesHandler, EthGetFilterChangesParams, EthGetFilterChangesResult, EthGetFilterLogsHandler, EthGetFilterLogsParams, EthGetFilterLogsResult, EthGetLogsHandler, EthGetLogsParams, EthGetLogsResult, EthGetStorageAtHandler, EthGetStorageAtParams, EthGetStorageAtResult, EthGetTransactionByBlockHashAndIndexHandler, EthGetTransactionByBlockHashAndIndexParams, EthGetTransactionByBlockHashAndIndexResult, EthGetTransactionByBlockNumberAndIndexHandler, EthGetTransactionByBlockNumberAndIndexParams, EthGetTransactionByBlockNumberAndIndexResult, EthGetTransactionByHashHandler, EthGetTransactionByHashParams, EthGetTransactionByHashResult, EthGetTransactionCountHandler, EthGetTransactionCountParams, EthGetTransactionCountResult, EthGetTransactionReceiptHandler, EthGetTransactionReceiptParams, EthGetTransactionReceiptResult, EthGetUncleByBlockHashAndIndexHandler, EthGetUncleByBlockHashAndIndexParams, EthGetUncleByBlockHashAndIndexResult, EthGetUncleByBlockNumberAndIndexHandler, EthGetUncleByBlockNumberAndIndexParams, EthGetUncleByBlockNumberAndIndexResult, EthGetUncleCountByBlockHashHandler, EthGetUncleCountByBlockHashParams, EthGetUncleCountByBlockHashResult, EthGetUncleCountByBlockNumberHandler, EthGetUncleCountByBlockNumberParams, EthGetUncleCountByBlockNumberResult, EthHashrateHandler, EthHashrateParams, EthHashrateResult, EthMiningHandler, EthMiningParams, EthMiningResult, EthNewBlockFilterHandler, EthNewBlockFilterParams, EthNewBlockFilterResult, EthNewFilterHandler, EthNewFilterParams, EthNewFilterResult, EthNewPendingTransactionFilterHandler, EthNewPendingTransactionFilterParams, EthNewPendingTransactionFilterResult, EthParams, EthProtocolVersionHandler, EthProtocolVersionParams, EthProtocolVersionResult, EthSendRawTransactionHandler, EthSendRawTransactionParams, EthSendRawTransactionResult, EthSendTransactionHandler, EthSendTransactionParams, EthSendTransactionResult, EthSignHandler, EthSignParams, EthSignResult, EthSignTransactionHandler, EthSignTransactionParams, EthSignTransactionResult, EthSyncingHandler, EthSyncingParams, EthSyncingResult, EthUninstallFilterHandler, EthUninstallFilterParams, EthUninstallFilterResult, FilterLog, FilterParams, GetAccountHandler, GetAccountParams, GetAccountResult, Hex, LoadStateHandler, LoadStateParams, LoadStateResult, Log, MineHandler, MineParams, MineResult, NetworkConfig, ScriptHandler, ScriptParams, ScriptResult, SetAccountHandler, SetAccountParams, SetAccountResult, StateOverrideSet, StructLog, TraceCall, TraceParams, TraceResult, TraceType, TransactionParams, TransactionReceiptResult, TransactionResult };