import VM from 'ethereumts-vm'; import { Transaction } from 'ethereumjs-tx'; import { RpcTransactionReceipt, RpcTransactionResponse, RpcBlockResponse } from '../model'; import { TestChainOptions } from '../TestChainOptions'; import { Hash, Address, Quantity, HexData } from '../primitives'; import { DethStateManger } from './storage/DethStateManger'; import { DethBlockchain } from './storage/DethBlockchain'; import { SnapshotObject } from './storage/SnapshotObject'; interface VMSnapshot { blockchain: DethBlockchain; stateManager: DethStateManger; } /** * TestVM is a wrapper around ethereumts-vm (our fork). It provides a promise-based * interface and abstracts away weird ethereumjs specific details */ export declare class TestVM { private options; vm: VM; state: SnapshotObject<{ stateManger: DethStateManger; blockchain: DethBlockchain; }>; pendingTransactions: Transaction[]; transactions: Map; receipts: Map; snapshots: VMSnapshot[]; constructor(options: TestChainOptions); init(): Promise; installStepHook(hook: Function): void; makeSnapshot(): number; revertToSnapshot(id: number): void; private hotswapStateStorageForVm; getBlockNumber(): Promise; getLatestBlock(): Promise; addPendingTransaction(signedTransaction: HexData): Promise; mineBlock(clockSkew: number): Promise; getTransaction(hash: Hash): RpcTransactionResponse | undefined; getTransactionReceipt(hash: Hash): RpcTransactionReceipt | undefined; getNonce(address: Address): Promise>; getBalance(address: Address): Promise>; private getAccount; getCode(address: Address): Promise>; runIsolatedTransaction(transaction: Transaction, clockSkew: number): Promise; getBlock(hashOrNumber: string): Promise; } export {};