Skip to content

Conversation

ryangoree
Copy link
Member

@ryangoree ryangoree commented Sep 2, 2025

Partial patch to the portfolio queries which limits the "toBlock" of event queries for the longs and shorts. Some of the queries are still failing and will need to be broken up into smaller queries, but this gets us half way there so at least some positions will show up.

Copy link

changeset-bot bot commented Sep 2, 2025

⚠️ No Changeset found

Latest commit: 3be2776

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Sep 2, 2025

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

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
hyperdrive-mainnet-production Ignored Ignored Sep 2, 2025 8:25pm

@ryangoree ryangoree changed the title Add latest position blocks to portfolio long queries Add latest position blocks to portfolio queries Sep 2, 2025
Comment on lines +74 to +83
} catch (e) {
console.error(
`Error fetching longs for ${hyperdrive.address}:`,
e,
);
return {
hyperdrive,
openLongs: [],
};
}
Copy link
Member Author

Choose a reason for hiding this comment

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

This prevents the entire query from failing when one of the chains fails.

Copy link
Contributor

@jrhea jrhea left a comment

Choose a reason for hiding this comment

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

out of curiosity, why do long, short and lp have different latest position blocks? did you actually find the latest ones for each chain?

@ryangoree
Copy link
Member Author

out of curiosity, why do long, short and lp have different latest position blocks? did you actually find the latest ones for each chain?

Yeah, I went to the analytics page for each chain, and sorted each tab by "Latest Activity", then added the latest block from there.
image

@jrhea
Copy link
Contributor

jrhea commented Sep 2, 2025

out of curiosity, why do long, short and lp have different latest position blocks? did you actually find the latest ones for each chain?

Yeah, I went to the analytics page for each chain, and sorted each tab by "Latest Activity", then added the latest block from there. image

oh nice! thanks for doing that

@jrhea jrhea merged commit 8939286 into main Sep 2, 2025
8 checks passed
@jrhea jrhea deleted the ryan-latest-blocks branch September 2, 2025 20:57
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.

2 participants