Decentralised Art Server
High-performance C++ backend that exposes HTML interface and a secure REST API for managing Performative Transactions entities
 
Loading...
Searching...
No Matches
hex.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4
5#ifdef interface
6 #undef interface
7#endif
8#include <evmc/evmc.hpp>
9#ifndef interface
10 #define interface __STRUCT__
11#endif
12
13#include "parser.hpp"
14
15
16namespace dcn::chain
17{
18 std::string bytes32ToHex(const evmc::bytes32 & value);
19
20 std::string withHexPrefix(std::string value);
21
22 std::string normalizeHex(std::string value);
23
24 std::string toHexQuantity(const std::int64_t value);
25}
26
27namespace dcn::parse
28{
29 Result<std::int64_t> parseHexQuantity(const std::string & value);
30}
Definition address.hpp:17
std::string withHexPrefix(std::string value)
Definition hex.cpp:12
std::string normalizeHex(std::string value)
Definition hex.cpp:21
std::string toHexQuantity(const std::int64_t value)
Definition hex.cpp:26
std::string bytes32ToHex(const evmc::bytes32 &value)
Definition hex.cpp:6
Definition hex.hpp:28
std::expected< T, ParseError > Result
Definition parse_error.hpp:26
Result< std::int64_t > parseHexQuantity(const std::string &value)
Definition hex.cpp:38