90 virtual void flushTransactions() = 0;
94 ExecutionResult call(
Address const& _from,
u256 _value,
Address _dest,
bytes const& _data =
bytes(),
u256 _gas = 1000000,
u256 _gasPrice = DefaultGasPrice,
FudgeFactor _ff =
FudgeFactor::Strict) {
return call(_from, _value, _dest, _data, _gas, _gasPrice, m_default, _ff); }
95 ExecutionResult call(
Secret const& _secret,
u256 _value,
Address _dest,
bytes const& _data,
u256 _gas,
u256 _gasPrice,
BlockNumber _blockNumber,
FudgeFactor _ff =
FudgeFactor::Strict) {
return call(
toAddress(_secret), _value, _dest, _data, _gas, _gasPrice, _blockNumber, _ff); }
96 ExecutionResult call(
Secret const& _secret,
u256 _value,
Address _dest,
bytes const& _data,
u256 _gas,
u256 _gasPrice,
FudgeFactor _ff =
FudgeFactor::Strict) {
return call(
toAddress(_secret), _value, _dest, _data, _gas, _gasPrice, _ff); }
101 ExecutionResult create(
Address const& _from,
u256 _value,
bytes const& _data =
bytes(),
u256 _gas = 1000000,
u256 _gasPrice = DefaultGasPrice,
FudgeFactor _ff =
FudgeFactor::Strict) {
return create(_from, _value, _data, _gas, _gasPrice, m_default, _ff); }
102 ExecutionResult create(
Secret const& _secret,
u256 _value,
bytes const& _data,
u256 _gas,
u256 _gasPrice,
BlockNumber _blockNumber,
FudgeFactor _ff =
FudgeFactor::Strict) {
return create(
toAddress(_secret), _value, _data, _gas, _gasPrice, _blockNumber, _ff); }
103 ExecutionResult create(
Secret const& _secret,
u256 _value,
bytes const& _data,
u256 _gas,
u256 _gasPrice,
FudgeFactor _ff =
FudgeFactor::Strict) {
return create(
toAddress(_secret), _value, _data, _gas, _gasPrice, _ff); }
134 virtual std::map<h256, std::pair<u256, u256>> storageAt(
Address _a,
BlockNumber _block)
const = 0;
144 virtual bool uninstallWatch(
unsigned _watchId) = 0;
152 virtual bool isKnownTransaction(
h256 const& _transactionHash)
const = 0;
153 virtual bool isKnownTransaction(
h256 const& _blockHash,
unsigned _i)
const = 0;
158 virtual std::pair<h256, unsigned> transactionLocation(
h256 const& _transactionHash)
const = 0;
161 virtual int compareBlockHashes(
h256 _h1,
h256 _h2)
const = 0;
163 virtual bool isKnown(
BlockNumber _block)
const = 0;
164 virtual bool isKnown(
h256 const& _hash)
const = 0;
167 virtual Transaction transaction(
h256 _blockHash,
unsigned _i)
const = 0;
171 virtual unsigned transactionCount(
h256 _blockHash)
const = 0;
172 virtual unsigned uncleCount(
h256 _blockHash)
const = 0;
194 virtual unsigned number()
const = 0;
199 virtual h256s pendingHashes()
const = 0;
207 virtual u256 gasLimitRemaining()
const = 0;
209 virtual u256 gasBidPrice()
const = 0;
217 virtual void setAuthor(
Address const& _us) = 0;
219 virtual Address author()
const = 0;
223 virtual void startSealing() = 0;
226 virtual void stopSealing() = 0;
228 virtual bool wouldSeal()
const = 0;
244 int m_default = PendingBlock;
259 class Watch:
public boost::noncopyable
267 ~Watch() {
if (m_c) m_c->uninstallWatch(m_id); }
Adapted from code found on http://stackoverflow.com/questions/180947/base64-decode-snippet-in-c Origi...
ExecutionResult create(Secret const &_secret, u256 _value, bytes const &_data, u256 _gas, u256 _gasPrice, BlockNumber _blockNumber, FudgeFactor _ff=FudgeFactor::Strict)
Watch(Interface &_c, LogFilter const &_tf)
void swap(dev::eth::Watch &_a, dev::eth::Watch &_b)
u256 countAt(Address _a) const
virtual EVMSchedule evmSchedule() const
BlockHeader uncle(BlockNumber _block, unsigned _i) const
std::vector< Transaction > Transactions
Nice name for vector of Transaction.
Transaction transaction(BlockNumber _block, unsigned _i) const
virtual BlockDetails pendingDetails() const
std::hash for asio::adress
LocalisedLogEntries check()
virtual bool isSyncing() const
Are we updating the chain (syncing or importing a new block)?
LocalisedLogEntries checkWatchSafe(unsigned _watchId)
ExecutionResult create(Secret const &_secret, u256 _value, bytes const &_data, u256 _gas, u256 _gasPrice, FudgeFactor _ff=FudgeFactor::Strict)
Description of the result of executing a transaction.
h256 codeHashAt(Address _a) const
std::vector< LocalisedLogEntry > LocalisedLogEntries
void swap(dev::shh::Watch &_a, dev::shh::Watch &_b)
virtual void setNetworkId(u256 const &)
Sets the network id.
UncleHashes uncleHashes(BlockNumber _block) const
virtual Addresses addresses() const
Get a list of all active addresses.
bytes codeAt(Address _a) const
ExecutionResult create(Address const &_from, u256 _value, bytes const &_data=bytes(), u256 _gas=1000000, u256 _gasPrice=DefaultGasPrice, FudgeFactor _ff=FudgeFactor::Strict)
IfDropped
Import transaction policy.
virtual bool isMajorSyncing() const
Are we syncing the chain?
ExecutionResult call(Secret const &_secret, u256 _value, Address _dest, bytes const &_data, u256 _gas, u256 _gasPrice, FudgeFactor _ff=FudgeFactor::Strict)
virtual ~Interface()
Destructor.
u256 balanceAt(Address _a) const
std::vector< byte > bytes
Don't import transaction that was previously dropped.
Fixed-size raw-byte array container type, with an API optimised for storing hashes.
virtual u256 networkId() const
Gets the network id.
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)
Transactions transactions(BlockNumber _block) const
Address toAddress(std::string const &_s)
Convert the given string into an address.
boost::multiprecision::number< boost::multiprecision::cpp_int_backend< 256, 256, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void >> u256
h160s Addresses
A vector of Ethereum addresses.
unsigned uncleCount(BlockNumber _block) const
Encodes a transaction, ready to be exported to or freshly imported from RLP.
Main API hub for interfacing with Ethereum.
LocalisedLogEntries peekWatchSafe(unsigned _watchId) const
LocalisedLogEntries peek()
std::function< void(GasEstimationProgress const &)> GasEstimationCallback
u256 stateAt(Address _a, u256 _l) const
unsigned transactionCount(BlockNumber _block) const
virtual SealEngineFace * sealEngine() const
Get the seal engine.
Watch(Interface &_c, h256 _f)
std::map< h256, std::pair< u256, u256 > > storageAt(Address _a) const
TransactionHashes transactionHashes(BlockNumber _block) const
std::vector< h256 > h256s
void setDefault(BlockNumber _block)
LocalisedLogEntries logs() const
virtual BlockHeader pendingInfo() const