allorad Reference
What You'll Learn
- Complete command reference for the
alloradCLI tool with all available functions - Understanding the difference between query functions (read-only) and transaction functions (write operations)
- How to interact with the Allora Chain for topic management, staking, and network operations
- Practical examples and parameter descriptions for every major CLI command
Overview
The allorad CLI is the primary command-line interface for interacting with the Allora Network blockchain. This comprehensive reference covers all available commands and their usage patterns.
Command Categories
allorad commands below are broken out into:
- Query functions, or functions that read from the chain
- e.g. get active topics, get amount of stake in a topic
- Tx functions, or functions that write to the chain
- e.g. create a topic, add stake to a reputer
Why Use the CLI?
Direct Network Access:
- Complete functionality: Access to all network features and operations
- Scripting capability: Automate network interactions through scripts
- Development tools: Essential for development, testing, and debugging
- Network administration: Full control over node operations and configurations
Production Benefits:
- Reliable interface: Stable, well-tested interface for production use
- Precise control: Fine-grained control over all network parameters
- Integration ready: Easy integration with other tools and systems
- Documentation: Comprehensive reference for all available operations
Query Functions
These functions read from the appchain only and do not write. Add the Command value into your query to retrieve the expected data.
allorad q emissions [Command] --node <RPC_URL>Network Parameters
Params
- RPC Method:
Params - Command:
params - Description: Get the current module parameters.
Usage Example:
allorad q emissions params --node https://rpc.testnet.allora.networkUse Cases:
- Network monitoring: Check current network configuration and settings
- Development: Verify parameter changes during development and testing
- Analysis: Understand network economics and operational parameters
- Troubleshooting: Diagnose network issues related to configuration
Topic Management Queries
Get Next Topic ID
- RPC Method:
GetNextTopicId - Command:
next-topic-id - Description: Get next topic id. Topic ids are incremented with each newly added topic.
Planning Benefits:
- Topic creation: Know the ID that will be assigned to your next topic
- Development planning: Plan topic IDs for development and testing
- Integration: Prepare applications for specific topic IDs
- Resource allocation: Plan infrastructure for upcoming topics
Get Topic
- RPC Method:
GetTopic - Command:
topic [topic_id] - Description: Get topic by topic_id.
- Positional Arguments:
topic_idIdentifier of the topic whose information will be returned.
Information Retrieved:
- Topic configuration: All topic settings and parameters
- Economic parameters: Fees, rewards, and incentive structures
- Participation rules: Requirements and constraints for participation
- Current status: Active status and operational state
Topic Exists
- RPC Method:
TopicExists - Command:
topic-exists [topic_id] - Description: True if topic exists at given id, else false.
- Positional Arguments:
topic_idIdentifier of the topic whose information will be returned.
Validation Use Cases:
- Input validation: Verify topic IDs before performing operations
- Error prevention: Avoid operations on non-existent topics
- Development testing: Validate topic creation and management workflows
- Integration checks: Ensure external systems reference valid topics
Get Active Topics
- RPC Method:
GetActiveTopics - Command:
active-topics [pagination] - Description: Get topic by topic_id.
- Positional Arguments:
paginationThe json key-value pair of the limit of topics outputted- Example:
'{"limit":10}'
- Example:
Pagination Benefits:
- Large dataset handling: Manage queries when many topics exist
- Performance optimization: Reduce query response times and resource usage
- Selective browsing: View topics in manageable chunks
- Integration efficiency: Support for paginated displays in applications
Is Topic Active
- RPC Method:
IsTopicActive - Command:
is-topic-active [topic_id] - Description: True if the topic is active, else false.
- Positional Arguments:
topic_idIdentifier of the topic whose information will be returned.
Status Monitoring:
- Operational decisions: Determine if topic accepts new participants
- Resource planning: Focus efforts on active topics
- Network health: Monitor topic lifecycle and participation
- Automated systems: Enable/disable features based on topic status
Get Rewardable Topics
- RPC Method:
GetRewardableTopics - Command:
rewardable-topics - Description: Get Rewardable Topics.
Economic Analysis:
- Reward planning: Identify topics eligible for reward distribution
- Participant guidance: Help users find profitable participation opportunities
- Network economics: Understand which topics drive network incentives
- Performance tracking: Monitor reward-eligible topic performance
Stake and Delegation Queries
Get Delegate Reward Per Share
- RPC Method:
GetDelegateRewardPerShare - Command:
delegate-reward-per-share [topic_id] [reputer_address] - Description: Get total delegate reward per share stake in a reputer for a topic.
- Positional Arguments:
topic_idIdentifier of the topic whose information will be returned.reputer_addressAddress of the reputer.
Delegation Economics:
- Reward calculations: Calculate expected returns from delegation
- Reputer comparison: Compare reward rates across different reputers
- Investment decisions: Make informed delegation choices
- Performance tracking: Monitor delegation returns over time
Get Delegate Stake Placement
- RPC Method:
GetDelegateStakePlacement - Command:
delegate-reward-per-share [topic_id] [delegator] [target] - Description: Get information about delegate stake placement.
- Positional Arguments:
topic_idIdentifier of the topic whose information will be returned.delegatorAddress of the delegator.targetAddress of the target (reputer or worker).
Stake Management:
- Portfolio tracking: Monitor delegation positions across topics
- Performance analysis: Evaluate delegation effectiveness
- Risk management: Understand stake distribution and exposure
- Strategic planning: Optimize delegation strategies
Worker Performance Queries
Get Worker Inference Scores At Block
- RPC Method:
GetWorkerInferenceScoresAtBlock - Command:
inference-scores [topic_id] [block_height] - Description: Return scores for a worker at a block height.
- Positional Arguments:
topic_idIdentifier of the topic whose information will be returned.block_heightBlock height to query.
Performance Analysis:
- Historical performance: Track worker performance over time
- Quality assessment: Evaluate inference accuracy and reliability
- Competitive analysis: Compare worker performance across participants
- Reward prediction: Estimate future rewards based on performance trends
Stake Information Queries
Get Stake From Reputer In Topic In Self
- RPC Method:
GetStakeFromReputerInTopicInSelf - Command:
stake-reputer-in-topic-self [reputer_address] [topic_id] - Description: Get the stake of a reputer in a topic that they put on themselves.
- Positional Arguments:
reputer_addressAddress of the reputer.topic_idIdentifier of the topic whose information will be returned.
Self-Stake Analysis:
- Commitment assessment: Evaluate reputer commitment through self-stake
- Trust indicators: Higher self-stake often indicates confidence
- Risk evaluation: Understand reputer skin-in-the-game
- Delegation decisions: Factor self-stake into delegation choices
Get Stake Removals Up Until Block
- RPC Method:
GetStakeRemovalsUpUntilBlock - Command:
stake-removals-up-until-block [block_height] - Description: Get all pending stake removal requests going to happen at a given block height.
- Positional Arguments:
block_heightBlock height to query.
Liquidity Planning:
- Unstaking timeline: Understand when stakes will become available
- Network liquidity: Monitor network-wide stake changes
- Planning decisions: Time operations around stake removals
- Market impact: Anticipate effects of large stake removals
Get Delegate Stake Removals Up Until Block
- RPC Method:
GetDelegateStakeRemovalsUpUntilBlock - Command:
delegate-stake-removals-up-until-block [block_height] - Description: Get all pending delegate stake removal requests going to happen at a given block height.
- Positional Arguments:
block_heightBlock height to query.
Delegation Management:
- Portfolio planning: Plan for delegation changes and withdrawals
- Liquidity management: Understand when delegated funds become available
- Risk assessment: Monitor delegation stability across the network
- Strategic timing: Optimize delegation adjustments around network changes
Get Stake Removal Info
- RPC Method:
GetStakeRemovalInfo - Command:
stake-removal-info [address] [topic_id] - Description: Get a pending stake removal for a reputer in a topic.
- Positional Arguments:
addressAddress of the reputer.topic_idIdentifier of the topic whose information will be returned.
Individual Stake Tracking:
- Personal management: Track your own pending stake removals
- Timeline planning: Understand when your stake will be available
- Decision support: Make informed decisions about additional operations
- Status verification: Confirm stake removal requests are processed correctly
Get Delegate Stake Removal Info
- RPC Method:
GetDelegateStakeRemovalInfo - Command:
delegate-stake-removal-info [delegator] [reputer] [topic_id] - Description: Get a pending delegate stake removal for a delegator in a topic.
- Positional Arguments:
delegatorAddress of the delegator.reputerAddress of the reputer.topic_idIdentifier of the topic whose information will be returned.
Delegation Tracking:
- Portfolio management: Monitor all pending delegation changes
- Timing optimization: Plan delegation strategies around removal timelines
- Risk management: Understand exposure during removal periods
- Verification: Confirm delegation removal requests are accurate
Network Activity Queries
Get Topic Last Worker Commit Info
- RPC Method:
GetTopicLastWorkerCommitInfo - Command:
topic-last-worker-commit [topic_id] - Description: Get the last commit by a worker for a topic.
- Positional Arguments:
topic_idIdentifier of the topic whose information will be returned.
Activity Monitoring:
- Network health: Monitor recent worker activity and participation
- Topic vitality: Assess topic engagement and operational status
- Performance tracking: Understand worker participation patterns
- Debugging: Troubleshoot topic issues related to worker participation
Get Topic Last Reputer Commit Info
- RPC Method:
GetTopicLastReputerCommitInfo - Command:
topic-last-reputer-commit [topic_id] - Description: Get the last commit by a reputer for a topic.
- Positional Arguments:
topic_idIdentifier of the topic whose information will be returned.
Quality Assurance Monitoring:
- Reputer activity: Track reputer engagement and evaluation frequency
- Quality control: Monitor reputation system health and activity
- Network integrity: Ensure continuous quality assessment operations
- System health: Identify potential issues with reputation mechanisms
Get Forecasts for a Topic at Block Height
- RPC Method:
GetForecastsAtBlock - Command:
forecasts-at-block [topic_id] [block_height] - Description: Get the Forecasts for a topic at block height.
- Positional Arguments:
topic_idIdentifier of the topic whose information will be returnedblock_heightNumber of blocks that precede the specific block you are trying to query
Historical Analysis:
- Performance research: Analyze forecast accuracy over time
- Model evaluation: Compare forecast quality across different periods
- Market analysis: Understand prediction patterns and trends
- Algorithm improvement: Use historical data to enhance prediction models
Execute GetMultiReputerStakeInTopic RPC Method
- RPC Method:
GetMultiReputerStakeInTopic - Command:
get-multi-reputer-stake-in-topic - Description: Execute the GetMultiReputerStakeInTopic RPC method.
Bulk Analysis:
- Network overview: Get comprehensive stake information across multiple reputers
- Market analysis: Understand stake distribution and concentration
- Risk assessment: Evaluate network decentralization and stake concentration
- Strategic planning: Inform delegation and participation strategies
Get All Inferences Produced for a Topic in a Particular Timestamp
- RPC Method:
GetInferencesAtBlock - Command:
inferences-at-block [topic_id] [block_height] - Description: Get All Inferences produced for a topic in a particular timestamp.
- Positional Arguments:
topic_idIdentifier of the topic whose information will be returnedblock_heightNumber of blocks that precede the specific block you are trying to query
Data Analysis:
- Historical research: Access complete inference datasets for analysis
- Quality assessment: Evaluate inference quality and consistency
- Model training: Use historical inferences for model improvement
- Competitive analysis: Understand inference patterns across participants
Check if Reputer is Registered in the Topic
- RPC Method:
IsReputerRegistered - Command:
is-reputer-registered [topic_id] [address] - Description: True if reputer is registered in the topic.
- Positional Arguments:
topic_idIdentifier of the topic whose information will be returnedaddressReputer Address
Registration Verification:
- Participation eligibility: Verify reputer can participate in topic evaluation
- System validation: Confirm registration status before operations
- Troubleshooting: Diagnose participation issues related to registration
- Planning: Understand which reputers are active in specific topics
Tx Functions
These functions perform transactions that write to the chain and modify network state. All transaction functions require proper authentication and sufficient gas fees.
Command Structure
Basic Transaction Format:
allorad tx [module] [command] [parameters] --from [account] --chain-id [chain_id] --node [rpc_url]Common Parameters:
--from: The account executing the transaction--chain-id: Network identifier (e.g., allora-testnet-1)--node: RPC endpoint URL--gas: Gas limit for the transaction--gas-prices: Gas price in network tokens
Topic Management Transactions
Create New Topic
- RPC Method:
CreateTopic - Command:
create-topic [metadata] [loss_logic] [loss_method] [inference_logic] [inference_method] [default_arg] [creator] [weight_logic] [weight_method] [weight_cadence] [weight_default_arg] [inference_cadence] [ground_truth_lag] [p_norm] [alpha_regret] [allow_negative] [epsilon] --min-stake [amount]
Topic Creation Process:
- Economic planning: Set minimum stake and participation requirements
- Logic configuration: Define inference and loss calculation methods
- Cadence settings: Configure timing for inferences and weight updates
- Quality parameters: Set accuracy requirements and evaluation criteria
Parameters Explained:
metadata: JSON string with topic description and configurationloss_logic: Contract or logic for calculating prediction lossesinference_logic: Contract or logic for generating inferencesweight_cadence: How often weights are recalculatedground_truth_lag: Delay before ground truth is available
Fund Topic
- RPC Method:
FundTopic - Command:
fund-topic [topic_id] [amount] - Description: Add funding to an existing topic to incentivize participation.
- Positional Arguments:
topic_idThe topic to fundamountAmount of tokens to contribute as funding
Funding Strategy:
- Incentive enhancement: Increase rewards to attract better participants
- Quality improvement: Higher funding often correlates with better predictions
- Network growth: Well-funded topics attract more participants
- Competitive advantage: Strategic funding can improve topic performance
Stake Management Transactions
Add Stake to Reputer
- RPC Method:
AddStake - Command:
add-stake [topic_id] [amount] - Description: Add stake to yourself as a reputer in a topic.
- Positional Arguments:
topic_idThe topic to stake inamountAmount of tokens to stake
Self-Staking Benefits:
- Participation qualification: Meet minimum stake requirements
- Skin-in-the-game: Demonstrate commitment to quality evaluation
- Reward eligibility: Qualify for reputer rewards based on performance
- Network contribution: Support network security and quality assurance
Remove Stake from Reputer
- RPC Method:
RemoveStake - Command:
remove-stake [topic_id] [amount] - Description: Remove stake from yourself as a reputer in a topic.
- Positional Arguments:
topic_idThe topic to remove stake fromamountAmount of tokens to unstake
Unstaking Considerations:
- Unbonding period: Stake remains locked for security period
- Penalty exposure: Remain subject to slashing during unbonding
- Reward impact: Reduced stake affects future reward eligibility
- Strategic timing: Plan unstaking around performance and market conditions
Delegate Stake to Reputer
- RPC Method:
DelegateStake - Command:
delegate-stake [topic_id] [reputer_address] [amount] - Description: Delegate stake to a reputer in a topic.
- Positional Arguments:
topic_idThe topic for delegationreputer_addressAddress of the reputer to delegate toamountAmount of tokens to delegate
Delegation Strategy:
- Passive participation: Earn rewards without direct reputer operations
- Risk distribution: Spread delegation across multiple reputers
- Performance-based: Choose reputers based on historical performance
- Diversification: Participate in multiple topics through delegation
Undelegate Stake from Reputer
- RPC Method:
UndelegateStake - Command:
undelegate-stake [topic_id] [reputer_address] [amount] - Description: Remove delegated stake from a reputer in a topic.
- Positional Arguments:
topic_idThe topic to undelegate fromreputer_addressAddress of the reputer to undelegate fromamountAmount of tokens to undelegate
Undelegation Management:
- Portfolio rebalancing: Adjust delegation based on performance
- Risk management: Reduce exposure to underperforming reputers
- Opportunity optimization: Reallocate to better opportunities
- Liquidity planning: Time undelegation for capital needs
Reward Management Transactions
Claim Rewards
- RPC Method:
ClaimRewards - Command:
claim-rewards [topic_id] - Description: Claim accumulated rewards from participation in a topic.
- Positional Arguments:
topic_idThe topic to claim rewards from
Reward Claiming:
- Regular income: Convert earned rewards to liquid tokens
- Compounding strategy: Decide between claiming and restaking rewards
- Tax planning: Manage reward claiming for tax optimization
- Reinvestment: Use claimed rewards for additional participation
Registration Transactions
Register as Worker
- RPC Method:
RegisterWorker - Command:
register-worker [topic_id] [worker_info] - Description: Register as a worker to provide inferences for a topic.
- Positional Arguments:
topic_idThe topic to register forworker_infoJSON containing worker configuration and endpoints
Worker Registration:
- Network participation: Begin providing AI/ML inferences
- Economic opportunity: Earn rewards for accurate predictions
- Technical setup: Configure endpoints and inference capabilities
- Quality commitment: Commit to providing reliable, accurate inferences
Register as Reputer
- RPC Method:
RegisterReputer - Command:
register-reputer [topic_id] [reputer_info] - Description: Register as a reputer to evaluate worker performance.
- Positional Arguments:
topic_idThe topic to register forreputer_infoJSON containing reputer configuration and capabilities
Reputer Registration:
- Quality assurance: Participate in network quality control
- Evaluation expertise: Contribute domain knowledge for assessment
- Economic participation: Earn rewards for accurate evaluations
- Network health: Support network integrity through reputation management
Best Practices
Query Optimization
Efficient Querying:
- Pagination: Use pagination for large datasets to improve performance
- Specific queries: Query specific information rather than broad datasets
- Caching: Cache frequently accessed data to reduce API calls
- Batch operations: Group related queries to minimize network overhead
Transaction Management
Transaction Best Practices:
- Gas estimation: Estimate gas requirements before submitting transactions
- Fee optimization: Balance transaction speed with cost considerations
- Error handling: Implement retry logic for failed transactions
- Confirmation tracking: Monitor transaction status and confirmations
Security Considerations
Safe Operations:
- Key management: Secure storage and handling of private keys
- Amount verification: Double-check amounts before submitting transactions
- Address validation: Verify recipient addresses to prevent loss
- Network verification: Confirm you're on the correct network
Common Workflows
Topic Participation Workflow
Getting Started:
- Query active topics: Find topics with good participation opportunities
- Check requirements: Verify minimum stake and participation requirements
- Register: Register as worker or reputer based on capabilities
- Stake: Add necessary stake to begin participation
- Monitor: Track performance and adjust strategy as needed
Delegation Workflow
Delegation Strategy:
- Research reputers: Analyze reputer performance and track records
- Evaluate topics: Choose topics with good economic potential
- Delegate stake: Distribute stake across selected reputers and topics
- Monitor performance: Track delegation returns and reputer performance
- Rebalance: Adjust delegations based on performance and opportunities
Stake Management Workflow
Lifecycle Management:
- Initial staking: Add stake to begin network participation
- Performance monitoring: Track rewards and network participation
- Strategic adjustments: Add or remove stake based on performance
- Reward claiming: Regularly claim rewards or compound them
- Exit planning: Plan stake removal timing for optimal returns
Prerequisites
- Network access: Connectivity to Allora Network RPC endpoints
- Account setup: Properly configured account with sufficient tokens
- CLI installation: Installed and configured
alloradbinary - Basic understanding: Knowledge of blockchain operations and command-line interfaces
Next Steps
- Learn about wallet setup for account configuration
- Study network parameters for understanding network configuration
- Explore topic creation for launching prediction markets
- Review staking guides for participation strategies