Fabcoin Core  0.16.2
P2P Digital Currency
Public Member Functions | Public Attributes | Private Attributes | List of all members
dev::eth::ExtVMFace Class Referenceabstract

Interface and null implementation of the class for specifying VM externalities. More...

#include <ExtVMFace.h>

Inheritance diagram for dev::eth::ExtVMFace:
[legend]
Collaboration diagram for dev::eth::ExtVMFace:
[legend]

Public Member Functions

 ExtVMFace ()=default
 Null constructor. More...
 
 ExtVMFace (EnvInfo const &_envInfo, Address _myAddress, Address _caller, Address _origin, u256 _value, u256 _gasPrice, bytesConstRef _data, bytes _code, h256 const &_codeHash, unsigned _depth)
 Full constructor. More...
 
virtual ~ExtVMFace ()=default
 
 ExtVMFace (ExtVMFace const &)=delete
 
ExtVMFaceoperator= (ExtVMFace const &)=delete
 
virtual u256 store (u256)
 Read storage location. More...
 
virtual void setStore (u256, u256)
 Write a value in storage. More...
 
virtual u256 balance (Address)
 Read address's balance. More...
 
virtual bytes const & codeAt (Address)
 Read address's code. More...
 
virtual size_t codeSizeAt (Address)
 
virtual bool exists (Address)
 Does the account exist? More...
 
virtual void suicide (Address)
 Suicide the associated contract and give proceeds to the given address. More...
 
virtual h160 create (u256, u256 &, bytesConstRef, OnOpFunc const &)
 Create a new (contract) account. More...
 
virtual boost::optional< owning_bytes_refcall (CallParameters &)=0
 Make a new message call. More...
 
virtual void log (h256s &&_topics, bytesConstRef _data)
 Revert any changes made (by any of the other calls). More...
 
h256 blockHash (u256 _number)
 Hash of a block if within the last 256 blocks, or h256() otherwise. More...
 
EnvInfo const & envInfo () const
 Get the execution environment information. More...
 
virtual EVMSchedule const & evmSchedule () const
 Return the EVM gas-price schedule for this execution context. More...
 

Public Attributes

Address myAddress
 Address associated with executing code (a contract, or contract-to-be). More...
 
Address caller
 Address which sent the message (either equal to origin or a contract). More...
 
Address origin
 Original transactor. More...
 
u256 value
 Value (in Wei) that was passed to this address. More...
 
u256 gasPrice
 Price of gas (that we already paid). More...
 
bytesConstRef data
 Current input data. More...
 
bytes code
 Current code that is executing. More...
 
h256 codeHash
 SHA3 hash of the executing code. More...
 
SubState sub
 Sub-band VM state (suicides, refund counter, logs). More...
 
unsigned depth = 0
 Depth of the present call. More...
 

Private Attributes

EnvInfo const & m_envInfo
 

Detailed Description

Interface and null implementation of the class for specifying VM externalities.

Definition at line 265 of file ExtVMFace.h.

Constructor & Destructor Documentation

dev::eth::ExtVMFace::ExtVMFace ( )
default

Null constructor.

ExtVMFace::ExtVMFace ( EnvInfo const &  _envInfo,
Address  _myAddress,
Address  _caller,
Address  _origin,
u256  _value,
u256  _gasPrice,
bytesConstRef  _data,
bytes  _code,
h256 const &  _codeHash,
unsigned  _depth 
)

Full constructor.

Definition at line 27 of file ExtVMFace.cpp.

virtual dev::eth::ExtVMFace::~ExtVMFace ( )
virtualdefault
dev::eth::ExtVMFace::ExtVMFace ( ExtVMFace const &  )
delete

Member Function Documentation

virtual u256 dev::eth::ExtVMFace::balance ( Address  )
inlinevirtual

Read address's balance.

Reimplemented in dev::eth::ExtVM, and dev::test::FakeExtVM.

Definition at line 286 of file ExtVMFace.h.

h256 dev::eth::ExtVMFace::blockHash ( u256  _number)
inline

Hash of a block if within the last 256 blocks, or h256() otherwise.

Definition at line 310 of file ExtVMFace.h.

virtual boost::optional<owning_bytes_ref> dev::eth::ExtVMFace::call ( CallParameters )
pure virtual

Make a new message call.

Implemented in dev::eth::ExtVM, and dev::test::FakeExtVM.

virtual bytes const& dev::eth::ExtVMFace::codeAt ( Address  )
inlinevirtual

Read address's code.

Reimplemented in dev::eth::ExtVM, and dev::test::FakeExtVM.

Definition at line 289 of file ExtVMFace.h.

virtual size_t dev::eth::ExtVMFace::codeSizeAt ( Address  )
inlinevirtual
Returns
the size of the code in bytes at the given address.

Reimplemented in dev::eth::ExtVM, and dev::test::FakeExtVM.

Definition at line 292 of file ExtVMFace.h.

virtual h160 dev::eth::ExtVMFace::create ( u256  ,
u256 ,
bytesConstRef  ,
OnOpFunc const &   
)
inlinevirtual

Create a new (contract) account.

Reimplemented in dev::eth::ExtVM, and dev::test::FakeExtVM.

Definition at line 301 of file ExtVMFace.h.

EnvInfo const& dev::eth::ExtVMFace::envInfo ( ) const
inline

Get the execution environment information.

Definition at line 313 of file ExtVMFace.h.

Here is the caller graph for this function:

virtual EVMSchedule const& dev::eth::ExtVMFace::evmSchedule ( ) const
inlinevirtual

Return the EVM gas-price schedule for this execution context.

Reimplemented in dev::eth::ExtVM.

Definition at line 316 of file ExtVMFace.h.

Here is the caller graph for this function:

virtual bool dev::eth::ExtVMFace::exists ( Address  )
inlinevirtual

Does the account exist?

Reimplemented in dev::eth::ExtVM, and dev::test::FakeExtVM.

Definition at line 295 of file ExtVMFace.h.

virtual void dev::eth::ExtVMFace::log ( h256s &&  _topics,
bytesConstRef  _data 
)
inlinevirtual

Revert any changes made (by any of the other calls).

Definition at line 307 of file ExtVMFace.h.

Here is the call graph for this function:

ExtVMFace& dev::eth::ExtVMFace::operator= ( ExtVMFace const &  )
delete
virtual void dev::eth::ExtVMFace::setStore ( u256  ,
u256   
)
inlinevirtual

Write a value in storage.

Reimplemented in dev::eth::ExtVM, and dev::test::FakeExtVM.

Definition at line 283 of file ExtVMFace.h.

virtual u256 dev::eth::ExtVMFace::store ( u256  )
inlinevirtual

Read storage location.

Reimplemented in dev::eth::ExtVM, and dev::test::FakeExtVM.

Definition at line 280 of file ExtVMFace.h.

virtual void dev::eth::ExtVMFace::suicide ( Address  )
inlinevirtual

Suicide the associated contract and give proceeds to the given address.

Reimplemented in dev::eth::ExtVM, and dev::test::FakeExtVM.

Definition at line 298 of file ExtVMFace.h.

Here is the caller graph for this function:

Member Data Documentation

Address dev::eth::ExtVMFace::caller

Address which sent the message (either equal to origin or a contract).

Definition at line 324 of file ExtVMFace.h.

bytes dev::eth::ExtVMFace::code

Current code that is executing.

Definition at line 329 of file ExtVMFace.h.

h256 dev::eth::ExtVMFace::codeHash

SHA3 hash of the executing code.

Definition at line 330 of file ExtVMFace.h.

bytesConstRef dev::eth::ExtVMFace::data

Current input data.

Definition at line 328 of file ExtVMFace.h.

unsigned dev::eth::ExtVMFace::depth = 0

Depth of the present call.

Definition at line 332 of file ExtVMFace.h.

u256 dev::eth::ExtVMFace::gasPrice

Price of gas (that we already paid).

Definition at line 327 of file ExtVMFace.h.

EnvInfo const& dev::eth::ExtVMFace::m_envInfo
private

Definition at line 319 of file ExtVMFace.h.

Address dev::eth::ExtVMFace::myAddress

Address associated with executing code (a contract, or contract-to-be).

Definition at line 323 of file ExtVMFace.h.

Address dev::eth::ExtVMFace::origin

Original transactor.

Definition at line 325 of file ExtVMFace.h.

SubState dev::eth::ExtVMFace::sub

Sub-band VM state (suicides, refund counter, logs).

Definition at line 331 of file ExtVMFace.h.

u256 dev::eth::ExtVMFace::value

Value (in Wei) that was passed to this address.

Definition at line 326 of file ExtVMFace.h.


The documentation for this class was generated from the following files: