Empire Builder Docs
  • Empire Builder Docs
    • API
      • Get Top Empires
      • Get Leaderboard By Empire
      • Get All Empires
      • Get Boosters By Empire
      • Get Leaderboard Stats for Single Address within Empire
      • Deploy Empire for Existing Token
      • Deploy Token with Attached Empire
      • Refresh Leaderboard By Empire
    • Contracts
      • Empire Factory Contract
      • Empire Contracts (Read)
      • Empire Contracts (Write)
        • Distribute Tokens (Bulk Send)
        • Burn
        • Guardian Management
        • Token Authorization
Powered by GitBook
On this page
  • getAuthorizedAddresses() → address[]
  • getLeaderboard(uint8 leaderboardId) → LeaderboardEntry[]
  • getAllowedTokens() → address[]
  • isOperationExecutable(uint256 operationId) → bool
  • getScheduledOperationsCount() → uint256
  • Key Features
  1. Empire Builder Docs
  2. Contracts

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

  1. Authorization System: Multi-level authorization with owner and authorized addresses

  2. Leaderboard Management: Support for up to 50 leaderboards with scoring

  3. Token Distribution: Support for multiple distribution methods and scheduling

  4. Scheduling System: Ability to schedule operations for future execution

  5. Token Management: Whitelist system for allowed distribution tokens

PreviousEmpire Factory ContractNextEmpire Contracts (Write)

Last updated 22 days ago