Fabcoin Core
0.16.2
P2P Digital Currency
|
Main API hub for interfacing with Ethereum. More...
#include <Interface.h>
Public Member Functions | |
Interface () | |
Constructor. More... | |
virtual | ~Interface () |
Destructor. More... | |
virtual std::pair< h256, Address > | submitTransaction (TransactionSkeleton const &_t, Secret const &_secret)=0 |
Submits a new transaction. More... | |
void | submitTransaction (Secret const &_secret, u256 const &_value, Address const &_dest, bytes const &_data=bytes(), u256 const &_gas=1000000, u256 const &_gasPrice=DefaultGasPrice, u256 const &_nonce=Invalid256) |
Submits the given message-call transaction. More... | |
Address | submitTransaction (Secret const &_secret, u256 const &_endowment, bytes const &_init, u256 const &_gas=1000000, u256 const &_gasPrice=DefaultGasPrice, u256 const &_nonce=Invalid256) |
Submits a new contract-creation transaction. More... | |
virtual void | flushTransactions ()=0 |
Blocks until all pending transactions have been processed. More... | |
virtual ExecutionResult | call (Address const &_from, u256 _value, Address _dest, bytes const &_data, u256 _gas, u256 _gasPrice, BlockNumber _blockNumber, FudgeFactor _ff=FudgeFactor::Strict)=0 |
Makes the given call. Nothing is recorded into the state. More... | |
ExecutionResult | call (Address const &_from, u256 _value, Address _dest, bytes const &_data=bytes(), u256 _gas=1000000, u256 _gasPrice=DefaultGasPrice, FudgeFactor _ff=FudgeFactor::Strict) |
ExecutionResult | call (Secret const &_secret, u256 _value, Address _dest, bytes const &_data, u256 _gas, u256 _gasPrice, BlockNumber _blockNumber, FudgeFactor _ff=FudgeFactor::Strict) |
ExecutionResult | call (Secret const &_secret, u256 _value, Address _dest, bytes const &_data, u256 _gas, u256 _gasPrice, FudgeFactor _ff=FudgeFactor::Strict) |
virtual ExecutionResult | create (Address const &_from, u256 _value, bytes const &_data, u256 _gas, u256 _gasPrice, BlockNumber _blockNumber, FudgeFactor _ff=FudgeFactor::Strict)=0 |
Does the given creation. More... | |
ExecutionResult | create (Address const &_from, u256 _value, bytes const &_data=bytes(), u256 _gas=1000000, u256 _gasPrice=DefaultGasPrice, FudgeFactor _ff=FudgeFactor::Strict) |
ExecutionResult | create (Secret const &_secret, u256 _value, bytes const &_data, u256 _gas, u256 _gasPrice, BlockNumber _blockNumber, FudgeFactor _ff=FudgeFactor::Strict) |
ExecutionResult | create (Secret const &_secret, u256 _value, bytes const &_data, u256 _gas, u256 _gasPrice, FudgeFactor _ff=FudgeFactor::Strict) |
virtual ImportResult | injectTransaction (bytes const &_rlp, IfDropped _id=IfDropped::Ignore)=0 |
Injects the RLP-encoded transaction given by the _rlp into the transaction queue directly. More... | |
virtual ImportResult | injectBlock (bytes const &_block)=0 |
Injects the RLP-encoded block given by the _rlp into the block queue directly. More... | |
virtual std::pair< u256, ExecutionResult > | estimateGas (Address const &_from, u256 _value, Address _dest, bytes const &_data, int64_t _maxGas, u256 _gasPrice, BlockNumber _blockNumber, GasEstimationCallback const &_callback=GasEstimationCallback())=0 |
Estimate gas usage for call/create. More... | |
int | getDefault () const |
void | setDefault (BlockNumber _block) |
u256 | balanceAt (Address _a) const |
u256 | countAt (Address _a) const |
u256 | stateAt (Address _a, u256 _l) const |
bytes | codeAt (Address _a) const |
h256 | codeHashAt (Address _a) const |
std::map< h256, std::pair< u256, u256 > > | storageAt (Address _a) const |
virtual u256 | balanceAt (Address _a, BlockNumber _block) const =0 |
virtual u256 | countAt (Address _a, BlockNumber _block) const =0 |
virtual u256 | stateAt (Address _a, u256 _l, BlockNumber _block) const =0 |
virtual h256 | stateRootAt (Address _a, BlockNumber _block) const =0 |
virtual bytes | codeAt (Address _a, BlockNumber _block) const =0 |
virtual h256 | codeHashAt (Address _a, BlockNumber _block) const =0 |
virtual std::map< h256, std::pair< u256, u256 > > | storageAt (Address _a, BlockNumber _block) const =0 |
virtual LocalisedLogEntries | logs (unsigned _watchId) const =0 |
virtual LocalisedLogEntries | logs (LogFilter const &_filter) const =0 |
virtual unsigned | installWatch (LogFilter const &_filter, Reaping _r=Reaping::Automatic)=0 |
Install, uninstall and query watches. More... | |
virtual unsigned | installWatch (h256 _filterId, Reaping _r=Reaping::Automatic)=0 |
virtual bool | uninstallWatch (unsigned _watchId)=0 |
LocalisedLogEntries | peekWatchSafe (unsigned _watchId) const |
LocalisedLogEntries | checkWatchSafe (unsigned _watchId) |
virtual LocalisedLogEntries | peekWatch (unsigned _watchId) const =0 |
virtual LocalisedLogEntries | checkWatch (unsigned _watchId)=0 |
virtual bool | isKnownTransaction (h256 const &_transactionHash) const =0 |
virtual bool | isKnownTransaction (h256 const &_blockHash, unsigned _i) const =0 |
virtual Transaction | transaction (h256 _transactionHash) const =0 |
virtual LocalisedTransaction | localisedTransaction (h256 const &_transactionHash) const =0 |
virtual TransactionReceipt | transactionReceipt (h256 const &_transactionHash) const =0 |
virtual LocalisedTransactionReceipt | localisedTransactionReceipt (h256 const &_transactionHash) const =0 |
virtual std::pair< h256, unsigned > | transactionLocation (h256 const &_transactionHash) const =0 |
virtual h256 | hashFromNumber (BlockNumber _number) const =0 |
virtual BlockNumber | numberFromHash (h256 _blockHash) const =0 |
virtual int | compareBlockHashes (h256 _h1, h256 _h2) const =0 |
virtual bool | isKnown (BlockNumber _block) const =0 |
virtual bool | isKnown (h256 const &_hash) const =0 |
virtual BlockHeader | blockInfo (h256 _hash) const =0 |
virtual BlockDetails | blockDetails (h256 _hash) const =0 |
virtual Transaction | transaction (h256 _blockHash, unsigned _i) const =0 |
virtual LocalisedTransaction | localisedTransaction (h256 const &_blockHash, unsigned _i) const =0 |
virtual BlockHeader | uncle (h256 _blockHash, unsigned _i) const =0 |
virtual UncleHashes | uncleHashes (h256 _blockHash) const =0 |
virtual unsigned | transactionCount (h256 _blockHash) const =0 |
virtual unsigned | uncleCount (h256 _blockHash) const =0 |
virtual Transactions | transactions (h256 _blockHash) const =0 |
virtual TransactionHashes | transactionHashes (h256 _blockHash) const =0 |
virtual BlockHeader | pendingInfo () const |
virtual BlockDetails | pendingDetails () const |
virtual EVMSchedule | evmSchedule () const |
BlockHeader | blockInfo (BlockNumber _block) const |
BlockDetails | blockDetails (BlockNumber _block) const |
Transaction | transaction (BlockNumber _block, unsigned _i) const |
unsigned | transactionCount (BlockNumber _block) const |
Transactions | transactions (BlockNumber _block) const |
TransactionHashes | transactionHashes (BlockNumber _block) const |
BlockHeader | uncle (BlockNumber _block, unsigned _i) const |
UncleHashes | uncleHashes (BlockNumber _block) const |
unsigned | uncleCount (BlockNumber _block) const |
virtual unsigned | number () const =0 |
virtual Transactions | pending () const =0 |
Get a map containing each of the pending transactions. More... | |
virtual h256s | pendingHashes () const =0 |
virtual Addresses | addresses () const |
Get a list of all active addresses. More... | |
virtual Addresses | addresses (BlockNumber _block) const =0 |
virtual u256 | gasLimitRemaining () const =0 |
Get the remaining gas limit in this block. More... | |
virtual u256 | gasBidPrice () const =0 |
virtual SyncStatus | syncStatus () const =0 |
Get some information on the block queue. More... | |
virtual void | setAuthor (Address const &_us)=0 |
Set the block author address. More... | |
virtual Address | author () const =0 |
Get the block author address. More... | |
virtual void | startSealing ()=0 |
Start sealing. More... | |
virtual void | stopSealing ()=0 |
Stop sealing. More... | |
virtual bool | wouldSeal () const =0 |
Would we like to be sealing now? More... | |
virtual bool | isSyncing () const |
Are we updating the chain (syncing or importing a new block)? More... | |
virtual bool | isMajorSyncing () const |
Are we syncing the chain? More... | |
virtual u256 | networkId () const |
Gets the network id. More... | |
virtual void | setNetworkId (u256 const &) |
Sets the network id. More... | |
virtual SealEngineFace * | sealEngine () const |
Get the seal engine. More... | |
Protected Attributes | |
int | m_default = PendingBlock |
Main API hub for interfacing with Ethereum.
Definition at line 67 of file Interface.h.
|
inline |
Constructor.
Definition at line 71 of file Interface.h.
|
inlinevirtual |
Destructor.
Definition at line 74 of file Interface.h.
|
inlinevirtual |
Get a list of all active addresses.
NOTE: This only works when compiled with ETH_FATDB; otherwise will throw InterfaceNotSupported.
Definition at line 203 of file Interface.h.
|
pure virtual |
Implemented in dev::eth::ClientBase.
|
pure virtual |
Get the block author address.
Implemented in dev::eth::ClientBase, and dev::eth::Client.
Definition at line 121 of file Interface.h.
|
pure virtual |
Implemented in dev::eth::ClientBase.
|
pure virtual |
Implemented in dev::eth::ClientBase.
BlockDetails Interface::blockDetails | ( | BlockNumber | _block | ) | const |
Definition at line 59 of file Interface.cpp.
|
pure virtual |
Implemented in dev::eth::ClientBase.
BlockHeader Interface::blockInfo | ( | BlockNumber | _block | ) | const |
Definition at line 52 of file Interface.cpp.
|
pure virtual |
Makes the given call. Nothing is recorded into the state.
Implemented in dev::eth::ClientBase.
|
inline |
Definition at line 94 of file Interface.h.
|
inline |
Definition at line 95 of file Interface.h.
|
inline |
Definition at line 96 of file Interface.h.
|
pure virtual |
|
inline |
Definition at line 146 of file Interface.h.
Definition at line 124 of file Interface.h.
|
pure virtual |
Implemented in dev::eth::ClientBase.
Definition at line 125 of file Interface.h.
|
pure virtual |
Implemented in dev::eth::ClientBase.
Implemented in dev::eth::ClientBase.
Definition at line 122 of file Interface.h.
|
pure virtual |
Implemented in dev::eth::ClientBase.
|
pure virtual |
Does the given creation.
Nothing is recorded into the state.
Implemented in dev::eth::ClientBase.
|
inline |
Definition at line 101 of file Interface.h.
|
inline |
Definition at line 102 of file Interface.h.
|
inline |
Definition at line 103 of file Interface.h.
|
pure virtual |
Estimate gas usage for call/create.
_maxGas | An upper bound value for estimation, if not provided default value of c_maxGasEstimate will be used. |
_callback | Optional callback function for progress reporting |
Implemented in dev::eth::ClientBase.
|
inlinevirtual |
Reimplemented in dev::eth::ClientBase.
Definition at line 179 of file Interface.h.
|
pure virtual |
Blocks until all pending transactions have been processed.
Implemented in dev::eth::Client, and dev::test::FixedClient.
|
pure virtual |
Implemented in dev::eth::ClientBase, and dev::eth::Client.
|
pure virtual |
Get the remaining gas limit in this block.
Implemented in dev::eth::ClientBase, and dev::eth::Client.
|
inline |
Definition at line 118 of file Interface.h.
|
pure virtual |
|
pure virtual |
Injects the RLP-encoded block given by the _rlp into the block queue directly.
Implemented in dev::eth::ClientBase.
|
pure virtual |
Injects the RLP-encoded transaction given by the _rlp into the transaction queue directly.
Implemented in dev::eth::ClientBase.
|
pure virtual |
Install, uninstall and query watches.
Implemented in dev::eth::ClientBase.
|
pure virtual |
Implemented in dev::eth::ClientBase.
|
pure virtual |
|
pure virtual |
Implemented in dev::eth::ClientBase.
|
pure virtual |
|
pure virtual |
Implemented in dev::eth::ClientBase.
|
inlinevirtual |
Are we syncing the chain?
Reimplemented in dev::eth::Client.
Definition at line 233 of file Interface.h.
|
inlinevirtual |
Are we updating the chain (syncing or importing a new block)?
Reimplemented in dev::eth::Client.
Definition at line 231 of file Interface.h.
|
pure virtual |
Implemented in dev::eth::ClientBase.
|
pure virtual |
Implemented in dev::eth::ClientBase.
|
pure virtual |
Implemented in dev::eth::ClientBase.
|
pure virtual |
Implemented in dev::eth::ClientBase.
|
pure virtual |
Implemented in dev::eth::ClientBase.
|
inlinevirtual |
|
pure virtual |
Implemented in dev::eth::ClientBase.
|
pure virtual |
Implemented in dev::eth::ClientBase.
|
pure virtual |
Implemented in dev::eth::ClientBase.
|
inline |
Definition at line 145 of file Interface.h.
|
pure virtual |
Get a map containing each of the pending transactions.
: Remove in favour of transactions().
Implemented in dev::eth::ClientBase.
|
inlinevirtual |
Reimplemented in dev::eth::ClientBase.
Definition at line 177 of file Interface.h.
|
pure virtual |
Implemented in dev::eth::ClientBase.
|
inlinevirtual |
Reimplemented in dev::eth::ClientBase.
Definition at line 176 of file Interface.h.
|
inlinevirtual |
Get the seal engine.
Reimplemented in dev::eth::Client.
Definition at line 241 of file Interface.h.
|
pure virtual |
Set the block author address.
Implemented in dev::eth::Client, and dev::test::FixedClient.
|
inline |
Definition at line 119 of file Interface.h.
|
inlinevirtual |
|
pure virtual |
Start sealing.
NOT thread-safe - call it & stopSealing only from a single thread
Implemented in dev::eth::ClientBase, and dev::eth::Client.
Definition at line 123 of file Interface.h.
|
pure virtual |
Implemented in dev::eth::ClientBase.
|
pure virtual |
Implemented in dev::eth::ClientBase.
|
pure virtual |
Definition at line 126 of file Interface.h.
|
pure virtual |
Implemented in dev::eth::ClientBase.
|
pure virtual |
Submits a new transaction.
Implemented in dev::eth::ClientBase.
void Interface::submitTransaction | ( | Secret const & | _secret, |
u256 const & | _value, | ||
Address const & | _dest, | ||
bytes const & | _data = bytes() , |
||
u256 const & | _gas = 1000000 , |
||
u256 const & | _gasPrice = DefaultGasPrice , |
||
u256 const & | _nonce = Invalid256 |
||
) |
Submits the given message-call transaction.
Definition at line 27 of file Interface.cpp.
Address Interface::submitTransaction | ( | Secret const & | _secret, |
u256 const & | _endowment, | ||
bytes const & | _init, | ||
u256 const & | _gas = 1000000 , |
||
u256 const & | _gasPrice = DefaultGasPrice , |
||
u256 const & | _nonce = Invalid256 |
||
) |
Submits a new contract-creation transaction.
Definition at line 40 of file Interface.cpp.
|
pure virtual |
Get some information on the block queue.
Implemented in dev::eth::ClientBase, and dev::eth::Client.
|
pure virtual |
Implemented in dev::eth::ClientBase.
|
pure virtual |
Implemented in dev::eth::ClientBase.
|
inline |
Definition at line 183 of file Interface.h.
|
pure virtual |
Implemented in dev::eth::ClientBase.
|
inline |
Definition at line 184 of file Interface.h.
|
pure virtual |
Implemented in dev::eth::ClientBase.
|
inline |
Definition at line 186 of file Interface.h.
|
pure virtual |
Implemented in dev::eth::ClientBase.
|
pure virtual |
Implemented in dev::eth::ClientBase.
|
pure virtual |
Implemented in dev::eth::ClientBase.
|
inline |
Definition at line 185 of file Interface.h.
|
pure virtual |
Implemented in dev::eth::ClientBase.
|
inline |
Definition at line 187 of file Interface.h.
|
pure virtual |
Implemented in dev::eth::ClientBase.
|
inline |
Definition at line 189 of file Interface.h.
|
pure virtual |
Implemented in dev::eth::ClientBase.
|
inline |
Definition at line 188 of file Interface.h.
|
pure virtual |
|
pure virtual |
Would we like to be sealing now?
Implemented in dev::eth::ClientBase, and dev::eth::Client.
|
protected |
Definition at line 244 of file Interface.h.