Skip to content

Commit

Permalink
Update Kinobi
Browse files Browse the repository at this point in the history
  • Loading branch information
lorisleiva committed Dec 12, 2023
1 parent 31a5153 commit eb44ee0
Show file tree
Hide file tree
Showing 24 changed files with 163 additions and 344 deletions.
20 changes: 6 additions & 14 deletions clients/js/src/generated/instructions/addMemo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,20 +117,12 @@ export function getAddMemoInstruction<
// Original args.
const args = { ...input };

// Remaining accounts.
const remainingAccounts: IAccountMeta[] = [];

// Bytes created on chain.
const bytesCreatedOnChain = 0;

return Object.freeze({
...getAddMemoInstructionRaw(
args as AddMemoInstructionDataArgs,
programAddress,
remainingAccounts
),
bytesCreatedOnChain,
});
const instruction = getAddMemoInstructionRaw(
args as AddMemoInstructionDataArgs,
programAddress
);

return instruction;
}

export function getAddMemoInstructionRaw<
Expand Down
19 changes: 6 additions & 13 deletions clients/js/src/generated/instructions/advanceNonceAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,11 +274,6 @@ export function getAdvanceNonceAccountInstruction<
accounts.recentBlockhashesSysvar.value =
'SysvarRecentB1ockHashes11111111111111111111' as Address<'SysvarRecentB1ockHashes11111111111111111111'>;
}
// Remaining accounts.
const remainingAccounts: IAccountMeta[] = [];

// Bytes created on chain.
const bytesCreatedOnChain = 0;

// Get account metas and signers.
const accountMetas = getAccountMetasWithSigners(
Expand All @@ -287,14 +282,12 @@ export function getAdvanceNonceAccountInstruction<
programAddress
);

return Object.freeze({
...getAdvanceNonceAccountInstructionRaw(
accountMetas as Record<keyof AccountMetas, IAccountMeta>,
programAddress,
remainingAccounts
),
bytesCreatedOnChain,
});
const instruction = getAdvanceNonceAccountInstructionRaw(
accountMetas as Record<keyof AccountMetas, IAccountMeta>,
programAddress
);

return instruction;
}

export function getAdvanceNonceAccountInstructionRaw<
Expand Down
22 changes: 7 additions & 15 deletions clients/js/src/generated/instructions/allocate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,28 +179,20 @@ export function getAllocateInstruction<
// Original args.
const args = { ...input };

// Remaining accounts.
const remainingAccounts: IAccountMeta[] = [];

// Bytes created on chain.
const bytesCreatedOnChain = 0;

// Get account metas and signers.
const accountMetas = getAccountMetasWithSigners(
accounts,
'programId',
programAddress
);

return Object.freeze({
...getAllocateInstructionRaw(
accountMetas as Record<keyof AccountMetas, IAccountMeta>,
args as AllocateInstructionDataArgs,
programAddress,
remainingAccounts
),
bytesCreatedOnChain,
});
const instruction = getAllocateInstructionRaw(
accountMetas as Record<keyof AccountMetas, IAccountMeta>,
args as AllocateInstructionDataArgs,
programAddress
);

return instruction;
}

export function getAllocateInstructionRaw<
Expand Down
22 changes: 7 additions & 15 deletions clients/js/src/generated/instructions/allocateWithSeed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,28 +262,20 @@ export function getAllocateWithSeedInstruction<
// Original args.
const args = { ...input };

// Remaining accounts.
const remainingAccounts: IAccountMeta[] = [];

// Bytes created on chain.
const bytesCreatedOnChain = 0;

// Get account metas and signers.
const accountMetas = getAccountMetasWithSigners(
accounts,
'programId',
programAddress
);

return Object.freeze({
...getAllocateWithSeedInstructionRaw(
accountMetas as Record<keyof AccountMetas, IAccountMeta>,
args as AllocateWithSeedInstructionDataArgs,
programAddress,
remainingAccounts
),
bytesCreatedOnChain,
});
const instruction = getAllocateWithSeedInstructionRaw(
accountMetas as Record<keyof AccountMetas, IAccountMeta>,
args as AllocateWithSeedInstructionDataArgs,
programAddress
);

return instruction;
}

export function getAllocateWithSeedInstructionRaw<
Expand Down
22 changes: 7 additions & 15 deletions clients/js/src/generated/instructions/assign.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,28 +179,20 @@ export function getAssignInstruction<
// Original args.
const args = { ...input };

// Remaining accounts.
const remainingAccounts: IAccountMeta[] = [];

// Bytes created on chain.
const bytesCreatedOnChain = 0;

// Get account metas and signers.
const accountMetas = getAccountMetasWithSigners(
accounts,
'programId',
programAddress
);

return Object.freeze({
...getAssignInstructionRaw(
accountMetas as Record<keyof AccountMetas, IAccountMeta>,
args as AssignInstructionDataArgs,
programAddress,
remainingAccounts
),
bytesCreatedOnChain,
});
const instruction = getAssignInstructionRaw(
accountMetas as Record<keyof AccountMetas, IAccountMeta>,
args as AssignInstructionDataArgs,
programAddress
);

return instruction;
}

export function getAssignInstructionRaw<
Expand Down
22 changes: 7 additions & 15 deletions clients/js/src/generated/instructions/assignWithSeed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,28 +236,20 @@ export function getAssignWithSeedInstruction<
// Original args.
const args = { ...input };

// Remaining accounts.
const remainingAccounts: IAccountMeta[] = [];

// Bytes created on chain.
const bytesCreatedOnChain = 0;

// Get account metas and signers.
const accountMetas = getAccountMetasWithSigners(
accounts,
'programId',
programAddress
);

return Object.freeze({
...getAssignWithSeedInstructionRaw(
accountMetas as Record<keyof AccountMetas, IAccountMeta>,
args as AssignWithSeedInstructionDataArgs,
programAddress,
remainingAccounts
),
bytesCreatedOnChain,
});
const instruction = getAssignWithSeedInstructionRaw(
accountMetas as Record<keyof AccountMetas, IAccountMeta>,
args as AssignWithSeedInstructionDataArgs,
programAddress
);

return instruction;
}

export function getAssignWithSeedInstructionRaw<
Expand Down
21 changes: 7 additions & 14 deletions clients/js/src/generated/instructions/authorizeNonceAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,6 @@ export function getAuthorizeNonceAccountInstruction<
if (!args.nonceAccountArg) {
args.nonceAccountArg = expectAddress(accounts.nonceAccount.value);
}
// Remaining accounts.
const remainingAccounts: IAccountMeta[] = [];

// Bytes created on chain.
const bytesCreatedOnChain = 0;

// Get account metas and signers.
const accountMetas = getAccountMetasWithSigners(
Expand All @@ -259,15 +254,13 @@ export function getAuthorizeNonceAccountInstruction<
programAddress
);

return Object.freeze({
...getAuthorizeNonceAccountInstructionRaw(
accountMetas as Record<keyof AccountMetas, IAccountMeta>,
args as AuthorizeNonceAccountInstructionDataArgs,
programAddress,
remainingAccounts
),
bytesCreatedOnChain,
});
const instruction = getAuthorizeNonceAccountInstructionRaw(
accountMetas as Record<keyof AccountMetas, IAccountMeta>,
args as AuthorizeNonceAccountInstructionDataArgs,
programAddress
);

return instruction;
}

export function getAuthorizeNonceAccountInstructionRaw<
Expand Down
20 changes: 6 additions & 14 deletions clients/js/src/generated/instructions/closeLookupTable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,27 +261,19 @@ export function getCloseLookupTableInstruction<
recipient: { value: input.recipient ?? null, isWritable: true },
};

// Remaining accounts.
const remainingAccounts: IAccountMeta[] = [];

// Bytes created on chain.
const bytesCreatedOnChain = 0;

// Get account metas and signers.
const accountMetas = getAccountMetasWithSigners(
accounts,
'programId',
programAddress
);

return Object.freeze({
...getCloseLookupTableInstructionRaw(
accountMetas as Record<keyof AccountMetas, IAccountMeta>,
programAddress,
remainingAccounts
),
bytesCreatedOnChain,
});
const instruction = getCloseLookupTableInstructionRaw(
accountMetas as Record<keyof AccountMetas, IAccountMeta>,
programAddress
);

return instruction;
}

export function getCloseLookupTableInstructionRaw<
Expand Down
19 changes: 7 additions & 12 deletions clients/js/src/generated/instructions/createAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,6 @@ export function getCreateAccountInstruction<
// Original args.
const args = { ...input };

// Remaining accounts.
const remainingAccounts: IAccountMeta[] = [];

// Bytes created on chain.
const bytesCreatedOnChain = Number(args.space) + BASE_ACCOUNT_SIZE;

Expand All @@ -254,15 +251,13 @@ export function getCreateAccountInstruction<
programAddress
);

return Object.freeze({
...getCreateAccountInstructionRaw(
accountMetas as Record<keyof AccountMetas, IAccountMeta>,
args as CreateAccountInstructionDataArgs,
programAddress,
remainingAccounts
),
bytesCreatedOnChain,
});
const instruction = getCreateAccountInstructionRaw(
accountMetas as Record<keyof AccountMetas, IAccountMeta>,
args as CreateAccountInstructionDataArgs,
programAddress
);

return Object.freeze({ ...instruction, bytesCreatedOnChain });
}

export function getCreateAccountInstructionRaw<
Expand Down
22 changes: 7 additions & 15 deletions clients/js/src/generated/instructions/createAccountWithSeed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -316,28 +316,20 @@ export function getCreateAccountWithSeedInstruction<
// Original args.
const args = { ...input };

// Remaining accounts.
const remainingAccounts: IAccountMeta[] = [];

// Bytes created on chain.
const bytesCreatedOnChain = 0;

// Get account metas and signers.
const accountMetas = getAccountMetasWithSigners(
accounts,
'programId',
programAddress
);

return Object.freeze({
...getCreateAccountWithSeedInstructionRaw(
accountMetas as Record<keyof AccountMetas, IAccountMeta>,
args as CreateAccountWithSeedInstructionDataArgs,
programAddress,
remainingAccounts
),
bytesCreatedOnChain,
});
const instruction = getCreateAccountWithSeedInstructionRaw(
accountMetas as Record<keyof AccountMetas, IAccountMeta>,
args as CreateAccountWithSeedInstructionDataArgs,
programAddress
);

return instruction;
}

export function getCreateAccountWithSeedInstructionRaw<
Expand Down
Loading

0 comments on commit eb44ee0

Please sign in to comment.