UNPKG

hardhat

Version:

Hardhat is an extensible developer tool that helps smart contract developers increase productivity by reliably bringing together the tools they want.

29 lines 1.43 kB
/// <reference types="node" /> import type { Provider as EdrProviderT } from "@nomicfoundation/edr"; import type { Address } from "@nomicfoundation/ethereumjs-util"; import type { MinimalEVMResult, MinimalInterpreterStep, MinimalMessage } from "./types"; import { AsyncEventEmitter } from "@nomicfoundation/ethereumjs-util"; /** * Used by the provider to keep the `_vm` variable used by some plugins. This * interface only has the things used by those plugins. */ export interface MinimalEthereumJsVm { evm: { events: AsyncEventEmitter<MinimalEthereumJsVmEvents>; }; stateManager: { putContractCode: (address: Address, code: Buffer) => Promise<void>; getContractStorage: (address: Address, slotHash: Buffer) => Promise<Buffer>; putContractStorage: (address: Address, slotHash: Buffer, slotValue: Buffer) => Promise<void>; }; } type MinimalEthereumJsVmEvents = { beforeMessage: (data: MinimalMessage, resolve?: (result?: any) => void) => void; afterMessage: (data: MinimalEVMResult, resolve?: (result?: any) => void) => void; step: (data: MinimalInterpreterStep, resolve?: (result?: any) => void) => void; }; export declare class MinimalEthereumJsVmEventEmitter extends AsyncEventEmitter<MinimalEthereumJsVmEvents> { } export declare function getMinimalEthereumJsVm(provider: EdrProviderT): MinimalEthereumJsVm; export {}; //# sourceMappingURL=minimal-vm.d.ts.map