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
Hi, been trying to fetch user positions for a DLMM pool and keep getting the following error:
Uncaught (in promise) TypeError: clockAccInfo.data.readBigInt64LE is not a function at DLMM.getPositionsByUserAndLbPair (@meteora-ag_dlmm.js?v=f8389d80:23004:25) at async getMeteora (getMeteora.ts:15:17) at async loadMarkets (MyFile.tsx:50:25)
Not sure what is causing it, the account data object returned by getMultipleChunkedAccountInfos does NOT have the ".readBigInt64LE " method. The result was the same when I tried to get the Clock data outside of the node module using a standard connection and 3 RPC's from 3 different providers.
My @solana/web3.js version is 1.91.7 have also tried with 1.87.6 and latest @~1.78.3,
Potential solution:
I believe I have managed to get the correct output using .readInt32LE() which is available.
`
const clockinfo = connection.getAccountInfo(SYSVAR_CLOCK_PUBKEY);
const pclockinfo = connection.getParsedAccountInfo(SYSVAR_CLOCK_PUBKEY);
Hi, been trying to fetch user positions for a DLMM pool and keep getting the following error:
Uncaught (in promise) TypeError: clockAccInfo.data.readBigInt64LE is not a function at DLMM.getPositionsByUserAndLbPair (@meteora-ag_dlmm.js?v=f8389d80:23004:25) at async getMeteora (getMeteora.ts:15:17) at async loadMarkets (MyFile.tsx:50:25)
Not sure what is causing it, the account data object returned by getMultipleChunkedAccountInfos does NOT have the ".readBigInt64LE " method. The result was the same when I tried to get the Clock data outside of the node module using a standard connection and 3 RPC's from 3 different providers.
My @solana/web3.js version is 1.91.7 have also tried with 1.87.6 and latest @~1.78.3,
Potential solution:
I believe I have managed to get the correct output using .readInt32LE() which is available.
`
const clockinfo = connection.getAccountInfo(SYSVAR_CLOCK_PUBKEY);
const pclockinfo = connection.getParsedAccountInfo(SYSVAR_CLOCK_PUBKEY);
`
Difference likely due to latency between calls
Available methods for the returned account data:
ƒ compare(target, start, end, thisStart, thisEnd)
ƒ copy(target, targetStart, start, end)
ƒ equals(b)
ƒ fill(val, start, end, encoding)
ƒ includes(val, byteOffset, encoding)
ƒ indexOf(val, byteOffset, encoding)
ƒ inspect()
ƒ lastIndexOf(val, byteOffset, encoding)
ƒ readDoubleBE(offset, noAssert)
ƒ readDoubleLE(offset, noAssert)
ƒ readFloatBE(offset, noAssert)
ƒ readFloatLE(offset, noAssert)
ƒ readInt8(offset, noAssert)
ƒ readInt16BE(offset, noAssert)
ƒ readInt16LE(offset, noAssert)
ƒ readInt32BE(offset, noAssert)
ƒ readInt32LE(offset, noAssert)
ƒ readIntBE(offset, byteLength2, noAssert)
ƒ readIntLE(offset, byteLength2, noAssert)
ƒ readUInt8(offset, noAssert)
ƒ readUInt16BE(offset, noAssert)
ƒ readUInt16LE(offset, noAssert)
ƒ readUInt32BE(offset, noAssert)
ƒ readUInt32LE(offset, noAssert)
ƒ readUIntBE(offset, byteLength2, noAssert)
ƒ readUIntLE(offset, byteLength2, noAssert)
ƒ readUInt8(offset, noAssert)
ƒ readUInt16BE(offset, noAssert)
ƒ readUInt16LE(offset, noAssert)
ƒ readUInt32BE(offset, noAssert)
ƒ readUInt32LE(offset, noAssert)
ƒ readUIntBE(offset, byteLength2, noAssert)
ƒ readUIntLE(offset, byteLength2, noAssert)
ƒ slice(start, end)
ƒ swap16()
ƒ swap32()
ƒ swap64()
ƒ toJSON()
ƒ toString()
ƒ toString()
ƒ write(string, offset, length, encoding)
ƒ writeDoubleBE(value, offset, noAssert)
ƒ writeDoubleLE(value, offset, noAssert)
ƒ writeFloatBE(value, offset, noAssert)
ƒ writeFloatLE(value, offset, noAssert)
ƒ writeInt8(value, offset, noAssert)
ƒ writeInt16BE(value, offset, noAssert)
ƒ writeInt16LE(value, offset, noAssert)
ƒ writeInt32BE(value, offset, noAssert)
ƒ writeInt32LE(value, offset, noAssert)
ƒ writeIntBE(value, offset, byteLength2, noAssert)
ƒ writeIntLE(value, offset, byteLength2, noAssert)
ƒ writeUInt8(value, offset, noAssert)
ƒ writeUInt16BE(value, offset, noAssert)
ƒ writeUInt16LE(value, offset, noAssert)
ƒ writeUInt32BE(value, offset, noAssert)
ƒ writeUInt32LE(value, offset, noAssert)
ƒ writeUIntBE(value, offset, byteLength2, noAssert)
ƒ writeUIntLE(value, offset, byteLength2, noAssert)
ƒ writeUInt8(value, offset, noAssert)
ƒ writeUInt16BE(value, offset, noAssert)
ƒ writeUInt16LE(value, offset, noAssert)
ƒ writeUInt32BE(value, offset, noAssert)
ƒ writeUInt32LE(value, offset, noAssert)
ƒ writeUIntBE(value, offset, byteLength2, noAssert)
ƒ writeUIntLE(value, offset, byteLength2, noAssert)
The text was updated successfully, but these errors were encountered: