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 | byte_traits |
The char traits for byte-like types. 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 = std::basic_string< unsigned char, byte_traits< unsigned char > > |
String of unsigned chars representing bytes. | |
using | bytes_view = std::basic_string_view< unsigned char, byte_traits< unsigned char > > |
String view of unsigned chars representing bytes. | |
using | uint256be = bytes32 |
The alias for evmc::bytes32 to represent a big-endian 256-bit integer. | |
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. | |
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. | |
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. | |
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. | |
constexpr bool | operator== (const address &a, const address &b) noexcept |
The "equal to" comparison operator for the evmc::address type. | |
constexpr bool | operator!= (const address &a, const address &b) noexcept |
The "not equal to" comparison operator for the evmc::address type. | |
constexpr bool | operator< (const address &a, const address &b) noexcept |
The "less than" comparison operator for the evmc::address type. | |
constexpr bool | operator> (const address &a, const address &b) noexcept |
The "greater than" comparison operator for the evmc::address type. | |
constexpr bool | operator<= (const address &a, const address &b) noexcept |
The "less than or equal to" comparison operator for the evmc::address type. | |
constexpr bool | operator>= (const address &a, const address &b) noexcept |
The "greater than or equal to" comparison operator for the evmc::address type. | |
constexpr bool | operator== (const bytes32 &a, const bytes32 &b) noexcept |
The "equal to" comparison operator for the evmc::bytes32 type. | |
constexpr bool | operator!= (const bytes32 &a, const bytes32 &b) noexcept |
The "not equal to" comparison operator for the evmc::bytes32 type. | |
constexpr bool | operator< (const bytes32 &a, const bytes32 &b) noexcept |
The "less than" comparison operator for the evmc::bytes32 type. | |
constexpr bool | operator> (const bytes32 &a, const bytes32 &b) noexcept |
The "greater than" comparison operator for the evmc::bytes32 type. | |
constexpr bool | operator<= (const bytes32 &a, const bytes32 &b) noexcept |
The "less than or equal to" comparison operator for the evmc::bytes32 type. | |
constexpr bool | operator>= (const bytes32 &a, const bytes32 &b) noexcept |
The "greater than or equal to" comparison operator for the evmc::bytes32 type. | |
constexpr bool | is_zero (const address &a) noexcept |
Checks if the given address is the zero address. | |
constexpr bool | is_zero (const bytes32 &a) noexcept |
Checks if the given bytes32 object has all zero bytes. | |
const char * | to_string (evmc_status_code status_code) noexcept |
Returns text representation of the evmc_status_code. | |
const char * | to_string (evmc_revision rev) noexcept |
Returns the name of the evmc_revision. | |
constexpr bool | isspace (char ch) noexcept |
The constexpr variant of std::isspace(). | |
constexpr bool | is_not_space (char ch) noexcept |
Checks if a character is not a white space. | |
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. | |
std::string | hex (bytes_view bs) |
Encodes bytes as hex string. | |
template<typename InputIt , typename OutputIt > | |
constexpr bool | from_hex (InputIt begin, InputIt end, OutputIt out) noexcept |
Decodes hex-encoded sequence of characters. | |
bool | validate_hex (std::string_view hex) noexcept |
Validates hex encoded string. | |
std::optional< bytes > | from_hex (std::string_view hex) |
Decodes hex encoded string to bytes. | |
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. | |
template<typename InputIterator > | |
std::optional< bytes > | from_spaced_hex (InputIterator begin, InputIterator end) noexcept |
Decodes hex encoded string to bytes. | |
std::optional< bytes > | from_spaced_hex (std::string_view hex) noexcept |
Decodes hex encoded string to bytes. | |
Variables | |
constexpr auto | make_result = evmc_make_result |
Alias for evmc_make_result(). | |
EVMC C++ API - wrappers and bindings for C++.
using evmc::bytes = typedef std::basic_string<unsigned char, byte_traits<unsigned char> > |
using evmc::bytes_view = typedef std::basic_string_view<unsigned char, byte_traits<unsigned char> > |
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 58 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 101 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 116 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 138 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 148 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 258 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 128 of file evmc.hpp.
|
inlineconstexprnoexcept |
Loads 64 bits / 8 bytes of data from the given data
array in little-endian order.
Definition at line 136 of file evmc.hpp.
The "not equal to" comparison operator for the evmc::address type.
Definition at line 179 of file evmc.hpp.
The "not equal to" comparison operator for the evmc::bytes32 type.
Definition at line 222 of file evmc.hpp.
The "less than" comparison operator for the evmc::address type.
Definition at line 185 of file evmc.hpp.
The "less than" comparison operator for the evmc::bytes32 type.
Definition at line 228 of file evmc.hpp.
The "less than or equal to" comparison operator for the evmc::address type.
Definition at line 201 of file evmc.hpp.
The "less than or equal to" comparison operator for the evmc::bytes32 type.
Definition at line 246 of file evmc.hpp.
The "equal to" comparison operator for the evmc::address type.
Definition at line 171 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 195 of file evmc.hpp.
The "greater than" comparison operator for the evmc::bytes32 type.
Definition at line 240 of file evmc.hpp.
The "greater than or equal to" comparison operator for the evmc::address type.
Definition at line 207 of file evmc.hpp.
The "greater than or equal to" comparison operator for the evmc::bytes32 type.
Definition at line 252 of file evmc.hpp.
|
inlinenoexcept |
Returns the name of the evmc_revision.
Definition at line 315 of file evmc.hpp.
|
inlinenoexcept |
Returns text representation of the evmc_status_code.
Definition at line 309 of file evmc.hpp.
|
inlinenoexcept |
Validates hex encoded string.
|
constexpr |
Alias for evmc_make_result().