Skip to content

Fix: Upgrade Kinobi to Codama #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 12 additions & 7 deletions clients/js/jito_tip_router/accounts/ballotBox.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
* This code was AUTOGENERATED using the kinobi library.
* This code was AUTOGENERATED using the codama library.
* Please DO NOT EDIT THIS FILE, instead use visitors
* to add features, then rerun kinobi to update it.
* to add features, then rerun codama to update it.
*
* @see https://github.com/kinobi-so/kinobi
* @see https://github.com/codama-idl/codama
*/

import {
Expand All @@ -13,10 +13,14 @@ import {
decodeAccount,
fetchEncodedAccount,
fetchEncodedAccounts,
fixDecoderSize,
fixEncoderSize,
getAddressDecoder,
getAddressEncoder,
getArrayDecoder,
getArrayEncoder,
getBytesDecoder,
getBytesEncoder,
getStructDecoder,
getStructEncoder,
getU64Decoder,
Expand All @@ -33,6 +37,7 @@ import {
type FetchAccountsConfig,
type MaybeAccount,
type MaybeEncodedAccount,
type ReadonlyUint8Array,
} from '@solana/web3.js';
import {
getBallotDecoder,
Expand All @@ -56,7 +61,7 @@ export type BallotBox = {
bump: number;
slotCreated: bigint;
slotConsensusReached: bigint;
reserved: Array<number>;
reserved: ReadonlyUint8Array;
operatorsVoted: bigint;
uniqueBallots: bigint;
winningBallot: Ballot;
Expand All @@ -71,7 +76,7 @@ export type BallotBoxArgs = {
bump: number;
slotCreated: number | bigint;
slotConsensusReached: number | bigint;
reserved: Array<number>;
reserved: ReadonlyUint8Array;
operatorsVoted: number | bigint;
uniqueBallots: number | bigint;
winningBallot: BallotArgs;
Expand All @@ -87,7 +92,7 @@ export function getBallotBoxEncoder(): Encoder<BallotBoxArgs> {
['bump', getU8Encoder()],
['slotCreated', getU64Encoder()],
['slotConsensusReached', getU64Encoder()],
['reserved', getArrayEncoder(getU8Encoder(), { size: 128 })],
['reserved', fixEncoderSize(getBytesEncoder(), 128)],
['operatorsVoted', getU64Encoder()],
['uniqueBallots', getU64Encoder()],
['winningBallot', getBallotEncoder()],
Expand All @@ -104,7 +109,7 @@ export function getBallotBoxDecoder(): Decoder<BallotBox> {
['bump', getU8Decoder()],
['slotCreated', getU64Decoder()],
['slotConsensusReached', getU64Decoder()],
['reserved', getArrayDecoder(getU8Decoder(), { size: 128 })],
['reserved', fixDecoderSize(getBytesDecoder(), 128)],
['operatorsVoted', getU64Decoder()],
['uniqueBallots', getU64Decoder()],
['winningBallot', getBallotDecoder()],
Expand Down
19 changes: 12 additions & 7 deletions clients/js/jito_tip_router/accounts/baseRewardRouter.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
* This code was AUTOGENERATED using the kinobi library.
* This code was AUTOGENERATED using the codama library.
* Please DO NOT EDIT THIS FILE, instead use visitors
* to add features, then rerun kinobi to update it.
* to add features, then rerun codama to update it.
*
* @see https://github.com/kinobi-so/kinobi
* @see https://github.com/codama-idl/codama
*/

import {
Expand All @@ -13,10 +13,14 @@ import {
decodeAccount,
fetchEncodedAccount,
fetchEncodedAccounts,
fixDecoderSize,
fixEncoderSize,
getAddressDecoder,
getAddressEncoder,
getArrayDecoder,
getArrayEncoder,
getBytesDecoder,
getBytesEncoder,
getStructDecoder,
getStructEncoder,
getU16Decoder,
Expand All @@ -35,6 +39,7 @@ import {
type FetchAccountsConfig,
type MaybeAccount,
type MaybeEncodedAccount,
type ReadonlyUint8Array,
} from '@solana/web3.js';
import {
getBaseRewardRouterRewardsDecoder,
Expand All @@ -56,7 +61,7 @@ export type BaseRewardRouter = {
totalRewards: bigint;
rewardPool: bigint;
rewardsProcessed: bigint;
reserved: Array<number>;
reserved: ReadonlyUint8Array;
lastNcnGroupIndex: number;
lastVoteIndex: number;
lastRewardsToProcess: bigint;
Expand All @@ -74,7 +79,7 @@ export type BaseRewardRouterArgs = {
totalRewards: number | bigint;
rewardPool: number | bigint;
rewardsProcessed: number | bigint;
reserved: Array<number>;
reserved: ReadonlyUint8Array;
lastNcnGroupIndex: number;
lastVoteIndex: number;
lastRewardsToProcess: number | bigint;
Expand All @@ -93,7 +98,7 @@ export function getBaseRewardRouterEncoder(): Encoder<BaseRewardRouterArgs> {
['totalRewards', getU64Encoder()],
['rewardPool', getU64Encoder()],
['rewardsProcessed', getU64Encoder()],
['reserved', getArrayEncoder(getU8Encoder(), { size: 128 })],
['reserved', fixEncoderSize(getBytesEncoder(), 128)],
['lastNcnGroupIndex', getU8Encoder()],
['lastVoteIndex', getU16Encoder()],
['lastRewardsToProcess', getU64Encoder()],
Expand Down Expand Up @@ -122,7 +127,7 @@ export function getBaseRewardRouterDecoder(): Decoder<BaseRewardRouter> {
['totalRewards', getU64Decoder()],
['rewardPool', getU64Decoder()],
['rewardsProcessed', getU64Decoder()],
['reserved', getArrayDecoder(getU8Decoder(), { size: 128 })],
['reserved', fixDecoderSize(getBytesDecoder(), 128)],
['lastNcnGroupIndex', getU8Decoder()],
['lastVoteIndex', getU16Decoder()],
['lastRewardsToProcess', getU64Decoder()],
Expand Down
21 changes: 12 additions & 9 deletions clients/js/jito_tip_router/accounts/config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
* This code was AUTOGENERATED using the kinobi library.
* This code was AUTOGENERATED using the codama library.
* Please DO NOT EDIT THIS FILE, instead use visitors
* to add features, then rerun kinobi to update it.
* to add features, then rerun codama to update it.
*
* @see https://github.com/kinobi-so/kinobi
* @see https://github.com/codama-idl/codama
*/

import {
Expand All @@ -13,10 +13,12 @@ import {
decodeAccount,
fetchEncodedAccount,
fetchEncodedAccounts,
fixDecoderSize,
fixEncoderSize,
getAddressDecoder,
getAddressEncoder,
getArrayDecoder,
getArrayEncoder,
getBytesDecoder,
getBytesEncoder,
getStructDecoder,
getStructEncoder,
getU64Decoder,
Expand All @@ -33,6 +35,7 @@ import {
type FetchAccountsConfig,
type MaybeAccount,
type MaybeEncodedAccount,
type ReadonlyUint8Array,
} from '@solana/web3.js';
import {
getFeeConfigDecoder,
Expand All @@ -50,7 +53,7 @@ export type Config = {
epochsBeforeStall: bigint;
feeConfig: FeeConfig;
bump: number;
reserved: Array<number>;
reserved: ReadonlyUint8Array;
};

export type ConfigArgs = {
Expand All @@ -62,7 +65,7 @@ export type ConfigArgs = {
epochsBeforeStall: number | bigint;
feeConfig: FeeConfigArgs;
bump: number;
reserved: Array<number>;
reserved: ReadonlyUint8Array;
};

export function getConfigEncoder(): Encoder<ConfigArgs> {
Expand All @@ -75,7 +78,7 @@ export function getConfigEncoder(): Encoder<ConfigArgs> {
['epochsBeforeStall', getU64Encoder()],
['feeConfig', getFeeConfigEncoder()],
['bump', getU8Encoder()],
['reserved', getArrayEncoder(getU8Encoder(), { size: 127 })],
['reserved', fixEncoderSize(getBytesEncoder(), 127)],
]);
}

Expand All @@ -89,7 +92,7 @@ export function getConfigDecoder(): Decoder<Config> {
['epochsBeforeStall', getU64Decoder()],
['feeConfig', getFeeConfigDecoder()],
['bump', getU8Decoder()],
['reserved', getArrayDecoder(getU8Decoder(), { size: 127 })],
['reserved', fixDecoderSize(getBytesDecoder(), 127)],
]);
}

Expand Down
21 changes: 12 additions & 9 deletions clients/js/jito_tip_router/accounts/epochSnapshot.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
* This code was AUTOGENERATED using the kinobi library.
* This code was AUTOGENERATED using the codama library.
* Please DO NOT EDIT THIS FILE, instead use visitors
* to add features, then rerun kinobi to update it.
* to add features, then rerun codama to update it.
*
* @see https://github.com/kinobi-so/kinobi
* @see https://github.com/codama-idl/codama
*/

import {
Expand All @@ -13,10 +13,12 @@ import {
decodeAccount,
fetchEncodedAccount,
fetchEncodedAccounts,
fixDecoderSize,
fixEncoderSize,
getAddressDecoder,
getAddressEncoder,
getArrayDecoder,
getArrayEncoder,
getBytesDecoder,
getBytesEncoder,
getStructDecoder,
getStructEncoder,
getU64Decoder,
Expand All @@ -33,6 +35,7 @@ import {
type FetchAccountsConfig,
type MaybeAccount,
type MaybeEncodedAccount,
type ReadonlyUint8Array,
} from '@solana/web3.js';
import {
getFeesDecoder,
Expand All @@ -58,7 +61,7 @@ export type EpochSnapshot = {
operatorsRegistered: bigint;
validOperatorVaultDelegations: bigint;
stakeWeights: StakeWeights;
reserved: Array<number>;
reserved: ReadonlyUint8Array;
};

export type EpochSnapshotArgs = {
Expand All @@ -74,7 +77,7 @@ export type EpochSnapshotArgs = {
operatorsRegistered: number | bigint;
validOperatorVaultDelegations: number | bigint;
stakeWeights: StakeWeightsArgs;
reserved: Array<number>;
reserved: ReadonlyUint8Array;
};

export function getEpochSnapshotEncoder(): Encoder<EpochSnapshotArgs> {
Expand All @@ -91,7 +94,7 @@ export function getEpochSnapshotEncoder(): Encoder<EpochSnapshotArgs> {
['operatorsRegistered', getU64Encoder()],
['validOperatorVaultDelegations', getU64Encoder()],
['stakeWeights', getStakeWeightsEncoder()],
['reserved', getArrayEncoder(getU8Encoder(), { size: 128 })],
['reserved', fixEncoderSize(getBytesEncoder(), 128)],
]);
}

Expand All @@ -109,7 +112,7 @@ export function getEpochSnapshotDecoder(): Decoder<EpochSnapshot> {
['operatorsRegistered', getU64Decoder()],
['validOperatorVaultDelegations', getU64Decoder()],
['stakeWeights', getStakeWeightsDecoder()],
['reserved', getArrayDecoder(getU8Decoder(), { size: 128 })],
['reserved', fixDecoderSize(getBytesDecoder(), 128)],
]);
}

Expand Down
19 changes: 12 additions & 7 deletions clients/js/jito_tip_router/accounts/epochState.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
* This code was AUTOGENERATED using the kinobi library.
* This code was AUTOGENERATED using the codama library.
* Please DO NOT EDIT THIS FILE, instead use visitors
* to add features, then rerun kinobi to update it.
* to add features, then rerun codama to update it.
*
* @see https://github.com/kinobi-so/kinobi
* @see https://github.com/codama-idl/codama
*/

import {
Expand All @@ -13,10 +13,14 @@ import {
decodeAccount,
fetchEncodedAccount,
fetchEncodedAccounts,
fixDecoderSize,
fixEncoderSize,
getAddressDecoder,
getAddressEncoder,
getArrayDecoder,
getArrayEncoder,
getBytesDecoder,
getBytesEncoder,
getStructDecoder,
getStructEncoder,
getU64Decoder,
Expand All @@ -33,6 +37,7 @@ import {
type FetchAccountsConfig,
type MaybeAccount,
type MaybeEncodedAccount,
type ReadonlyUint8Array,
} from '@solana/web3.js';
import {
getEpochAccountStatusDecoder,
Expand Down Expand Up @@ -63,7 +68,7 @@ export type EpochState = {
totalDistributionProgress: Progress;
baseDistributionProgress: Progress;
ncnDistributionProgress: Array<Progress>;
reserved: Array<number>;
reserved: ReadonlyUint8Array;
};

export type EpochStateArgs = {
Expand All @@ -84,7 +89,7 @@ export type EpochStateArgs = {
totalDistributionProgress: ProgressArgs;
baseDistributionProgress: ProgressArgs;
ncnDistributionProgress: Array<ProgressArgs>;
reserved: Array<number>;
reserved: ReadonlyUint8Array;
};

export function getEpochStateEncoder(): Encoder<EpochStateArgs> {
Expand Down Expand Up @@ -112,7 +117,7 @@ export function getEpochStateEncoder(): Encoder<EpochStateArgs> {
'ncnDistributionProgress',
getArrayEncoder(getProgressEncoder(), { size: 2048 }),
],
['reserved', getArrayEncoder(getU8Encoder(), { size: 1024 })],
['reserved', fixEncoderSize(getBytesEncoder(), 1024)],
]);
}

Expand Down Expand Up @@ -141,7 +146,7 @@ export function getEpochStateDecoder(): Decoder<EpochState> {
'ncnDistributionProgress',
getArrayDecoder(getProgressDecoder(), { size: 2048 }),
],
['reserved', getArrayDecoder(getU8Decoder(), { size: 1024 })],
['reserved', fixDecoderSize(getBytesDecoder(), 1024)],
]);
}

Expand Down
6 changes: 3 additions & 3 deletions clients/js/jito_tip_router/accounts/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
* This code was AUTOGENERATED using the kinobi library.
* This code was AUTOGENERATED using the codama library.
* Please DO NOT EDIT THIS FILE, instead use visitors
* to add features, then rerun kinobi to update it.
* to add features, then rerun codama to update it.
*
* @see https://github.com/kinobi-so/kinobi
* @see https://github.com/codama-idl/codama
*/

export * from './ballotBox';
Expand Down
Loading
Loading