Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
ebatsell committed Nov 7, 2024
1 parent 59d3a12 commit b14b8ee
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
10 changes: 7 additions & 3 deletions clients/js/jito_tip_router/instructions/initializeConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -56,7 +59,8 @@ export type InitializeConfigInstruction<
: TAccountConfig,
TAccountNcn extends string ? ReadonlyAccount<TAccountNcn> : TAccountNcn,
TAccountNcnAdmin extends string
? WritableAccount<TAccountNcnAdmin>
? ReadonlySignerAccount<TAccountNcnAdmin> &
IAccountSignerMeta<TAccountNcnAdmin>
: TAccountNcnAdmin,
TAccountFeeWallet extends string
? ReadonlyAccount<TAccountFeeWallet>
Expand Down Expand Up @@ -129,7 +133,7 @@ export type InitializeConfigInput<
> = {
config: Address<TAccountConfig>;
ncn: Address<TAccountNcn>;
ncnAdmin: Address<TAccountNcnAdmin>;
ncnAdmin: TransactionSigner<TAccountNcnAdmin>;
feeWallet: Address<TAccountFeeWallet>;
tieBreakerAdmin: Address<TAccountTieBreakerAdmin>;
restakingProgramId: Address<TAccountRestakingProgramId>;
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions idl/jito_tip_router.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
},
{
"name": "ncnAdmin",
"isMut": true,
"isSigner": false
"isMut": false,
"isSigner": true
},
{
"name": "feeWallet",
Expand Down

0 comments on commit b14b8ee

Please sign in to comment.