Skip to content

Commit

Permalink
ixs almost done
Browse files Browse the repository at this point in the history
  • Loading branch information
coachchucksol committed Nov 27, 2024
1 parent d0bdf50 commit b0d2122
Show file tree
Hide file tree
Showing 30 changed files with 4,802 additions and 60 deletions.
4 changes: 4 additions & 0 deletions clients/js/jito_tip_router/accounts/epochRewardRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export type EpochRewardRouter = {
bump: number;
slotCreated: bigint;
rewardPool: bigint;
rewardsProcessed: bigint;
doaRewards: bigint;
reserved: Array<number>;
ncnRewardBuckets: Array<RewardBucket>;
Expand All @@ -65,6 +66,7 @@ export type EpochRewardRouterArgs = {
bump: number;
slotCreated: number | bigint;
rewardPool: number | bigint;
rewardsProcessed: number | bigint;
doaRewards: number | bigint;
reserved: Array<number>;
ncnRewardBuckets: Array<RewardBucketArgs>;
Expand All @@ -79,6 +81,7 @@ export function getEpochRewardRouterEncoder(): Encoder<EpochRewardRouterArgs> {
['bump', getU8Encoder()],
['slotCreated', getU64Encoder()],
['rewardPool', getU64Encoder()],
['rewardsProcessed', getU64Encoder()],
['doaRewards', getU64Encoder()],
['reserved', getArrayEncoder(getU8Encoder(), { size: 128 })],
[
Expand All @@ -97,6 +100,7 @@ export function getEpochRewardRouterDecoder(): Decoder<EpochRewardRouter> {
['bump', getU8Decoder()],
['slotCreated', getU64Decoder()],
['rewardPool', getU64Decoder()],
['rewardsProcessed', getU64Decoder()],
['doaRewards', getU64Decoder()],
['reserved', getArrayDecoder(getU8Decoder(), { size: 128 })],
[
Expand Down
8 changes: 4 additions & 4 deletions clients/js/jito_tip_router/accounts/epochSnapshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export type EpochSnapshot = {
bump: number;
slotCreated: bigint;
slotFinalized: bigint;
ncnFees: Fees;
fees: Fees;
operatorCount: bigint;
vaultCount: bigint;
operatorsRegistered: bigint;
Expand All @@ -68,7 +68,7 @@ export type EpochSnapshotArgs = {
bump: number;
slotCreated: number | bigint;
slotFinalized: number | bigint;
ncnFees: FeesArgs;
fees: FeesArgs;
operatorCount: number | bigint;
vaultCount: number | bigint;
operatorsRegistered: number | bigint;
Expand All @@ -85,7 +85,7 @@ export function getEpochSnapshotEncoder(): Encoder<EpochSnapshotArgs> {
['bump', getU8Encoder()],
['slotCreated', getU64Encoder()],
['slotFinalized', getU64Encoder()],
['ncnFees', getFeesEncoder()],
['fees', getFeesEncoder()],
['operatorCount', getU64Encoder()],
['vaultCount', getU64Encoder()],
['operatorsRegistered', getU64Encoder()],
Expand All @@ -103,7 +103,7 @@ export function getEpochSnapshotDecoder(): Decoder<EpochSnapshot> {
['bump', getU8Decoder()],
['slotCreated', getU64Decoder()],
['slotFinalized', getU64Decoder()],
['ncnFees', getFeesDecoder()],
['fees', getFeesDecoder()],
['operatorCount', getU64Decoder()],
['vaultCount', getU64Decoder()],
['operatorsRegistered', getU64Decoder()],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export type OperatorEpochRewardRouter = {
bump: number;
slotCreated: bigint;
rewardPool: bigint;
rewardsProcessed: bigint;
operatorRewards: bigint;
reserved: Array<number>;
vaultRewards: Array<RewardRoutes>;
Expand All @@ -62,6 +63,7 @@ export type OperatorEpochRewardRouterArgs = {
bump: number;
slotCreated: number | bigint;
rewardPool: number | bigint;
rewardsProcessed: number | bigint;
operatorRewards: number | bigint;
reserved: Array<number>;
vaultRewards: Array<RewardRoutesArgs>;
Expand All @@ -76,6 +78,7 @@ export function getOperatorEpochRewardRouterEncoder(): Encoder<OperatorEpochRewa
['bump', getU8Encoder()],
['slotCreated', getU64Encoder()],
['rewardPool', getU64Encoder()],
['rewardsProcessed', getU64Encoder()],
['operatorRewards', getU64Encoder()],
['reserved', getArrayEncoder(getU8Encoder(), { size: 128 })],
['vaultRewards', getArrayEncoder(getRewardRoutesEncoder(), { size: 32 })],
Expand All @@ -91,6 +94,7 @@ export function getOperatorEpochRewardRouterDecoder(): Decoder<OperatorEpochRewa
['bump', getU8Decoder()],
['slotCreated', getU64Decoder()],
['rewardPool', getU64Decoder()],
['rewardsProcessed', getU64Decoder()],
['operatorRewards', getU64Decoder()],
['reserved', getArrayDecoder(getU8Decoder(), { size: 128 })],
['vaultRewards', getArrayDecoder(getRewardRoutesDecoder(), { size: 32 })],
Expand Down
5 changes: 5 additions & 0 deletions clients/js/jito_tip_router/instructions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,16 @@
*/

export * from './adminUpdateWeightTable';
export * from './initializeEpochRewardRouter';
export * from './initializeEpochSnapshot';
export * from './initializeNCNConfig';
export * from './initializeOperatorEpochRewardRouter';
export * from './initializeOperatorSnapshot';
export * from './initializeTrackedMints';
export * from './initializeWeightTable';
export * from './processEpochRewardBuckets';
export * from './processEpochRewardPool';
export * from './processOperatorEpochRewardPool';
export * from './registerMint';
export * from './setConfigFees';
export * from './setNewAdmin';
Expand Down
Loading

0 comments on commit b0d2122

Please sign in to comment.