You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
547 B
35 lines
547 B
|
|
#pragma once
|
|
|
|
#include <vector>
|
|
|
|
#include <libevm/ExtVMFace.h>
|
|
|
|
#include "Utils.h"
|
|
|
|
namespace evmcc
|
|
{
|
|
|
|
using StackImpl = std::vector<i256>;
|
|
using MemoryImpl = dev::bytes;
|
|
|
|
class Runtime
|
|
{
|
|
public:
|
|
Runtime(std::unique_ptr<dev::eth::ExtVMFace> _ext);
|
|
~Runtime();
|
|
|
|
Runtime(const Runtime&) = delete;
|
|
void operator=(const Runtime&) = delete;
|
|
|
|
static StackImpl& getStack();
|
|
static MemoryImpl& getMemory();
|
|
static dev::eth::ExtVMFace& getExt();
|
|
|
|
private:
|
|
StackImpl m_stack;
|
|
MemoryImpl m_memory;
|
|
std::unique_ptr<dev::eth::ExtVMFace> m_ext;
|
|
};
|
|
|
|
}
|