#pragma once #include #include #include "Utils.h" #ifdef _MSC_VER #define EXPORT __declspec(dllexport) #else #define EXPORT #endif namespace evmcc { using StackImpl = std::vector; using MemoryImpl = dev::bytes; class Runtime { public: Runtime(dev::u256 _gas, std::unique_ptr _ext); ~Runtime(); Runtime(const Runtime&) = delete; void operator=(const Runtime&) = delete; static StackImpl& getStack(); static MemoryImpl& getMemory(); static dev::eth::ExtVMFace& getExt(); static dev::u256 getGas(); private: StackImpl m_stack; MemoryImpl m_memory; std::unique_ptr m_ext; }; }