23 #include <json/json.h> 59 bool disableStorage =
false;
60 bool disableMemory =
false;
61 bool disableStack =
false;
62 bool fullStorage =
false;
71 std::string json(
bool _styled =
false)
const;
73 OnOpFunc onOp() {
return [=](uint64_t _steps, uint64_t _PC,
Instruction _inst,
bigint _newMemSize,
bigint _gasCost,
bigint _gas,
VM* _vm,
ExtVMFace const* _extVM) { (*this)(_steps, _PC, _inst, _newMemSize, _gasCost, _gas, _vm, _extVM); }; }
76 bool m_showMnemonics =
false;
151 u256 gasUsed()
const;
163 void accrueSubState(
SubState& _parentContext);
173 static OnOpFunc standardTrace(std::ostream& o_output);
181 bool excepted()
const {
return m_excepted != TransactionException::None; }
197 unsigned m_depth = 0;
209 bool m_isCreation =
false;
211 size_t m_savepoint = 0;
Adapted from code found on http://stackoverflow.com/questions/180947/base64-decode-snippet-in-c Origi...
std::function< void(uint64_t, uint64_t, dev::eth::Instruction, dev::bigint, dev::bigint, dev::bigint, dev::eth::VM *, dev::eth::ExtVMFace const *)> OnOpFunc
Implements the blockchain database.
boost::multiprecision::number< boost::multiprecision::cpp_int_backend<>> bigint
owning_bytes_ref m_output
Execution output.
std::shared_ptr< ExtVM > m_ext
The VM externality object for the VM execution or null if no VM is required. shared_ptr used only to ...
Description of the result of executing a transaction.
std::vector< Instruction > m_lastInst
Model of an Ethereum state, essentially a facade for the trie.
Address newAddress() const
Executive(State &_s, EnvInfo const &_envInfo, SealEngineFace const &_sealEngine, unsigned _level=0)
Simple constructor; executive will operate on given state, with the given environment info...
int64_t m_baseGasRequired
The base amount of gas requried for executing this transaction.
Transaction const & t() const
Active model of a block within the block chain.
LogEntries m_logs
The log entries created by this transaction. Set by finalize().
std::vector< h256 > LastHashes
EnvInfo m_envInfo
Information on the runtime environment.
std::vector< byte > bytes
Fixed-size raw-byte array container type, with an API optimised for storing hashes.
std::function< void(uint64_t, uint64_t, Instruction, bigint, bigint, bigint, VM *, ExtVMFace const *)> OnOpFunc
Message-call/contract-creation executor; useful for executing transactions.
boost::multiprecision::number< boost::multiprecision::cpp_int_backend< 256, 256, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void >> u256
LogEntries const & logs() const
Encodes a transaction, ready to be exported to or freshly imported from RLP.
Instruction
Virtual machine bytecode instruction.
void initialize(bytesConstRef _transaction)
Initializes the executive for evaluating a transaction. You must call finalize() at some point follow...
Interface and null implementation of the class for specifying VM externalities.
Reference to a slice of buffer that also owns the buffer.
State & m_s
The state to which this operation/transaction is applied.
owning_bytes_ref takeOutput()
The default logging channels.
Transaction m_t
The original transaction. Set by setup().
SealEngineFace const & m_sealEngine
std::vector< LogEntry > LogEntries
void setOptions(DebugOptions _options)
void setResultRecipient(ExecutionResult &_res)
Collect execution results in the result storage provided.