OpenCBDC Transaction Processor
Loading...
Searching...
No Matches
serialization.cpp File Reference
#include "serialization.hpp"
#include "crypto/sha256.h"
#include "format.hpp"
#include "hash.hpp"
#include "messages.hpp"
#include "rlp.hpp"
#include "util.hpp"
#include "util/common/hash.hpp"
#include "util/serialization/util.hpp"
#include <optional>
#include <secp256k1.h>
Include dependency graph for parsec/agent/runners/evm/serialization.cpp:

Go to the source code of this file.

Namespaces

namespace  cbdc
 
namespace  cbdc::parsec
 
namespace  cbdc::parsec::agent
 
namespace  cbdc::parsec::agent::runner
 

Functions

auto cbdc::parsec::agent::runner::tx_id (const cbdc::parsec::agent::runner::evm_tx &tx, uint64_t chain_id=opencbdc_chain_id) -> cbdc::hash_t
 Calculate ethereum-compatible txid.
 
auto cbdc::parsec::agent::runner::is_valid_rlp_tx (evm_tx_type type, const rlp_value &rlp_tx) -> bool
 
auto cbdc::parsec::agent::runner::check_tx_decode (const cbdc::buffer &buf, const std::shared_ptr< logging::log > &logger, const std::shared_ptr< cbdc::parsec::agent::runner::evm_tx > &tx) -> std::optional< rlp_value >
 
auto cbdc::parsec::agent::runner::tx_decode (const cbdc::buffer &buf, const std::shared_ptr< logging::log > &logger, uint64_t chain_id=opencbdc_chain_id) -> std::optional< std::shared_ptr< cbdc::parsec::agent::runner::evm_tx > >
 Converts a given buffer to an evm_tx.
 
auto cbdc::parsec::agent::runner::tx_encode (const cbdc::parsec::agent::runner::evm_tx &tx, uint64_t chain_id=opencbdc_chain_id, bool for_sighash=false) -> cbdc::buffer
 Converts the given transaction to an RLP encoded buffer conforming to Ethereums conventions.
 
auto cbdc::parsec::agent::runner::dryrun_tx_from_json (const Json::Value &json, uint64_t chain_id=opencbdc_chain_id) -> std::optional< std::shared_ptr< cbdc::parsec::agent::runner::evm_dryrun_tx > >
 Converts a given Json::Value to an evm_dryrun_tx.
 
auto cbdc::parsec::agent::runner::address_from_json (const Json::Value &addr) -> std::optional< evmc::address >
 Converts a given Json::Value to an evmc::address.
 
auto cbdc::parsec::agent::runner::uint256be_from_json (const Json::Value &val) -> std::optional< evmc::uint256be >
 Converts a given Json::Value to an evmc::uint256be.
 
auto cbdc::parsec::agent::runner::buffer_from_json (const Json::Value &val) -> std::optional< cbdc::buffer >
 Converts a given Json::Value to a cbdc::buffer.
 
auto cbdc::parsec::agent::runner::uint256be_or_default (const Json::Value &val, evmc::uint256be def) -> evmc::uint256be
 Converts a given Json::Value to an evmc::uint256be, returning a default value if none could be decoded.
 
auto cbdc::parsec::agent::runner::raw_tx_from_json (const Json::Value &param) -> std::optional< std::shared_ptr< cbdc::parsec::agent::runner::evm_tx > >
 Converts a given Json::Value to an evm_tx.
 
auto cbdc::parsec::agent::runner::tx_from_json (const Json::Value &json, uint64_t chain_id=opencbdc_chain_id) -> std::optional< std::shared_ptr< cbdc::parsec::agent::runner::evm_tx > >
 Converts a given Json::Value to an evm_tx.
 
auto cbdc::parsec::agent::runner::tx_to_json (cbdc::parsec::agent::runner::evm_tx &tx, const std::shared_ptr< secp256k1_context > &ctx) -> Json::Value
 Encodes the given transaction into a eth-RPC compatible representation in JSON - as Json::Value.
 
auto cbdc::parsec::agent::runner::tx_receipt_to_json (cbdc::parsec::agent::runner::evm_tx_receipt &rcpt, const std::shared_ptr< secp256k1_context > &ctx) -> Json::Value
 Encodes the given transaction receipt into a eth-RPC compatible representation in JSON - as Json::Value.
 
auto cbdc::parsec::agent::runner::tx_log_to_json (cbdc::parsec::agent::runner::evm_log &log, interface::ticket_number_type tn, cbdc::hash_t txid) -> Json::Value
 Encodes the given transaction log into a eth-RPC compatible representation in JSON - as Json::Value.
 
auto cbdc::parsec::agent::runner::access_list_to_json (cbdc::parsec::agent::runner::evm_access_list &al) -> Json::Value
 Encodes the given access list into a eth-RPC compatible representation in JSON - as Json::Value.