EVMC
|
EVMC C++ API - wrappers and bindings for C++. More...
Classes | |
struct | address |
The big-endian 160-bit hash suitable for keeping an Ethereum address. More... | |
struct | bytes32 |
The fixed size array of 32 bytes for storing 256-bit EVM values. More... | |
struct | filter_iterator |
The filter iterator adaptor creates a view of an iterator range in which some elements of the range are skipped. More... | |
class | Host |
Abstract class to be used by Host implementations. More... | |
class | HostContext |
Wrapper around EVMC host context / host interface. More... | |
class | HostInterface |
The EVMC Host interface. More... | |
struct | MockedAccount |
Mocked account. More... | |
class | MockedHost |
Mocked EVMC Host implementation. More... | |
class | Result |
The EVM code execution result. More... | |
struct | skip_space_iterator |
The input filter iterator which skips whitespace characters from the base input iterator. More... | |
struct | StorageValue |
Extended value (with original value and access flag) for account storage. More... | |
class | VM |
The VM instance. More... | |
Typedefs | |
using | bytes_view = std::basic_string_view< uint8_t > |
String view of uint8_t chars. More... | |
using | uint256be = bytes32 |
The alias for evmc::bytes32 to represent a big-endian 256-bit integer. More... | |
using | bytes = std::basic_string< uint8_t > |
String of uint8_t chars. More... | |
Functions | |
constexpr uint64_t | load64be (const uint8_t *data) noexcept |
Loads 64 bits / 8 bytes of data from the given data array in big-endian order. More... | |
constexpr uint64_t | load64le (const uint8_t *data) noexcept |
Loads 64 bits / 8 bytes of data from the given data array in little-endian order. More... | |
constexpr uint32_t | load32be (const uint8_t *data) noexcept |
Loads 32 bits / 4 bytes of data from the given data array in big-endian order. More... | |
constexpr uint32_t | load32le (const uint8_t *data) noexcept |
Loads 32 bits / 4 bytes of data from the given data array in little-endian order. More... | |
constexpr bool | operator== (const address &a, const address &b) noexcept |
The "equal to" comparison operator for the evmc::address type. More... | |
constexpr bool | operator!= (const address &a, const address &b) noexcept |
The "not equal to" comparison operator for the evmc::address type. More... | |
constexpr bool | operator< (const address &a, const address &b) noexcept |
The "less than" comparison operator for the evmc::address type. More... | |
constexpr bool | operator> (const address &a, const address &b) noexcept |
The "greater than" comparison operator for the evmc::address type. More... | |
constexpr bool | operator<= (const address &a, const address &b) noexcept |
The "less than or equal to" comparison operator for the evmc::address type. More... | |
constexpr bool | operator>= (const address &a, const address &b) noexcept |
The "greater than or equal to" comparison operator for the evmc::address type. More... | |
constexpr bool | operator== (const bytes32 &a, const bytes32 &b) noexcept |
The "equal to" comparison operator for the evmc::bytes32 type. More... | |
constexpr bool | operator!= (const bytes32 &a, const bytes32 &b) noexcept |
The "not equal to" comparison operator for the evmc::bytes32 type. More... | |
constexpr bool | operator< (const bytes32 &a, const bytes32 &b) noexcept |
The "less than" comparison operator for the evmc::bytes32 type. More... | |
constexpr bool | operator> (const bytes32 &a, const bytes32 &b) noexcept |
The "greater than" comparison operator for the evmc::bytes32 type. More... | |
constexpr bool | operator<= (const bytes32 &a, const bytes32 &b) noexcept |
The "less than or equal to" comparison operator for the evmc::bytes32 type. More... | |
constexpr bool | operator>= (const bytes32 &a, const bytes32 &b) noexcept |
The "greater than or equal to" comparison operator for the evmc::bytes32 type. More... | |
constexpr bool | is_zero (const address &a) noexcept |
Checks if the given address is the zero address. More... | |
constexpr bool | is_zero (const bytes32 &a) noexcept |
Checks if the given bytes32 object has all zero bytes. More... | |
const char * | to_string (evmc_status_code status_code) noexcept |
Returns text representation of the evmc_status_code. More... | |
const char * | to_string (evmc_revision rev) noexcept |
Returns the name of the evmc_revision. More... | |
constexpr bool | isspace (char ch) noexcept |
The constexpr variant of std::isspace(). More... | |
constexpr bool | is_not_space (char ch) noexcept |
Checks if a character is not a white space. More... | |
template<typename BaseIterator > | |
skip_space_iterator (BaseIterator, BaseIterator) -> skip_space_iterator< BaseIterator > | |
Class template argument deduction guide. | |
std::string | hex (uint8_t b) noexcept |
Encode a byte to a hex string. More... | |
std::string | hex (bytes_view bs) |
Encodes bytes as hex string. More... | |
template<typename InputIt , typename OutputIt > | |
constexpr bool | from_hex (InputIt begin, InputIt end, OutputIt out) noexcept |
Decodes hex-encoded sequence of characters. More... | |
bool | validate_hex (std::string_view hex) noexcept |
Validates hex encoded string. More... | |
std::optional< bytes > | from_hex (std::string_view hex) |
Decodes hex encoded string to bytes. More... | |
template<typename T > | |
constexpr std::optional< T > | from_hex (std::string_view s) noexcept |
Decodes hex-encoded string into custom type T with .bytes array of uint8_t. More... | |
template<typename InputIterator > | |
std::optional< bytes > | from_spaced_hex (InputIterator begin, InputIterator end) noexcept |
Decodes hex encoded string to bytes. More... | |
std::optional< bytes > | from_spaced_hex (std::string_view hex) noexcept |
Decodes hex encoded string to bytes. More... | |
Variables | |
constexpr auto | make_result = evmc_make_result |
Alias for evmc_make_result(). More... | |
EVMC C++ API - wrappers and bindings for C++.
typedef std::basic_string< uint8_t > evmc::bytes |
typedef std::basic_string_view< uint8_t > evmc::bytes_view |
using evmc::uint256be = typedef bytes32 |
The alias for evmc::bytes32 to represent a big-endian 256-bit integer.
|
inlineconstexprnoexcept |
Decodes hex-encoded sequence of characters.
It is guaranteed that the output will not be longer than half of the input length.
begin | The input begin iterator. It only must satisfy input iterator concept. |
end | The input end iterator. It only must satisfy input iterator concept. |
out | The output iterator. It must satisfy output iterator concept. |
Definition at line 64 of file hex.hpp.
|
inline |
Decodes hex encoded string to bytes.
In case the input is invalid the returned value is std::nullopt. This can happen if a non-hex digit or odd number of digits is encountered.
Definition at line 107 of file hex.hpp.
|
constexprnoexcept |
Decodes hex-encoded string into custom type T with .bytes array of uint8_t.
When the input is smaller than the result type, the result is padded with zeros on the left (the result bytes of lowest indices are filled with zeros). TODO: Support optional left alignment.
Definition at line 122 of file hex.hpp.
|
noexcept |
Decodes hex encoded string to bytes.
The whitespace in the input is ignored.
In case the input is invalid the returned value is std::nullopt. This can happen if a non-hex digit or odd number of digits is encountered. The whitespace (as defined by std::isspace) in the input is ignored.
Definition at line 144 of file hex.hpp.
|
inlinenoexcept |
Decodes hex encoded string to bytes.
The whitespace in the input is ignored.
In case the input is invalid the returned value is std::nullopt. This can happen if a non-hex digit or odd number of digits is encountered. The whitespace (as defined by std::isspace) in the input is ignored.
Definition at line 154 of file hex.hpp.
|
inline |
|
inlinenoexcept |
|
inlineconstexprnoexcept |
Checks if a character is not a white space.
Definition at line 18 of file filter_iterator.hpp.
|
inlineconstexprnoexcept |
Checks if the given address is the zero address.
Definition at line 261 of file evmc.hpp.
|
inlineconstexprnoexcept |
Checks if the given bytes32 object has all zero bytes.
|
inlineconstexprnoexcept |
The constexpr variant of std::isspace().
Definition at line 11 of file filter_iterator.hpp.
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
Loads 64 bits / 8 bytes of data from the given data
array in big-endian order.
Definition at line 131 of file evmc.hpp.
|
inlineconstexprnoexcept |
Loads 64 bits / 8 bytes of data from the given data
array in little-endian order.
Definition at line 139 of file evmc.hpp.
The "not equal to" comparison operator for the evmc::address type.
Definition at line 182 of file evmc.hpp.
The "not equal to" comparison operator for the evmc::bytes32 type.
Definition at line 225 of file evmc.hpp.
The "less than" comparison operator for the evmc::address type.
Definition at line 188 of file evmc.hpp.
The "less than" comparison operator for the evmc::bytes32 type.
Definition at line 231 of file evmc.hpp.
The "less than or equal to" comparison operator for the evmc::address type.
Definition at line 204 of file evmc.hpp.
The "less than or equal to" comparison operator for the evmc::bytes32 type.
Definition at line 249 of file evmc.hpp.
The "equal to" comparison operator for the evmc::address type.
Definition at line 174 of file evmc.hpp.
The "equal to" comparison operator for the evmc::bytes32 type.
The "greater than" comparison operator for the evmc::address type.
Definition at line 198 of file evmc.hpp.
The "greater than" comparison operator for the evmc::bytes32 type.
Definition at line 243 of file evmc.hpp.
The "greater than or equal to" comparison operator for the evmc::address type.
Definition at line 210 of file evmc.hpp.
The "greater than or equal to" comparison operator for the evmc::bytes32 type.
Definition at line 255 of file evmc.hpp.
|
inlinenoexcept |
Returns the name of the evmc_revision.
Definition at line 318 of file evmc.hpp.
|
inlinenoexcept |
Returns text representation of the evmc_status_code.
Definition at line 312 of file evmc.hpp.
|
inlinenoexcept |
Validates hex encoded string.
|
constexpr |
Alias for evmc_make_result().