Revealer
Revealer
Inherits: AccessControl, IRevealer
Manages the revelation of cards from multiple games
Only addresses with the REVEALER_ROLE can call the revealBatch function
State Variables
REVEALER_ROLE
Revealer role hash
bytes32 public constant REVEALER_ROLE = keccak256("REVEALER_ROLE");
Functions
constructor
Initializes the contract and grants the default admin role to the deployer
constructor();
revealCard
Reveals a card
Emits CardRevealed event
function revealCard(RevealedCard calldata _card) external onlyRole(REVEALER_ROLE);
Parameters
Name
Type
Description
_card
RevealedCard
The details of the revealed card
revealCardBatch
Reveals multiple cards from a single or different games
Emits CardRevealed event
function revealCardBatch(RevealedCard[] calldata _cards) external onlyRole(REVEALER_ROLE);
Parameters
Name
Type
Description
_cards
RevealedCard[]
The details of the revealed cards
initialize
Initializes a game
Emits GameInitialized event
function initialize(InitializeGame calldata _data) external onlyRole(REVEALER_ROLE);
Parameters
Name
Type
Description
_data
InitializeGame
The details of the game
initializeBatch
Initializes multiple games
Emits GameInitialized event
function initializeBatch(InitializeGame[] calldata _data) external onlyRole(REVEALER_ROLE);
Parameters
Name
Type
Description
_data
InitializeGame[]
The details of multiple games
Last updated