You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const pricePublicKey = new PublicKey(oracle.priceAddress);
const result = await connection.getAccountInfo(pricePublicKey);
if (result !== null) {
let { price, previousPrice } = parsePriceData(result.data);
priceData = price || previousPrice;
}
Error
Error: The value of "offset is out of range. It must be >= 0 and <= 126. Received 176
at ERR_OUT_OF_RANGE (c:\Users\dedaq\Documents\SolendLiquidator\dans-liquidator\src\libs\pyth.ts:287:3)
at boundsError (c:\Users\dedaq\Documents\SolendLiquidator\dans-liquidator\src\libs\pyth.ts:283:9)
at readBigUInt64LE (c:\Users\dedaq\Documents\SolendLiquidator\dans-liquidator\src\libs\pyth.ts:247:5)
at parsePriceData (c:\Users\dedaq\Documents\SolendLiquidator\dans-liquidator\src\libs\pyth.ts:162:24)
at getTokenOracleData (c:\Users\dedaq\Documents\SolendLiquidator\dans-liquidator\src\libs\pyth.ts:56:38)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at getTokensOracleData (c:\Users\dedaq\Documents\SolendLiquidator\dans-liquidator\src\libs\pyth.ts:104:16)
at runLiquidator (c:\Users\dedaq\Documents\SolendLiquidator\dans-liquidator\src\liquidate.ts:49:28)
Node.js v20.10.0
I'm not sure why it's not able to parse the oracles data anymore.
The text was updated successfully, but these errors were encountered:
I'm starting to study programming on Solana and in your solution to the "parsePriceData" error, can you indicate where we should get or import "PythSolanaReceiver", "NodeWallet" and "RAND_KEYPAIR" from?
Code in question
Error
I'm not sure why it's not able to parse the oracles data anymore.
The text was updated successfully, but these errors were encountered: