Skip to content

Commit b58590e

Browse files
committed
Rename exceptions.ts in evm to errors.ts to be uniform with eof errors file
1 parent a9d768d commit b58590e

24 files changed

+24
-24
lines changed
File renamed without changes.

packages/evm/src/evm.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { EventEmitter } from 'eventemitter3'
2121

2222
import { FORMAT } from './eof/constants.ts'
2323
import { isEOF } from './eof/util.ts'
24-
import { EVMError, EvmError } from './exceptions.ts'
24+
import { EVMError, EvmError } from './errors.ts'
2525
import { Interpreter } from './interpreter.ts'
2626
import { Journal } from './journal.ts'
2727
import { EVMPerformanceLogger } from './logger.ts'

packages/evm/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { EOFContainer, validateEOF } from './eof/container.ts'
2+
import { EVMError as EVMErrorMessage, EvmError } from './errors.ts'
23
import { EVM } from './evm.ts'
3-
import { EVMError as EVMErrorMessage, EvmError } from './exceptions.ts'
44
import { Message } from './message.ts'
55
import { getOpcodesForHF } from './opcodes/index.ts'
66
import {

packages/evm/src/interpreter.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { FORMAT, MAGIC, VERSION } from './eof/constants.ts'
1818
import { EOFContainerMode, validateEOF } from './eof/container.ts'
1919
import { setupEOF } from './eof/setup.ts'
2020
import { ContainerSectionType } from './eof/verify.ts'
21-
import { EVMError, EvmError } from './exceptions.ts'
21+
import { EVMError, EvmError } from './errors.ts'
2222
import { type EVMPerformanceLogger, type Timer } from './logger.ts'
2323
import { Memory } from './memory.ts'
2424
import { Message } from './message.ts'

packages/evm/src/opcodes/EIP2200.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { equalsBytes } from '@ethereumjs/util'
22

3-
import { EVMError } from '../exceptions.ts'
3+
import { EVMError } from '../errors.ts'
44

55
import { adjustSstoreGasEIP2929 } from './EIP2929.ts'
66
import { trap } from './util.ts'

packages/evm/src/opcodes/functions.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import { keccak256 } from 'ethereum-cryptography/keccak.js'
3131
import { EOFContainer, EOFContainerMode } from '../eof/container.ts'
3232
import { EOFError } from '../eof/errors.ts'
3333
import { EOFBYTES, EOFHASH, isEOF } from '../eof/util.ts'
34-
import { EVMError } from '../exceptions.ts'
34+
import { EVMError } from '../errors.ts'
3535

3636
import {
3737
createAddressFromStackBigInt,

packages/evm/src/opcodes/gas.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
} from '@ethereumjs/util'
1313

1414
import { EOFError } from '../eof/errors.ts'
15-
import { EVMError } from '../exceptions.ts'
15+
import { EVMError } from '../errors.ts'
1616
import { DELEGATION_7702_FLAG } from '../types.ts'
1717

1818
import { updateSstoreGasEIP1283 } from './EIP1283.ts'

packages/evm/src/opcodes/util.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ import {
1515
} from '@ethereumjs/util'
1616
import { keccak256 } from 'ethereum-cryptography/keccak.js'
1717

18-
import { EvmError } from '../exceptions.ts'
18+
import { EvmError } from '../errors.ts'
1919

2020
import type { Common } from '@ethereumjs/common'
2121
import type { Address } from '@ethereumjs/util'
22-
import type { EVMErrorType } from '../exceptions.ts'
22+
import type { EVMErrorType } from '../errors.ts'
2323
import type { RunState } from '../interpreter.ts'
2424

2525
const MASK_160 = (BIGINT_1 << BIGINT_160) - BIGINT_1

packages/evm/src/precompiles/08-bn254-pairing.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { bytesToHex } from '@ethereumjs/util'
22

3+
import { EVMError, EvmError } from '../errors.ts'
34
import { EvmErrorResult, OOGResult } from '../evm.ts'
4-
import { EVMError, EvmError } from '../exceptions.ts'
55

66
import { getPrecompileName } from './index.ts'
77
import { gasLimitCheck, moduloLengthCheck } from './util.ts'

packages/evm/src/precompiles/09-blake2f.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { bytesToHex } from '@ethereumjs/util'
22

3+
import { EVMError, EvmError } from '../errors.ts'
34
import { OOGResult } from '../evm.ts'
4-
import { EVMError, EvmError } from '../exceptions.ts'
55

66
import { getPrecompileName } from './index.ts'
77
import { gasLimitCheck } from './util.ts'

packages/evm/src/precompiles/0a-kzg-point-evaluation.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import {
77
setLengthLeft,
88
} from '@ethereumjs/util'
99

10+
import { EVMError, EvmError } from '../errors.ts'
1011
import { EvmErrorResult, OOGResult } from '../evm.ts'
11-
import { EVMError, EvmError } from '../exceptions.ts'
1212

1313
import { getPrecompileName } from './index.ts'
1414
import { gasLimitCheck } from './util.ts'

packages/evm/src/precompiles/0b-bls12-g1add.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { bytesToHex } from '@ethereumjs/util'
22

3+
import { EVMError, EvmError } from '../errors.ts'
34
import type { EVM } from '../evm.ts'
45
import { EvmErrorResult, OOGResult } from '../evm.ts'
5-
import { EVMError, EvmError } from '../exceptions.ts'
66

77
import { leading16ZeroBytesCheck } from './bls12_381/index.ts'
88
import { getPrecompileName } from './index.ts'

packages/evm/src/precompiles/0c-bls12-g1msm.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { bytesToHex } from '@ethereumjs/util'
22

3+
import { EVMError, EvmError } from '../errors.ts'
34
import type { EVM } from '../evm.ts'
45
import { EvmErrorResult, OOGResult } from '../evm.ts'
5-
import { EVMError, EvmError } from '../exceptions.ts'
66

77
import {
88
BLS_GAS_DISCOUNT_PAIRS_G1,

packages/evm/src/precompiles/0d-bls12-g2add.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { bytesToHex } from '@ethereumjs/util'
22

3+
import { EVMError, EvmError } from '../errors.ts'
34
import type { EVM } from '../evm.ts'
45
import { EvmErrorResult, OOGResult } from '../evm.ts'
5-
import { EVMError, EvmError } from '../exceptions.ts'
66

77
import { leading16ZeroBytesCheck } from './bls12_381/index.ts'
88
import { getPrecompileName } from './index.ts'

packages/evm/src/precompiles/0e-bls12-g2msm.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { bytesToHex } from '@ethereumjs/util'
22

3+
import { EVMError, EvmError } from '../errors.ts'
34
import type { EVM } from '../evm.ts'
45
import { EvmErrorResult, OOGResult } from '../evm.ts'
5-
import { EVMError, EvmError } from '../exceptions.ts'
66

77
import {
88
BLS_GAS_DISCOUNT_PAIRS_G2,

packages/evm/src/precompiles/0f-bls12-pairing.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { bytesToHex } from '@ethereumjs/util'
22

3+
import { EVMError, EvmError } from '../errors.ts'
34
import type { EVM } from '../evm.ts'
45
import { EvmErrorResult, OOGResult } from '../evm.ts'
5-
import { EVMError, EvmError } from '../exceptions.ts'
66

77
import { leading16ZeroBytesCheck } from './bls12_381/index.ts'
88
import { getPrecompileName } from './index.ts'

packages/evm/src/precompiles/10-bls12-map-fp-to-g1.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { bytesToHex } from '@ethereumjs/util'
22

3+
import { EVMError, EvmError } from '../errors.ts'
34
import type { EVM } from '../evm.ts'
45
import { EvmErrorResult, OOGResult } from '../evm.ts'
5-
import { EVMError, EvmError } from '../exceptions.ts'
66

77
import { leading16ZeroBytesCheck } from './bls12_381/index.ts'
88
import { getPrecompileName } from './index.ts'

packages/evm/src/precompiles/11-bls12-map-fp2-to-g2.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { bytesToHex } from '@ethereumjs/util'
22

3+
import { EVMError, EvmError } from '../errors.ts'
34
import type { EVM } from '../evm.ts'
45
import { EvmErrorResult, OOGResult } from '../evm.ts'
5-
import { EVMError, EvmError } from '../exceptions.ts'
66

77
import { leading16ZeroBytesCheck } from './bls12_381/index.ts'
88
import { getPrecompileName } from './index.ts'

packages/evm/src/precompiles/bls12_381/mcl.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
unprefixedHexToBytes,
88
} from '@ethereumjs/util'
99

10-
import { EVMError, EvmError } from '../../exceptions.ts'
10+
import { EVMError, EvmError } from '../../errors.ts'
1111

1212
import {
1313
BLS_FIELD_MODULUS,

packages/evm/src/precompiles/bls12_381/noble.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
} from '@ethereumjs/util'
99
import { bls12_381 } from '@noble/curves/bls12-381'
1010

11-
import { EVMError, EvmError } from '../../exceptions.ts'
11+
import { EVMError, EvmError } from '../../errors.ts'
1212

1313
import {
1414
BLS_FIELD_MODULUS,

packages/evm/src/precompiles/bn254/noble.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
} from '@ethereumjs/util'
1010
import { bn254 } from '@noble/curves/bn254'
1111

12-
import { EVMError, EvmError } from '../../exceptions.ts'
12+
import { EVMError, EvmError } from '../../errors.ts'
1313

1414
import type { AffinePoint } from '@noble/curves/abstract/weierstrass'
1515
import type { EVMBN254Interface } from '../../types.ts'

packages/evm/src/stack.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { EVMError, EvmError } from './exceptions.ts'
1+
import { EVMError, EvmError } from './errors.ts'
22

33
/**
44
* Implementation of the stack used in evm.

packages/evm/src/types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import type { Account, Address, PrefixedHexString } from '@ethereumjs/util'
99
import type { EventEmitter } from 'eventemitter3'
1010
import type { BinaryTreeAccessWitness } from './binaryTreeAccessWitness.ts'
1111
import type { EOFContainer } from './eof/container.ts'
12-
import type { EvmError } from './exceptions.ts'
12+
import type { EvmError } from './errors.ts'
1313
import type { InterpreterStep, RunState } from './interpreter.ts'
1414
import type { Message } from './message.ts'
1515
import type { AsyncDynamicGasHandler, SyncDynamicGasHandler } from './opcodes/gas.ts'

packages/evm/test/runCall.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ import {
1616
import { keccak256 } from 'ethereum-cryptography/keccak.js'
1717
import { assert, describe, it } from 'vitest'
1818

19+
import { EVMError } from '../src/errors.ts'
1920
import { defaultBlock } from '../src/evm.ts'
20-
import { EVMError } from '../src/exceptions.ts'
2121
import { createEVM } from '../src/index.ts'
2222

2323
import { eip4844Data } from './testdata/eip4844.ts'

0 commit comments

Comments
 (0)