|
EVMC
|
Abstract class to be used by Host implementations. More...
#include <evmc.hpp>
Public Member Functions | |
| evmc_host_context * | to_context () noexcept |
| Converts the Host object to the opaque host context pointer. | |
Public Member Functions inherited from evmc::HostInterface | |
| virtual bool | account_exists (const address &addr) const noexcept=0 |
| Check account existence callback function. | |
| virtual bytes32 | get_storage (const address &addr, const bytes32 &key) const noexcept=0 |
| Get storage callback function. | |
| virtual evmc_storage_status | set_storage (const address &addr, const bytes32 &key, const bytes32 &value) noexcept=0 |
| Set storage callback function. | |
| virtual uint256be | get_balance (const address &addr) const noexcept=0 |
| Get balance callback function. | |
| virtual size_t | get_code_size (const address &addr) const noexcept=0 |
| Get code size callback function. | |
| virtual bytes32 | get_code_hash (const address &addr) const noexcept=0 |
| Get code hash callback function. | |
| virtual size_t | copy_code (const address &addr, size_t code_offset, uint8_t *buffer_data, size_t buffer_size) const noexcept=0 |
| Copy code callback function. | |
| virtual bool | selfdestruct (const address &addr, const address &beneficiary) noexcept=0 |
| Selfdestruct callback function. | |
| virtual Result | call (const evmc_message &msg) noexcept=0 |
| Call callback function. | |
| virtual evmc_tx_context | get_tx_context () const noexcept=0 |
| Get transaction context callback function. | |
| virtual bytes32 | get_block_hash (int64_t block_number) const noexcept=0 |
| Get block hash callback function. | |
| virtual void | emit_log (const address &addr, const uint8_t *data, size_t data_size, const bytes32 topics[], size_t num_topics) noexcept=0 |
| Emit log callback function. | |
| virtual evmc_access_status | access_account (const address &addr) noexcept=0 |
| Access account callback function. | |
| virtual evmc_access_status | access_storage (const address &addr, const bytes32 &key) noexcept=0 |
| Access storage callback function. | |
| virtual bytes32 | get_transient_storage (const address &addr, const bytes32 &key) const noexcept=0 |
| Get transient storage callback function. | |
| virtual void | set_transient_storage (const address &addr, const bytes32 &key, const bytes32 &value) noexcept=0 |
| Set transient storage callback function. | |
Static Public Member Functions | |
| static const evmc_host_interface & | get_interface () noexcept |
| Provides access to the global host interface. | |
| template<typename DerivedClass = Host> | |
| static DerivedClass * | from_context (evmc_host_context *context) noexcept |
| Converts the opaque host context pointer back to the original Host object. | |
Abstract class to be used by Host implementations.
When implementing EVMC Host, you can directly inherit from the evmc::Host class. This way your implementation will be simpler by avoiding manual handling of the evmc_host_context and the evmc_host_interface.
|
inlinestaticnoexcept |
Converts the opaque host context pointer back to the original Host object.
| DerivedClass | The class derived from the Host class. |
| context | The opaque host context pointer. |
Definition at line 636 of file evmc.hpp.
|
inlinestaticnoexcept |
Provides access to the global host interface.
Definition at line 882 of file evmc.hpp.
|
inlinenoexcept |
Converts the Host object to the opaque host context pointer.
Definition at line 629 of file evmc.hpp.