46 ExtVM(
State& _s,
EnvInfo const& _envInfo,
SealEngineFace const& _sealEngine,
Address _myAddress,
Address _caller,
Address _origin,
u256 _value,
u256 _gasPrice,
bytesConstRef _data,
bytesConstRef _code,
h256 const& _codeHash,
unsigned _depth = 0):
47 ExtVMFace(_envInfo, _myAddress, _caller, _origin, _value, _gasPrice, _data, _code.toBytes(), _codeHash, _depth),
m_s(_s),
m_sealEngine(_sealEngine)
71 virtual boost::optional<owning_bytes_ref>
call(
CallParameters& _params)
override final;
bool addressInUse(Address const &_address) const
Check if the address is in use.
u256 balance(Address const &_id) const
Get an account's balance.
Adapted from code found on http://stackoverflow.com/questions/180947/base64-decode-snippet-in-c Origi...
bool accountNonemptyAndExisting(Address const &_address) const
Check if the account exists in the state and is non empty (nonce > 0 || balance > 0 || code nonempty)...
virtual bool exists(Address _a) overridefinal
Does the account exist?
virtual boost::optional< owning_bytes_ref > call(CallParameters &_params) overridefinal
Create a new message call. Leave _myAddressOverride as the default to use the present address as call...
State & m_s
A reference to the base state.
virtual void suicide(Address _a) overridefinal
Suicide the associated contract to the given address.
EnvInfo const & envInfo() const
Get the execution environment information.
ExtVM(State &_s, EnvInfo const &_envInfo, SealEngineFace const &_sealEngine, Address _myAddress, Address _caller, Address _origin, u256 _value, u256 _gasPrice, bytesConstRef _data, bytesConstRef _code, h256 const &_codeHash, unsigned _depth=0)
Full constructor.
assert(len-trim+(2 *lenIndices)<=WIDTH)
Model of an Ethereum state, essentially a facade for the trie.
virtual EVMSchedule const & evmSchedule() const overridefinal
Return the EVM gas-price schedule for this execution context.
virtual h160 create(u256 _endowment, u256 &io_gas, bytesConstRef _code, OnOpFunc const &_onOp={}) overridefinal
Create a new contract.
virtual u256 balance(Address _a) overridefinal
Read address's balance.
virtual size_t codeSizeAt(Address _a) overridefinal
std::vector< byte > bytes
u256 storage(Address const &_contract, u256 const &_memory) const
Get the value of a storage position of an account.
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
virtual bytes const & codeAt(Address _a) overridefinal
Read address's code.
bytes const & code(Address const &_addr) const
Get the code of an account.
virtual u256 store(u256 _n) overridefinal
Read storage location.
boost::multiprecision::number< boost::multiprecision::cpp_int_backend< 256, 256, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void >> u256
SealEngineFace const & m_sealEngine
Interface and null implementation of the class for specifying VM externalities.
virtual EVMSchedule const & evmSchedule(EnvInfo const &) const =0
Address myAddress
Address associated with executing code (a contract, or contract-to-be).
Externality interface for the Virtual Machine providing access to world state.
State const & state() const
virtual void setStore(u256 _n, u256 _v) overridefinal
Write a value in storage.