Skip to content

sgns::primitives::Transaction

#include <transaction.hpp>

Public Types

Name
using base::Hash256 Hash
Hash of tx.
using uint64_t Priority
Priority for a transaction. Additive. Higher is better.
using uint64_t Longevity
using std::vector< uint8_t > Tag

Public Attributes

Name
Extrinsic ext
Raw extrinsic representing that transaction.
size_t bytes
Number of bytes encoding of the transaction requires.
Hash hash
Transaction hash (unique).
Priority priority
Transaction priority (higher = better).
Longevity valid_till
At which block the transaction becomes invalid?
std::vector< Tag > provides
Tags that this transaction provides.
bool should_propagate
Should that transaction be propagated.

Friends

Name
std::ostream & operator<<(std::ostream & out, const Transaction & test_struct)

Public Types Documentation

using Hash

using sgns::primitives::Transaction::Hash = base::Hash256;

Hash of tx.

using Priority

using sgns::primitives::Transaction::Priority = uint64_t;

Priority for a transaction. Additive. Higher is better.

using Longevity

using sgns::primitives::Transaction::Longevity = uint64_t;

Minimum number of blocks a transaction will remain valid for. TransactionLongevity::max_value() means "forever".

using Tag

using sgns::primitives::Transaction::Tag = std::vector<uint8_t>;

Tag for a transaction. No two transactions with the same tag should be placed on-chain.

Public Attributes Documentation

variable ext

Extrinsic ext;

Raw extrinsic representing that transaction.

variable bytes

size_t bytes {};

Number of bytes encoding of the transaction requires.

variable hash

Hash hash;

Transaction hash (unique).

variable priority

Priority priority {};

Transaction priority (higher = better).

variable valid_till

Longevity valid_till {};

At which block the transaction becomes invalid?

variable provides

std::vector< Tag > provides;

Tags that this transaction provides.

variable should_propagate

bool should_propagate {false};

Should that transaction be propagated.

Friends

friend operator<<

friend std::ostream & operator<<(
    std::ostream & out,

    const Transaction & test_struct
);

Updated on 2026-03-04 at 13:10:43 -0800