Skip to content

Add can_claim_all_rewards to stake config#1078

Merged
DRadmir merged 1 commit intomainfrom
monad-claim-reward-issue
Apr 15, 2026
Merged

Add can_claim_all_rewards to stake config#1078
DRadmir merged 1 commit intomainfrom
monad-claim-reward-issue

Conversation

@DRadmir
Copy link
Copy Markdown
Contributor

@DRadmir DRadmir commented Apr 15, 2026

Introduce a new boolean flag can_claim_all_rewards to StakeChainConfig in both crates/primitives and gemstone, add StakeChain::get_can_claim_all_rewards() accessor, update CHAIN_CONFIGS entries with appropriate values for each chain, and adjust get_stake_config and tests to include the new field. This separates the permission to claim all rewards from the existing can_claim_rewards flag.

Introduce a new boolean flag `can_claim_all_rewards` to StakeChainConfig in both `crates/primitives` and `gemstone`, add `StakeChain::get_can_claim_all_rewards()` accessor, update CHAIN_CONFIGS entries with appropriate values for each chain, and adjust `get_stake_config` and tests to include the new field. This separates the permission to claim all rewards from the existing `can_claim_rewards` flag.
@DRadmir DRadmir requested a review from 0xh3rman April 15, 2026 09:11
@DRadmir DRadmir self-assigned this Apr 15, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a can_claim_all_rewards field to the StakeChainConfig struct and implements a corresponding getter method in StakeChain. The review feedback recommends adding documentation comments to these new additions to clarify their functionality and maintain consistency with the existing codebase.

pub can_redelegate: bool,
pub can_withdraw: bool,
pub can_claim_rewards: bool,
pub can_claim_all_rewards: bool,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Adding a documentation comment to the new can_claim_all_rewards field would help clarify its specific meaning, especially in contrast to can_claim_rewards. For example, it could specify that this flag indicates support for claiming rewards from all validators in a single transaction.

Suggested change
pub can_claim_all_rewards: bool,
/// Whether the chain supports claiming all rewards in a single transaction.
pub can_claim_all_rewards: bool,

self.config().can_claim_rewards
}

pub fn get_can_claim_all_rewards(&self) -> bool {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The new method get_can_claim_all_rewards should have a documentation comment to maintain consistency with other methods in this implementation block (e.g., get_lock_time, get_can_redelegate).

Suggested change
pub fn get_can_claim_all_rewards(&self) -> bool {
/// Get if chain supports claiming all rewards in one transaction
pub fn get_can_claim_all_rewards(&self) -> bool {

@gemdev111 gemdev111 self-requested a review April 15, 2026 16:09
@DRadmir DRadmir merged commit f192b1c into main Apr 15, 2026
6 checks passed
@DRadmir DRadmir deleted the monad-claim-reward-issue branch April 15, 2026 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants