Storage-Variables

Mappings

  1. s_eventIdToTokenIds: store all tokenIds(array of uint256) related to particular eventId(string).

  2. s_eventIdToAccessLevels:store all accessLevels(array of Strings) related to particular eventId(string).

  3. s_tokenIdToTicketPrice: maps ticketPrice(uint256) to particular tokenId, default price for any tokenId is Zero.

  4. s_tokenIdToWhitelist: maps token IDs to a boolean indicating whether they are on the whitelist.

  5. s_tokenIdApprovals: maps token IDs to approvals granted by specific addresses (only event manager needs to approve).

  6. s_collectedAmountForEventId: maps event IDs to the total collected amount (for paid tickets).

// Some code
```remix-solidity
    /**
    Event ID to Token IDs Mapping: Maps event IDs to arrays of associated token IDs.
    This mapping stores all token IDs associated with each event ID.
    */
    mapping(string => uint256[]) private s_eventIdToTokenIds;

    /**
    Event ID to Access Levels Mapping: Maps event IDs to arrays of access levels.
    This mapping stores all access levels associated with each event ID.
    */
    mapping(string => string[]) private s_eventIdToAccessLevels;

    /**
    Token ID to Ticket Price Mapping: Maps token IDs to their respective ticket prices.
    This mapping stores the ticket price for each token ID.
    */
    mapping(uint256 => uint256) private s_tokenIdToTicketPrice;

    /**
    Token ID to Whitelist Mapping: Maps token IDs to a boolean indicating whether they are on the whitelist.
    This mapping stores whether each token ID is on the whitelist, controlling access or privileges associated with the token.
    */
    mapping(uint256 => bool) private s_tokenIdToWhitelist;

    /**
    Token ID Approvals Mapping: Maps token IDs to approvals granted by specific addresses.
    This mapping stores the number of tokens approved by each address for each token ID.
    */
    mapping(uint256 => mapping(address => uint256)) private s_tokenIdApprovals;

    /**
    Collected Amount for Event ID Mapping: Maps event IDs to the total collected amount.
    This mapping stores the total amount collected for each event ID, typically used in financial transactions or ticket sales.
    */
    mapping(string => uint256) private s_collectedAmountForEventId;
    

```

Last updated