Skip to content

ACRONYM Structure

Overview

ACRONYM is the data structure for the acronym game/voting mechanic. It stores a user's phrase submission along with their identity information.

  • File: include/acronym.sol
  • License: Sharia
  • Solidity: ^0.8.21

What This Means For Players

Plain English Summary: ACRONYM stores your entry in the word game. When you submit a phrase that matches an acronym (like "LOL" = "Laugh Out Loud"), your submission is saved as an ACRONYM struct with your player info attached.

Real-World Analogy: It's like a game show entry card. You write your answer (phrase), sign your name (UserInfo), and it gets a number (Id) so the judges can track all entries and pick winners.

How It Affects Your Gameplay: - Word game entries - Each phrase you submit becomes an ACRONYM record - Attribution - Your user info is attached so you get credit - Voting - Other players can vote for your submission by its Id

Definition

struct ACRONYM {
    uint16 Id;         // Submission identifier
    User UserInfo;     // Submitting user's information
    string Phrase;     // The submitted phrase
}

Field Descriptions

Field Type Purpose
Id uint16 Unique identifier for this submission (0-65535)
UserInfo User Full user context including Soul, Bao, Username, Entropy
Phrase string The phrase that should match the acronym

Game Mechanic

  1. System generates random acronym (e.g., "ABC")
  2. Users submit phrases (e.g., "A Big Cat")
  3. Submissions stored as ACRONYM structs
  4. Validation uses STRINGLIB.CheckAcronym()
  5. Valid submissions may earn rewards

Validation Flow

// Generate acronym
bytes memory acronym = stringLib.RandomAcronym(5); // e.g., "ABCDE"

// User submits
ACRONYM memory submission;
submission.Id = nextId++;
submission.UserInfo = getUser();
submission.Phrase = "Always Be Coding Daily, Everyone";

// Validate
bool valid = stringLib.CheckAcronym(acronym, submission.Phrase);

Dependencies

Imports: - User - ./user.sol

Used By

Game contracts that implement the acronym voting mechanic.

Example

// Round: Acronym is "LOL"

ACRONYM[] memory submissions;

submissions[0] = ACRONYM({
    Id: 1,
    UserInfo: alice,
    Phrase: "Laugh Out Loud"  // Valid
});

submissions[1] = ACRONYM({
    Id: 2,
    UserInfo: bob,
    Phrase: "Lots Of Love"    // Valid
});

submissions[2] = ACRONYM({
    Id: 3,
    UserInfo: charlie,
    Phrase: "Living On Luck"  // Valid
});

Storage Patterns

// Per-round storage
mapping(uint256 roundId => ACRONYM[]) submissions;

// Per-user tracking
mapping(uint64 soul => uint16[] submissionIds) userSubmissions;

Contract Verification

Property Value
Keccak256 Hash 0x7f041e0d5ffb5e3760957a058780371777c5a4ba1b7154de3ec0f32d9775ef24
Source URL https://raw.githubusercontent.com/busytoby/atropa_pulsechain/main/solidity/dysnomia/include/acronym.sol
Hash Generated 2026-02-08T00:29:08Z