11import { Common , Hardfork , Mainnet } from '@ethereumjs/common'
2- import { EVMErrorMessage } from '@ethereumjs/evm'
2+ import { EVMErrorCode } from '@ethereumjs/evm'
33import { Address , bytesToBigInt , hexToBytes } from '@ethereumjs/util'
44import { assert , describe , it } from 'vitest'
55
@@ -8,7 +8,7 @@ import { createAccountWithDefaults } from '../utils.js'
88
99const testCases = [
1010 { chain : Mainnet , hardfork : Hardfork . Istanbul , selfbalance : '0xf1' } ,
11- { chain : Mainnet , hardfork : Hardfork . Constantinople , err : EVMErrorMessage . INVALID_OPCODE } ,
11+ { chain : Mainnet , hardfork : Hardfork . Constantinople , err : EVMErrorCode . INVALID_OPCODE } ,
1212]
1313
1414// SELFBALANCE PUSH8 0x00 MSTORE8 PUSH8 0x01 PUSH8 0x00 RETURN
@@ -35,7 +35,7 @@ describe('Istanbul: EIP-1884', () => {
3535 try {
3636 const res = await vm . evm . runCode ! ( runCodeArgs )
3737 if ( testCase . err !== undefined ) {
38- assert . equal ( res . exceptionError ?. error , testCase . err )
38+ assert . equal ( res . exceptionError ?. type . code , testCase . err )
3939 } else {
4040 assert . ok ( res . exceptionError === undefined )
4141 assert . ok ( BigInt ( testCase . selfbalance ! ) === bytesToBigInt ( res . returnValue ) )
0 commit comments