Merge pull request #121 from drift-labs/master

maxPrice oracle field
This commit is contained in:
Nour Alharithi
2024-03-25 14:28:16 -07:00
committed by GitHub
4 changed files with 8 additions and 5 deletions

View File

@@ -6,7 +6,7 @@
"license": "Apache-2.0", "license": "Apache-2.0",
"dependencies": { "dependencies": {
"@coral-xyz/anchor": "^0.29.0", "@coral-xyz/anchor": "^0.29.0",
"@drift-labs/sdk": "2.74.0-beta.8", "@drift-labs/sdk": "2.74.0-beta.12",
"@opentelemetry/api": "^1.1.0", "@opentelemetry/api": "^1.1.0",
"@opentelemetry/auto-instrumentations-node": "^0.31.1", "@opentelemetry/auto-instrumentations-node": "^0.31.1",
"@opentelemetry/exporter-prometheus": "^0.31.0", "@opentelemetry/exporter-prometheus": "^0.31.0",

View File

@@ -548,6 +548,7 @@ const main = async (): Promise<void> => {
confidence: oracle.confidence.toString(), confidence: oracle.confidence.toString(),
hasSufficientNumberOfDataPoints: hasSufficientNumberOfDataPoints:
oracle.hasSufficientNumberOfDataPoints, oracle.hasSufficientNumberOfDataPoints,
maxPrice: oracle.maxPrice,
}; };
if (oracle.twap) { if (oracle.twap) {
oracleHuman['twap'] = oracle.twap.toString(); oracleHuman['twap'] = oracle.twap.toString();

View File

@@ -69,6 +69,7 @@ type SerializableOraclePriceData = {
hasSufficientNumberOfDataPoints: boolean; hasSufficientNumberOfDataPoints: boolean;
twap?: string; twap?: string;
twapConfidence?: string; twapConfidence?: string;
maxPrice?: string;
}; };
const getSerializableOraclePriceData = ( const getSerializableOraclePriceData = (
@@ -82,6 +83,7 @@ const getSerializableOraclePriceData = (
oraclePriceData.hasSufficientNumberOfDataPoints, oraclePriceData.hasSufficientNumberOfDataPoints,
twap: oraclePriceData.twap?.toString?.(), twap: oraclePriceData.twap?.toString?.(),
twapConfidence: oraclePriceData.twapConfidence?.toString?.(), twapConfidence: oraclePriceData.twapConfidence?.toString?.(),
maxPrice: oraclePriceData.maxPrice?.toString?.(),
}; };
}; };

View File

@@ -115,10 +115,10 @@
enabled "2.0.x" enabled "2.0.x"
kuler "^2.0.0" kuler "^2.0.0"
"@drift-labs/sdk@2.74.0-beta.8": "@drift-labs/sdk@2.74.0-beta.12":
version "2.74.0-beta.8" version "2.74.0-beta.12"
resolved "https://registry.yarnpkg.com/@drift-labs/sdk/-/sdk-2.74.0-beta.8.tgz#0737827a8299d0eb2c591983612028f501ef22ed" resolved "https://registry.yarnpkg.com/@drift-labs/sdk/-/sdk-2.74.0-beta.12.tgz#86a4e0657c5b425e303c4d3684ad82fe1f7919ce"
integrity sha512-QlQ9X48nrs7xMIlLotdV3Wdje/4JC5/yNkvRTdSf+ZGbyjPp8xaBcjD3nx+pdSKqP/A7SiZWQTw6XZQa/qz9qQ== integrity sha512-YFr6jnQn1ANRrAiby5gdg93dHyKVG3wJ9bTe/U3p2T6PoxDzzhZF4/1oabewodGNia5PHvTRiA3rpbmTHdvWkQ==
dependencies: dependencies:
"@coral-xyz/anchor" "0.28.1-beta.2" "@coral-xyz/anchor" "0.28.1-beta.2"
"@ellipsis-labs/phoenix-sdk" "^1.4.2" "@ellipsis-labs/phoenix-sdk" "^1.4.2"