diff --git a/clients/js/jito_tip_router/instructions/initializeConfig.ts b/clients/js/jito_tip_router/instructions/initializeConfig.ts index e36327c1..e5c99aab 100644 --- a/clients/js/jito_tip_router/instructions/initializeConfig.ts +++ b/clients/js/jito_tip_router/instructions/initializeConfig.ts @@ -20,10 +20,13 @@ import { type Decoder, type Encoder, type IAccountMeta, + type IAccountSignerMeta, type IInstruction, type IInstructionWithAccounts, type IInstructionWithData, type ReadonlyAccount, + type ReadonlySignerAccount, + type TransactionSigner, type WritableAccount, } from '@solana/web3.js'; import { JITO_TIP_ROUTER_PROGRAM_ADDRESS } from '../programs'; @@ -56,7 +59,8 @@ export type InitializeConfigInstruction< : TAccountConfig, TAccountNcn extends string ? ReadonlyAccount : TAccountNcn, TAccountNcnAdmin extends string - ? WritableAccount + ? ReadonlySignerAccount & + IAccountSignerMeta : TAccountNcnAdmin, TAccountFeeWallet extends string ? ReadonlyAccount @@ -129,7 +133,7 @@ export type InitializeConfigInput< > = { config: Address; ncn: Address; - ncnAdmin: Address; + ncnAdmin: TransactionSigner; feeWallet: Address; tieBreakerAdmin: Address; restakingProgramId: Address; @@ -177,7 +181,7 @@ export function getInitializeConfigInstruction< const originalAccounts = { config: { value: input.config ?? null, isWritable: true }, ncn: { value: input.ncn ?? null, isWritable: false }, - ncnAdmin: { value: input.ncnAdmin ?? null, isWritable: true }, + ncnAdmin: { value: input.ncnAdmin ?? null, isWritable: false }, feeWallet: { value: input.feeWallet ?? null, isWritable: false }, tieBreakerAdmin: { value: input.tieBreakerAdmin ?? null, diff --git a/clients/rust/jito_tip_router/src/generated/instructions/initialize_config.rs b/clients/rust/jito_tip_router/src/generated/instructions/initialize_config.rs index d9cbd3ee..2e718af4 100644 --- a/clients/rust/jito_tip_router/src/generated/instructions/initialize_config.rs +++ b/clients/rust/jito_tip_router/src/generated/instructions/initialize_config.rs @@ -44,9 +44,9 @@ impl InitializeConfig { accounts.push(solana_program::instruction::AccountMeta::new_readonly( self.ncn, false, )); - accounts.push(solana_program::instruction::AccountMeta::new( + accounts.push(solana_program::instruction::AccountMeta::new_readonly( self.ncn_admin, - false, + true, )); accounts.push(solana_program::instruction::AccountMeta::new_readonly( self.fee_wallet, @@ -108,7 +108,7 @@ pub struct InitializeConfigInstructionArgs { /// /// 0. `[writable]` config /// 1. `[]` ncn -/// 2. `[writable]` ncn_admin +/// 2. `[signer]` ncn_admin /// 3. `[]` fee_wallet /// 4. `[]` tie_breaker_admin /// 5. `[]` restaking_program_id @@ -336,9 +336,9 @@ impl<'a, 'b> InitializeConfigCpi<'a, 'b> { *self.ncn.key, false, )); - accounts.push(solana_program::instruction::AccountMeta::new( + accounts.push(solana_program::instruction::AccountMeta::new_readonly( *self.ncn_admin.key, - false, + true, )); accounts.push(solana_program::instruction::AccountMeta::new_readonly( *self.fee_wallet.key, @@ -399,7 +399,7 @@ impl<'a, 'b> InitializeConfigCpi<'a, 'b> { /// /// 0. `[writable]` config /// 1. `[]` ncn -/// 2. `[writable]` ncn_admin +/// 2. `[signer]` ncn_admin /// 3. `[]` fee_wallet /// 4. `[]` tie_breaker_admin /// 5. `[]` restaking_program_id diff --git a/idl/jito_tip_router.json b/idl/jito_tip_router.json index 787445c6..4078fd72 100644 --- a/idl/jito_tip_router.json +++ b/idl/jito_tip_router.json @@ -17,8 +17,8 @@ }, { "name": "ncnAdmin", - "isMut": true, - "isSigner": false + "isMut": false, + "isSigner": true }, { "name": "feeWallet",