From f76a86766db74f985b47f7af9a47bc814cbf4c60 Mon Sep 17 00:00:00 2001 From: jpe7s Date: Thu, 15 Aug 2024 10:43:43 -0500 Subject: [PATCH] use latest source gen. --- build.gradle | 8 +++--- .../drift/anchor/types/CurveRecord.java | 21 +-------------- .../programs/drift/anchor/types/FeeTier.java | 9 +------ .../anchor/types/FundingPaymentRecord.java | 10 +------ .../drift/anchor/types/FundingRateRecord.java | 14 +--------- .../anchor/types/HistoricalIndexData.java | 6 +---- .../anchor/types/HistoricalOracleData.java | 7 +---- .../drift/anchor/types/InsuranceClaim.java | 6 +---- .../drift/anchor/types/InsuranceFund.java | 10 +------ .../anchor/types/InsuranceFundRecord.java | 11 +------- .../anchor/types/InsuranceFundStake.java | 11 +------- .../types/InsuranceFundStakeRecord.java | 13 +--------- .../programs/drift/anchor/types/LPRecord.java | 9 +------ .../LiquidateBorrowForPerpPnlRecord.java | 7 +---- .../LiquidatePerpPnlForDepositRecord.java | 7 +---- .../anchor/types/LiquidatePerpRecord.java | 11 +------- .../anchor/types/LiquidateSpotRecord.java | 8 +----- .../drift/anchor/types/MarketIdentifier.java | 2 +- .../drift/anchor/types/NewUserRecord.java | 7 +---- .../programs/drift/anchor/types/Order.java | 25 +----------------- .../types/OrderFillerRewardStructure.java | 2 +- .../anchor/types/PerpFulfillmentMethod.java | 2 +- .../drift/anchor/types/PerpPosition.java | 16 +----------- .../types/PhoenixV1FulfillmentConfig.java | 11 +------- .../drift/anchor/types/PoolBalance.java | 2 +- .../drift/anchor/types/PrelaunchOracle.java | 8 +----- .../types/PriceDivergenceGuardRails.java | 2 +- .../types/ProtocolIfSharesTransferConfig.java | 6 +---- .../drift/anchor/types/ReferrerName.java | 2 +- .../types/SerumV3FulfillmentConfig.java | 16 +----------- .../drift/anchor/types/SettlePnlRecord.java | 10 +------ .../anchor/types/SpotBankruptcyRecord.java | 2 +- .../anchor/types/SpotFulfillmentMethod.java | 6 +++-- .../anchor/types/SpotInterestRecord.java | 10 +------ .../drift/anchor/types/SpotPosition.java | 9 +------ .../programs/drift/anchor/types/State.java | 26 +------------------ .../drift/anchor/types/SwapRecord.java | 10 +------ .../programs/drift/anchor/types/UserFees.java | 7 +---- .../anchor/types/ValidityGuardRails.java | 2 +- .../glam/anchor/types/EngineField.java | 2 +- .../anchor/types/AddLiquidityEvent.java | 11 +------- .../anchor/types/AddValidatorEvent.java | 2 +- .../anchor/types/BoolValueChange.java | 2 +- .../marinade/anchor/types/ClaimEvent.java | 10 +------ .../marinade/anchor/types/DepositEvent.java | 14 +--------- .../types/DepositStakeAccountEvent.java | 14 +--------- .../anchor/types/EmergencyPauseEvent.java | 2 +- .../programs/marinade/anchor/types/Fee.java | 2 +- .../marinade/anchor/types/FeeCents.java | 2 +- .../anchor/types/InitializeEvent.java | 10 +------ .../programs/marinade/anchor/types/List.java | 6 +---- .../anchor/types/MergeStakesEvent.java | 16 +----------- .../anchor/types/OrderUnstakeEvent.java | 13 +--------- .../anchor/types/PubkeyValueChange.java | 2 +- .../anchor/types/ReallocStakeListEvent.java | 2 +- .../types/ReallocValidatorListEvent.java | 2 +- .../anchor/types/RemoveLiquidityEvent.java | 11 +------- .../anchor/types/RemoveValidatorEvent.java | 2 +- .../marinade/anchor/types/ResumeEvent.java | 2 +- .../anchor/types/SplitStakeAccountInfo.java | 2 +- .../marinade/anchor/types/StakeRecord.java | 2 +- .../anchor/types/StakeReserveEvent.java | 14 +--------- .../anchor/types/TicketAccountData.java | 2 +- .../marinade/anchor/types/U32ValueChange.java | 2 +- .../marinade/anchor/types/U64ValueChange.java | 2 +- .../anchor/types/ValidatorRecord.java | 6 +---- .../types/WithdrawStakeAccountEvent.java | 18 +------------ 67 files changed, 72 insertions(+), 454 deletions(-) diff --git a/build.gradle b/build.gradle index 306a894..e068cb1 100644 --- a/build.gradle +++ b/build.gradle @@ -39,11 +39,9 @@ ext { jsoniter = '2.11.+' - sava = '1.0.9' - sava_solana_web2 = '1.0.5' - sava_solana_programs = '1.0.7' - sava_anchor_src_gen = '1.0.4' - sava_anchor_programs = '1.0.8' + sava = '1.0.12' + sava_solana_programs = '1.0.8' + sava_anchor_src_gen = '1.0.11' } subprojects { diff --git a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/CurveRecord.java b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/CurveRecord.java index 9f9de48..36ba212 100644 --- a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/CurveRecord.java +++ b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/CurveRecord.java @@ -147,25 +147,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 8 - + 8 - + 16 - + 16 - + 16 - + 16 - + 16 - + 16 - + 16 - + 16 - + 16 - + 16 - + 16 - + 16 - + 16 - + 16 - + 8 - + 16 - + 4 - + 2; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/FeeTier.java b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/FeeTier.java index ed71d95..628f933 100644 --- a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/FeeTier.java +++ b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/FeeTier.java @@ -67,13 +67,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 4 - + 4 - + 4 - + 4 - + 4 - + 4 - + 4 - + 4; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/FundingPaymentRecord.java b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/FundingPaymentRecord.java index 929182a..f6a45cc 100644 --- a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/FundingPaymentRecord.java +++ b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/FundingPaymentRecord.java @@ -81,14 +81,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 8 - + 32 - + 32 - + 2 - + 8 - + 8 - + 8 - + 16 - + 16; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/FundingRateRecord.java b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/FundingRateRecord.java index c66f5f7..789e307 100644 --- a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/FundingRateRecord.java +++ b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/FundingRateRecord.java @@ -103,18 +103,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 8 - + 8 - + 2 - + 8 - + 16 - + 16 - + 16 - + 16 - + 8 - + 8 - + 8 - + 16 - + 16; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/HistoricalIndexData.java b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/HistoricalIndexData.java index 4e4781c..08afc89 100644 --- a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/HistoricalIndexData.java +++ b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/HistoricalIndexData.java @@ -54,10 +54,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 8 - + 8 - + 8 - + 8 - + 8; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/HistoricalOracleData.java b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/HistoricalOracleData.java index f2bb29c..84383b6 100644 --- a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/HistoricalOracleData.java +++ b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/HistoricalOracleData.java @@ -61,11 +61,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 8 - + 8 - + 8 - + 8 - + 8 - + 8; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/InsuranceClaim.java b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/InsuranceClaim.java index cf61e2c..f578bb9 100644 --- a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/InsuranceClaim.java +++ b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/InsuranceClaim.java @@ -60,10 +60,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 8 - + 8 - + 8 - + 8 - + 8; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/InsuranceFund.java b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/InsuranceFund.java index 69f06d2..2bc0dd6 100644 --- a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/InsuranceFund.java +++ b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/InsuranceFund.java @@ -81,14 +81,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 32 - + 16 - + 16 - + 16 - + 8 - + 8 - + 8 - + 4 - + 4; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/InsuranceFundRecord.java b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/InsuranceFundRecord.java index 7aceb0c..5c5b1d6 100644 --- a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/InsuranceFundRecord.java +++ b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/InsuranceFundRecord.java @@ -87,15 +87,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 8 - + 2 - + 2 - + 4 - + 4 - + 8 - + 8 - + 16 - + 16 - + 8; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/InsuranceFundStake.java b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/InsuranceFundStake.java index 7dd8736..2b8c035 100644 --- a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/InsuranceFundStake.java +++ b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/InsuranceFundStake.java @@ -170,15 +170,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 8 + 32 - + 16 - + 16 - + 16 - + 8 - + 8 - + 8 - + 8 - + 2 - + Borsh.fixedLen(padding); + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/InsuranceFundStakeRecord.java b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/InsuranceFundStakeRecord.java index 7758b01..aa3a5c1 100644 --- a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/InsuranceFundStakeRecord.java +++ b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/InsuranceFundStakeRecord.java @@ -98,17 +98,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 8 - + 32 - + Borsh.len(action) - + 8 - + 2 - + 8 - + 16 - + 16 - + 16 - + 16 - + 16 - + 16; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/LPRecord.java b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/LPRecord.java index 8896aff..f2ac92f 100644 --- a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/LPRecord.java +++ b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/LPRecord.java @@ -70,13 +70,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 8 - + 32 - + Borsh.len(action) - + 8 - + 2 - + 8 - + 8 - + 8; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/LiquidateBorrowForPerpPnlRecord.java b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/LiquidateBorrowForPerpPnlRecord.java index f5b77f4..b50e972 100644 --- a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/LiquidateBorrowForPerpPnlRecord.java +++ b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/LiquidateBorrowForPerpPnlRecord.java @@ -61,11 +61,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 2 - + 8 - + 16 - + 2 - + 8 - + 16; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/LiquidatePerpPnlForDepositRecord.java b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/LiquidatePerpPnlForDepositRecord.java index 85d2144..7396acd 100644 --- a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/LiquidatePerpPnlForDepositRecord.java +++ b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/LiquidatePerpPnlForDepositRecord.java @@ -61,11 +61,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 2 - + 8 - + 16 - + 2 - + 8 - + 16; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/LiquidatePerpRecord.java b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/LiquidatePerpRecord.java index 8b79195..a240091 100644 --- a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/LiquidatePerpRecord.java +++ b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/LiquidatePerpRecord.java @@ -86,15 +86,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 2 - + 8 - + 8 - + 8 - + 8 - + 8 - + 4 - + 4 - + 8 - + 8; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/LiquidateSpotRecord.java b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/LiquidateSpotRecord.java index d9a06ef..66a56b8 100644 --- a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/LiquidateSpotRecord.java +++ b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/LiquidateSpotRecord.java @@ -69,12 +69,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 2 - + 8 - + 16 - + 2 - + 8 - + 16 - + 8; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/MarketIdentifier.java b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/MarketIdentifier.java index 5487084..be7fc3b 100644 --- a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/MarketIdentifier.java +++ b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/MarketIdentifier.java @@ -28,6 +28,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return Borsh.len(marketType) + 2; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/NewUserRecord.java b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/NewUserRecord.java index 181114b..a249f42 100644 --- a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/NewUserRecord.java +++ b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/NewUserRecord.java @@ -58,11 +58,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 8 - + 32 - + 32 - + 2 - + Borsh.fixedLen(name) - + 32; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/Order.java b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/Order.java index 40e5956..9c48cac 100644 --- a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/Order.java +++ b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/Order.java @@ -194,29 +194,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 8 - + 8 - + 8 - + 8 - + 8 - + 8 - + 8 - + 8 - + 8 - + 4 - + 4 - + 2 - + Borsh.len(status) - + Borsh.len(orderType) - + Borsh.len(marketType) - + 1 - + Borsh.len(existingPositionDirection) - + Borsh.len(direction) - + 1 - + 1 - + 1 - + Borsh.len(triggerCondition) - + 1 - + Borsh.fixedLen(padding); + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/OrderFillerRewardStructure.java b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/OrderFillerRewardStructure.java index 507269e..c9aa87c 100644 --- a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/OrderFillerRewardStructure.java +++ b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/OrderFillerRewardStructure.java @@ -39,6 +39,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 4 + 4 + 16; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/PerpFulfillmentMethod.java b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/PerpFulfillmentMethod.java index b3b9a17..8428163 100644 --- a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/PerpFulfillmentMethod.java +++ b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/PerpFulfillmentMethod.java @@ -61,7 +61,7 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 1 + 32 + 2; + return BYTES; } @Override diff --git a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/PerpPosition.java b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/PerpPosition.java index b9ff266..d6af17f 100644 --- a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/PerpPosition.java +++ b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/PerpPosition.java @@ -146,20 +146,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 8 - + 8 - + 8 - + 8 - + 8 - + 8 - + 8 - + 8 - + 8 - + 8 - + 8 - + 4 - + 2 - + 1 - + 1; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/PhoenixV1FulfillmentConfig.java b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/PhoenixV1FulfillmentConfig.java index 83f2a8a..6899e10 100644 --- a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/PhoenixV1FulfillmentConfig.java +++ b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/PhoenixV1FulfillmentConfig.java @@ -148,15 +148,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 8 + 32 - + 32 - + 32 - + 32 - + 32 - + 32 - + 2 - + Borsh.len(fulfillmentType) - + Borsh.len(status) - + Borsh.fixedLen(padding); + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/PoolBalance.java b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/PoolBalance.java index 3dfc744..2626369 100644 --- a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/PoolBalance.java +++ b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/PoolBalance.java @@ -42,6 +42,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 16 + 2 + Borsh.fixedLen(padding); + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/PrelaunchOracle.java b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/PrelaunchOracle.java index 14faa82..95fc268 100644 --- a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/PrelaunchOracle.java +++ b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/PrelaunchOracle.java @@ -128,12 +128,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 8 + 8 - + 8 - + 8 - + 8 - + 8 - + 2 - + Borsh.fixedLen(padding); + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/PriceDivergenceGuardRails.java b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/PriceDivergenceGuardRails.java index 940e08a..fd1aaad 100644 --- a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/PriceDivergenceGuardRails.java +++ b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/PriceDivergenceGuardRails.java @@ -29,6 +29,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 8 + 8; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/ProtocolIfSharesTransferConfig.java b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/ProtocolIfSharesTransferConfig.java index 6a792a4..ccc0864 100644 --- a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/ProtocolIfSharesTransferConfig.java +++ b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/ProtocolIfSharesTransferConfig.java @@ -97,10 +97,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 8 + Borsh.fixedLen(whitelistedSigners) - + 16 - + 16 - + 8 - + Borsh.fixedLen(padding); + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/ReferrerName.java b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/ReferrerName.java index 7949478..400361d 100644 --- a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/ReferrerName.java +++ b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/ReferrerName.java @@ -80,6 +80,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 8 + 32 + 32 + 32 + Borsh.fixedLen(name); + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/SerumV3FulfillmentConfig.java b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/SerumV3FulfillmentConfig.java index 6de7aca..1c6427a 100644 --- a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/SerumV3FulfillmentConfig.java +++ b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/SerumV3FulfillmentConfig.java @@ -207,20 +207,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 8 + 32 - + 32 - + 32 - + 32 - + 32 - + 32 - + 32 - + 32 - + 32 - + 32 - + 8 - + 2 - + Borsh.len(fulfillmentType) - + Borsh.len(status) - + Borsh.fixedLen(padding); + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/SettlePnlRecord.java b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/SettlePnlRecord.java index f82e545..63782dc 100644 --- a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/SettlePnlRecord.java +++ b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/SettlePnlRecord.java @@ -80,14 +80,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 8 - + 32 - + 2 - + 16 - + 8 - + 8 - + 8 - + 8 - + Borsh.len(explanation); + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/SpotBankruptcyRecord.java b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/SpotBankruptcyRecord.java index 378e6a2..73a0935 100644 --- a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/SpotBankruptcyRecord.java +++ b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/SpotBankruptcyRecord.java @@ -47,6 +47,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 2 + 16 + 16 + 16; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/SpotFulfillmentMethod.java b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/SpotFulfillmentMethod.java index 662e2d8..69ae629 100644 --- a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/SpotFulfillmentMethod.java +++ b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/SpotFulfillmentMethod.java @@ -15,12 +15,14 @@ static SpotFulfillmentMethod read(final byte[] _data, final int offset) { final int ordinal = _data[offset] & 0xFF; int i = offset + 1; return switch (ordinal) { - case 0 -> new ExternalMarket(); + case 0 -> ExternalMarket.INSTANCE; case 1 -> Match.read(_data, i); default -> throw new IllegalStateException(java.lang.String.format("Unexpected ordinal [%d] for enum [SpotFulfillmentMethod].", ordinal)); }; } + record ExternalMarket() implements EnumNone, SpotFulfillmentMethod { + public static final ExternalMarket INSTANCE = new ExternalMarket(); @Override public int ordinal() { @@ -53,7 +55,7 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 1 + 32 + 2; + return BYTES; } @Override diff --git a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/SpotInterestRecord.java b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/SpotInterestRecord.java index bc1eff4..9536fa5 100644 --- a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/SpotInterestRecord.java +++ b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/SpotInterestRecord.java @@ -81,14 +81,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 8 - + 2 - + 16 - + 16 - + 16 - + 16 - + 4 - + 4 - + 4; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/SpotPosition.java b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/SpotPosition.java index 4fe0886..5069d79 100644 --- a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/SpotPosition.java +++ b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/SpotPosition.java @@ -79,13 +79,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 8 - + 8 - + 8 - + 8 - + 2 - + Borsh.len(balanceType) - + 1 - + Borsh.fixedLen(padding); + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/State.java b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/State.java index bde3683..c7b2b37 100644 --- a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/State.java +++ b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/State.java @@ -334,30 +334,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 8 + 32 - + 32 - + 32 - + 32 - + 32 - + Borsh.len(perpFeeStructure) - + Borsh.len(spotFeeStructure) - + Borsh.len(oracleGuardRails) - + 8 - + 8 - + 8 - + 4 - + 2 - + 2 - + 2 - + 1 - + 1 - + 1 - + 1 - + 1 - + 1 - + 2 - + 2 - + 2 - + Borsh.fixedLen(padding); + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/SwapRecord.java b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/SwapRecord.java index b611ad1..263cad5 100644 --- a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/SwapRecord.java +++ b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/SwapRecord.java @@ -77,14 +77,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 8 - + 32 - + 8 - + 8 - + 2 - + 2 - + 8 - + 8 - + 8; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/UserFees.java b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/UserFees.java index 518bb59..c0edb96 100644 --- a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/UserFees.java +++ b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/UserFees.java @@ -67,11 +67,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 8 - + 8 - + 8 - + 8 - + 8 - + 8; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/ValidityGuardRails.java b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/ValidityGuardRails.java index c6b5fd2..1df53db 100644 --- a/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/ValidityGuardRails.java +++ b/programs/src/main/java/software/sava/anchor/programs/drift/anchor/types/ValidityGuardRails.java @@ -43,6 +43,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 8 + 8 + 8 + 8; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/glam/anchor/types/EngineField.java b/programs/src/main/java/software/sava/anchor/programs/glam/anchor/types/EngineField.java index 9f693df..a450a21 100644 --- a/programs/src/main/java/software/sava/anchor/programs/glam/anchor/types/EngineField.java +++ b/programs/src/main/java/software/sava/anchor/programs/glam/anchor/types/EngineField.java @@ -24,6 +24,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return Borsh.len(name) + Borsh.len(value); + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/AddLiquidityEvent.java b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/AddLiquidityEvent.java index 042881b..e4d7dcd 100644 --- a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/AddLiquidityEvent.java +++ b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/AddLiquidityEvent.java @@ -81,15 +81,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 32 - + 32 - + 8 - + 8 - + 8 - + 8 - + 8 - + 8 - + 8 - + 8; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/AddValidatorEvent.java b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/AddValidatorEvent.java index bec3b3c..79b1cf4 100644 --- a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/AddValidatorEvent.java +++ b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/AddValidatorEvent.java @@ -45,6 +45,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 32 + 32 + 4 + 4; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/BoolValueChange.java b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/BoolValueChange.java index bd0d40a..a617610 100644 --- a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/BoolValueChange.java +++ b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/BoolValueChange.java @@ -26,6 +26,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 1 + 1; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/ClaimEvent.java b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/ClaimEvent.java index 2edf4fa..b16c8d6 100644 --- a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/ClaimEvent.java +++ b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/ClaimEvent.java @@ -75,14 +75,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 32 - + 8 - + 32 - + 32 - + 8 - + 8 - + 8 - + 8 - + 8; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/DepositEvent.java b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/DepositEvent.java index 2684923..fb1bc29 100644 --- a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/DepositEvent.java +++ b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/DepositEvent.java @@ -99,18 +99,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 32 - + 32 - + 8 - + 8 - + 8 - + 8 - + 8 - + 8 - + 8 - + 8 - + 8 - + 8 - + 8; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/DepositStakeAccountEvent.java b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/DepositStakeAccountEvent.java index f0be940..aec7a42 100644 --- a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/DepositStakeAccountEvent.java +++ b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/DepositStakeAccountEvent.java @@ -101,18 +101,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 32 - + 32 - + 8 - + 32 - + 4 - + 32 - + 4 - + 8 - + 8 - + 8 - + 8 - + 8 - + 8; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/EmergencyPauseEvent.java b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/EmergencyPauseEvent.java index 8c908bd..54b7cec 100644 --- a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/EmergencyPauseEvent.java +++ b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/EmergencyPauseEvent.java @@ -25,6 +25,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 32; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/Fee.java b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/Fee.java index 8e70790..6922a11 100644 --- a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/Fee.java +++ b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/Fee.java @@ -25,6 +25,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 4; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/FeeCents.java b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/FeeCents.java index 6594bf7..5df950f 100644 --- a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/FeeCents.java +++ b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/FeeCents.java @@ -27,6 +27,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 4; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/InitializeEvent.java b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/InitializeEvent.java index d05c4fd..f60bcd5 100644 --- a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/InitializeEvent.java +++ b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/InitializeEvent.java @@ -72,14 +72,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 32 - + Borsh.len(params) - + 32 - + 32 - + 32 - + 32 - + 32 - + 32 - + 32; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/List.java b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/List.java index e9e407f..3241a8c 100644 --- a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/List.java +++ b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/List.java @@ -51,10 +51,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 32 - + 4 - + 4 - + 32 - + 4; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/MergeStakesEvent.java b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/MergeStakesEvent.java index ba62432..a904a40 100644 --- a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/MergeStakesEvent.java +++ b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/MergeStakesEvent.java @@ -113,20 +113,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 32 - + 8 - + 4 - + 32 - + 8 - + 4 - + 32 - + 8 - + 4 - + 32 - + 8 - + 8 - + 8 - + 8 - + 8; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/OrderUnstakeEvent.java b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/OrderUnstakeEvent.java index f3a66d2..f89c9fd 100644 --- a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/OrderUnstakeEvent.java +++ b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/OrderUnstakeEvent.java @@ -95,17 +95,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 32 - + 8 - + 32 - + 32 - + 8 - + 8 - + 8 - + 8 - + 8 - + 4 - + 8 - + 8; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/PubkeyValueChange.java b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/PubkeyValueChange.java index ecc68a4..51f3b31 100644 --- a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/PubkeyValueChange.java +++ b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/PubkeyValueChange.java @@ -29,6 +29,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 32 + 32; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/ReallocStakeListEvent.java b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/ReallocStakeListEvent.java index d3e7835..c3cfd1c 100644 --- a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/ReallocStakeListEvent.java +++ b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/ReallocStakeListEvent.java @@ -37,6 +37,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 32 + 4 + 4; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/ReallocValidatorListEvent.java b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/ReallocValidatorListEvent.java index 8930659..018abf0 100644 --- a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/ReallocValidatorListEvent.java +++ b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/ReallocValidatorListEvent.java @@ -37,6 +37,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 32 + 4 + 4; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/RemoveLiquidityEvent.java b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/RemoveLiquidityEvent.java index 256e10b..2ca52f7 100644 --- a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/RemoveLiquidityEvent.java +++ b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/RemoveLiquidityEvent.java @@ -81,15 +81,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 32 - + 8 - + 8 - + 8 - + 8 - + 8 - + 8 - + 8 - + 8 - + 8; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/RemoveValidatorEvent.java b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/RemoveValidatorEvent.java index 3fef32d..7250ef9 100644 --- a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/RemoveValidatorEvent.java +++ b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/RemoveValidatorEvent.java @@ -47,6 +47,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 32 + 32 + 4 + 8; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/ResumeEvent.java b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/ResumeEvent.java index b52955e..c75fc46 100644 --- a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/ResumeEvent.java +++ b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/ResumeEvent.java @@ -25,6 +25,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 32; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/SplitStakeAccountInfo.java b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/SplitStakeAccountInfo.java index f296b03..e5fee2a 100644 --- a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/SplitStakeAccountInfo.java +++ b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/SplitStakeAccountInfo.java @@ -31,6 +31,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 32 + 4; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/StakeRecord.java b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/StakeRecord.java index e4b12ab..91d9bf7 100644 --- a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/StakeRecord.java +++ b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/StakeRecord.java @@ -45,6 +45,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 32 + 8 + 8 + 1; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/StakeReserveEvent.java b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/StakeReserveEvent.java index 1dd892a..e3e2517 100644 --- a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/StakeReserveEvent.java +++ b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/StakeReserveEvent.java @@ -101,18 +101,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 32 - + 8 - + 4 - + 32 - + 4 - + 32 - + 8 - + 8 - + 8 - + 8 - + 8 - + 8 - + 8; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/TicketAccountData.java b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/TicketAccountData.java index a28bd73..9a12952 100644 --- a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/TicketAccountData.java +++ b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/TicketAccountData.java @@ -91,6 +91,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 8 + 32 + 32 + 8 + 8; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/U32ValueChange.java b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/U32ValueChange.java index ee7f89b..dc25c89 100644 --- a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/U32ValueChange.java +++ b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/U32ValueChange.java @@ -29,6 +29,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 4 + 4; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/U64ValueChange.java b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/U64ValueChange.java index 7a39297..4ddae09 100644 --- a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/U64ValueChange.java +++ b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/U64ValueChange.java @@ -29,6 +29,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 8 + 8; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/ValidatorRecord.java b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/ValidatorRecord.java index 02c29a0..220a71a 100644 --- a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/ValidatorRecord.java +++ b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/ValidatorRecord.java @@ -55,10 +55,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 32 - + 8 - + 4 - + 8 - + 1; + return BYTES; } } diff --git a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/WithdrawStakeAccountEvent.java b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/WithdrawStakeAccountEvent.java index 933e0d6..23922d4 100644 --- a/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/WithdrawStakeAccountEvent.java +++ b/programs/src/main/java/software/sava/anchor/programs/marinade/anchor/types/WithdrawStakeAccountEvent.java @@ -125,22 +125,6 @@ public int write(final byte[] _data, final int offset) { @Override public int l() { - return 32 - + 8 - + 32 - + 8 - + 4 - + 32 - + 4 - + 8 - + 32 - + 8 - + 8 - + 32 - + 32 - + 8 - + 4 - + 8 - + 8; + return BYTES; } }