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

Respect tradeable flag in Omnipool #7

Open
mrq1911 opened this issue Jan 12, 2023 · 0 comments
Open

Respect tradeable flag in Omnipool #7

mrq1911 opened this issue Jan 12, 2023 · 0 comments
Assignees
Labels
area/sdk Related to trading router kind/enhancement Enhancement of existing functionality

Comments

@mrq1911
Copy link
Member

mrq1911 commented Jan 12, 2023

functions that are enabled to do with asset is stored in tradable bit flags
https://apidocs.bsx.fi/HydraDX/pallets/Omnipool/storage/Assets

hub asset (LRNA) has these flags stored in:
https://apidocs.bsx.fi/HydraDX/pallets/Omnipool/storage/HubAssetTradability

these bitflags can be transformed using the WASM to the following permissions:

export function is_sell_allowed(a: number): number;
export function is_buy_allowed(a: number): number;
export function is_add_liquidity_allowed(a: number): number;
export function is_remove_liquidity_allowed(a: number): number;

buy / sell should be disabled accorg to these permissions

@nohaapav nohaapav added the kind/enhancement Enhancement of existing functionality label Feb 21, 2023
@nohaapav nohaapav added the area/sdk Related to trading router label Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/sdk Related to trading router kind/enhancement Enhancement of existing functionality
Projects
None yet
Development

No branches or pull requests

2 participants