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

Prepopulate LPNFT denoms in view server #2410

Closed
Tracked by #1724
hdevalence opened this issue Apr 25, 2023 · 0 comments · Fixed by #2425
Closed
Tracked by #1724

Prepopulate LPNFT denoms in view server #2410

hdevalence opened this issue Apr 25, 2023 · 0 comments · Fixed by #2425
Assignees

Comments

@hdevalence
Copy link
Member

Is your feature request related to a problem? Please describe.

The view server fetches denoms from the chain, but LPNFT denoms aren't registered with the chain, because they're mostly only relevant to the user who actually controls the LPNFT, so they won't be found in the lookup.

There are four denoms for each position ID, one for each position state:

LpNft::new(id, position::State::Opened).denom()
LpNft::new(id, position::State::Closed).denom()
LpNft::new(id, position::State::Withdrawn).denom()
LpNft::new(id, position::State::Claimed).denom()

When the view server downloads a full transaction, it should, for each PositionOpen action, grab the position ID out of the action, compute the four denoms, and save them locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Testnet 52: Amalthe
3 participants