Skip to content

Commit 19ebe85

Browse files
committed
Bump Codama JS renderer
1 parent d7452c5 commit 19ebe85

File tree

16 files changed

+92
-143
lines changed

16 files changed

+92
-143
lines changed

clients/js/src/generated/accounts/addressLookupTable.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
2-
* This code was AUTOGENERATED using the codama library.
2+
* This code was AUTOGENERATED using the Codama library.
33
* 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.
55
*
66
* @see https://github.com/codama-idl/codama
77
*/

clients/js/src/generated/accounts/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
2-
* This code was AUTOGENERATED using the codama library.
2+
* This code was AUTOGENERATED using the Codama library.
33
* 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.
55
*
66
* @see https://github.com/codama-idl/codama
77
*/

clients/js/src/generated/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
2-
* This code was AUTOGENERATED using the codama library.
2+
* This code was AUTOGENERATED using the Codama library.
33
* 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.
55
*
66
* @see https://github.com/codama-idl/codama
77
*/

clients/js/src/generated/instructions/closeLookupTable.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
2-
* This code was AUTOGENERATED using the codama library.
2+
* This code was AUTOGENERATED using the Codama library.
33
* 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.
55
*
66
* @see https://github.com/codama-idl/codama
77
*/
@@ -129,22 +129,20 @@ export function getCloseLookupTableInstruction<
129129
>;
130130

131131
const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');
132-
const instruction = {
132+
return Object.freeze({
133133
accounts: [
134134
getAccountMeta(accounts.address),
135135
getAccountMeta(accounts.authority),
136136
getAccountMeta(accounts.recipient),
137137
],
138-
programAddress,
139138
data: getCloseLookupTableInstructionDataEncoder().encode({}),
139+
programAddress,
140140
} as CloseLookupTableInstruction<
141141
TProgramAddress,
142142
TAccountAddress,
143143
TAccountAuthority,
144144
TAccountRecipient
145-
>;
146-
147-
return instruction;
145+
>);
148146
}
149147

150148
export type ParsedCloseLookupTableInstruction<

clients/js/src/generated/instructions/createLookupTable.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
2-
* This code was AUTOGENERATED using the codama library.
2+
* This code was AUTOGENERATED using the Codama library.
33
* 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.
55
*
66
* @see https://github.com/codama-idl/codama
77
*/
@@ -202,26 +202,26 @@ export async function getCreateLookupTableInstructionAsync<
202202
const byteDelta: number = [56 + BASE_ACCOUNT_SIZE].reduce((a, b) => a + b, 0);
203203

204204
const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');
205-
const instruction = {
205+
return Object.freeze({
206206
accounts: [
207207
getAccountMeta(accounts.address),
208208
getAccountMeta(accounts.authority),
209209
getAccountMeta(accounts.payer),
210210
getAccountMeta(accounts.systemProgram),
211211
],
212-
programAddress,
212+
byteDelta,
213213
data: getCreateLookupTableInstructionDataEncoder().encode(
214214
args as CreateLookupTableInstructionDataArgs
215215
),
216+
programAddress,
216217
} as CreateLookupTableInstruction<
217218
TProgramAddress,
218219
TAccountAddress,
219220
TAccountAuthority,
220221
TAccountPayer,
221222
TAccountSystemProgram
222-
>;
223-
224-
return Object.freeze({ ...instruction, byteDelta });
223+
> &
224+
InstructionWithByteDelta);
225225
}
226226

227227
export type CreateLookupTableInput<
@@ -295,26 +295,26 @@ export function getCreateLookupTableInstruction<
295295
const byteDelta: number = [56 + BASE_ACCOUNT_SIZE].reduce((a, b) => a + b, 0);
296296

297297
const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');
298-
const instruction = {
298+
return Object.freeze({
299299
accounts: [
300300
getAccountMeta(accounts.address),
301301
getAccountMeta(accounts.authority),
302302
getAccountMeta(accounts.payer),
303303
getAccountMeta(accounts.systemProgram),
304304
],
305-
programAddress,
305+
byteDelta,
306306
data: getCreateLookupTableInstructionDataEncoder().encode(
307307
args as CreateLookupTableInstructionDataArgs
308308
),
309+
programAddress,
309310
} as CreateLookupTableInstruction<
310311
TProgramAddress,
311312
TAccountAddress,
312313
TAccountAuthority,
313314
TAccountPayer,
314315
TAccountSystemProgram
315-
>;
316-
317-
return Object.freeze({ ...instruction, byteDelta });
316+
> &
317+
InstructionWithByteDelta);
318318
}
319319

320320
export type ParsedCreateLookupTableInstruction<

clients/js/src/generated/instructions/deactivateLookupTable.ts

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
2-
* This code was AUTOGENERATED using the codama library.
2+
* This code was AUTOGENERATED using the Codama library.
33
* 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.
55
*
66
* @see https://github.com/codama-idl/codama
77
*/
@@ -119,20 +119,18 @@ export function getDeactivateLookupTableInstruction<
119119
>;
120120

121121
const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');
122-
const instruction = {
122+
return Object.freeze({
123123
accounts: [
124124
getAccountMeta(accounts.address),
125125
getAccountMeta(accounts.authority),
126126
],
127-
programAddress,
128127
data: getDeactivateLookupTableInstructionDataEncoder().encode({}),
128+
programAddress,
129129
} as DeactivateLookupTableInstruction<
130130
TProgramAddress,
131131
TAccountAddress,
132132
TAccountAuthority
133-
>;
134-
135-
return instruction;
133+
>);
136134
}
137135

138136
export type ParsedDeactivateLookupTableInstruction<
@@ -167,10 +165,7 @@ export function parseDeactivateLookupTableInstruction<
167165
};
168166
return {
169167
programAddress: instruction.programAddress,
170-
accounts: {
171-
address: getNextAccount(),
172-
authority: getNextAccount(),
173-
},
168+
accounts: { address: getNextAccount(), authority: getNextAccount() },
174169
data: getDeactivateLookupTableInstructionDataDecoder().decode(
175170
instruction.data
176171
),

clients/js/src/generated/instructions/extendLookupTable.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
2-
* This code was AUTOGENERATED using the codama library.
2+
* This code was AUTOGENERATED using the Codama library.
33
* 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.
55
*
66
* @see https://github.com/codama-idl/codama
77
*/
@@ -191,26 +191,26 @@ export function getExtendLookupTableInstruction<
191191
].reduce((a, b) => a + b, 0);
192192

193193
const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');
194-
const instruction = {
194+
return Object.freeze({
195195
accounts: [
196196
getAccountMeta(accounts.address),
197197
getAccountMeta(accounts.authority),
198198
getAccountMeta(accounts.payer),
199199
getAccountMeta(accounts.systemProgram),
200200
],
201-
programAddress,
201+
byteDelta,
202202
data: getExtendLookupTableInstructionDataEncoder().encode(
203203
args as ExtendLookupTableInstructionDataArgs
204204
),
205+
programAddress,
205206
} as ExtendLookupTableInstruction<
206207
TProgramAddress,
207208
TAccountAddress,
208209
TAccountAuthority,
209210
TAccountPayer,
210211
TAccountSystemProgram
211-
>;
212-
213-
return Object.freeze({ ...instruction, byteDelta });
212+
> &
213+
InstructionWithByteDelta);
214214
}
215215

216216
export type ParsedExtendLookupTableInstruction<

clients/js/src/generated/instructions/freezeLookupTable.ts

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
2-
* This code was AUTOGENERATED using the codama library.
2+
* This code was AUTOGENERATED using the Codama library.
33
* 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.
55
*
66
* @see https://github.com/codama-idl/codama
77
*/
@@ -116,20 +116,18 @@ export function getFreezeLookupTableInstruction<
116116
>;
117117

118118
const getAccountMeta = getAccountMetaFactory(programAddress, 'programId');
119-
const instruction = {
119+
return Object.freeze({
120120
accounts: [
121121
getAccountMeta(accounts.address),
122122
getAccountMeta(accounts.authority),
123123
],
124-
programAddress,
125124
data: getFreezeLookupTableInstructionDataEncoder().encode({}),
125+
programAddress,
126126
} as FreezeLookupTableInstruction<
127127
TProgramAddress,
128128
TAccountAddress,
129129
TAccountAuthority
130-
>;
131-
132-
return instruction;
130+
>);
133131
}
134132

135133
export type ParsedFreezeLookupTableInstruction<
@@ -164,10 +162,7 @@ export function parseFreezeLookupTableInstruction<
164162
};
165163
return {
166164
programAddress: instruction.programAddress,
167-
accounts: {
168-
address: getNextAccount(),
169-
authority: getNextAccount(),
170-
},
165+
accounts: { address: getNextAccount(), authority: getNextAccount() },
171166
data: getFreezeLookupTableInstructionDataDecoder().decode(instruction.data),
172167
};
173168
}

clients/js/src/generated/instructions/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
2-
* This code was AUTOGENERATED using the codama library.
2+
* This code was AUTOGENERATED using the Codama library.
33
* 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.
55
*
66
* @see https://github.com/codama-idl/codama
77
*/

clients/js/src/generated/pdas/addressLookupTable.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
2-
* This code was AUTOGENERATED using the codama library.
2+
* This code was AUTOGENERATED using the Codama library.
33
* 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.
55
*
66
* @see https://github.com/codama-idl/codama
77
*/

0 commit comments

Comments
 (0)