Skip to content

Commit 4c2d3bf

Browse files
committed
add feature flag sdk fn
1 parent ed20ae2 commit 4c2d3bf

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

sdk/src/math/state.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,11 @@ export function useMedianTriggerPrice(stateAccount: StateAccount): boolean {
3838
(stateAccount.featureBitFlags & FeatureBitFlags.MEDIAN_TRIGGER_PRICE) > 0
3939
);
4040
}
41+
42+
export function builderCodesEnabled(stateAccount: StateAccount): boolean {
43+
return (stateAccount.featureBitFlags & FeatureBitFlags.BUILDER_CODES) > 0;
44+
}
45+
46+
export function builderReferralEnabled(stateAccount: StateAccount): boolean {
47+
return (stateAccount.featureBitFlags & FeatureBitFlags.BUILDER_REFERRAL) > 0;
48+
}

sdk/src/types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ export enum ExchangeStatus {
3131
export enum FeatureBitFlags {
3232
MM_ORACLE_UPDATE = 1,
3333
MEDIAN_TRIGGER_PRICE = 2,
34+
BUILDER_CODES = 4,
35+
BUILDER_REFERRAL = 8,
3436
}
3537

3638
export class MarketStatus {

0 commit comments

Comments
 (0)