Fabcoin Core
0.16.2
P2P Digital Currency
|
Interface and null implementation of the class for specifying VM externalities. More...
#include <ExtVMFace.h>
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 | |
ExtVMFace & | operator= (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_ref > | call (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 |
Interface and null implementation of the class for specifying VM externalities.
Definition at line 265 of file ExtVMFace.h.
|
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.
|
virtualdefault |
|
delete |
Read address's balance.
Reimplemented in dev::eth::ExtVM, and dev::test::FakeExtVM.
Definition at line 286 of file ExtVMFace.h.
Hash of a block if within the last 256 blocks, or h256() otherwise.
Definition at line 310 of file ExtVMFace.h.
|
pure virtual |
Make a new message call.
Implemented in dev::eth::ExtVM, and dev::test::FakeExtVM.
Read address's code.
Reimplemented in dev::eth::ExtVM, and dev::test::FakeExtVM.
Definition at line 289 of file ExtVMFace.h.
|
inlinevirtual |
Reimplemented in dev::eth::ExtVM, and dev::test::FakeExtVM.
Definition at line 292 of file ExtVMFace.h.
|
inlinevirtual |
Create a new (contract) account.
Reimplemented in dev::eth::ExtVM, and dev::test::FakeExtVM.
Definition at line 301 of file ExtVMFace.h.
|
inline |
Get the execution environment information.
Definition at line 313 of file ExtVMFace.h.
|
inlinevirtual |
Return the EVM gas-price schedule for this execution context.
Reimplemented in dev::eth::ExtVM.
Definition at line 316 of file ExtVMFace.h.
|
inlinevirtual |
Does the account exist?
Reimplemented in dev::eth::ExtVM, and dev::test::FakeExtVM.
Definition at line 295 of file ExtVMFace.h.
|
inlinevirtual |
Revert any changes made (by any of the other calls).
Definition at line 307 of file ExtVMFace.h.
Write a value in storage.
Reimplemented in dev::eth::ExtVM, and dev::test::FakeExtVM.
Definition at line 283 of file ExtVMFace.h.
Read storage location.
Reimplemented in dev::eth::ExtVM, and dev::test::FakeExtVM.
Definition at line 280 of file ExtVMFace.h.
|
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.
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.
|
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.