|
1 | 1 | /** |
2 | | - * This code was AUTOGENERATED using the codama library. |
| 2 | + * This code was AUTOGENERATED using the Codama library. |
3 | 3 | * Please DO NOT EDIT THIS FILE, instead use visitors |
4 | | - * to add features, then rerun codama to update it. |
| 4 | + * to add features, then rerun Codama to update it. |
5 | 5 | * |
6 | 6 | * @see https://github.com/codama-idl/codama |
7 | 7 | */ |
@@ -202,26 +202,26 @@ export async function getCreateLookupTableInstructionAsync< |
202 | 202 | const byteDelta: number = [56 + BASE_ACCOUNT_SIZE].reduce((a, b) => a + b, 0); |
203 | 203 |
|
204 | 204 | const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); |
205 | | - const instruction = { |
| 205 | + return Object.freeze({ |
206 | 206 | accounts: [ |
207 | 207 | getAccountMeta(accounts.address), |
208 | 208 | getAccountMeta(accounts.authority), |
209 | 209 | getAccountMeta(accounts.payer), |
210 | 210 | getAccountMeta(accounts.systemProgram), |
211 | 211 | ], |
212 | | - programAddress, |
| 212 | + byteDelta, |
213 | 213 | data: getCreateLookupTableInstructionDataEncoder().encode( |
214 | 214 | args as CreateLookupTableInstructionDataArgs |
215 | 215 | ), |
| 216 | + programAddress, |
216 | 217 | } as CreateLookupTableInstruction< |
217 | 218 | TProgramAddress, |
218 | 219 | TAccountAddress, |
219 | 220 | TAccountAuthority, |
220 | 221 | TAccountPayer, |
221 | 222 | TAccountSystemProgram |
222 | | - >; |
223 | | - |
224 | | - return Object.freeze({ ...instruction, byteDelta }); |
| 223 | + > & |
| 224 | + InstructionWithByteDelta); |
225 | 225 | } |
226 | 226 |
|
227 | 227 | export type CreateLookupTableInput< |
@@ -295,26 +295,26 @@ export function getCreateLookupTableInstruction< |
295 | 295 | const byteDelta: number = [56 + BASE_ACCOUNT_SIZE].reduce((a, b) => a + b, 0); |
296 | 296 |
|
297 | 297 | const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); |
298 | | - const instruction = { |
| 298 | + return Object.freeze({ |
299 | 299 | accounts: [ |
300 | 300 | getAccountMeta(accounts.address), |
301 | 301 | getAccountMeta(accounts.authority), |
302 | 302 | getAccountMeta(accounts.payer), |
303 | 303 | getAccountMeta(accounts.systemProgram), |
304 | 304 | ], |
305 | | - programAddress, |
| 305 | + byteDelta, |
306 | 306 | data: getCreateLookupTableInstructionDataEncoder().encode( |
307 | 307 | args as CreateLookupTableInstructionDataArgs |
308 | 308 | ), |
| 309 | + programAddress, |
309 | 310 | } as CreateLookupTableInstruction< |
310 | 311 | TProgramAddress, |
311 | 312 | TAccountAddress, |
312 | 313 | TAccountAuthority, |
313 | 314 | TAccountPayer, |
314 | 315 | TAccountSystemProgram |
315 | | - >; |
316 | | - |
317 | | - return Object.freeze({ ...instruction, byteDelta }); |
| 316 | + > & |
| 317 | + InstructionWithByteDelta); |
318 | 318 | } |
319 | 319 |
|
320 | 320 | export type ParsedCreateLookupTableInstruction< |
|
0 commit comments