Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add grpc endpoints for staking module, extend cli and endpoints, improve impls #291

Merged
merged 12 commits into from
Oct 8, 2024

Conversation

dmvict
Copy link
Collaborator

@dmvict dmvict commented Sep 26, 2024

No description provided.

@dmvict dmvict requested review from joneskm and NYBACHOK October 1, 2024 06:12
@@ -149,6 +155,82 @@ impl<
}
}

pub fn query_delegator_validator<DB: Database>(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Omit writing such method in keeper. Better move them to abci_handler

}
}

pub fn query_validator_delegations<DB: Database>(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Omit writing such method in keeper. Better move them to abci_handler

}
}

pub fn query_validator_unbonding_delegations<DB: Database>(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Omit writing such method in keeper. Better move them to abci_handler

@@ -228,6 +310,71 @@ impl<
(p_result, iter.collect())
}

/// query_delegator_validators queries all validators info for given delegator address
pub fn query_delegator_validators<DB: Database>(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Omit writing such method in keeper. Better move them to abci_handler

}
}

pub fn query_historical_info<DB: Database>(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Omit writing such method in keeper. Better move them to abci_handler

}
}

pub fn query_pool<DB: Database>(&self, ctx: &QueryContext<DB, SK>) -> QueryPoolResponse {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Omit writing such method in keeper. Better move them to abci_handler

@@ -201,6 +242,22 @@ impl<

Ok(self.keeper.query_validators(ctx, req).into_bytes())
}
"/cosmos.staking.v1beta1.Query/ValidatorDelegations" => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Prefer {TYPE_NAME}::QUERY_URL if query implement with macro.

@joneskm joneskm merged commit c21b49e into rumos-io:main Oct 8, 2024
1 check passed
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