This repository was archived by the owner on Sep 8, 2026. It is now read-only.
feat(contributor-rewards): add read-rewards command - #212
Merged
Conversation
karl-dz
suggested changes
Nov 26, 2025
karl-dz
left a comment
Contributor
There was a problem hiding this comment.
Can you update the changelog?
Contributor
Author
done 👍 |
karl-dz
approved these changes
Nov 26, 2025
bgm-malbeclabs
pushed a commit
to malbeclabs/doublezero
that referenced
this pull request
Aug 28, 2026
…ezero-offchain#212) # Summary Add `read-rewards` command and `--json` flag support Fixes: #2298 Adds a new `read-rewards` command to fetch all contributor rewards for an epoch in a single RPC call, and adds --json output support to both read-rewards and check-reward commands. ## Changes - Add `ReadRewards` command with `-e/--epoch` and `--json` flags - Add `--json` flag to existing CheckReward command - Add `read_all_rewards()` function in ledger_operations to fetch and display all rewards - Add `CheckRewardOutput, RewardEntry, AllRewardsOutput` structs for JSON serialization - Update `check_contributor_reward()` to support JSON output format - Add `read_all_rewards()` method to orchestrator ## Usage ```bash # Read all rewards (table) $ doublezero-contributor-rewards read-rewards -e 56 # Read all rewards (JSON) $ doublezero-contributor-rewards read-rewards -e 56 --json # Check single reward (JSON) $ doublezero-contributor-rewards check-reward -e 56 -c <PUBKEY> --json ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add
read-rewardscommand and--jsonflag supportFixes: malbeclabs/doublezero#2298
Adds a new
read-rewardscommand to fetch all contributor rewards for an epoch in a single RPC call, and adds --json output support to both read-rewards and check-reward commands.Changes
ReadRewardscommand with-e/--epochand--jsonflags--jsonflag to existing CheckReward commandread_all_rewards()function in ledger_operations to fetch and display all rewardsCheckRewardOutput, RewardEntry, AllRewardsOutputstructs for JSON serializationcheck_contributor_reward()to support JSON output formatread_all_rewards()method to orchestratorUsage