feat(write): claim-emissions command (#5 sub-task 8/13)#20
Merged
anajuliabit merged 1 commit intomainfrom May 6, 2026
Merged
Conversation
23 tasks
731e185 to
53a7728
Compare
Claims a pod's emissions for a given epoch. Both networks supported,
with caveats: testnet ABI is leaner so claim-status / amount-due
checks only run on mainnet.
Pre-flight (mainnet): NOT_POD_OWNER, ALREADY_CLAIMED, NO_EMISSIONS_DUE.
Pre-flight (testnet): NOT_POD_OWNER only — caller bears the cost of a
doomed re-claim if they're already-claimed for that epoch (testnet
ABI lacks hasPodOwnerClaimedEmissions / getPodEmissionsOfEpoch).
Args fingerprint: { podId, epoch }.
Output: { txHash, podId, epoch, amountClaimed, block, basescanUrl } —
amountClaimed is { unavailable } on testnet.
Pipeline green.
53a7728 to
655de6f
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Claims a pod's emissions for a given epoch.
Network split: the V2 testnet ABI is leaner —
hasPodOwnerClaimedEmissionsandgetPodEmissionsOfEpochonly exist on the V1 mainnet ABI. So:NOT_POD_OWNER+ALREADY_CLAIMED+NO_EMISSIONS_DUENOT_POD_OWNERonly — caller bears the cost of a doomed re-claim if they're already-claimed for that epochBoth networks share
ownerOfandclaimPodOwnerEmissions, so the actual write call is the same.Output:
{ txHash, podId, epoch, amountClaimed: {raw, formatted} | {unavailable}, block, basescanUrl }.amountClaimedis{unavailable}on testnet (no on-chain way to know without the missing view). Two-phase write, args fingerprint{ podId, epoch }.🤖 Generated with Claude Code