![]() |
Ethereum
PoC-8
The C++ Implementation of Ethereum
|
Interface and null implementation of the class for specifying VM externalities. More...
#include <ExtVMFace.h>
Public Member Functions | |
| ExtVMFace (EnvInfo const &_envInfo, Address _myAddress, Address _caller, Address _origin, u256 _value, u256 _gasPrice, bytesConstRef _data, bytes _code, h256 const &_codeHash, unsigned _depth, bool _isCreate, bool _staticCall) | |
| 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 | originalStorageValue (u256 const &) |
| Read original storage value (before modifications in the current transaction). 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 h256 | codeHashAt (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 CreateResult | create (u256, u256 &, bytesConstRef, Instruction, u256, OnOpFunc const &)=0 |
| Create a new (contract) account. More... | |
| virtual CallResult | 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... | |
| virtual h256 | blockHash (u256 _number)=0 |
| 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... | |
| u256 | salt |
| Values used in new address construction by CREATE2. More... | |
| SubState | sub |
| Sub-band VM state (suicides, refund counter, logs). More... | |
| unsigned | depth = 0 |
| Depth of the present call. More... | |
| bool | isCreate = false |
| Is this a CREATE call? More... | |
| bool | staticCall = false |
| Throw on state changing. More... | |
Interface and null implementation of the class for specifying VM externalities.
Definition at line 203 of file ExtVMFace.h.
| dev::eth::ExtVMFace::ExtVMFace | ( | EnvInfo const & | _envInfo, |
| Address | _myAddress, | ||
| Address | _caller, | ||
| Address | _origin, | ||
| u256 | _value, | ||
| u256 | _gasPrice, | ||
| bytesConstRef | _data, | ||
| bytes | _code, | ||
| h256 const & | _codeHash, | ||
| unsigned | _depth, | ||
| bool | _isCreate, | ||
| bool | _staticCall | ||
| ) |
Full constructor.
Definition at line 298 of file ExtVMFace.cpp.
|
virtualdefault |
|
delete |
Read address's balance.
Reimplemented in dev::eth::ExtVM.
Definition at line 226 of file ExtVMFace.h.
Hash of a block if within the last 256 blocks, or h256() otherwise.
Implemented in dev::eth::ExtVM.
|
pure virtual |
Make a new message call.
Implemented in dev::eth::ExtVM.
Reimplemented in dev::eth::ExtVM.
Definition at line 235 of file ExtVMFace.h.
|
inlinevirtual |
Reimplemented in dev::eth::ExtVM.
Definition at line 232 of file ExtVMFace.h.
|
pure virtual |
Create a new (contract) account.
Implemented in dev::eth::ExtVM.
|
inline |
Get the execution environment information.
Definition at line 256 of file ExtVMFace.h.
|
inlinevirtual |
Return the EVM gas-price schedule for this execution context.
Reimplemented in dev::eth::ExtVM.
Definition at line 259 of file ExtVMFace.h.
|
inlinevirtual |
Does the account exist?
Reimplemented in dev::eth::ExtVM.
Definition at line 238 of file ExtVMFace.h.
|
inlinevirtual |
Revert any changes made (by any of the other calls).
Definition at line 250 of file ExtVMFace.h.
Read original storage value (before modifications in the current transaction).
Reimplemented in dev::eth::ExtVM.
Definition at line 223 of file ExtVMFace.h.
Write a value in storage.
Reimplemented in dev::eth::ExtVM.
Definition at line 220 of file ExtVMFace.h.
Read storage location.
Reimplemented in dev::eth::ExtVM.
Definition at line 217 of file ExtVMFace.h.
|
inlinevirtual |
Suicide the associated contract and give proceeds to the given address.
Reimplemented in dev::eth::ExtVM.
Definition at line 241 of file ExtVMFace.h.
| Address dev::eth::ExtVMFace::caller |
Address which sent the message (either equal to origin or a contract).
Definition at line 267 of file ExtVMFace.h.
| bytes dev::eth::ExtVMFace::code |
Current code that is executing.
Definition at line 272 of file ExtVMFace.h.
| h256 dev::eth::ExtVMFace::codeHash |
SHA3 hash of the executing code.
Definition at line 273 of file ExtVMFace.h.
| bytesConstRef dev::eth::ExtVMFace::data |
Current input data.
Definition at line 271 of file ExtVMFace.h.
| unsigned dev::eth::ExtVMFace::depth = 0 |
Depth of the present call.
Definition at line 276 of file ExtVMFace.h.
| u256 dev::eth::ExtVMFace::gasPrice |
Price of gas (that we already paid).
Definition at line 270 of file ExtVMFace.h.
| bool dev::eth::ExtVMFace::isCreate = false |
Is this a CREATE call?
Definition at line 277 of file ExtVMFace.h.
| Address dev::eth::ExtVMFace::myAddress |
Address associated with executing code (a contract, or contract-to-be).
Definition at line 266 of file ExtVMFace.h.
| Address dev::eth::ExtVMFace::origin |
Original transactor.
Definition at line 268 of file ExtVMFace.h.
| u256 dev::eth::ExtVMFace::salt |
Values used in new address construction by CREATE2.
Definition at line 274 of file ExtVMFace.h.
| bool dev::eth::ExtVMFace::staticCall = false |
Throw on state changing.
Definition at line 278 of file ExtVMFace.h.
| SubState dev::eth::ExtVMFace::sub |
Sub-band VM state (suicides, refund counter, logs).
Definition at line 275 of file ExtVMFace.h.
| u256 dev::eth::ExtVMFace::value |
Value (in Wei) that was passed to this address.
Definition at line 269 of file ExtVMFace.h.