import { Address } from 'web3x/address' ; import { BlockchainContext } from '../blockchain' ; import { EvmMemory } from '../memory' ; import { Stack } from '../stack' ; import { Trie } from '../trie' ; import { TxSubstrate } from '../tx/tx-substrate' ; import { WorldState } from '../world/world-state' ; export class EvmContext { public stack = new Stack < bigint > ( ) ; public memory = new EvmMemory ( ) ; public ip = 0 ; public halt = false ; public reverted = false ; public revertInstruction = 0 ; public returned = Buffer . of ( ) ; public lastReturned = Buffer . of ( ) ; public error ? : Error ; constructor ( public worldState , public blockchainCtx , public code = Buffer . of ( ) , public calldata = Buffer . of ( ) , public origin = Address . ZERO , public caller = Address . ZERO , public executor = Address . ZERO , public transferValue = BigInt ( 0 ) , public executionValue = BigInt ( 0 ) , public availableGas = BigInt ( 0 ) , public gasPrice = BigInt ( 0 ) , public storage = new Trie ( ) , public callDepth = 0 , public modify = true , public txSubstrate = new TxSubstrate ( ) ) { } }