Skip to content

Commit

Permalink
asdf
Browse files Browse the repository at this point in the history
  • Loading branch information
ebatsell committed Nov 13, 2024
1 parent 734fc4a commit 2e075df
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
19 changes: 17 additions & 2 deletions clients/js/jito_tip_router/types/mintEntry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@

import {
combineCodec,
fixDecoderSize,
fixEncoderSize,
getAddressDecoder,
getAddressEncoder,
getBytesDecoder,
getBytesEncoder,
getStructDecoder,
getStructEncoder,
getU64Decoder,
Expand All @@ -18,23 +22,34 @@ import {
type Codec,
type Decoder,
type Encoder,
type ReadonlyUint8Array,
} from '@solana/web3.js';

export type MintEntry = { stMint: Address; vaultIndex: bigint };
export type MintEntry = {
stMint: Address;
vaultIndex: bigint;
reserved: ReadonlyUint8Array;
};

export type MintEntryArgs = { stMint: Address; vaultIndex: number | bigint };
export type MintEntryArgs = {
stMint: Address;
vaultIndex: number | bigint;
reserved: ReadonlyUint8Array;
};

export function getMintEntryEncoder(): Encoder<MintEntryArgs> {
return getStructEncoder([
['stMint', getAddressEncoder()],
['vaultIndex', getU64Encoder()],
['reserved', fixEncoderSize(getBytesEncoder(), 32)],
]);
}

export function getMintEntryDecoder(): Decoder<MintEntry> {
return getStructDecoder([
['stMint', getAddressDecoder()],
['vaultIndex', getU64Decoder()],
['reserved', fixDecoderSize(getBytesDecoder(), 32)],
]);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ pub struct MintEntry {
)]
pub st_mint: Pubkey,
pub vault_index: u64,
pub reserved: [u8; 32],
}
9 changes: 9 additions & 0 deletions idl/jito_tip_router.json
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,15 @@
"type": {
"defined": "PodU64"
}
},
{
"name": "reserved",
"type": {
"array": [
"u8",
32
]
}
}
]
}
Expand Down

0 comments on commit 2e075df

Please sign in to comment.