Skip to content

Commit

Permalink
Add size information
Browse files Browse the repository at this point in the history
  • Loading branch information
febo committed Aug 24, 2023
1 parent 7db08e3 commit 813aa9b
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 2 deletions.
4 changes: 4 additions & 0 deletions clients/js/src/generated/accounts/metadataDelegateRecord.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@ export function getMetadataDelegateRecordGpaBuilder(
);
}

export function getMetadataDelegateRecordSize(): number {
return 98;
}

export function findMetadataDelegateRecordPda(
context: Pick<Context, 'eddsa' | 'programs'>,
seeds: {
Expand Down
4 changes: 4 additions & 0 deletions clients/js/src/generated/accounts/tokenRecord.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@ export function getTokenRecordGpaBuilder(
.whereField('key', Key.TokenRecord);
}

export function getTokenRecordSize(): number {
return 80;
}

export function findTokenRecordPda(
context: Pick<Context, 'eddsa' | 'programs'>,
seeds: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ pub struct MetadataDelegateRecord {
}

impl MetadataDelegateRecord {
pub const LEN: usize = 98;

pub fn find_pda(
mint: &Pubkey,
delegate_role: MetadataDelegateRoleSeed,
Expand Down
2 changes: 2 additions & 0 deletions clients/rust/src/generated/accounts/token_record.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ pub struct TokenRecord {
}

impl TokenRecord {
pub const LEN: usize = 80;

pub fn find_pda(mint: &Pubkey, token: &Pubkey) -> (solana_program::pubkey::Pubkey, u8) {
solana_program::pubkey::Pubkey::find_program_address(
&[
Expand Down
4 changes: 2 additions & 2 deletions configs/kinobi.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ kinobi.update(
],
},
tokenRecord: {
size: undefined,
size: 80,
seeds: [
...metadataSeeds,
k.stringConstantSeed("token_record"),
Expand All @@ -62,7 +62,7 @@ kinobi.update(
],
},
metadataDelegateRecord: {
size: undefined,
size: 98,
seeds: [
...metadataSeeds,
k.variableSeed(
Expand Down

0 comments on commit 813aa9b

Please sign in to comment.