structs.sol

Overview

This file defines several Solidity struct types that serve as foundational data models for handling messaging, media, and reward-related entities within the system. These data structures encapsulate various attributes related to messages, media content, and entities called "Popit" and "PopitCandidateWithMedia," which appear to be central concepts related to rewards, values, and associated lists of identifiers. The file does not contain executable code or functions but provides the essential types that other contracts or modules will utilize to maintain state and perform logic operations.


Struct Definitions and Details

MessageInfo

Represents metadata for a message.

MessageInfo memory msgInfo = MessageInfo({
    messageHash: uint256(keccak256(abi.encodePacked(messageContent))),
    expireAt: uint32(block.timestamp + 3600)  // expires in 1 hour
});

PopitMedia

Represents media content associated with a Popit entity.


Popit

Represents a core entity with reward and value tracking, along with multiple associated lists of identifiers.


PopitCandidateWithMedia

Combines candidate Popit data with associated media and timing information.


Implementation Details and Algorithms


Interaction with Other System Components


Structure Diagram

classDiagram
class MessageInfo {
+uint256 messageHash
+uint32 expireAt
}
class PopitMedia {
+string media
+uint256 id
+optional uint32 protopopit
}
class Popit {
+uint128 rewards
+uint64 value
+uint128 leftTaps
+uint128 leftRewards
+uint64[] MBNLst
+uint64[] TAPLst
+uint64[] BCLst
}
class PopitCandidateWithMedia {
+uint64 value
+string media
+optional uint32 protopopit
+uint32 time
+uint64[] MBNLst
+uint64[] TAPLst
+uint64[] BCLst
}