Empire Contracts (Read)
List of relevant read calls for individual Empire contracts
These read functions allow you to query leaderboards, authorization status, token information, and scheduled operations.
getAuthorizedAddresses() → address[]
Returns the list of all authorized addresses.
Returns:
Array of authorized addresses
Example:
solidityaddress[] memory authorized = empire.getAuthorizedAddresses();
getLeaderboard(uint8 leaderboardId) → LeaderboardEntry[]
Returns the entries for a specific leaderboard.
Parameters:
leaderboardId
(uint8): Leaderboard ID (0-49)
Returns:
Array of
LeaderboardEntry
structs containing user addresses and scores
Example:
solidityLeaderboardLib.LeaderboardEntry[] memory entries = empire.getLeaderboard(0);
getAllowedTokens() → address[]
Returns the list of tokens allowed for distribution.
Returns:
Array of token contract addresses
Example:
solidityaddress[] memory tokens = empire.getAllowedTokens();
isOperationExecutable(uint256 operationId) → bool
Checks if a scheduled operation can be executed.
Parameters:
operationId
(uint256): Operation ID to check
Returns:
true
if operation is ready for execution,false
otherwise
Example:
soliditybool canExecute = empire.isOperationExecutable(123);
getScheduledOperationsCount() → uint256
Returns the total number of scheduled operations.
Returns:
Total count of scheduled operations
Example:
solidityuint256 totalOps = empire.getScheduledOperationsCount();
Key Features
Authorization System: Multi-level authorization with owner and authorized addresses
Leaderboard Management: Support for up to 50 leaderboards with scoring
Token Distribution: Support for multiple distribution methods and scheduling
Scheduling System: Ability to schedule operations for future execution
Token Management: Whitelist system for allowed distribution tokens
Last updated