-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from oxen-io/logs
Logs
- Loading branch information
Showing
3 changed files
with
119 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// logs.hpp | ||
#pragma once | ||
|
||
#include <string> | ||
#include <vector> | ||
#include <optional> | ||
|
||
struct LogEntry { | ||
std::string address; // Address from which this log originated | ||
std::vector<std::string> topics; // Array of 0-4 32-byte data of indexed log arguments | ||
std::string data; // One or more 32-byte non-indexed arguments of the log | ||
std::optional<uint64_t> blockNumber; // Block number where this log was in (optional) | ||
std::optional<std::string> transactionHash; // Hash of the transaction this log was created from (optional) | ||
std::optional<uint32_t> transactionIndex; // Index of the transaction in the block (optional) | ||
std::optional<std::string> blockHash; // Hash of the block where this log was in (optional) | ||
std::optional<uint32_t> logIndex; // Index of the log in the block (optional) | ||
bool removed; // True if log was removed due to a chain reorganization | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters