|
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 | */ |
@@ -153,22 +153,20 @@ export function getAllocateWithSeedInstruction< |
153 | 153 | const args = { ...input }; |
154 | 154 |
|
155 | 155 | const getAccountMeta = getAccountMetaFactory(programAddress, 'omitted'); |
156 | | - const instruction = { |
| 156 | + return Object.freeze({ |
157 | 157 | accounts: [ |
158 | 158 | getAccountMeta(accounts.newAccount), |
159 | 159 | getAccountMeta(accounts.baseAccount), |
160 | 160 | ], |
161 | | - programAddress, |
162 | 161 | data: getAllocateWithSeedInstructionDataEncoder().encode( |
163 | 162 | args as AllocateWithSeedInstructionDataArgs |
164 | 163 | ), |
| 164 | + programAddress, |
165 | 165 | } as AllocateWithSeedInstruction< |
166 | 166 | TProgramAddress, |
167 | 167 | TAccountNewAccount, |
168 | 168 | TAccountBaseAccount |
169 | | - >; |
170 | | - |
171 | | - return instruction; |
| 169 | + >); |
172 | 170 | } |
173 | 171 |
|
174 | 172 | export type ParsedAllocateWithSeedInstruction< |
@@ -203,10 +201,7 @@ export function parseAllocateWithSeedInstruction< |
203 | 201 | }; |
204 | 202 | return { |
205 | 203 | programAddress: instruction.programAddress, |
206 | | - accounts: { |
207 | | - newAccount: getNextAccount(), |
208 | | - baseAccount: getNextAccount(), |
209 | | - }, |
| 204 | + accounts: { newAccount: getNextAccount(), baseAccount: getNextAccount() }, |
210 | 205 | data: getAllocateWithSeedInstructionDataDecoder().decode(instruction.data), |
211 | 206 | }; |
212 | 207 | } |
0 commit comments