OpenCBDC Transaction Processor
Loading...
Searching...
No Matches
rlp.hpp File Reference
#include "format.hpp"
#include "util/common/buffer.hpp"
#include "util/serialization/buffer_serializer.hpp"
#include "util/serialization/format.hpp"
#include "util/serialization/serializer.hpp"
#include "util/serialization/util.hpp"
#include <evmc/evmc.hpp>
#include <optional>
#include <vector>
Include dependency graph for rlp.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  cbdc::rlp_value
 This class contains a value that can be serialized into, or was deserialized from, a Recursive Length Prefix (RLP) encoded representation. More...
 

Namespaces

namespace  cbdc
 

Enumerations

enum class  cbdc::rlp_value_type { cbdc::array , cbdc::buffer }
 Possible types for an RLP value. More...
 

Functions

template<typename T >
auto cbdc::make_rlp_value (const T &obj, bool trim_leading_zeroes=false) -> rlp_value
 Turns an existing value into an rlp_value by first serializing it as a cbdc::buffer, and then turning that into an rlp_value.
 
template<typename... Args>
auto cbdc::make_rlp_array (const Args &... values) -> rlp_value
 Turns multiple rlp_value objects into an rlp_value of type array.
 
void cbdc::serialize_rlp_length (serializer &ser, size_t len, unsigned char offset)
 Serializes the passed len from the given offset as RLP compatible size representation as documented in https://eth.wiki/fundamentals/rlp.
 
auto cbdc::serialize_size (size_t size) -> std::vector< std::byte >
 Creates a binary representation for sizes that exceed the single-byte presentation.
 
auto cbdc::rlp_encode_access_list (const parsec::agent::runner::evm_access_list &access_list) -> rlp_value
 RLP encodes an access list.
 
auto cbdc::rlp_decode_access_list (const rlp_value &rlp) -> std::optional< parsec::agent::runner::evm_access_list >
 Decodes an access list from and rlp_value of type rlp_value_type::array.
 
auto cbdc::deserialize_size (const cbdc::buffer &buf) -> size_t
 Decodes a binary representation for sizes that exceed the single-byte presentation into size_t.
 
auto cbdc::operator<< (serializer &ser, const rlp_value &v) -> serializer &
 
auto cbdc::operator>> (serializer &ser, cbdc::rlp_value &v) -> serializer &