22: Add dummy AnchorIdlJupiterPerpsCustodyDecoder.decodeCurrentCumulativeInterestRate() method

This commit is contained in:
2026-06-30 16:52:57 +02:00
parent e754df67b6
commit 1f22f5f16b
@@ -23,10 +23,6 @@ class AnchorIdlJupiterPerpsCustodyDecoder {
return readPublicKey(data, MINT_OFFSET); return readPublicKey(data, MINT_OFFSET);
} }
BigInteger decodeCurrentCumulativeInterestRate(SolanaAccountInfo custodyAccountInfo) {
return null;
}
private ΩSPLMintAddressΩ readPublicKey( private ΩSPLMintAddressΩ readPublicKey(
byte[] data, byte[] data,
int offset int offset
@@ -47,9 +43,22 @@ class AnchorIdlJupiterPerpsCustodyDecoder {
private static final int ANCHOR_DISCRIMINATOR_LENGTH = 8; private static final int ANCHOR_DISCRIMINATOR_LENGTH = 8;
private static final int PUBLIC_KEY_LENGTH = 32; private static final int PUBLIC_KEY_LENGTH = 32;
private static final int MINT_OFFSET = // Offsets:
ANCHOR_DISCRIMINATOR_LENGTH // 8 discriminator
+ PUBLIC_KEY_LENGTH; // pool // +32 pool
// +32 mint
// +32 token_account
// +1 decimals
// +1 is_stable
// +45 oracle
// +48 pricing
// +7 permissions
// +8 target_ratio_bps
// +48 assets
private static final int MINT_OFFSET = ANCHOR_DISCRIMINATOR_LENGTH + PUBLIC_KEY_LENGTH;
private static final int FUNDING_RATE_STATE_OFFSET = 262;
private static final int CUMULATIVE_INTEREST_RATE_OFFSET = FUNDING_RATE_STATE_OFFSET;
private static final Base58Codec base58 = new Base58CodecImpl(); private static final Base58Codec base58 = new Base58CodecImpl();
} }