Skip to content

Backport scripts for getting position IDs and position details#296

Open
illia-malachyn wants to merge 6 commits intomainfrom
illia-malachyn/backport-add-get-position-ids-script
Open

Backport scripts for getting position IDs and position details#296
illia-malachyn wants to merge 6 commits intomainfrom
illia-malachyn/backport-add-get-position-ids-script

Conversation

@illia-malachyn
Copy link
Copy Markdown
Collaborator

@illia-malachyn illia-malachyn commented Mar 26, 2026

Backporting this branch with a difference that in this PR, we filter open positions explicitly, as FlowALPv0 behavior is different on main

illia-malachyn and others added 6 commits March 26, 2026 12:31
Since the pool contract does not remove positions from its dictionary
on close (balance keys persist with zero values), the previous scripts
returned stale/closed position IDs. Rename to get_open_position_ids
and get_open_positions_by_ids, and filter by checking for non-zero
balances so only truly open positions are returned.
@illia-malachyn illia-malachyn requested a review from a team as a code owner March 26, 2026 11:41
@illia-malachyn
Copy link
Copy Markdown
Collaborator Author

illia-malachyn commented Mar 26, 2026

@nialexsan is this a correct way to return only open positions? We don't delete closed positions on main, but we do so on v0

Copy link
Copy Markdown
Member

@jordanschalm jordanschalm left a comment

Choose a reason for hiding this comment

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

I assume we will want to port @nialexsan's closePosition functionality to main at some point, so I would hold off on implementing a separate mechanism to find closed positions. We should be able to largely retain the scripts you made for the v0 version.

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