From bb0ffd9415814e61ef1fe2284d83cc8ebc91cbbc Mon Sep 17 00:00:00 2001 From: William Cory Date: Thu, 17 Oct 2024 19:31:20 -0700 Subject: [PATCH] :boom: Fix: some breaking changes --- .../src/create2ContractAddress.spec.ts | 4 +- .../address/src/createContractAddress.spec.ts | 8 +- packages/common/docs/globals.md | 2 +- .../interfaces/EvmStateManagerInterface.md | 8 +- packages/common/src/createCommon.js | 8 +- packages/common/src/index.ts | 2 +- .../ethereum/ethereumjs/AuthCallUnsetError.js | 92 ------------------- .../errors/src/ethereum/ethereumjs/index.ts | 1 - packages/errors/src/ethereum/index.ts | 2 - packages/errors/src/index.ts | 2 - .../evm/docs/interfaces/InterpreterStep.md | 2 +- .../state/docs/interfaces/StateManager.md | 54 +++++------ packages/state/src/StateManager.ts | 4 +- packages/utils/src/ethereumjs.js | 9 +- packages/utils/src/index.ts | 2 +- tevm/docs/common/README.md | 2 +- .../interfaces/EvmStateManagerInterface.md | 8 +- tevm/docs/evm/interfaces/InterpreterStep.md | 2 +- tevm/docs/state/interfaces/StateManager.md | 54 +++++------ 19 files changed, 87 insertions(+), 179 deletions(-) delete mode 100644 packages/errors/src/ethereum/ethereumjs/AuthCallUnsetError.js diff --git a/packages/address/src/create2ContractAddress.spec.ts b/packages/address/src/create2ContractAddress.spec.ts index ee39bbccfd..9aa514fb83 100644 --- a/packages/address/src/create2ContractAddress.spec.ts +++ b/packages/address/src/create2ContractAddress.spec.ts @@ -6,7 +6,7 @@ import { create2ContractAddress } from './create2ContractAddress.js' describe('create2ContractAddress', () => { it('should create a valid contract address using CREATE2', () => { - const from = EthjsAddress.fromString(`0x${'11'.repeat(20)}`) + const from = new EthjsAddress(hexToBytes(`0x${'11'.repeat(20)}`)) const salt = `0x${'00'.repeat(32)}` as const const code = `0x${'60'.repeat(10)}` as const const expectedAddress = keccak256( @@ -21,7 +21,7 @@ describe('create2ContractAddress', () => { }) it('should throw InvalidSaltError if salt is not 32 bytes', () => { - const from = EthjsAddress.fromString(`0x${'11'.repeat(20)}`) + const from = new EthjsAddress(hexToBytes(`0x${'11'.repeat(20)}`)) const invalidSalt = `0x${'00'.repeat(16)}` as const const code = `0x${'60'.repeat(10)}` as const diff --git a/packages/address/src/createContractAddress.spec.ts b/packages/address/src/createContractAddress.spec.ts index d84e97b848..4b52a5c7cb 100644 --- a/packages/address/src/createContractAddress.spec.ts +++ b/packages/address/src/createContractAddress.spec.ts @@ -1,13 +1,13 @@ import { InvalidAddressError } from '@tevm/errors' -import { EthjsAddress, keccak256, toRlp } from '@tevm/utils' -import { numberToBytes } from 'viem' +import { keccak256, toRlp } from '@tevm/utils' +import { hexToBytes, numberToBytes } from 'viem' import { describe, expect, it } from 'vitest' import { Address } from './Address.js' import { createContractAddress } from './createContractAddress.js' describe('createContractAddress', () => { it('should create a valid contract address with nonce 0', () => { - const from = EthjsAddress.fromString(`0x${'11'.repeat(20)}`) + const from = new Address(hexToBytes(`0x${'11'.repeat(20)}`)) const nonce = 0n const expectedAddress = keccak256(toRlp([from.bytes, Uint8Array.from([])]), 'bytes').subarray(-20) @@ -18,7 +18,7 @@ describe('createContractAddress', () => { }) it('should create a valid contract address with a non-zero nonce', () => { - const from = EthjsAddress.fromString(`0x${'22'.repeat(20)}`) + const from = new Address(hexToBytes(`0x${'22'.repeat(20)}`)) const nonce = 1n const expectedAddress = keccak256(toRlp([from.bytes, numberToBytes(nonce)]), 'bytes').subarray(-20) diff --git a/packages/common/docs/globals.md b/packages/common/docs/globals.md index 7f57986030..2b9afe015a 100644 --- a/packages/common/docs/globals.md +++ b/packages/common/docs/globals.md @@ -12,7 +12,7 @@ ## Interfaces - [CustomCrypto](interfaces/CustomCrypto.md) -- [EvmStateManagerInterface](interfaces/EvmStateManagerInterface.md) +- [StateManagerInterface](interfaces/StateManagerInterface.md) - [StorageDump](interfaces/StorageDump.md) - [StorageRange](interfaces/StorageRange.md) diff --git a/packages/common/docs/interfaces/EvmStateManagerInterface.md b/packages/common/docs/interfaces/EvmStateManagerInterface.md index b1df0ecffa..dc35d5634b 100644 --- a/packages/common/docs/interfaces/EvmStateManagerInterface.md +++ b/packages/common/docs/interfaces/EvmStateManagerInterface.md @@ -2,9 +2,9 @@ *** -[@tevm/common](../globals.md) / EvmStateManagerInterface +[@tevm/common](../globals.md) / StateManagerInterface -# Interface: EvmStateManagerInterface +# Interface: StateManagerInterface ## Extends @@ -520,7 +520,7 @@ node\_modules/.pnpm/@ethereumjs+common@4.4.0/node\_modules/@ethereumjs/common/di ### shallowCopy() -> **shallowCopy**(`downlevelCaches`?): [`EvmStateManagerInterface`](EvmStateManagerInterface.md) +> **shallowCopy**(`downlevelCaches`?): [`StateManagerInterface`](StateManagerInterface.md) #### Parameters @@ -528,7 +528,7 @@ node\_modules/.pnpm/@ethereumjs+common@4.4.0/node\_modules/@ethereumjs/common/di #### Returns -[`EvmStateManagerInterface`](EvmStateManagerInterface.md) +[`StateManagerInterface`](StateManagerInterface.md) #### Overrides diff --git a/packages/common/src/createCommon.js b/packages/common/src/createCommon.js index a8240e7a23..9baef1b0c6 100644 --- a/packages/common/src/createCommon.js +++ b/packages/common/src/createCommon.js @@ -1,4 +1,4 @@ -import { Common } from '@ethereumjs/common' +import { createCustomCommon } from '@ethereumjs/common' import { InvalidParamsError } from '@tevm/errors' import { createLogger } from '@tevm/logger' import { createMockKzg } from './createMockKzg.js' @@ -59,15 +59,13 @@ export const createCommon = ({ }) => { try { const logger = createLogger({ level: loggingLevel, name: '@tevm/common' }) - const ethjsCommon = Common.custom( + const ethjsCommon = createCustomCommon( { name: 'TevmCustom', chainId: chain.id, - // TODO what is diff between chainId and networkId??? - networkId: chain.id, }, { - hardfork, + hardfork: hardfork, baseChain: 1, eips: [...eips, 1559, 4895, 4844, 4788], customCrypto: { diff --git a/packages/common/src/index.ts b/packages/common/src/index.ts index 1b7aecddbe..f69cf9772f 100644 --- a/packages/common/src/index.ts +++ b/packages/common/src/index.ts @@ -5,7 +5,7 @@ export type { Common } from './Common.js' export { type CustomCrypto, type StorageDump, - type EVMStateManagerInterface as EvmStateManagerInterface, + type StateManagerInterface as StateManagerInterface, type AccountFields, type StorageRange, ConsensusAlgorithm, diff --git a/packages/errors/src/ethereum/ethereumjs/AuthCallUnsetError.js b/packages/errors/src/ethereum/ethereumjs/AuthCallUnsetError.js deleted file mode 100644 index 4597d7676b..0000000000 --- a/packages/errors/src/ethereum/ethereumjs/AuthCallUnsetError.js +++ /dev/null @@ -1,92 +0,0 @@ -import { EVMErrorMessage } from '@ethereumjs/evm' -import { ExecutionError } from '../ExecutionErrorError.js' - -/** - * Parameters for constructing a {@link AuthCallUnsetError}. - * @typedef {Object} AuthCallUnsetErrorParameters - * @property {string} [docsBaseUrl] - Base URL for the documentation. - * @property {string} [docsPath] - Path to the documentation. - * @property {string} [docsSlug] - Slug for the documentation. - * @property {string[]} [metaMessages] - Additional meta messages. - * @property {ExecutionError|import('@ethereumjs/evm').EvmError} [cause] - The cause of the error. - * @property {string} [details] - Details of the error. - * @property {object} [meta] - Optional object containing additional information about the error. - */ - -/** - * Represents an EIP-3074 specific error that occurs when attempting to AUTHCALL without AUTH set. - * - * AuthCallUnset errors can occur due to: - * - Attempting to execute an AUTHCALL without setting the necessary authorization. - * - * To debug an AuthCallUnset error: - * 1. **Review Authorization Logic**: Ensure that the necessary authorization is set before executing an AUTHCALL. - * 2. **Use TEVM Tracing**: Utilize TEVM tracing to step through the contract execution and identify where the AUTHCALL is attempted without AUTH set. - * - * @example - * ```typescript - * import { AuthCallUnsetError } from '@tevm/errors' - * try { - * // Some operation that can throw an AuthCallUnsetError - * } catch (error) { - * if (error instanceof AuthCallUnsetError) { - * console.error(error.message); - * // Handle the AuthCallUnset error - * } - * } - * ``` - * - * @param {string} [message='AuthCallUnset error occurred.'] - A human-readable error message. - * @param {AuthCallUnsetErrorParameters} [args={}] - Additional parameters for the BaseError. - * @property {'AuthCallUnsetError'} _tag - Same as name, used internally. - * @property {'AuthCallUnsetError'} name - The name of the error, used to discriminate errors. - * @property {string} message - Human-readable error message. - * @property {object} [meta] - Optional object containing additional information about the error. - * @property {number} code - Error code, analogous to the code in JSON RPC error. - * @property {string} docsPath - Path to the documentation for this error. - * @property {string[]} [metaMessages] - Additional meta messages for more context. - */ -export class AuthCallUnsetError extends ExecutionError { - static EVMErrorMessage = EVMErrorMessage.AUTHCALL_UNSET - /** - * Constructs an AuthCallUnsetError. - * Represents an EIP-3074 specific error that occurs when attempting to AUTHCALL without AUTH set. - * - * AuthCallUnset errors can occur due to: - * - Attempting to execute an AUTHCALL without setting the necessary authorization. - * - * To debug an AuthCallUnset error: - * 1. **Review Authorization Logic**: Ensure that the necessary authorization is set before executing an AUTHCALL. - * 2. **Use TEVM Tracing**: Utilize TEVM tracing to step through the contract execution and identify where the AUTHCALL is attempted without AUTH set. - * - * @param {string} [message='AuthCallUnset error occurred.'] - Human-readable error message. - * @param {AuthCallUnsetErrorParameters} [args={}] - Additional parameters for the BaseError. - * @param {string} [tag='AuthCallUnsetError'] - The tag for the error. - */ - constructor(message = 'AuthCallUnset error occurred.', args = {}, tag = 'AuthCallUnsetError') { - super( - message, - { - ...args, - docsBaseUrl: args.docsBaseUrl ?? 'https://tevm.sh', - docsPath: args.docsPath ?? '/reference/tevm/errors/classes/authcallunseterror/', - }, - tag, - ) - - /** - * @type {string} - * @override - */ - this.message = message - - /** - * @type {object|undefined} - */ - this.meta = args.meta - /** - * @type {'AuthCallUnsetError'} - */ - this._tag = 'AuthCallUnsetError' - } -} diff --git a/packages/errors/src/ethereum/ethereumjs/index.ts b/packages/errors/src/ethereum/ethereumjs/index.ts index 39cc48a597..e0eaf94e02 100644 --- a/packages/errors/src/ethereum/ethereumjs/index.ts +++ b/packages/errors/src/ethereum/ethereumjs/index.ts @@ -1,6 +1,5 @@ // index.ts -export { AuthCallUnsetError, type AuthCallUnsetErrorParameters } from './AuthCallUnsetError.js' export { BLS12381FpNotInFieldError, type BLS12381FpNotInFieldErrorParameters } from './BLS12381FpNotInFieldError.js' export { BLS12381InputEmptyError, type BLS12381InputEmptyErrorParameters } from './BLS12381InputEmptyError.js' export { diff --git a/packages/errors/src/ethereum/index.ts b/packages/errors/src/ethereum/index.ts index cb0349e7f1..85f86632f7 100644 --- a/packages/errors/src/ethereum/index.ts +++ b/packages/errors/src/ethereum/index.ts @@ -45,8 +45,6 @@ export { UnknownBlockError, type UnknownBlockErrorParameters } from './UnknownBl export { UnsupportedChainError, type UnsupportedChainErrorParameters } from './UnsupportedChainError.js' export { AccountNotFoundError } from './AccountNotFoundError.js' export { - AuthCallUnsetError, - type AuthCallUnsetErrorParameters, BLS12381FpNotInFieldError, type BLS12381FpNotInFieldErrorParameters, BLS12381InputEmptyError, diff --git a/packages/errors/src/index.ts b/packages/errors/src/index.ts index fede58540c..2212ca9404 100644 --- a/packages/errors/src/index.ts +++ b/packages/errors/src/index.ts @@ -136,7 +136,6 @@ export { InternalEvmError, InvalidJumpError, InvalidProofError, - AuthCallUnsetError, StackOverflowError, InvalidJumpSubError, StackUnderflowError, @@ -162,7 +161,6 @@ export { type InvalidJumpErrorParameters, CodeSizeExceedsMaximumError, type InvalidProofErrorParameters, - type AuthCallUnsetErrorParameters, BLS12381PointNotOnCurveError, type StackOverflowErrorParameters, type InvalidJumpSubErrorParameters, diff --git a/packages/evm/docs/interfaces/InterpreterStep.md b/packages/evm/docs/interfaces/InterpreterStep.md index 4be32897ea..97403f6c6e 100644 --- a/packages/evm/docs/interfaces/InterpreterStep.md +++ b/packages/evm/docs/interfaces/InterpreterStep.md @@ -136,7 +136,7 @@ node\_modules/.pnpm/@ethereumjs+evm@3.1.0/node\_modules/@ethereumjs/evm/dist/esm ### stateManager -> **stateManager**: `EVMStateManagerInterface` +> **stateManager**: `StateManagerInterface` #### Defined in diff --git a/packages/state/docs/interfaces/StateManager.md b/packages/state/docs/interfaces/StateManager.md index 54ff985a78..1b13db3fb6 100644 --- a/packages/state/docs/interfaces/StateManager.md +++ b/packages/state/docs/interfaces/StateManager.md @@ -8,7 +8,7 @@ ## Extends -- `EVMStateManagerInterface` +- `StateManagerInterface` ## Properties @@ -64,7 +64,7 @@ Returns contract addresses #### Inherited from -`EvmStateManagerInterface.originalStorageCache` +`StateManagerInterface.originalStorageCache` #### Defined in @@ -102,7 +102,7 @@ node\_modules/.pnpm/@ethereumjs+common@4.4.0/node\_modules/@ethereumjs/common/di #### Inherited from -`EvmStateManagerInterface.checkChunkWitnessPresent` +`StateManagerInterface.checkChunkWitnessPresent` #### Defined in @@ -120,7 +120,7 @@ node\_modules/.pnpm/@ethereumjs+common@4.4.0/node\_modules/@ethereumjs/common/di #### Inherited from -`EvmStateManagerInterface.checkpoint` +`StateManagerInterface.checkpoint` #### Defined in @@ -158,7 +158,7 @@ Resets all internal caches #### Inherited from -`EvmStateManagerInterface.clearContractStorage` +`StateManagerInterface.clearContractStorage` #### Defined in @@ -188,7 +188,7 @@ This api is not stable #### Overrides -`EvmStateManagerInterface.commit` +`StateManagerInterface.commit` #### Defined in @@ -226,7 +226,7 @@ Returns a new instance of the ForkStateManager with the same opts and all storag #### Inherited from -`EvmStateManagerInterface.deleteAccount` +`StateManagerInterface.deleteAccount` #### Defined in @@ -264,7 +264,7 @@ Dumps the state of the state manager as a [TevmState](../type-aliases/TevmState. #### Inherited from -`EvmStateManagerInterface.dumpStorage` +`StateManagerInterface.dumpStorage` #### Defined in @@ -290,7 +290,7 @@ node\_modules/.pnpm/@ethereumjs+common@4.4.0/node\_modules/@ethereumjs/common/di #### Inherited from -`EvmStateManagerInterface.dumpStorageRange` +`StateManagerInterface.dumpStorageRange` #### Defined in @@ -312,7 +312,7 @@ node\_modules/.pnpm/@ethereumjs+common@4.4.0/node\_modules/@ethereumjs/common/di #### Inherited from -`EvmStateManagerInterface.generateCanonicalGenesis` +`StateManagerInterface.generateCanonicalGenesis` #### Defined in @@ -334,7 +334,7 @@ node\_modules/.pnpm/@ethereumjs+common@4.4.0/node\_modules/@ethereumjs/common/di #### Inherited from -`EvmStateManagerInterface.getAccount` +`StateManagerInterface.getAccount` #### Defined in @@ -356,7 +356,7 @@ node\_modules/.pnpm/@ethereumjs+common@4.4.0/node\_modules/@ethereumjs/common/di #### Inherited from -`EvmStateManagerInterface.getAppliedKey` +`StateManagerInterface.getAppliedKey` #### Defined in @@ -378,7 +378,7 @@ node\_modules/.pnpm/@ethereumjs+common@4.4.0/node\_modules/@ethereumjs/common/di #### Inherited from -`EvmStateManagerInterface.getContractCode` +`StateManagerInterface.getContractCode` #### Defined in @@ -400,7 +400,7 @@ node\_modules/.pnpm/@ethereumjs+common@4.4.0/node\_modules/@ethereumjs/common/di #### Inherited from -`EvmStateManagerInterface.getContractCodeSize` +`StateManagerInterface.getContractCodeSize` #### Defined in @@ -424,7 +424,7 @@ node\_modules/.pnpm/@ethereumjs+common@4.4.0/node\_modules/@ethereumjs/common/di #### Inherited from -`EvmStateManagerInterface.getContractStorage` +`StateManagerInterface.getContractStorage` #### Defined in @@ -448,7 +448,7 @@ node\_modules/.pnpm/@ethereumjs+common@4.4.0/node\_modules/@ethereumjs/common/di #### Inherited from -`EvmStateManagerInterface.getProof` +`StateManagerInterface.getProof` #### Defined in @@ -466,7 +466,7 @@ node\_modules/.pnpm/@ethereumjs+common@4.4.0/node\_modules/@ethereumjs/common/di #### Inherited from -`EvmStateManagerInterface.getStateRoot` +`StateManagerInterface.getStateRoot` #### Defined in @@ -488,7 +488,7 @@ node\_modules/.pnpm/@ethereumjs+common@4.4.0/node\_modules/@ethereumjs/common/di #### Inherited from -`EvmStateManagerInterface.hasStateRoot` +`StateManagerInterface.hasStateRoot` #### Defined in @@ -512,7 +512,7 @@ node\_modules/.pnpm/@ethereumjs+common@4.4.0/node\_modules/@ethereumjs/common/di #### Inherited from -`EvmStateManagerInterface.modifyAccountFields` +`StateManagerInterface.modifyAccountFields` #### Defined in @@ -536,7 +536,7 @@ node\_modules/.pnpm/@ethereumjs+common@4.4.0/node\_modules/@ethereumjs/common/di #### Inherited from -`EvmStateManagerInterface.putAccount` +`StateManagerInterface.putAccount` #### Defined in @@ -560,7 +560,7 @@ node\_modules/.pnpm/@ethereumjs+common@4.4.0/node\_modules/@ethereumjs/common/di #### Inherited from -`EvmStateManagerInterface.putContractCode` +`StateManagerInterface.putContractCode` #### Defined in @@ -586,7 +586,7 @@ node\_modules/.pnpm/@ethereumjs+common@4.4.0/node\_modules/@ethereumjs/common/di #### Inherited from -`EvmStateManagerInterface.putContractStorage` +`StateManagerInterface.putContractStorage` #### Defined in @@ -604,7 +604,7 @@ node\_modules/.pnpm/@ethereumjs+common@4.4.0/node\_modules/@ethereumjs/common/di #### Inherited from -`EvmStateManagerInterface.revert` +`StateManagerInterface.revert` #### Defined in @@ -653,7 +653,7 @@ THis API is considered unstable #### Inherited from -`EvmStateManagerInterface.setStateRoot` +`StateManagerInterface.setStateRoot` #### Defined in @@ -663,7 +663,7 @@ node\_modules/.pnpm/@ethereumjs+common@4.4.0/node\_modules/@ethereumjs/common/di ### shallowCopy() -> **shallowCopy**(`downlevelCaches`?): `EVMStateManagerInterface` +> **shallowCopy**(`downlevelCaches`?): `StateManagerInterface` #### Parameters @@ -671,11 +671,11 @@ node\_modules/.pnpm/@ethereumjs+common@4.4.0/node\_modules/@ethereumjs/common/di #### Returns -`EVMStateManagerInterface` +`StateManagerInterface` #### Inherited from -`EvmStateManagerInterface.shallowCopy` +`StateManagerInterface.shallowCopy` #### Defined in diff --git a/packages/state/src/StateManager.ts b/packages/state/src/StateManager.ts index abfb3bd585..d64faac34d 100644 --- a/packages/state/src/StateManager.ts +++ b/packages/state/src/StateManager.ts @@ -1,9 +1,9 @@ -import type { EvmStateManagerInterface } from '@tevm/common' +import type { StateManagerInterface } from '@tevm/common' import type { Address } from 'viem' import type { BaseState } from './BaseState.js' import type { TevmState } from './state-types/index.js' -export interface StateManager extends EvmStateManagerInterface { +export interface StateManager extends StateManagerInterface { /** * The internal state representation */ diff --git a/packages/utils/src/ethereumjs.js b/packages/utils/src/ethereumjs.js index cc17623a72..25a9726aa0 100644 --- a/packages/utils/src/ethereumjs.js +++ b/packages/utils/src/ethereumjs.js @@ -18,7 +18,14 @@ export { KECCAK256_RLP_ARRAY, ecrecover, ecsign, - zeros, randomBytes, AsyncEventEmitter, } from '@ethereumjs/util' +/** + * Returns a Uint8Array filled with zeros of the specified length. + * @param {number} length - The length of the Uint8Array to create. + * @returns {Uint8Array} A new Uint8Array filled with zeros. + */ +export function zeros(length) { + return new Uint8Array(length).fill(0) +} diff --git a/packages/utils/src/index.ts b/packages/utils/src/index.ts index f6b372aae3..e768b45410 100644 --- a/packages/utils/src/index.ts +++ b/packages/utils/src/index.ts @@ -115,7 +115,7 @@ export type { AddressLike, BigIntLike, BytesLike, - JsonRpcWithdrawal, + JSONRPCWithdrawal as JsonRpcWithdrawal, } from '@ethereumjs/util' export type { Log as EthjsLog } from '@ethereumjs/evm' export type { diff --git a/tevm/docs/common/README.md b/tevm/docs/common/README.md index d9f5b179b7..6aa552adb0 100644 --- a/tevm/docs/common/README.md +++ b/tevm/docs/common/README.md @@ -16,7 +16,7 @@ ### Interfaces - [CustomCrypto](interfaces/CustomCrypto.md) -- [EvmStateManagerInterface](interfaces/EvmStateManagerInterface.md) +- [StateManagerInterface](interfaces/StateManagerInterface.md) - [StorageDump](interfaces/StorageDump.md) - [StorageRange](interfaces/StorageRange.md) diff --git a/tevm/docs/common/interfaces/EvmStateManagerInterface.md b/tevm/docs/common/interfaces/EvmStateManagerInterface.md index e0b0bf696a..269bf8878a 100644 --- a/tevm/docs/common/interfaces/EvmStateManagerInterface.md +++ b/tevm/docs/common/interfaces/EvmStateManagerInterface.md @@ -2,9 +2,9 @@ *** -[tevm](../../modules.md) / [common](../README.md) / EvmStateManagerInterface +[tevm](../../modules.md) / [common](../README.md) / StateManagerInterface -# Interface: EvmStateManagerInterface +# Interface: StateManagerInterface ## Extends @@ -524,7 +524,7 @@ node\_modules/.pnpm/@ethereumjs+common@4.4.0/node\_modules/@ethereumjs/common/di ### shallowCopy() -> **shallowCopy**(`downlevelCaches`?): [`EvmStateManagerInterface`](EvmStateManagerInterface.md) +> **shallowCopy**(`downlevelCaches`?): [`StateManagerInterface`](StateManagerInterface.md) #### Parameters @@ -532,7 +532,7 @@ node\_modules/.pnpm/@ethereumjs+common@4.4.0/node\_modules/@ethereumjs/common/di #### Returns -[`EvmStateManagerInterface`](EvmStateManagerInterface.md) +[`StateManagerInterface`](StateManagerInterface.md) #### Overrides diff --git a/tevm/docs/evm/interfaces/InterpreterStep.md b/tevm/docs/evm/interfaces/InterpreterStep.md index 1cc60f09cd..73b8240dea 100644 --- a/tevm/docs/evm/interfaces/InterpreterStep.md +++ b/tevm/docs/evm/interfaces/InterpreterStep.md @@ -136,7 +136,7 @@ node\_modules/.pnpm/@ethereumjs+evm@3.1.0/node\_modules/@ethereumjs/evm/dist/esm ### stateManager -> **stateManager**: [`EvmStateManagerInterface`](../../common/interfaces/EvmStateManagerInterface.md) +> **stateManager**: [`StateManagerInterface`](../../common/interfaces/StateManagerInterface.md) #### Defined in diff --git a/tevm/docs/state/interfaces/StateManager.md b/tevm/docs/state/interfaces/StateManager.md index ecdd045ca4..c9bf1e6b09 100644 --- a/tevm/docs/state/interfaces/StateManager.md +++ b/tevm/docs/state/interfaces/StateManager.md @@ -8,7 +8,7 @@ ## Extends -- [`EvmStateManagerInterface`](../../common/interfaces/EvmStateManagerInterface.md) +- [`StateManagerInterface`](../../common/interfaces/StateManagerInterface.md) ## Properties @@ -64,7 +64,7 @@ packages/state/dist/index.d.ts:132 #### Inherited from -[`EvmStateManagerInterface`](../../common/interfaces/EvmStateManagerInterface.md).[`originalStorageCache`](../../common/interfaces/EvmStateManagerInterface.md#originalstoragecache) +[`StateManagerInterface`](../../common/interfaces/StateManagerInterface.md).[`originalStorageCache`](../../common/interfaces/StateManagerInterface.md#originalstoragecache) #### Defined in @@ -102,7 +102,7 @@ packages/state/dist/index.d.ts:128 #### Inherited from -[`EvmStateManagerInterface`](../../common/interfaces/EvmStateManagerInterface.md).[`checkChunkWitnessPresent`](../../common/interfaces/EvmStateManagerInterface.md#checkchunkwitnesspresent) +[`StateManagerInterface`](../../common/interfaces/StateManagerInterface.md).[`checkChunkWitnessPresent`](../../common/interfaces/StateManagerInterface.md#checkchunkwitnesspresent) #### Defined in @@ -120,7 +120,7 @@ node\_modules/.pnpm/@ethereumjs+common@4.4.0/node\_modules/@ethereumjs/common/di #### Inherited from -[`EvmStateManagerInterface`](../../common/interfaces/EvmStateManagerInterface.md).[`checkpoint`](../../common/interfaces/EvmStateManagerInterface.md#checkpoint) +[`StateManagerInterface`](../../common/interfaces/StateManagerInterface.md).[`checkpoint`](../../common/interfaces/StateManagerInterface.md#checkpoint) #### Defined in @@ -158,7 +158,7 @@ packages/state/dist/index.d.ts:144 #### Inherited from -[`EvmStateManagerInterface`](../../common/interfaces/EvmStateManagerInterface.md).[`clearContractStorage`](../../common/interfaces/EvmStateManagerInterface.md#clearcontractstorage) +[`StateManagerInterface`](../../common/interfaces/StateManagerInterface.md).[`clearContractStorage`](../../common/interfaces/StateManagerInterface.md#clearcontractstorage) #### Defined in @@ -188,7 +188,7 @@ This api is not stable #### Overrides -[`EvmStateManagerInterface`](../../common/interfaces/EvmStateManagerInterface.md).[`commit`](../../common/interfaces/EvmStateManagerInterface.md#commit) +[`StateManagerInterface`](../../common/interfaces/StateManagerInterface.md).[`commit`](../../common/interfaces/StateManagerInterface.md#commit) #### Defined in @@ -226,7 +226,7 @@ packages/state/dist/index.d.ts:136 #### Inherited from -[`EvmStateManagerInterface`](../../common/interfaces/EvmStateManagerInterface.md).[`deleteAccount`](../../common/interfaces/EvmStateManagerInterface.md#deleteaccount) +[`StateManagerInterface`](../../common/interfaces/StateManagerInterface.md).[`deleteAccount`](../../common/interfaces/StateManagerInterface.md#deleteaccount) #### Defined in @@ -264,7 +264,7 @@ packages/state/dist/index.d.ts:140 #### Inherited from -[`EvmStateManagerInterface`](../../common/interfaces/EvmStateManagerInterface.md).[`dumpStorage`](../../common/interfaces/EvmStateManagerInterface.md#dumpstorage) +[`StateManagerInterface`](../../common/interfaces/StateManagerInterface.md).[`dumpStorage`](../../common/interfaces/StateManagerInterface.md#dumpstorage) #### Defined in @@ -290,7 +290,7 @@ node\_modules/.pnpm/@ethereumjs+common@4.4.0/node\_modules/@ethereumjs/common/di #### Inherited from -[`EvmStateManagerInterface`](../../common/interfaces/EvmStateManagerInterface.md).[`dumpStorageRange`](../../common/interfaces/EvmStateManagerInterface.md#dumpstoragerange) +[`StateManagerInterface`](../../common/interfaces/StateManagerInterface.md).[`dumpStorageRange`](../../common/interfaces/StateManagerInterface.md#dumpstoragerange) #### Defined in @@ -312,7 +312,7 @@ node\_modules/.pnpm/@ethereumjs+common@4.4.0/node\_modules/@ethereumjs/common/di #### Inherited from -[`EvmStateManagerInterface`](../../common/interfaces/EvmStateManagerInterface.md).[`generateCanonicalGenesis`](../../common/interfaces/EvmStateManagerInterface.md#generatecanonicalgenesis) +[`StateManagerInterface`](../../common/interfaces/StateManagerInterface.md).[`generateCanonicalGenesis`](../../common/interfaces/StateManagerInterface.md#generatecanonicalgenesis) #### Defined in @@ -334,7 +334,7 @@ node\_modules/.pnpm/@ethereumjs+common@4.4.0/node\_modules/@ethereumjs/common/di #### Inherited from -[`EvmStateManagerInterface`](../../common/interfaces/EvmStateManagerInterface.md).[`getAccount`](../../common/interfaces/EvmStateManagerInterface.md#getaccount) +[`StateManagerInterface`](../../common/interfaces/StateManagerInterface.md).[`getAccount`](../../common/interfaces/StateManagerInterface.md#getaccount) #### Defined in @@ -356,7 +356,7 @@ node\_modules/.pnpm/@ethereumjs+common@4.4.0/node\_modules/@ethereumjs/common/di #### Inherited from -[`EvmStateManagerInterface`](../../common/interfaces/EvmStateManagerInterface.md).[`getAppliedKey`](../../common/interfaces/EvmStateManagerInterface.md#getappliedkey) +[`StateManagerInterface`](../../common/interfaces/StateManagerInterface.md).[`getAppliedKey`](../../common/interfaces/StateManagerInterface.md#getappliedkey) #### Defined in @@ -378,7 +378,7 @@ node\_modules/.pnpm/@ethereumjs+common@4.4.0/node\_modules/@ethereumjs/common/di #### Inherited from -[`EvmStateManagerInterface`](../../common/interfaces/EvmStateManagerInterface.md).[`getContractCode`](../../common/interfaces/EvmStateManagerInterface.md#getcontractcode) +[`StateManagerInterface`](../../common/interfaces/StateManagerInterface.md).[`getContractCode`](../../common/interfaces/StateManagerInterface.md#getcontractcode) #### Defined in @@ -400,7 +400,7 @@ node\_modules/.pnpm/@ethereumjs+common@4.4.0/node\_modules/@ethereumjs/common/di #### Inherited from -[`EvmStateManagerInterface`](../../common/interfaces/EvmStateManagerInterface.md).[`getContractCodeSize`](../../common/interfaces/EvmStateManagerInterface.md#getcontractcodesize) +[`StateManagerInterface`](../../common/interfaces/StateManagerInterface.md).[`getContractCodeSize`](../../common/interfaces/StateManagerInterface.md#getcontractcodesize) #### Defined in @@ -424,7 +424,7 @@ node\_modules/.pnpm/@ethereumjs+common@4.4.0/node\_modules/@ethereumjs/common/di #### Inherited from -[`EvmStateManagerInterface`](../../common/interfaces/EvmStateManagerInterface.md).[`getContractStorage`](../../common/interfaces/EvmStateManagerInterface.md#getcontractstorage) +[`StateManagerInterface`](../../common/interfaces/StateManagerInterface.md).[`getContractStorage`](../../common/interfaces/StateManagerInterface.md#getcontractstorage) #### Defined in @@ -448,7 +448,7 @@ node\_modules/.pnpm/@ethereumjs+common@4.4.0/node\_modules/@ethereumjs/common/di #### Inherited from -[`EvmStateManagerInterface`](../../common/interfaces/EvmStateManagerInterface.md).[`getProof`](../../common/interfaces/EvmStateManagerInterface.md#getproof) +[`StateManagerInterface`](../../common/interfaces/StateManagerInterface.md).[`getProof`](../../common/interfaces/StateManagerInterface.md#getproof) #### Defined in @@ -466,7 +466,7 @@ node\_modules/.pnpm/@ethereumjs+common@4.4.0/node\_modules/@ethereumjs/common/di #### Inherited from -[`EvmStateManagerInterface`](../../common/interfaces/EvmStateManagerInterface.md).[`getStateRoot`](../../common/interfaces/EvmStateManagerInterface.md#getstateroot) +[`StateManagerInterface`](../../common/interfaces/StateManagerInterface.md).[`getStateRoot`](../../common/interfaces/StateManagerInterface.md#getstateroot) #### Defined in @@ -488,7 +488,7 @@ node\_modules/.pnpm/@ethereumjs+common@4.4.0/node\_modules/@ethereumjs/common/di #### Inherited from -[`EvmStateManagerInterface`](../../common/interfaces/EvmStateManagerInterface.md).[`hasStateRoot`](../../common/interfaces/EvmStateManagerInterface.md#hasstateroot) +[`StateManagerInterface`](../../common/interfaces/StateManagerInterface.md).[`hasStateRoot`](../../common/interfaces/StateManagerInterface.md#hasstateroot) #### Defined in @@ -512,7 +512,7 @@ node\_modules/.pnpm/@ethereumjs+common@4.4.0/node\_modules/@ethereumjs/common/di #### Inherited from -[`EvmStateManagerInterface`](../../common/interfaces/EvmStateManagerInterface.md).[`modifyAccountFields`](../../common/interfaces/EvmStateManagerInterface.md#modifyaccountfields) +[`StateManagerInterface`](../../common/interfaces/StateManagerInterface.md).[`modifyAccountFields`](../../common/interfaces/StateManagerInterface.md#modifyaccountfields) #### Defined in @@ -536,7 +536,7 @@ node\_modules/.pnpm/@ethereumjs+common@4.4.0/node\_modules/@ethereumjs/common/di #### Inherited from -[`EvmStateManagerInterface`](../../common/interfaces/EvmStateManagerInterface.md).[`putAccount`](../../common/interfaces/EvmStateManagerInterface.md#putaccount) +[`StateManagerInterface`](../../common/interfaces/StateManagerInterface.md).[`putAccount`](../../common/interfaces/StateManagerInterface.md#putaccount) #### Defined in @@ -560,7 +560,7 @@ node\_modules/.pnpm/@ethereumjs+common@4.4.0/node\_modules/@ethereumjs/common/di #### Inherited from -[`EvmStateManagerInterface`](../../common/interfaces/EvmStateManagerInterface.md).[`putContractCode`](../../common/interfaces/EvmStateManagerInterface.md#putcontractcode) +[`StateManagerInterface`](../../common/interfaces/StateManagerInterface.md).[`putContractCode`](../../common/interfaces/StateManagerInterface.md#putcontractcode) #### Defined in @@ -586,7 +586,7 @@ node\_modules/.pnpm/@ethereumjs+common@4.4.0/node\_modules/@ethereumjs/common/di #### Inherited from -[`EvmStateManagerInterface`](../../common/interfaces/EvmStateManagerInterface.md).[`putContractStorage`](../../common/interfaces/EvmStateManagerInterface.md#putcontractstorage) +[`StateManagerInterface`](../../common/interfaces/StateManagerInterface.md).[`putContractStorage`](../../common/interfaces/StateManagerInterface.md#putcontractstorage) #### Defined in @@ -604,7 +604,7 @@ node\_modules/.pnpm/@ethereumjs+common@4.4.0/node\_modules/@ethereumjs/common/di #### Inherited from -[`EvmStateManagerInterface`](../../common/interfaces/EvmStateManagerInterface.md).[`revert`](../../common/interfaces/EvmStateManagerInterface.md#revert) +[`StateManagerInterface`](../../common/interfaces/StateManagerInterface.md).[`revert`](../../common/interfaces/StateManagerInterface.md#revert) #### Defined in @@ -653,7 +653,7 @@ packages/state/dist/index.d.ts:150 #### Inherited from -[`EvmStateManagerInterface`](../../common/interfaces/EvmStateManagerInterface.md).[`setStateRoot`](../../common/interfaces/EvmStateManagerInterface.md#setstateroot) +[`StateManagerInterface`](../../common/interfaces/StateManagerInterface.md).[`setStateRoot`](../../common/interfaces/StateManagerInterface.md#setstateroot) #### Defined in @@ -663,7 +663,7 @@ node\_modules/.pnpm/@ethereumjs+common@4.4.0/node\_modules/@ethereumjs/common/di ### shallowCopy() -> **shallowCopy**(`downlevelCaches`?): [`EvmStateManagerInterface`](../../common/interfaces/EvmStateManagerInterface.md) +> **shallowCopy**(`downlevelCaches`?): [`StateManagerInterface`](../../common/interfaces/StateManagerInterface.md) #### Parameters @@ -671,11 +671,11 @@ node\_modules/.pnpm/@ethereumjs+common@4.4.0/node\_modules/@ethereumjs/common/di #### Returns -[`EvmStateManagerInterface`](../../common/interfaces/EvmStateManagerInterface.md) +[`StateManagerInterface`](../../common/interfaces/StateManagerInterface.md) #### Inherited from -[`EvmStateManagerInterface`](../../common/interfaces/EvmStateManagerInterface.md).[`shallowCopy`](../../common/interfaces/EvmStateManagerInterface.md#shallowcopy) +[`StateManagerInterface`](../../common/interfaces/StateManagerInterface.md).[`shallowCopy`](../../common/interfaces/StateManagerInterface.md#shallowcopy) #### Defined in