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

Add staking queries #15

Merged
merged 13 commits into from
Oct 13, 2023
Merged

Add staking queries #15

merged 13 commits into from
Oct 13, 2023

Conversation

heliuchuan
Copy link
Contributor

@heliuchuan heliuchuan commented Oct 11, 2023

Description

Adds the getDelegatedStakingActivities and getNumberOfDelegators queries. Also adds a query to get number of delegators for all pools.

Test Plan

pnpm test

@heliuchuan heliuchuan requested a review from a team as a code owner October 11, 2023 09:01
src/api/staking.ts Show resolved Hide resolved
src/api/staking.ts Show resolved Hide resolved
src/internal/queries/getNumberOfDelegatorsQuery.graphql Outdated Show resolved Hide resolved
tests/e2e/api/staking.test.ts Outdated Show resolved Hide resolved
src/types/generated/types.ts Outdated Show resolved Hide resolved
import { GetDelegatedStakingActivities, GetNumberOfDelegators } from "../types/generated/queries";
import { queryIndexer } from "./general";

export async function getNumberOfDelegators(args: {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would rename here to getNumberOfDelegatorsByPoolAddress and the second one getNumberOfDelegators

src/internal/account.ts Show resolved Hide resolved
@gregnazario gregnazario enabled auto-merge (squash) October 13, 2023 19:08
@heliuchuan heliuchuan disabled auto-merge October 13, 2023 19:37
@heliuchuan heliuchuan enabled auto-merge (squash) October 13, 2023 20:47
@heliuchuan heliuchuan disabled auto-merge October 13, 2023 20:47
@heliuchuan heliuchuan merged commit ad7898b into main Oct 13, 2023
5 checks passed
@heliuchuan heliuchuan deleted the staking branch October 13, 2023 21:09
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