From 7db08e32baaa7675110eaeba5773f3ed325a6fda Mon Sep 17 00:00:00 2001 From: febo Date: Thu, 24 Aug 2023 20:39:45 +0300 Subject: [PATCH] Update size config --- clients/js/src/generated/accounts/masterEdition.ts | 4 ---- clients/js/src/generated/accounts/metadata.ts | 4 ---- .../js/src/generated/accounts/metadataDelegateRecord.ts | 4 ---- clients/js/src/generated/accounts/tokenRecord.ts | 4 ---- clients/rust/src/generated/accounts/master_edition.rs | 2 -- clients/rust/src/generated/accounts/metadata.rs | 2 -- .../src/generated/accounts/metadata_delegate_record.rs | 2 -- clients/rust/src/generated/accounts/token_record.rs | 2 -- configs/kinobi.cjs | 8 ++++---- 9 files changed, 4 insertions(+), 28 deletions(-) diff --git a/clients/js/src/generated/accounts/masterEdition.ts b/clients/js/src/generated/accounts/masterEdition.ts index 35ae997d..2806fa39 100644 --- a/clients/js/src/generated/accounts/masterEdition.ts +++ b/clients/js/src/generated/accounts/masterEdition.ts @@ -168,10 +168,6 @@ export function getMasterEditionGpaBuilder( .whereField('key', Key.MasterEditionV2); } -export function getMasterEditionSize(): number { - return 282; -} - export function findMasterEditionPda( context: Pick, seeds: { diff --git a/clients/js/src/generated/accounts/metadata.ts b/clients/js/src/generated/accounts/metadata.ts index 57719a6f..49288a16 100644 --- a/clients/js/src/generated/accounts/metadata.ts +++ b/clients/js/src/generated/accounts/metadata.ts @@ -250,10 +250,6 @@ export function getMetadataGpaBuilder( .whereField('key', Key.MetadataV1); } -export function getMetadataSize(): number { - return 679; -} - export function findMetadataPda( context: Pick, seeds: { diff --git a/clients/js/src/generated/accounts/metadataDelegateRecord.ts b/clients/js/src/generated/accounts/metadataDelegateRecord.ts index c4553253..116e45dd 100644 --- a/clients/js/src/generated/accounts/metadataDelegateRecord.ts +++ b/clients/js/src/generated/accounts/metadataDelegateRecord.ts @@ -184,10 +184,6 @@ export function getMetadataDelegateRecordGpaBuilder( ); } -export function getMetadataDelegateRecordSize(): number { - return 98; -} - export function findMetadataDelegateRecordPda( context: Pick, seeds: { diff --git a/clients/js/src/generated/accounts/tokenRecord.ts b/clients/js/src/generated/accounts/tokenRecord.ts index 294405f8..050e8b85 100644 --- a/clients/js/src/generated/accounts/tokenRecord.ts +++ b/clients/js/src/generated/accounts/tokenRecord.ts @@ -191,10 +191,6 @@ export function getTokenRecordGpaBuilder( .whereField('key', Key.TokenRecord); } -export function getTokenRecordSize(): number { - return 80; -} - export function findTokenRecordPda( context: Pick, seeds: { diff --git a/clients/rust/src/generated/accounts/master_edition.rs b/clients/rust/src/generated/accounts/master_edition.rs index 6cc68b4d..db1b6b3f 100644 --- a/clients/rust/src/generated/accounts/master_edition.rs +++ b/clients/rust/src/generated/accounts/master_edition.rs @@ -18,8 +18,6 @@ pub struct MasterEdition { } impl MasterEdition { - pub const LEN: usize = 282; - pub fn find_pda(mint: &Pubkey) -> (solana_program::pubkey::Pubkey, u8) { solana_program::pubkey::Pubkey::find_program_address( &[ diff --git a/clients/rust/src/generated/accounts/metadata.rs b/clients/rust/src/generated/accounts/metadata.rs index ce9ab4f7..033b4c07 100644 --- a/clients/rust/src/generated/accounts/metadata.rs +++ b/clients/rust/src/generated/accounts/metadata.rs @@ -37,8 +37,6 @@ pub struct Metadata { } impl Metadata { - pub const LEN: usize = 679; - pub fn find_pda(mint: &Pubkey) -> (solana_program::pubkey::Pubkey, u8) { solana_program::pubkey::Pubkey::find_program_address( &[ diff --git a/clients/rust/src/generated/accounts/metadata_delegate_record.rs b/clients/rust/src/generated/accounts/metadata_delegate_record.rs index 17c61b50..9d67dcf9 100644 --- a/clients/rust/src/generated/accounts/metadata_delegate_record.rs +++ b/clients/rust/src/generated/accounts/metadata_delegate_record.rs @@ -21,8 +21,6 @@ pub struct MetadataDelegateRecord { } impl MetadataDelegateRecord { - pub const LEN: usize = 98; - pub fn find_pda( mint: &Pubkey, delegate_role: MetadataDelegateRoleSeed, diff --git a/clients/rust/src/generated/accounts/token_record.rs b/clients/rust/src/generated/accounts/token_record.rs index 7840e082..ea5093b7 100644 --- a/clients/rust/src/generated/accounts/token_record.rs +++ b/clients/rust/src/generated/accounts/token_record.rs @@ -24,8 +24,6 @@ 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( &[ diff --git a/configs/kinobi.cjs b/configs/kinobi.cjs index 1e388995..b7476cd0 100755 --- a/configs/kinobi.cjs +++ b/configs/kinobi.cjs @@ -25,11 +25,11 @@ const metadataSeeds = [ kinobi.update( new k.UpdateAccountsVisitor({ metadata: { - size: 679, + size: undefined, seeds: metadataSeeds, }, masterEditionV2: { - size: 282, + size: undefined, name: "masterEdition", seeds: [...metadataSeeds, k.stringConstantSeed("edition")], }, @@ -51,7 +51,7 @@ kinobi.update( ], }, tokenRecord: { - size: 80, + size: undefined, seeds: [ ...metadataSeeds, k.stringConstantSeed("token_record"), @@ -62,7 +62,7 @@ kinobi.update( ], }, metadataDelegateRecord: { - size: 98, + size: undefined, seeds: [ ...metadataSeeds, k.variableSeed(