Merge branch 'master' into mainnet-beta
This commit is contained in:
Submodule drift-common updated: 05cc04b114...6ae9e6541b
@@ -46,6 +46,14 @@ function evaluateHealth(currentSlot: number): {
|
|||||||
return { isHealthy: true };
|
return { isHealthy: true };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const currentHealthStatus = getHealthStatus();
|
||||||
|
if (currentHealthStatus !== HEALTH_STATUS.Ok) {
|
||||||
|
return {
|
||||||
|
isHealthy: false,
|
||||||
|
reason: `Unhealthy state: ${currentHealthStatus}`,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
const timeDelta = now - globalHealthState.lastSlotTimestamp;
|
const timeDelta = now - globalHealthState.lastSlotTimestamp;
|
||||||
const slotDelta = currentSlot - globalHealthState.lastSlot;
|
const slotDelta = currentSlot - globalHealthState.lastSlot;
|
||||||
|
|
||||||
|
|||||||
@@ -937,6 +937,7 @@ const main = async (): Promise<void> => {
|
|||||||
auctionEndPriceOffsetFrom,
|
auctionEndPriceOffsetFrom,
|
||||||
additionalEndPriceBuffer,
|
additionalEndPriceBuffer,
|
||||||
userOrderId,
|
userOrderId,
|
||||||
|
forceUpToSlippage,
|
||||||
} = req.query;
|
} = req.query;
|
||||||
|
|
||||||
// Validate required parameters
|
// Validate required parameters
|
||||||
@@ -1001,6 +1002,7 @@ const main = async (): Promise<void> => {
|
|||||||
auctionEndPriceOffsetFrom: auctionEndPriceOffsetFrom as any,
|
auctionEndPriceOffsetFrom: auctionEndPriceOffsetFrom as any,
|
||||||
additionalEndPriceBuffer: additionalEndPriceBuffer as string,
|
additionalEndPriceBuffer: additionalEndPriceBuffer as string,
|
||||||
userOrderId: parseNumber(userOrderId as string),
|
userOrderId: parseNumber(userOrderId as string),
|
||||||
|
forceUpToSlippage: parseBoolean(forceUpToSlippage as string),
|
||||||
};
|
};
|
||||||
|
|
||||||
// Only add non-undefined values
|
// Only add non-undefined values
|
||||||
|
|||||||
@@ -128,6 +128,9 @@ const SPOT_MARKETS_TO_LOAD =
|
|||||||
: undefined;
|
: undefined;
|
||||||
|
|
||||||
const enableOffloadQueue = process.env.ENABLE_OFFLOAD === 'true';
|
const enableOffloadQueue = process.env.ENABLE_OFFLOAD === 'true';
|
||||||
|
const ignoreList = process.env.IGNORE_LIST?.split(',') || [
|
||||||
|
'5N1AcdftujhXWZdBaqfciaKtXn6uVBKjmgwf6aQxR1vW',
|
||||||
|
];
|
||||||
|
|
||||||
logger.info(`RPC endpoint: ${endpoint}`);
|
logger.info(`RPC endpoint: ${endpoint}`);
|
||||||
logger.info(`WS endpoint: ${wsEndpoint}`);
|
logger.info(`WS endpoint: ${wsEndpoint}`);
|
||||||
@@ -478,7 +481,7 @@ const main = async () => {
|
|||||||
const orderSubscriber = new OrderSubscriberFiltered({
|
const orderSubscriber = new OrderSubscriberFiltered({
|
||||||
driftClient,
|
driftClient,
|
||||||
subscriptionConfig,
|
subscriptionConfig,
|
||||||
ignoreList: ['5N1AcdftujhXWZdBaqfciaKtXn6uVBKjmgwf6aQxR1vW']
|
ignoreList,
|
||||||
});
|
});
|
||||||
|
|
||||||
dlobProvider = getDLOBProviderFromOrderSubscriber(orderSubscriber);
|
dlobProvider = getDLOBProviderFromOrderSubscriber(orderSubscriber);
|
||||||
|
|||||||
@@ -21,4 +21,5 @@ export type AuctionParamArgs = {
|
|||||||
auctionEndPriceOffsetFrom?: TradeOffsetPrice;
|
auctionEndPriceOffsetFrom?: TradeOffsetPrice;
|
||||||
additionalEndPriceBuffer?: string;
|
additionalEndPriceBuffer?: string;
|
||||||
userOrderId?: number;
|
userOrderId?: number;
|
||||||
|
forceUpToSlippage?: boolean;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -985,7 +985,7 @@ export const mapToMarketOrderParams = async (
|
|||||||
slippageTolerance: processedSlippageTolerance,
|
slippageTolerance: processedSlippageTolerance,
|
||||||
isOracleOrder: params.isOracleOrder,
|
isOracleOrder: params.isOracleOrder,
|
||||||
additionalEndPriceBuffer,
|
additionalEndPriceBuffer,
|
||||||
forceUpToSlippage: true,
|
forceUpToSlippage: params.forceUpToSlippage,
|
||||||
userOrderId: params.userOrderId,
|
userOrderId: params.userOrderId,
|
||||||
},
|
},
|
||||||
estimatedPrices,
|
estimatedPrices,
|
||||||
|
|||||||
Reference in New Issue
Block a user