Skip to content

Conversation

evan-wall-mysten
Copy link
Collaborator

Description

Implements reportRecords based on

async fn report_records(
&self,
ctx: &Context<'_>,
first: Option<u64>,
before: Option<CAddr>,
last: Option<u64>,
after: Option<CAddr>,
) -> Result<Connection<String, Address>> {
let page = Page::from_params(ctx.data_unchecked(), first, after, last, before)?;
let mut connection = Connection::new(false, false);
let Some(addresses) = &self.report_records else {
return Ok(connection);
};
let Some((prev, next, _, cs)) =
page.paginate_consistent_indices(addresses.len(), self.checkpoint_viewed_at)?
else {
return Ok(connection);
};
connection.has_previous_page = prev;
connection.has_next_page = next;
for c in cs {
connection.edges.push(Edge::new(
c.encode_cursor(),
Address {
address: addresses[c.ix].address,
checkpoint_viewed_at: c.c,
},
));
}
Ok(connection)
}
.

The return type is now Validator instead of Address.

Test plan

This PR adds new report_records.move snapshot test file. Testing pagination is left as a todo.


Release notes

Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.

For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.

  • Protocol:
  • Nodes (Validators and Full nodes):
  • gRPC:
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK:

@evan-wall-mysten evan-wall-mysten requested a review from a team as a code owner September 26, 2025 18:53
@evan-wall-mysten evan-wall-mysten temporarily deployed to sui-typescript-aws-kms-test-env September 26, 2025 18:53 — with GitHub Actions Inactive
Copy link

vercel bot commented Sep 26, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
sui-docs Ready Ready Preview Comment Oct 6, 2025 7:12pm
2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
multisig-toolkit Ignored Ignored Preview Oct 6, 2025 7:12pm
sui-kiosk Ignored Ignored Preview Oct 6, 2025 7:12pm

Copy link
Contributor

@amnn amnn left a comment

Choose a reason for hiding this comment

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

👍

@evan-wall-mysten evan-wall-mysten temporarily deployed to sui-typescript-aws-kms-test-env October 6, 2025 19:06 — with GitHub Actions Inactive
@evan-wall-mysten evan-wall-mysten enabled auto-merge (squash) October 6, 2025 19:08
@evan-wall-mysten evan-wall-mysten merged commit 715bc9a into main Oct 6, 2025
51 of 53 checks passed
@evan-wall-mysten evan-wall-mysten deleted the graphql_report_records branch October 6, 2025 19:47
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