EVMC
evmc.hpp File Reference

EVMC C++ API - wrappers and bindings for C++. More...

#include <evmc/evmc.h>
#include <evmc/helpers.h>
#include <functional>
#include <initializer_list>
#include <ostream>
#include <utility>

Go to the source code of this file.

Classes

struct  evmc::address
 The big-endian 160-bit hash suitable for keeping an Ethereum address. More...
 
struct  evmc::bytes32
 The fixed size array of 32 bytes for storing 256-bit EVM values. More...
 
class  evmc::result
 The EVM code execution result. More...
 
class  evmc::HostInterface
 The EVMC Host interface. More...
 
class  evmc::HostContext
 Wrapper around EVMC host context / host interface. More...
 
class  evmc::Host
 Abstract class to be used by Host implementations. More...
 
class  evmc::VM
 The VM instance. More...
 

Namespaces

 evmc
 EVMC C++ API - wrappers and bindings for C++.
 

Typedefs

using evmc::uint256be = bytes32
 The alias for evmc::bytes32 to represent a big-endian 256-bit integer.
 

Functions

constexpr uint64_t evmc::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 evmc::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 evmc::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 evmc::load32le (const uint8_t *data) noexcept
 Loads 32 bits / 4 bytes of data from the given data array in little-endian order.
 
constexpr uint64_t evmc::fnv::fnv1a_by64 (uint64_t h, uint64_t x) noexcept
 The hashing transformation for 64-bit inputs based on the FNV-1a formula.
 
constexpr bool evmc::operator== (const address &a, const address &b) noexcept
 The "equal to" comparison operator for the evmc::address type.
 
constexpr bool evmc::operator!= (const address &a, const address &b) noexcept
 The "not equal to" comparison operator for the evmc::address type.
 
constexpr bool evmc::operator< (const address &a, const address &b) noexcept
 The "less than" comparison operator for the evmc::address type.
 
constexpr bool evmc::operator> (const address &a, const address &b) noexcept
 The "greater than" comparison operator for the evmc::address type.
 
constexpr bool evmc::operator<= (const address &a, const address &b) noexcept
 The "less than or equal to" comparison operator for the evmc::address type.
 
constexpr bool evmc::operator>= (const address &a, const address &b) noexcept
 The "greater than or equal to" comparison operator for the evmc::address type.
 
constexpr bool evmc::operator== (const bytes32 &a, const bytes32 &b) noexcept
 The "equal to" comparison operator for the evmc::bytes32 type.
 
constexpr bool evmc::operator!= (const bytes32 &a, const bytes32 &b) noexcept
 The "not equal to" comparison operator for the evmc::bytes32 type.
 
constexpr bool evmc::operator< (const bytes32 &a, const bytes32 &b) noexcept
 The "less than" comparison operator for the evmc::bytes32 type.
 
constexpr bool evmc::operator> (const bytes32 &a, const bytes32 &b) noexcept
 The "greater than" comparison operator for the evmc::bytes32 type.
 
constexpr bool evmc::operator<= (const bytes32 &a, const bytes32 &b) noexcept
 The "less than or equal to" comparison operator for the evmc::bytes32 type.
 
constexpr bool evmc::operator>= (const bytes32 &a, const bytes32 &b) noexcept
 The "greater than or equal to" comparison operator for the evmc::bytes32 type.
 
constexpr bool evmc::is_zero (const address &a) noexcept
 Checks if the given address is the zero address.
 
constexpr bool evmc::is_zero (const bytes32 &a) noexcept
 Checks if the given bytes32 object has all zero bytes.
 
template<char... c>
constexpr address evmc::literals::operator""_address () noexcept
 Literal for evmc::address.
 
template<char... c>
constexpr bytes32 evmc::literals::operator""_bytes32 () noexcept
 Literal for evmc::bytes32.
 
const char * evmc::to_string (evmc_status_code status_code) noexcept
 Returns text representation of the evmc_status_code. More...
 
const char * evmc::to_string (evmc_revision rev) noexcept
 Returns the name of the evmc_revision. More...
 
std::ostream & operator<< (std::ostream &os, evmc_status_code status_code)
 "Stream out" operator implementation for evmc_status_code. More...
 
std::ostream & operator<< (std::ostream &os, evmc_revision rev)
 "Stream out" operator implementation for evmc_revision. More...
 

Variables

constexpr auto evmc::fnv::prime = 0x100000001b3
 The 64-bit FNV prime number.
 
constexpr auto evmc::fnv::offset_basis = 0xcbf29ce484222325
 The 64-bit FNV offset basis.
 
constexpr auto evmc::make_result = evmc_make_result
 Alias for evmc_make_result().
 

Detailed Description

EVMC C++ API - wrappers and bindings for C++.

Definition in file evmc.hpp.

Function Documentation

◆ operator<<() [1/2]

std::ostream& operator<< ( std::ostream &  os,
evmc_revision  rev 
)
inline

"Stream out" operator implementation for evmc_revision.

Note
This is defined in global namespace to match evmc_revision definition and allow convenient operator overloading usage.

Definition at line 886 of file evmc.hpp.

887 {
888  return os << evmc::to_string(rev);
889 }
const char * to_string(evmc_status_code status_code) noexcept
Returns text representation of the evmc_status_code.
Definition: evmc.hpp:346

◆ operator<<() [2/2]

std::ostream& operator<< ( std::ostream &  os,
evmc_status_code  status_code 
)
inline

"Stream out" operator implementation for evmc_status_code.

Note
This is defined in global namespace to match evmc_status_code definition and allow convenient operator overloading usage.

Definition at line 877 of file evmc.hpp.

878 {
879  return os << evmc::to_string(status_code);
880 }