diff --git a/.changeset/frank-stamps-bathe.md b/.changeset/frank-stamps-bathe.md new file mode 100644 index 0000000..ae25eb0 --- /dev/null +++ b/.changeset/frank-stamps-bathe.md @@ -0,0 +1,5 @@ +--- +'@codama/renderers-js': patch +--- + +Use standalone format function from Prettier and remove opinionated defaults diff --git a/src/utils/formatCode.ts b/src/utils/formatCode.ts index 9563516..84807c4 100644 --- a/src/utils/formatCode.ts +++ b/src/utils/formatCode.ts @@ -1,7 +1,8 @@ import { joinPath, mapRenderMapContentAsync, RenderMap } from '@codama/renderers-core'; -import { format, Plugin, resolveConfig } from 'prettier'; +import { Plugin, resolveConfig } from 'prettier'; import * as estreePlugin from 'prettier/plugins/estree'; import * as typeScriptPlugin from 'prettier/plugins/typescript'; +import { format } from 'prettier/standalone'; import { Fragment } from './fragment'; import { RenderOptions } from './options'; @@ -9,15 +10,8 @@ import { RenderOptions } from './options'; export type PrettierOptions = Parameters[1]; const DEFAULT_PRETTIER_OPTIONS: PrettierOptions = { - arrowParens: 'always', parser: 'typescript', plugins: [estreePlugin as Plugin, typeScriptPlugin], - printWidth: 80, - semi: true, - singleQuote: true, - tabWidth: 2, - trailingComma: 'es5', - useTabs: false, }; export async function formatCode( diff --git a/src/utils/packageJson.ts b/src/utils/packageJson.ts index d091869..b717cd2 100644 --- a/src/utils/packageJson.ts +++ b/src/utils/packageJson.ts @@ -2,9 +2,9 @@ import { CODAMA_ERROR__RENDERERS__MISSING_DEPENDENCY_VERSIONS, CodamaError, logW import { fileExists, joinPath, readJson, RenderMap, writeFile } from '@codama/renderers-core'; import { lt as ltVersion, minVersion, subset } from 'semver'; -import { RenderOptions } from '.'; import { Fragment, mergeFragments } from './fragment'; import { getExternalDependencies } from './importMap'; +import { RenderOptions } from './options'; type DependencyVersions = Record; diff --git a/test/e2e/anchor/src/generated/accounts/guardV1.ts b/test/e2e/anchor/src/generated/accounts/guardV1.ts index 027d404..8e8d8b5 100644 --- a/test/e2e/anchor/src/generated/accounts/guardV1.ts +++ b/test/e2e/anchor/src/generated/accounts/guardV1.ts @@ -101,7 +101,7 @@ export function getGuardV1Encoder(): Encoder { ['transferAmountRule', getOptionEncoder(getTransferAmountRuleEncoder())], ['additionalFieldsRule', getArrayEncoder(getMetadataAdditionalFieldRuleEncoder())], ]), - value => ({ ...value, discriminator: GUARD_V1_DISCRIMINATOR }) + value => ({ ...value, discriminator: GUARD_V1_DISCRIMINATOR }), ); } @@ -123,13 +123,13 @@ export function getGuardV1Codec(): Codec { } export function decodeGuardV1( - encodedAccount: EncodedAccount + encodedAccount: EncodedAccount, ): Account; export function decodeGuardV1( - encodedAccount: MaybeEncodedAccount + encodedAccount: MaybeEncodedAccount, ): MaybeAccount; export function decodeGuardV1( - encodedAccount: EncodedAccount | MaybeEncodedAccount + encodedAccount: EncodedAccount | MaybeEncodedAccount, ): Account | MaybeAccount { return decodeAccount(encodedAccount as MaybeEncodedAccount, getGuardV1Decoder()); } @@ -137,7 +137,7 @@ export function decodeGuardV1( export async function fetchGuardV1( rpc: Parameters[0], address: Address, - config?: FetchAccountConfig + config?: FetchAccountConfig, ): Promise> { const maybeAccount = await fetchMaybeGuardV1(rpc, address, config); assertAccountExists(maybeAccount); @@ -147,7 +147,7 @@ export async function fetchGuardV1( export async function fetchMaybeGuardV1( rpc: Parameters[0], address: Address, - config?: FetchAccountConfig + config?: FetchAccountConfig, ): Promise> { const maybeAccount = await fetchEncodedAccount(rpc, address, config); return decodeGuardV1(maybeAccount); @@ -156,7 +156,7 @@ export async function fetchMaybeGuardV1( export async function fetchAllGuardV1( rpc: Parameters[0], addresses: Array
, - config?: FetchAccountsConfig + config?: FetchAccountsConfig, ): Promise[]> { const maybeAccounts = await fetchAllMaybeGuardV1(rpc, addresses, config); assertAccountsExist(maybeAccounts); @@ -166,7 +166,7 @@ export async function fetchAllGuardV1( export async function fetchAllMaybeGuardV1( rpc: Parameters[0], addresses: Array
, - config?: FetchAccountsConfig + config?: FetchAccountsConfig, ): Promise[]> { const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config); return maybeAccounts.map(maybeAccount => decodeGuardV1(maybeAccount)); diff --git a/test/e2e/anchor/src/generated/errors/wenTransferGuard.ts b/test/e2e/anchor/src/generated/errors/wenTransferGuard.ts index c889b15..cc3fa23 100644 --- a/test/e2e/anchor/src/generated/errors/wenTransferGuard.ts +++ b/test/e2e/anchor/src/generated/errors/wenTransferGuard.ts @@ -66,7 +66,7 @@ export function getWenTransferGuardErrorMessage(code: WenTransferGuardError): st export function isWenTransferGuardError( error: unknown, transactionMessage: { instructions: Record }, - code?: TProgramErrorCode + code?: TProgramErrorCode, ): error is SolanaError & Readonly<{ context: Readonly<{ code: TProgramErrorCode }> }> { return isProgramError(error, transactionMessage, WEN_TRANSFER_GUARD_PROGRAM_ADDRESS, code); diff --git a/test/e2e/anchor/src/generated/instructions/createGuard.ts b/test/e2e/anchor/src/generated/instructions/createGuard.ts index 5754a61..04b38f0 100644 --- a/test/e2e/anchor/src/generated/instructions/createGuard.ts +++ b/test/e2e/anchor/src/generated/instructions/createGuard.ts @@ -136,7 +136,7 @@ export function getCreateGuardInstructionDataEncoder(): Encoder ({ ...value, discriminator: CREATE_GUARD_DISCRIMINATOR }) + value => ({ ...value, discriminator: CREATE_GUARD_DISCRIMINATOR }), ); } @@ -206,7 +206,7 @@ export async function getCreateGuardInstructionAsync< TAccountTokenProgram, TAccountSystemProgram >, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): Promise< CreateGuardInstruction< TProgramAddress, @@ -248,7 +248,7 @@ export async function getCreateGuardInstructionAsync< new Uint8Array([ 119, 101, 110, 95, 116, 111, 107, 101, 110, 95, 116, 114, 97, 110, 115, 102, 101, 114, 95, 103, 117, 97, 114, 100, - ]) + ]), ), getBytesEncoder().encode(new Uint8Array([103, 117, 97, 114, 100, 95, 118, 49])), getAddressEncoder().encode(expectAddress(accounts.mint.value)), @@ -353,7 +353,7 @@ export function getCreateGuardInstruction< TAccountTokenProgram, TAccountSystemProgram >, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): CreateGuardInstruction< TProgramAddress, TAccountGuard, @@ -446,7 +446,7 @@ export type ParsedCreateGuardInstruction< export function parseCreateGuardInstruction( instruction: Instruction & InstructionWithAccounts & - InstructionWithData + InstructionWithData, ): ParsedCreateGuardInstruction { if (instruction.accounts.length < 8) { // TODO: Coded error. diff --git a/test/e2e/anchor/src/generated/instructions/execute.ts b/test/e2e/anchor/src/generated/instructions/execute.ts index 72ae5af..5f3fa60 100644 --- a/test/e2e/anchor/src/generated/instructions/execute.ts +++ b/test/e2e/anchor/src/generated/instructions/execute.ts @@ -81,7 +81,7 @@ export function getExecuteInstructionDataEncoder(): FixedSizeEncoder ({ ...value, discriminator: EXECUTE_DISCRIMINATOR }) + value => ({ ...value, discriminator: EXECUTE_DISCRIMINATOR }), ); } @@ -134,7 +134,7 @@ export async function getExecuteInstructionAsync< TAccountGuard, TAccountInstructionSysvarAccount >, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): Promise< ExecuteInstruction< TProgramAddress, @@ -173,7 +173,7 @@ export async function getExecuteInstructionAsync< getBytesEncoder().encode( new Uint8Array([ 101, 120, 116, 114, 97, 45, 97, 99, 99, 111, 117, 110, 116, 45, 109, 101, 116, 97, 115, - ]) + ]), ), getAddressEncoder().encode(expectAddress(accounts.mint.value)), ], @@ -247,7 +247,7 @@ export function getExecuteInstruction< TAccountGuard, TAccountInstructionSysvarAccount >, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): ExecuteInstruction< TProgramAddress, TAccountSourceAccount, @@ -327,7 +327,7 @@ export type ParsedExecuteInstruction< export function parseExecuteInstruction( instruction: Instruction & InstructionWithAccounts & - InstructionWithData + InstructionWithData, ): ParsedExecuteInstruction { if (instruction.accounts.length < 7) { // TODO: Coded error. diff --git a/test/e2e/anchor/src/generated/instructions/initialize.ts b/test/e2e/anchor/src/generated/instructions/initialize.ts index 20686bb..a1acea4 100644 --- a/test/e2e/anchor/src/generated/instructions/initialize.ts +++ b/test/e2e/anchor/src/generated/instructions/initialize.ts @@ -126,7 +126,7 @@ export async function getInitializeInstructionAsync< TAccountSystemProgram, TAccountPayer >, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): Promise< InitializeInstruction< TProgramAddress, @@ -160,7 +160,7 @@ export async function getInitializeInstructionAsync< getBytesEncoder().encode( new Uint8Array([ 101, 120, 116, 114, 97, 45, 97, 99, 99, 111, 117, 110, 116, 45, 109, 101, 116, 97, 115, - ]) + ]), ), getAddressEncoder().encode(expectAddress(accounts.mint.value)), ], @@ -227,7 +227,7 @@ export function getInitializeInstruction< TAccountSystemProgram, TAccountPayer >, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): InitializeInstruction< TProgramAddress, TAccountExtraMetasAccount, @@ -299,7 +299,7 @@ export type ParsedInitializeInstruction< export function parseInitializeInstruction( instruction: Instruction & InstructionWithAccounts & - InstructionWithData + InstructionWithData, ): ParsedInitializeInstruction { if (instruction.accounts.length < 6) { // TODO: Coded error. diff --git a/test/e2e/anchor/src/generated/instructions/updateGuard.ts b/test/e2e/anchor/src/generated/instructions/updateGuard.ts index 0c2d17c..34400b6 100644 --- a/test/e2e/anchor/src/generated/instructions/updateGuard.ts +++ b/test/e2e/anchor/src/generated/instructions/updateGuard.ts @@ -107,7 +107,7 @@ export function getUpdateGuardInstructionDataEncoder(): Encoder ({ ...value, discriminator: UPDATE_GUARD_DISCRIMINATOR }) + value => ({ ...value, discriminator: UPDATE_GUARD_DISCRIMINATOR }), ); } @@ -163,7 +163,7 @@ export async function getUpdateGuardInstructionAsync< TAccountTokenProgram, TAccountSystemProgram >, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): Promise< UpdateGuardInstruction< TProgramAddress, @@ -201,7 +201,7 @@ export async function getUpdateGuardInstructionAsync< new Uint8Array([ 119, 101, 110, 95, 116, 111, 107, 101, 110, 95, 116, 114, 97, 110, 115, 102, 101, 114, 95, 103, 117, 97, 114, 100, - ]) + ]), ), getBytesEncoder().encode(new Uint8Array([103, 117, 97, 114, 100, 95, 118, 49])), getAddressEncoder().encode(expectAddress(accounts.mint.value)), @@ -287,7 +287,7 @@ export function getUpdateGuardInstruction< TAccountTokenProgram, TAccountSystemProgram >, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): UpdateGuardInstruction< TProgramAddress, TAccountGuard, @@ -366,7 +366,7 @@ export type ParsedUpdateGuardInstruction< export function parseUpdateGuardInstruction( instruction: Instruction & InstructionWithAccounts & - InstructionWithData + InstructionWithData, ): ParsedUpdateGuardInstruction { if (instruction.accounts.length < 6) { // TODO: Coded error. diff --git a/test/e2e/anchor/src/generated/programs/wenTransferGuard.ts b/test/e2e/anchor/src/generated/programs/wenTransferGuard.ts index 578de13..037b127 100644 --- a/test/e2e/anchor/src/generated/programs/wenTransferGuard.ts +++ b/test/e2e/anchor/src/generated/programs/wenTransferGuard.ts @@ -22,14 +22,14 @@ export enum WenTransferGuardAccount { } export function identifyWenTransferGuardAccount( - account: { data: ReadonlyUint8Array } | ReadonlyUint8Array + account: { data: ReadonlyUint8Array } | ReadonlyUint8Array, ): WenTransferGuardAccount { const data = 'data' in account ? account.data : account; if ( containsBytes( data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([185, 149, 156, 78, 245, 108, 172, 68])), - 0 + 0, ) ) { return WenTransferGuardAccount.GuardV1; @@ -45,14 +45,14 @@ export enum WenTransferGuardInstruction { } export function identifyWenTransferGuardInstruction( - instruction: { data: ReadonlyUint8Array } | ReadonlyUint8Array + instruction: { data: ReadonlyUint8Array } | ReadonlyUint8Array, ): WenTransferGuardInstruction { const data = 'data' in instruction ? instruction.data : instruction; if ( containsBytes( data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([251, 254, 17, 198, 219, 218, 154, 99])), - 0 + 0, ) ) { return WenTransferGuardInstruction.CreateGuard; @@ -61,7 +61,7 @@ export function identifyWenTransferGuardInstruction( containsBytes( data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([105, 37, 101, 197, 75, 251, 102, 26])), - 0 + 0, ) ) { return WenTransferGuardInstruction.Execute; @@ -70,7 +70,7 @@ export function identifyWenTransferGuardInstruction( containsBytes( data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([43, 34, 13, 49, 167, 88, 235, 235])), - 0 + 0, ) ) { return WenTransferGuardInstruction.Initialize; @@ -79,7 +79,7 @@ export function identifyWenTransferGuardInstruction( containsBytes( data, fixEncoderSize(getBytesEncoder(), 8).encode(new Uint8Array([51, 38, 175, 180, 25, 249, 39, 24])), - 0 + 0, ) ) { return WenTransferGuardInstruction.UpdateGuard; diff --git a/test/e2e/anchor/src/generated/shared/index.ts b/test/e2e/anchor/src/generated/shared/index.ts index a9d9fec..7380d8c 100644 --- a/test/e2e/anchor/src/generated/shared/index.ts +++ b/test/e2e/anchor/src/generated/shared/index.ts @@ -34,7 +34,7 @@ export function expectSome(value: T | null | undefined): T { * @internal */ export function expectAddress( - value: Address | ProgramDerivedAddress | TransactionSigner | null | undefined + value: Address | ProgramDerivedAddress | TransactionSigner | null | undefined, ): Address { if (!value) { throw new Error('Expected a Address.'); @@ -53,7 +53,7 @@ export function expectAddress( * @internal */ export function expectProgramDerivedAddress( - value: Address | ProgramDerivedAddress | TransactionSigner | null | undefined + value: Address | ProgramDerivedAddress | TransactionSigner | null | undefined, ): ProgramDerivedAddress { if (!value || !Array.isArray(value) || !isProgramDerivedAddress(value)) { throw new Error('Expected a ProgramDerivedAddress.'); @@ -66,7 +66,7 @@ export function expectProgramDerivedAddress( * @internal */ export function expectTransactionSigner( - value: Address | ProgramDerivedAddress | TransactionSigner | null | undefined + value: Address | ProgramDerivedAddress | TransactionSigner | null | undefined, ): TransactionSigner { if (!value || !isTransactionSigner(value)) { throw new Error('Expected a TransactionSigner.'); @@ -119,7 +119,7 @@ export function getAccountMetaFactory(programAddress: Address, optionalAccountSt } export function isTransactionSigner( - value: Address | ProgramDerivedAddress | TransactionSigner + value: Address | ProgramDerivedAddress | TransactionSigner, ): value is TransactionSigner { return !!value && typeof value === 'object' && 'address' in value && kitIsTransactionSigner(value); } diff --git a/test/e2e/anchor/src/generated/types/cpiRule.ts b/test/e2e/anchor/src/generated/types/cpiRule.ts index c451c93..1b40da1 100644 --- a/test/e2e/anchor/src/generated/types/cpiRule.ts +++ b/test/e2e/anchor/src/generated/types/cpiRule.ts @@ -57,11 +57,11 @@ export function getCpiRuleCodec(): Codec { // Data Enum Helpers. export function cpiRule( kind: 'Allow', - data: GetDiscriminatedUnionVariantContent['fields'] + data: GetDiscriminatedUnionVariantContent['fields'], ): GetDiscriminatedUnionVariant; export function cpiRule( kind: 'Deny', - data: GetDiscriminatedUnionVariantContent['fields'] + data: GetDiscriminatedUnionVariantContent['fields'], ): GetDiscriminatedUnionVariant; export function cpiRule(kind: K, data?: Data) { return Array.isArray(data) ? { __kind: kind, fields: data } : { __kind: kind, ...(data ?? {}) }; diff --git a/test/e2e/anchor/src/generated/types/metadataAdditionalFieldRestriction.ts b/test/e2e/anchor/src/generated/types/metadataAdditionalFieldRestriction.ts index 3ad10ca..0fd1023 100644 --- a/test/e2e/anchor/src/generated/types/metadataAdditionalFieldRestriction.ts +++ b/test/e2e/anchor/src/generated/types/metadataAdditionalFieldRestriction.ts @@ -84,22 +84,22 @@ export function getMetadataAdditionalFieldRestrictionCodec(): Codec< // Data Enum Helpers. export function metadataAdditionalFieldRestriction( kind: 'Includes', - data: GetDiscriminatedUnionVariantContent['fields'] + data: GetDiscriminatedUnionVariantContent['fields'], ): GetDiscriminatedUnionVariant; export function metadataAdditionalFieldRestriction( kind: 'Excludes', - data: GetDiscriminatedUnionVariantContent['fields'] + data: GetDiscriminatedUnionVariantContent['fields'], ): GetDiscriminatedUnionVariant; export function metadataAdditionalFieldRestriction( kind: K, - data?: Data + data?: Data, ) { return Array.isArray(data) ? { __kind: kind, fields: data } : { __kind: kind, ...(data ?? {}) }; } export function isMetadataAdditionalFieldRestriction( kind: K, - value: MetadataAdditionalFieldRestriction + value: MetadataAdditionalFieldRestriction, ): value is MetadataAdditionalFieldRestriction & { __kind: K } { return value.__kind === kind; } diff --git a/test/e2e/anchor/src/generated/types/transferAmountRule.ts b/test/e2e/anchor/src/generated/types/transferAmountRule.ts index b3c66a2..e841325 100644 --- a/test/e2e/anchor/src/generated/types/transferAmountRule.ts +++ b/test/e2e/anchor/src/generated/types/transferAmountRule.ts @@ -64,19 +64,19 @@ export function getTransferAmountRuleCodec(): Codec['fields'] + data: GetDiscriminatedUnionVariantContent['fields'], ): GetDiscriminatedUnionVariant; export function transferAmountRule( kind: 'Below', - data: GetDiscriminatedUnionVariantContent['fields'] + data: GetDiscriminatedUnionVariantContent['fields'], ): GetDiscriminatedUnionVariant; export function transferAmountRule( kind: 'Equal', - data: GetDiscriminatedUnionVariantContent['fields'] + data: GetDiscriminatedUnionVariantContent['fields'], ): GetDiscriminatedUnionVariant; export function transferAmountRule( kind: 'Rang', - data: GetDiscriminatedUnionVariantContent['fields'] + data: GetDiscriminatedUnionVariantContent['fields'], ): GetDiscriminatedUnionVariant; export function transferAmountRule(kind: K, data?: Data) { return Array.isArray(data) ? { __kind: kind, fields: data } : { __kind: kind, ...(data ?? {}) }; @@ -84,7 +84,7 @@ export function transferAmountRule( kind: K, - value: TransferAmountRule + value: TransferAmountRule, ): value is TransferAmountRule & { __kind: K } { return value.__kind === kind; } diff --git a/test/e2e/dummy/src/generated/instructions/instruction1.ts b/test/e2e/dummy/src/generated/instructions/instruction1.ts index 2dc4653..7219fcb 100644 --- a/test/e2e/dummy/src/generated/instructions/instruction1.ts +++ b/test/e2e/dummy/src/generated/instructions/instruction1.ts @@ -30,7 +30,7 @@ export type ParsedInstruction1Instruction( - instruction: Instruction + instruction: Instruction, ): ParsedInstruction1Instruction { return { programAddress: instruction.programAddress }; } diff --git a/test/e2e/dummy/src/generated/instructions/instruction2.ts b/test/e2e/dummy/src/generated/instructions/instruction2.ts index 09b5e20..e035185 100644 --- a/test/e2e/dummy/src/generated/instructions/instruction2.ts +++ b/test/e2e/dummy/src/generated/instructions/instruction2.ts @@ -26,7 +26,7 @@ export type Instruction2Input = { export function getInstruction2Instruction( input: Instruction2Input, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): Instruction2Instruction { // Program address. const programAddress = config?.programAddress ?? DUMMY_PROGRAM_ADDRESS; @@ -48,7 +48,7 @@ export type ParsedInstruction2Instruction( - instruction: Instruction + instruction: Instruction, ): ParsedInstruction2Instruction { return { programAddress: instruction.programAddress }; } diff --git a/test/e2e/dummy/src/generated/instructions/instruction3.ts b/test/e2e/dummy/src/generated/instructions/instruction3.ts index 3b378f1..820ffef 100644 --- a/test/e2e/dummy/src/generated/instructions/instruction3.ts +++ b/test/e2e/dummy/src/generated/instructions/instruction3.ts @@ -78,7 +78,7 @@ export type ParsedInstruction3Instruction( - instruction: Instruction & InstructionWithData + instruction: Instruction & InstructionWithData, ): ParsedInstruction3Instruction { return { programAddress: instruction.programAddress, diff --git a/test/e2e/dummy/src/generated/instructions/instruction4.ts b/test/e2e/dummy/src/generated/instructions/instruction4.ts index 87b083a..2e61cc6 100644 --- a/test/e2e/dummy/src/generated/instructions/instruction4.ts +++ b/test/e2e/dummy/src/generated/instructions/instruction4.ts @@ -54,7 +54,7 @@ export type Instruction4Input = { export function getInstruction4Instruction( input: Instruction4Input, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): Instruction4Instruction { // Program address. const programAddress = config?.programAddress ?? DUMMY_PROGRAM_ADDRESS; @@ -74,7 +74,7 @@ export type ParsedInstruction4Instruction( - instruction: Instruction & InstructionWithData + instruction: Instruction & InstructionWithData, ): ParsedInstruction4Instruction { return { programAddress: instruction.programAddress, diff --git a/test/e2e/dummy/src/generated/instructions/instruction5.ts b/test/e2e/dummy/src/generated/instructions/instruction5.ts index c47b1f0..9cf0023 100644 --- a/test/e2e/dummy/src/generated/instructions/instruction5.ts +++ b/test/e2e/dummy/src/generated/instructions/instruction5.ts @@ -58,7 +58,7 @@ export type Instruction5Input = { export function getInstruction5Instruction( input: Instruction5Input, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): Instruction5Instruction { // Program address. const programAddress = config?.programAddress ?? DUMMY_PROGRAM_ADDRESS; @@ -78,7 +78,7 @@ export type ParsedInstruction5Instruction( - instruction: Instruction & InstructionWithData + instruction: Instruction & InstructionWithData, ): ParsedInstruction5Instruction { return { programAddress: instruction.programAddress, diff --git a/test/e2e/dummy/src/generated/instructions/instruction6.ts b/test/e2e/dummy/src/generated/instructions/instruction6.ts index f2e2767..5cedb44 100644 --- a/test/e2e/dummy/src/generated/instructions/instruction6.ts +++ b/test/e2e/dummy/src/generated/instructions/instruction6.ts @@ -37,7 +37,7 @@ export function getInstruction6Instruction< TProgramAddress extends Address = typeof DUMMY_PROGRAM_ADDRESS, >( input: Instruction6Input, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): Instruction6Instruction { // Program address. const programAddress = config?.programAddress ?? DUMMY_PROGRAM_ADDRESS; @@ -64,7 +64,7 @@ export type ParsedInstruction6Instruction< }; export function parseInstruction6Instruction( - instruction: Instruction & InstructionWithAccounts + instruction: Instruction & InstructionWithAccounts, ): ParsedInstruction6Instruction { if (instruction.accounts.length < 1) { // TODO: Coded error. diff --git a/test/e2e/dummy/src/generated/instructions/instruction7.ts b/test/e2e/dummy/src/generated/instructions/instruction7.ts index 70de5a6..d86f821 100644 --- a/test/e2e/dummy/src/generated/instructions/instruction7.ts +++ b/test/e2e/dummy/src/generated/instructions/instruction7.ts @@ -37,7 +37,7 @@ export function getInstruction7Instruction< TProgramAddress extends Address = typeof DUMMY_PROGRAM_ADDRESS, >( input: Instruction7Input, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): Instruction7Instruction { // Program address. const programAddress = config?.programAddress ?? DUMMY_PROGRAM_ADDRESS; @@ -64,7 +64,7 @@ export type ParsedInstruction7Instruction< }; export function parseInstruction7Instruction( - instruction: Instruction & InstructionWithAccounts + instruction: Instruction & InstructionWithAccounts, ): ParsedInstruction7Instruction { if (instruction.accounts.length < 1) { // TODO: Coded error. diff --git a/test/e2e/dummy/src/generated/programs/dummy.ts b/test/e2e/dummy/src/generated/programs/dummy.ts index 5eb3e86..9a9dece 100644 --- a/test/e2e/dummy/src/generated/programs/dummy.ts +++ b/test/e2e/dummy/src/generated/programs/dummy.ts @@ -31,7 +31,7 @@ export enum DummyInstruction { } export function identifyDummyInstruction( - instruction: { data: ReadonlyUint8Array } | ReadonlyUint8Array + instruction: { data: ReadonlyUint8Array } | ReadonlyUint8Array, ): DummyInstruction { const data = 'data' in instruction ? instruction.data : instruction; if (containsBytes(data, getU32Encoder().encode(42), 0)) { diff --git a/test/e2e/dummy/src/generated/shared/index.ts b/test/e2e/dummy/src/generated/shared/index.ts index a9d9fec..7380d8c 100644 --- a/test/e2e/dummy/src/generated/shared/index.ts +++ b/test/e2e/dummy/src/generated/shared/index.ts @@ -34,7 +34,7 @@ export function expectSome(value: T | null | undefined): T { * @internal */ export function expectAddress( - value: Address | ProgramDerivedAddress | TransactionSigner | null | undefined + value: Address | ProgramDerivedAddress | TransactionSigner | null | undefined, ): Address { if (!value) { throw new Error('Expected a Address.'); @@ -53,7 +53,7 @@ export function expectAddress( * @internal */ export function expectProgramDerivedAddress( - value: Address | ProgramDerivedAddress | TransactionSigner | null | undefined + value: Address | ProgramDerivedAddress | TransactionSigner | null | undefined, ): ProgramDerivedAddress { if (!value || !Array.isArray(value) || !isProgramDerivedAddress(value)) { throw new Error('Expected a ProgramDerivedAddress.'); @@ -66,7 +66,7 @@ export function expectProgramDerivedAddress( * @internal */ export function expectTransactionSigner( - value: Address | ProgramDerivedAddress | TransactionSigner | null | undefined + value: Address | ProgramDerivedAddress | TransactionSigner | null | undefined, ): TransactionSigner { if (!value || !isTransactionSigner(value)) { throw new Error('Expected a TransactionSigner.'); @@ -119,7 +119,7 @@ export function getAccountMetaFactory(programAddress: Address, optionalAccountSt } export function isTransactionSigner( - value: Address | ProgramDerivedAddress | TransactionSigner + value: Address | ProgramDerivedAddress | TransactionSigner, ): value is TransactionSigner { return !!value && typeof value === 'object' && 'address' in value && kitIsTransactionSigner(value); } diff --git a/test/e2e/memo/src/generated/instructions/addMemo.ts b/test/e2e/memo/src/generated/instructions/addMemo.ts index 37a08f6..0c2c26b 100644 --- a/test/e2e/memo/src/generated/instructions/addMemo.ts +++ b/test/e2e/memo/src/generated/instructions/addMemo.ts @@ -54,7 +54,7 @@ export type AddMemoInput = { export function getAddMemoInstruction( input: AddMemoInput, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): AddMemoInstruction { // Program address. const programAddress = config?.programAddress ?? MEMO_PROGRAM_ADDRESS; @@ -82,7 +82,7 @@ export type ParsedAddMemoInstruction( - instruction: Instruction & InstructionWithData + instruction: Instruction & InstructionWithData, ): ParsedAddMemoInstruction { return { programAddress: instruction.programAddress, diff --git a/test/e2e/memo/src/generated/shared/index.ts b/test/e2e/memo/src/generated/shared/index.ts index a9d9fec..7380d8c 100644 --- a/test/e2e/memo/src/generated/shared/index.ts +++ b/test/e2e/memo/src/generated/shared/index.ts @@ -34,7 +34,7 @@ export function expectSome(value: T | null | undefined): T { * @internal */ export function expectAddress( - value: Address | ProgramDerivedAddress | TransactionSigner | null | undefined + value: Address | ProgramDerivedAddress | TransactionSigner | null | undefined, ): Address { if (!value) { throw new Error('Expected a Address.'); @@ -53,7 +53,7 @@ export function expectAddress( * @internal */ export function expectProgramDerivedAddress( - value: Address | ProgramDerivedAddress | TransactionSigner | null | undefined + value: Address | ProgramDerivedAddress | TransactionSigner | null | undefined, ): ProgramDerivedAddress { if (!value || !Array.isArray(value) || !isProgramDerivedAddress(value)) { throw new Error('Expected a ProgramDerivedAddress.'); @@ -66,7 +66,7 @@ export function expectProgramDerivedAddress( * @internal */ export function expectTransactionSigner( - value: Address | ProgramDerivedAddress | TransactionSigner | null | undefined + value: Address | ProgramDerivedAddress | TransactionSigner | null | undefined, ): TransactionSigner { if (!value || !isTransactionSigner(value)) { throw new Error('Expected a TransactionSigner.'); @@ -119,7 +119,7 @@ export function getAccountMetaFactory(programAddress: Address, optionalAccountSt } export function isTransactionSigner( - value: Address | ProgramDerivedAddress | TransactionSigner + value: Address | ProgramDerivedAddress | TransactionSigner, ): value is TransactionSigner { return !!value && typeof value === 'object' && 'address' in value && kitIsTransactionSigner(value); } diff --git a/test/e2e/system/src/generated/accounts/nonce.ts b/test/e2e/system/src/generated/accounts/nonce.ts index bb877df..6baf649 100644 --- a/test/e2e/system/src/generated/accounts/nonce.ts +++ b/test/e2e/system/src/generated/accounts/nonce.ts @@ -88,13 +88,13 @@ export function getNonceCodec(): FixedSizeCodec { } export function decodeNonce( - encodedAccount: EncodedAccount + encodedAccount: EncodedAccount, ): Account; export function decodeNonce( - encodedAccount: MaybeEncodedAccount + encodedAccount: MaybeEncodedAccount, ): MaybeAccount; export function decodeNonce( - encodedAccount: EncodedAccount | MaybeEncodedAccount + encodedAccount: EncodedAccount | MaybeEncodedAccount, ): Account | MaybeAccount { return decodeAccount(encodedAccount as MaybeEncodedAccount, getNonceDecoder()); } @@ -102,7 +102,7 @@ export function decodeNonce( export async function fetchNonce( rpc: Parameters[0], address: Address, - config?: FetchAccountConfig + config?: FetchAccountConfig, ): Promise> { const maybeAccount = await fetchMaybeNonce(rpc, address, config); assertAccountExists(maybeAccount); @@ -112,7 +112,7 @@ export async function fetchNonce( export async function fetchMaybeNonce( rpc: Parameters[0], address: Address, - config?: FetchAccountConfig + config?: FetchAccountConfig, ): Promise> { const maybeAccount = await fetchEncodedAccount(rpc, address, config); return decodeNonce(maybeAccount); @@ -121,7 +121,7 @@ export async function fetchMaybeNonce( export async function fetchAllNonce( rpc: Parameters[0], addresses: Array
, - config?: FetchAccountsConfig + config?: FetchAccountsConfig, ): Promise[]> { const maybeAccounts = await fetchAllMaybeNonce(rpc, addresses, config); assertAccountsExist(maybeAccounts); @@ -131,7 +131,7 @@ export async function fetchAllNonce( export async function fetchAllMaybeNonce( rpc: Parameters[0], addresses: Array
, - config?: FetchAccountsConfig + config?: FetchAccountsConfig, ): Promise[]> { const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config); return maybeAccounts.map(maybeAccount => decodeNonce(maybeAccount)); diff --git a/test/e2e/system/src/generated/errors/system.ts b/test/e2e/system/src/generated/errors/system.ts index 20462d2..0b9768f 100644 --- a/test/e2e/system/src/generated/errors/system.ts +++ b/test/e2e/system/src/generated/errors/system.ts @@ -70,7 +70,7 @@ export function getSystemErrorMessage(code: SystemError): string { export function isSystemError( error: unknown, transactionMessage: { instructions: Record }, - code?: TProgramErrorCode + code?: TProgramErrorCode, ): error is SolanaError & Readonly<{ context: Readonly<{ code: TProgramErrorCode }> }> { return isProgramError(error, transactionMessage, SYSTEM_PROGRAM_ADDRESS, code); diff --git a/test/e2e/system/src/generated/instructions/advanceNonceAccount.ts b/test/e2e/system/src/generated/instructions/advanceNonceAccount.ts index f8590d5..644224b 100644 --- a/test/e2e/system/src/generated/instructions/advanceNonceAccount.ts +++ b/test/e2e/system/src/generated/instructions/advanceNonceAccount.ts @@ -98,7 +98,7 @@ export function getAdvanceNonceAccountInstruction< TProgramAddress extends Address = typeof SYSTEM_PROGRAM_ADDRESS, >( input: AdvanceNonceAccountInput, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): AdvanceNonceAccountInstruction< TProgramAddress, TAccountNonceAccount, @@ -158,7 +158,7 @@ export function parseAdvanceNonceAccountInstruction< >( instruction: Instruction & InstructionWithAccounts & - InstructionWithData + InstructionWithData, ): ParsedAdvanceNonceAccountInstruction { if (instruction.accounts.length < 3) { // TODO: Coded error. diff --git a/test/e2e/system/src/generated/instructions/allocate.ts b/test/e2e/system/src/generated/instructions/allocate.ts index 6bc83cb..12d5478 100644 --- a/test/e2e/system/src/generated/instructions/allocate.ts +++ b/test/e2e/system/src/generated/instructions/allocate.ts @@ -62,7 +62,7 @@ export function getAllocateInstructionDataEncoder(): FixedSizeEncoder ({ ...value, discriminator: ALLOCATE_DISCRIMINATOR }) + value => ({ ...value, discriminator: ALLOCATE_DISCRIMINATOR }), ); } @@ -90,7 +90,7 @@ export function getAllocateInstruction< TProgramAddress extends Address = typeof SYSTEM_PROGRAM_ADDRESS, >( input: AllocateInput, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): AllocateInstruction { // Program address. const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS; @@ -124,7 +124,7 @@ export type ParsedAllocateInstruction< export function parseAllocateInstruction( instruction: Instruction & InstructionWithAccounts & - InstructionWithData + InstructionWithData, ): ParsedAllocateInstruction { if (instruction.accounts.length < 1) { // TODO: Coded error. diff --git a/test/e2e/system/src/generated/instructions/allocateWithSeed.ts b/test/e2e/system/src/generated/instructions/allocateWithSeed.ts index d6010e1..8255b5b 100644 --- a/test/e2e/system/src/generated/instructions/allocateWithSeed.ts +++ b/test/e2e/system/src/generated/instructions/allocateWithSeed.ts @@ -85,7 +85,7 @@ export function getAllocateWithSeedInstructionDataEncoder(): Encoder ({ ...value, discriminator: ALLOCATE_WITH_SEED_DISCRIMINATOR }) + value => ({ ...value, discriminator: ALLOCATE_WITH_SEED_DISCRIMINATOR }), ); } @@ -124,7 +124,7 @@ export function getAllocateWithSeedInstruction< TProgramAddress extends Address = typeof SYSTEM_PROGRAM_ADDRESS, >( input: AllocateWithSeedInput, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): AllocateWithSeedInstruction { // Program address. const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS; @@ -162,7 +162,7 @@ export type ParsedAllocateWithSeedInstruction< export function parseAllocateWithSeedInstruction( instruction: Instruction & InstructionWithAccounts & - InstructionWithData + InstructionWithData, ): ParsedAllocateWithSeedInstruction { if (instruction.accounts.length < 2) { // TODO: Coded error. diff --git a/test/e2e/system/src/generated/instructions/assign.ts b/test/e2e/system/src/generated/instructions/assign.ts index bbfeb17..15da16e 100644 --- a/test/e2e/system/src/generated/instructions/assign.ts +++ b/test/e2e/system/src/generated/instructions/assign.ts @@ -62,7 +62,7 @@ export function getAssignInstructionDataEncoder(): FixedSizeEncoder ({ ...value, discriminator: ASSIGN_DISCRIMINATOR }) + value => ({ ...value, discriminator: ASSIGN_DISCRIMINATOR }), ); } @@ -87,7 +87,7 @@ export function getAssignInstruction< TProgramAddress extends Address = typeof SYSTEM_PROGRAM_ADDRESS, >( input: AssignInput, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): AssignInstruction { // Program address. const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS; @@ -121,7 +121,7 @@ export type ParsedAssignInstruction< export function parseAssignInstruction( instruction: Instruction & InstructionWithAccounts & - InstructionWithData + InstructionWithData, ): ParsedAssignInstruction { if (instruction.accounts.length < 1) { // TODO: Coded error. diff --git a/test/e2e/system/src/generated/instructions/assignWithSeed.ts b/test/e2e/system/src/generated/instructions/assignWithSeed.ts index 9718db4..5b51304 100644 --- a/test/e2e/system/src/generated/instructions/assignWithSeed.ts +++ b/test/e2e/system/src/generated/instructions/assignWithSeed.ts @@ -76,7 +76,7 @@ export function getAssignWithSeedInstructionDataEncoder(): Encoder ({ ...value, discriminator: ASSIGN_WITH_SEED_DISCRIMINATOR }) + value => ({ ...value, discriminator: ASSIGN_WITH_SEED_DISCRIMINATOR }), ); } @@ -113,7 +113,7 @@ export function getAssignWithSeedInstruction< TProgramAddress extends Address = typeof SYSTEM_PROGRAM_ADDRESS, >( input: AssignWithSeedInput, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): AssignWithSeedInstruction { // Program address. const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS; @@ -151,7 +151,7 @@ export type ParsedAssignWithSeedInstruction< export function parseAssignWithSeedInstruction( instruction: Instruction & InstructionWithAccounts & - InstructionWithData + InstructionWithData, ): ParsedAssignWithSeedInstruction { if (instruction.accounts.length < 2) { // TODO: Coded error. diff --git a/test/e2e/system/src/generated/instructions/authorizeNonceAccount.ts b/test/e2e/system/src/generated/instructions/authorizeNonceAccount.ts index 34c317f..56c5775 100644 --- a/test/e2e/system/src/generated/instructions/authorizeNonceAccount.ts +++ b/test/e2e/system/src/generated/instructions/authorizeNonceAccount.ts @@ -65,7 +65,7 @@ export function getAuthorizeNonceAccountInstructionDataEncoder(): FixedSizeEncod ['discriminator', getU32Encoder()], ['newNonceAuthority', getAddressEncoder()], ]), - value => ({ ...value, discriminator: AUTHORIZE_NONCE_ACCOUNT_DISCRIMINATOR }) + value => ({ ...value, discriminator: AUTHORIZE_NONCE_ACCOUNT_DISCRIMINATOR }), ); } @@ -82,7 +82,7 @@ export function getAuthorizeNonceAccountInstructionDataCodec(): FixedSizeCodec< > { return combineCodec( getAuthorizeNonceAccountInstructionDataEncoder(), - getAuthorizeNonceAccountInstructionDataDecoder() + getAuthorizeNonceAccountInstructionDataDecoder(), ); } @@ -101,7 +101,7 @@ export function getAuthorizeNonceAccountInstruction< TProgramAddress extends Address = typeof SYSTEM_PROGRAM_ADDRESS, >( input: AuthorizeNonceAccountInput, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): AuthorizeNonceAccountInstruction { // Program address. const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS; @@ -142,7 +142,7 @@ export function parseAuthorizeNonceAccountInstruction< >( instruction: Instruction & InstructionWithAccounts & - InstructionWithData + InstructionWithData, ): ParsedAuthorizeNonceAccountInstruction { if (instruction.accounts.length < 2) { // TODO: Coded error. diff --git a/test/e2e/system/src/generated/instructions/createAccount.ts b/test/e2e/system/src/generated/instructions/createAccount.ts index 221d8eb..87e184e 100644 --- a/test/e2e/system/src/generated/instructions/createAccount.ts +++ b/test/e2e/system/src/generated/instructions/createAccount.ts @@ -79,7 +79,7 @@ export function getCreateAccountInstructionDataEncoder(): FixedSizeEncoder ({ ...value, discriminator: CREATE_ACCOUNT_DISCRIMINATOR }) + value => ({ ...value, discriminator: CREATE_ACCOUNT_DISCRIMINATOR }), ); } @@ -113,7 +113,7 @@ export function getCreateAccountInstruction< TProgramAddress extends Address = typeof SYSTEM_PROGRAM_ADDRESS, >( input: CreateAccountInput, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): CreateAccountInstruction & InstructionWithByteDelta { // Program address. const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS; @@ -155,7 +155,7 @@ export type ParsedCreateAccountInstruction< export function parseCreateAccountInstruction( instruction: Instruction & InstructionWithAccounts & - InstructionWithData + InstructionWithData, ): ParsedCreateAccountInstruction { if (instruction.accounts.length < 2) { // TODO: Coded error. diff --git a/test/e2e/system/src/generated/instructions/createAccountWithSeed.ts b/test/e2e/system/src/generated/instructions/createAccountWithSeed.ts index ee10f61..66c84fb 100644 --- a/test/e2e/system/src/generated/instructions/createAccountWithSeed.ts +++ b/test/e2e/system/src/generated/instructions/createAccountWithSeed.ts @@ -93,7 +93,7 @@ export function getCreateAccountWithSeedInstructionDataEncoder(): Encoder ({ ...value, discriminator: CREATE_ACCOUNT_WITH_SEED_DISCRIMINATOR }) + value => ({ ...value, discriminator: CREATE_ACCOUNT_WITH_SEED_DISCRIMINATOR }), ); } @@ -114,7 +114,7 @@ export function getCreateAccountWithSeedInstructionDataCodec(): Codec< > { return combineCodec( getCreateAccountWithSeedInstructionDataEncoder(), - getCreateAccountWithSeedInstructionDataDecoder() + getCreateAccountWithSeedInstructionDataDecoder(), ); } @@ -140,7 +140,7 @@ export function getCreateAccountWithSeedInstruction< TProgramAddress extends Address = typeof SYSTEM_PROGRAM_ADDRESS, >( input: CreateAccountWithSeedInput, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): CreateAccountWithSeedInstruction { // Program address. const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS; @@ -187,7 +187,7 @@ export function parseCreateAccountWithSeedInstruction< >( instruction: Instruction & InstructionWithAccounts & - InstructionWithData + InstructionWithData, ): ParsedCreateAccountWithSeedInstruction { if (instruction.accounts.length < 3) { // TODO: Coded error. diff --git a/test/e2e/system/src/generated/instructions/initializeNonceAccount.ts b/test/e2e/system/src/generated/instructions/initializeNonceAccount.ts index fe1acf8..c239e76 100644 --- a/test/e2e/system/src/generated/instructions/initializeNonceAccount.ts +++ b/test/e2e/system/src/generated/instructions/initializeNonceAccount.ts @@ -66,7 +66,7 @@ export function getInitializeNonceAccountInstructionDataEncoder(): FixedSizeEnco ['discriminator', getU32Encoder()], ['nonceAuthority', getAddressEncoder()], ]), - value => ({ ...value, discriminator: INITIALIZE_NONCE_ACCOUNT_DISCRIMINATOR }) + value => ({ ...value, discriminator: INITIALIZE_NONCE_ACCOUNT_DISCRIMINATOR }), ); } @@ -83,7 +83,7 @@ export function getInitializeNonceAccountInstructionDataCodec(): FixedSizeCodec< > { return combineCodec( getInitializeNonceAccountInstructionDataEncoder(), - getInitializeNonceAccountInstructionDataDecoder() + getInitializeNonceAccountInstructionDataDecoder(), ); } @@ -105,7 +105,7 @@ export function getInitializeNonceAccountInstruction< TProgramAddress extends Address = typeof SYSTEM_PROGRAM_ADDRESS, >( input: InitializeNonceAccountInput, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): InitializeNonceAccountInstruction< TProgramAddress, TAccountNonceAccount, @@ -144,7 +144,7 @@ export function getInitializeNonceAccountInstruction< getAccountMeta(accounts.rentSysvar), ], data: getInitializeNonceAccountInstructionDataEncoder().encode( - args as InitializeNonceAccountInstructionDataArgs + args as InitializeNonceAccountInstructionDataArgs, ), programAddress, } as InitializeNonceAccountInstruction< @@ -174,7 +174,7 @@ export function parseInitializeNonceAccountInstruction< >( instruction: Instruction & InstructionWithAccounts & - InstructionWithData + InstructionWithData, ): ParsedInitializeNonceAccountInstruction { if (instruction.accounts.length < 3) { // TODO: Coded error. diff --git a/test/e2e/system/src/generated/instructions/transferSol.ts b/test/e2e/system/src/generated/instructions/transferSol.ts index 93e2a2d..a331ed1 100644 --- a/test/e2e/system/src/generated/instructions/transferSol.ts +++ b/test/e2e/system/src/generated/instructions/transferSol.ts @@ -65,7 +65,7 @@ export function getTransferSolInstructionDataEncoder(): FixedSizeEncoder ({ ...value, discriminator: TRANSFER_SOL_DISCRIMINATOR }) + value => ({ ...value, discriminator: TRANSFER_SOL_DISCRIMINATOR }), ); } @@ -95,7 +95,7 @@ export function getTransferSolInstruction< TProgramAddress extends Address = typeof SYSTEM_PROGRAM_ADDRESS, >( input: TransferSolInput, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): TransferSolInstruction { // Program address. const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS; @@ -133,7 +133,7 @@ export type ParsedTransferSolInstruction< export function parseTransferSolInstruction( instruction: Instruction & InstructionWithAccounts & - InstructionWithData + InstructionWithData, ): ParsedTransferSolInstruction { if (instruction.accounts.length < 2) { // TODO: Coded error. diff --git a/test/e2e/system/src/generated/instructions/transferSolWithSeed.ts b/test/e2e/system/src/generated/instructions/transferSolWithSeed.ts index 58b8df0..f215281 100644 --- a/test/e2e/system/src/generated/instructions/transferSolWithSeed.ts +++ b/test/e2e/system/src/generated/instructions/transferSolWithSeed.ts @@ -80,7 +80,7 @@ export function getTransferSolWithSeedInstructionDataEncoder(): Encoder ({ ...value, discriminator: TRANSFER_SOL_WITH_SEED_DISCRIMINATOR }) + value => ({ ...value, discriminator: TRANSFER_SOL_WITH_SEED_DISCRIMINATOR }), ); } @@ -120,7 +120,7 @@ export function getTransferSolWithSeedInstruction< TProgramAddress extends Address = typeof SYSTEM_PROGRAM_ADDRESS, >( input: TransferSolWithSeedInput, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): TransferSolWithSeedInstruction { // Program address. const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS; @@ -167,7 +167,7 @@ export function parseTransferSolWithSeedInstruction< >( instruction: Instruction & InstructionWithAccounts & - InstructionWithData + InstructionWithData, ): ParsedTransferSolWithSeedInstruction { if (instruction.accounts.length < 3) { // TODO: Coded error. diff --git a/test/e2e/system/src/generated/instructions/upgradeNonceAccount.ts b/test/e2e/system/src/generated/instructions/upgradeNonceAccount.ts index b7b8c16..08b56b4 100644 --- a/test/e2e/system/src/generated/instructions/upgradeNonceAccount.ts +++ b/test/e2e/system/src/generated/instructions/upgradeNonceAccount.ts @@ -77,7 +77,7 @@ export function getUpgradeNonceAccountInstruction< TProgramAddress extends Address = typeof SYSTEM_PROGRAM_ADDRESS, >( input: UpgradeNonceAccountInput, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): UpgradeNonceAccountInstruction { // Program address. const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS; @@ -111,7 +111,7 @@ export function parseUpgradeNonceAccountInstruction< >( instruction: Instruction & InstructionWithAccounts & - InstructionWithData + InstructionWithData, ): ParsedUpgradeNonceAccountInstruction { if (instruction.accounts.length < 1) { // TODO: Coded error. diff --git a/test/e2e/system/src/generated/instructions/withdrawNonceAccount.ts b/test/e2e/system/src/generated/instructions/withdrawNonceAccount.ts index 35f165a..8b85d37 100644 --- a/test/e2e/system/src/generated/instructions/withdrawNonceAccount.ts +++ b/test/e2e/system/src/generated/instructions/withdrawNonceAccount.ts @@ -77,7 +77,7 @@ export function getWithdrawNonceAccountInstructionDataEncoder(): FixedSizeEncode ['discriminator', getU32Encoder()], ['withdrawAmount', getU64Encoder()], ]), - value => ({ ...value, discriminator: WITHDRAW_NONCE_ACCOUNT_DISCRIMINATOR }) + value => ({ ...value, discriminator: WITHDRAW_NONCE_ACCOUNT_DISCRIMINATOR }), ); } @@ -94,7 +94,7 @@ export function getWithdrawNonceAccountInstructionDataCodec(): FixedSizeCodec< > { return combineCodec( getWithdrawNonceAccountInstructionDataEncoder(), - getWithdrawNonceAccountInstructionDataDecoder() + getWithdrawNonceAccountInstructionDataDecoder(), ); } @@ -128,7 +128,7 @@ export function getWithdrawNonceAccountInstruction< TAccountRentSysvar, TAccountNonceAuthority >, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): WithdrawNonceAccountInstruction< TProgramAddress, TAccountNonceAccount, @@ -205,7 +205,7 @@ export function parseWithdrawNonceAccountInstruction< >( instruction: Instruction & InstructionWithAccounts & - InstructionWithData + InstructionWithData, ): ParsedWithdrawNonceAccountInstruction { if (instruction.accounts.length < 5) { // TODO: Coded error. diff --git a/test/e2e/system/src/generated/programs/system.ts b/test/e2e/system/src/generated/programs/system.ts index 296c887..ceabf63 100644 --- a/test/e2e/system/src/generated/programs/system.ts +++ b/test/e2e/system/src/generated/programs/system.ts @@ -46,7 +46,7 @@ export enum SystemInstruction { } export function identifySystemInstruction( - instruction: { data: ReadonlyUint8Array } | ReadonlyUint8Array + instruction: { data: ReadonlyUint8Array } | ReadonlyUint8Array, ): SystemInstruction { const data = 'data' in instruction ? instruction.data : instruction; if (containsBytes(data, getU32Encoder().encode(0), 0)) { diff --git a/test/e2e/system/src/generated/shared/index.ts b/test/e2e/system/src/generated/shared/index.ts index a9d9fec..7380d8c 100644 --- a/test/e2e/system/src/generated/shared/index.ts +++ b/test/e2e/system/src/generated/shared/index.ts @@ -34,7 +34,7 @@ export function expectSome(value: T | null | undefined): T { * @internal */ export function expectAddress( - value: Address | ProgramDerivedAddress | TransactionSigner | null | undefined + value: Address | ProgramDerivedAddress | TransactionSigner | null | undefined, ): Address { if (!value) { throw new Error('Expected a Address.'); @@ -53,7 +53,7 @@ export function expectAddress( * @internal */ export function expectProgramDerivedAddress( - value: Address | ProgramDerivedAddress | TransactionSigner | null | undefined + value: Address | ProgramDerivedAddress | TransactionSigner | null | undefined, ): ProgramDerivedAddress { if (!value || !Array.isArray(value) || !isProgramDerivedAddress(value)) { throw new Error('Expected a ProgramDerivedAddress.'); @@ -66,7 +66,7 @@ export function expectProgramDerivedAddress( * @internal */ export function expectTransactionSigner( - value: Address | ProgramDerivedAddress | TransactionSigner | null | undefined + value: Address | ProgramDerivedAddress | TransactionSigner | null | undefined, ): TransactionSigner { if (!value || !isTransactionSigner(value)) { throw new Error('Expected a TransactionSigner.'); @@ -119,7 +119,7 @@ export function getAccountMetaFactory(programAddress: Address, optionalAccountSt } export function isTransactionSigner( - value: Address | ProgramDerivedAddress | TransactionSigner + value: Address | ProgramDerivedAddress | TransactionSigner, ): value is TransactionSigner { return !!value && typeof value === 'object' && 'address' in value && kitIsTransactionSigner(value); } diff --git a/test/e2e/token/src/generated/accounts/mint.ts b/test/e2e/token/src/generated/accounts/mint.ts index febfddd..8847404 100644 --- a/test/e2e/token/src/generated/accounts/mint.ts +++ b/test/e2e/token/src/generated/accounts/mint.ts @@ -104,13 +104,13 @@ export function getMintCodec(): FixedSizeCodec { } export function decodeMint( - encodedAccount: EncodedAccount + encodedAccount: EncodedAccount, ): Account; export function decodeMint( - encodedAccount: MaybeEncodedAccount + encodedAccount: MaybeEncodedAccount, ): MaybeAccount; export function decodeMint( - encodedAccount: EncodedAccount | MaybeEncodedAccount + encodedAccount: EncodedAccount | MaybeEncodedAccount, ): Account | MaybeAccount { return decodeAccount(encodedAccount as MaybeEncodedAccount, getMintDecoder()); } @@ -118,7 +118,7 @@ export function decodeMint( export async function fetchMint( rpc: Parameters[0], address: Address, - config?: FetchAccountConfig + config?: FetchAccountConfig, ): Promise> { const maybeAccount = await fetchMaybeMint(rpc, address, config); assertAccountExists(maybeAccount); @@ -128,7 +128,7 @@ export async function fetchMint( export async function fetchMaybeMint( rpc: Parameters[0], address: Address, - config?: FetchAccountConfig + config?: FetchAccountConfig, ): Promise> { const maybeAccount = await fetchEncodedAccount(rpc, address, config); return decodeMint(maybeAccount); @@ -137,7 +137,7 @@ export async function fetchMaybeMint( export async function fetchAllMint( rpc: Parameters[0], addresses: Array
, - config?: FetchAccountsConfig + config?: FetchAccountsConfig, ): Promise[]> { const maybeAccounts = await fetchAllMaybeMint(rpc, addresses, config); assertAccountsExist(maybeAccounts); @@ -147,7 +147,7 @@ export async function fetchAllMint( export async function fetchAllMaybeMint( rpc: Parameters[0], addresses: Array
, - config?: FetchAccountsConfig + config?: FetchAccountsConfig, ): Promise[]> { const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config); return maybeAccounts.map(maybeAccount => decodeMint(maybeAccount)); diff --git a/test/e2e/token/src/generated/accounts/multisig.ts b/test/e2e/token/src/generated/accounts/multisig.ts index 8a96076..6640a2f 100644 --- a/test/e2e/token/src/generated/accounts/multisig.ts +++ b/test/e2e/token/src/generated/accounts/multisig.ts @@ -74,13 +74,13 @@ export function getMultisigCodec(): FixedSizeCodec { } export function decodeMultisig( - encodedAccount: EncodedAccount + encodedAccount: EncodedAccount, ): Account; export function decodeMultisig( - encodedAccount: MaybeEncodedAccount + encodedAccount: MaybeEncodedAccount, ): MaybeAccount; export function decodeMultisig( - encodedAccount: EncodedAccount | MaybeEncodedAccount + encodedAccount: EncodedAccount | MaybeEncodedAccount, ): Account | MaybeAccount { return decodeAccount(encodedAccount as MaybeEncodedAccount, getMultisigDecoder()); } @@ -88,7 +88,7 @@ export function decodeMultisig( export async function fetchMultisig( rpc: Parameters[0], address: Address, - config?: FetchAccountConfig + config?: FetchAccountConfig, ): Promise> { const maybeAccount = await fetchMaybeMultisig(rpc, address, config); assertAccountExists(maybeAccount); @@ -98,7 +98,7 @@ export async function fetchMultisig( export async function fetchMaybeMultisig( rpc: Parameters[0], address: Address, - config?: FetchAccountConfig + config?: FetchAccountConfig, ): Promise> { const maybeAccount = await fetchEncodedAccount(rpc, address, config); return decodeMultisig(maybeAccount); @@ -107,7 +107,7 @@ export async function fetchMaybeMultisig( export async function fetchAllMultisig( rpc: Parameters[0], addresses: Array
, - config?: FetchAccountsConfig + config?: FetchAccountsConfig, ): Promise[]> { const maybeAccounts = await fetchAllMaybeMultisig(rpc, addresses, config); assertAccountsExist(maybeAccounts); @@ -117,7 +117,7 @@ export async function fetchAllMultisig( export async function fetchAllMaybeMultisig( rpc: Parameters[0], addresses: Array
, - config?: FetchAccountsConfig + config?: FetchAccountsConfig, ): Promise[]> { const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config); return maybeAccounts.map(maybeAccount => decodeMultisig(maybeAccount)); diff --git a/test/e2e/token/src/generated/accounts/token.ts b/test/e2e/token/src/generated/accounts/token.ts index 6517598..4fc18fe 100644 --- a/test/e2e/token/src/generated/accounts/token.ts +++ b/test/e2e/token/src/generated/accounts/token.ts @@ -127,13 +127,13 @@ export function getTokenCodec(): FixedSizeCodec { } export function decodeToken( - encodedAccount: EncodedAccount + encodedAccount: EncodedAccount, ): Account; export function decodeToken( - encodedAccount: MaybeEncodedAccount + encodedAccount: MaybeEncodedAccount, ): MaybeAccount; export function decodeToken( - encodedAccount: EncodedAccount | MaybeEncodedAccount + encodedAccount: EncodedAccount | MaybeEncodedAccount, ): Account | MaybeAccount { return decodeAccount(encodedAccount as MaybeEncodedAccount, getTokenDecoder()); } @@ -141,7 +141,7 @@ export function decodeToken( export async function fetchToken( rpc: Parameters[0], address: Address, - config?: FetchAccountConfig + config?: FetchAccountConfig, ): Promise> { const maybeAccount = await fetchMaybeToken(rpc, address, config); assertAccountExists(maybeAccount); @@ -151,7 +151,7 @@ export async function fetchToken( export async function fetchMaybeToken( rpc: Parameters[0], address: Address, - config?: FetchAccountConfig + config?: FetchAccountConfig, ): Promise> { const maybeAccount = await fetchEncodedAccount(rpc, address, config); return decodeToken(maybeAccount); @@ -160,7 +160,7 @@ export async function fetchMaybeToken( export async function fetchAllToken( rpc: Parameters[0], addresses: Array
, - config?: FetchAccountsConfig + config?: FetchAccountsConfig, ): Promise[]> { const maybeAccounts = await fetchAllMaybeToken(rpc, addresses, config); assertAccountsExist(maybeAccounts); @@ -170,7 +170,7 @@ export async function fetchAllToken( export async function fetchAllMaybeToken( rpc: Parameters[0], addresses: Array
, - config?: FetchAccountsConfig + config?: FetchAccountsConfig, ): Promise[]> { const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config); return maybeAccounts.map(maybeAccount => decodeToken(maybeAccount)); diff --git a/test/e2e/token/src/generated/errors/associatedToken.ts b/test/e2e/token/src/generated/errors/associatedToken.ts index 47d9ef8..291a560 100644 --- a/test/e2e/token/src/generated/errors/associatedToken.ts +++ b/test/e2e/token/src/generated/errors/associatedToken.ts @@ -37,7 +37,7 @@ export function getAssociatedTokenErrorMessage(code: AssociatedTokenError): stri export function isAssociatedTokenError( error: unknown, transactionMessage: { instructions: Record }, - code?: TProgramErrorCode + code?: TProgramErrorCode, ): error is SolanaError & Readonly<{ context: Readonly<{ code: TProgramErrorCode }> }> { return isProgramError(error, transactionMessage, ASSOCIATED_TOKEN_PROGRAM_ADDRESS, code); diff --git a/test/e2e/token/src/generated/errors/token.ts b/test/e2e/token/src/generated/errors/token.ts index ef39809..4bc779f 100644 --- a/test/e2e/token/src/generated/errors/token.ts +++ b/test/e2e/token/src/generated/errors/token.ts @@ -114,7 +114,7 @@ export function getTokenErrorMessage(code: TokenError): string { export function isTokenError( error: unknown, transactionMessage: { instructions: Record }, - code?: TProgramErrorCode + code?: TProgramErrorCode, ): error is SolanaError & Readonly<{ context: Readonly<{ code: TProgramErrorCode }> }> { return isProgramError(error, transactionMessage, TOKEN_PROGRAM_ADDRESS, code); diff --git a/test/e2e/token/src/generated/instructions/amountToUiAmount.ts b/test/e2e/token/src/generated/instructions/amountToUiAmount.ts index 2f082df..6ebc19f 100644 --- a/test/e2e/token/src/generated/instructions/amountToUiAmount.ts +++ b/test/e2e/token/src/generated/instructions/amountToUiAmount.ts @@ -62,7 +62,7 @@ export function getAmountToUiAmountInstructionDataEncoder(): FixedSizeEncoder ({ ...value, discriminator: AMOUNT_TO_UI_AMOUNT_DISCRIMINATOR }) + value => ({ ...value, discriminator: AMOUNT_TO_UI_AMOUNT_DISCRIMINATOR }), ); } @@ -91,7 +91,7 @@ export function getAmountToUiAmountInstruction< TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS, >( input: AmountToUiAmountInput, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): AmountToUiAmountInstruction { // Program address. const programAddress = config?.programAddress ?? TOKEN_PROGRAM_ADDRESS; @@ -126,7 +126,7 @@ export type ParsedAmountToUiAmountInstruction< export function parseAmountToUiAmountInstruction( instruction: Instruction & InstructionWithAccounts & - InstructionWithData + InstructionWithData, ): ParsedAmountToUiAmountInstruction { if (instruction.accounts.length < 1) { // TODO: Coded error. diff --git a/test/e2e/token/src/generated/instructions/approve.ts b/test/e2e/token/src/generated/instructions/approve.ts index c5594d3..868e45f 100644 --- a/test/e2e/token/src/generated/instructions/approve.ts +++ b/test/e2e/token/src/generated/instructions/approve.ts @@ -74,7 +74,7 @@ export function getApproveInstructionDataEncoder(): FixedSizeEncoder ({ ...value, discriminator: APPROVE_DISCRIMINATOR }) + value => ({ ...value, discriminator: APPROVE_DISCRIMINATOR }), ); } @@ -111,7 +111,7 @@ export function getApproveInstruction< TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS, >( input: ApproveInput, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): ApproveInstruction< TProgramAddress, TAccountSource, @@ -180,7 +180,7 @@ export type ParsedApproveInstruction< export function parseApproveInstruction( instruction: Instruction & InstructionWithAccounts & - InstructionWithData + InstructionWithData, ): ParsedApproveInstruction { if (instruction.accounts.length < 3) { // TODO: Coded error. diff --git a/test/e2e/token/src/generated/instructions/approveChecked.ts b/test/e2e/token/src/generated/instructions/approveChecked.ts index cdaeb2c..64ba524 100644 --- a/test/e2e/token/src/generated/instructions/approveChecked.ts +++ b/test/e2e/token/src/generated/instructions/approveChecked.ts @@ -81,7 +81,7 @@ export function getApproveCheckedInstructionDataEncoder(): FixedSizeEncoder ({ ...value, discriminator: APPROVE_CHECKED_DISCRIMINATOR }) + value => ({ ...value, discriminator: APPROVE_CHECKED_DISCRIMINATOR }), ); } @@ -127,7 +127,7 @@ export function getApproveCheckedInstruction< TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS, >( input: ApproveCheckedInput, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): ApproveCheckedInstruction< TProgramAddress, TAccountSource, @@ -202,7 +202,7 @@ export type ParsedApproveCheckedInstruction< export function parseApproveCheckedInstruction( instruction: Instruction & InstructionWithAccounts & - InstructionWithData + InstructionWithData, ): ParsedApproveCheckedInstruction { if (instruction.accounts.length < 4) { // TODO: Coded error. diff --git a/test/e2e/token/src/generated/instructions/burn.ts b/test/e2e/token/src/generated/instructions/burn.ts index 7886167..62a124e 100644 --- a/test/e2e/token/src/generated/instructions/burn.ts +++ b/test/e2e/token/src/generated/instructions/burn.ts @@ -71,7 +71,7 @@ export function getBurnInstructionDataEncoder(): FixedSizeEncoder ({ ...value, discriminator: BURN_DISCRIMINATOR }) + value => ({ ...value, discriminator: BURN_DISCRIMINATOR }), ); } @@ -108,7 +108,7 @@ export function getBurnInstruction< TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS, >( input: BurnInput, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): BurnInstruction< TProgramAddress, TAccountAccount, @@ -177,7 +177,7 @@ export type ParsedBurnInstruction< export function parseBurnInstruction( instruction: Instruction & InstructionWithAccounts & - InstructionWithData + InstructionWithData, ): ParsedBurnInstruction { if (instruction.accounts.length < 3) { // TODO: Coded error. diff --git a/test/e2e/token/src/generated/instructions/burnChecked.ts b/test/e2e/token/src/generated/instructions/burnChecked.ts index 1dafce5..4432116 100644 --- a/test/e2e/token/src/generated/instructions/burnChecked.ts +++ b/test/e2e/token/src/generated/instructions/burnChecked.ts @@ -79,7 +79,7 @@ export function getBurnCheckedInstructionDataEncoder(): FixedSizeEncoder ({ ...value, discriminator: BURN_CHECKED_DISCRIMINATOR }) + value => ({ ...value, discriminator: BURN_CHECKED_DISCRIMINATOR }), ); } @@ -121,7 +121,7 @@ export function getBurnCheckedInstruction< TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS, >( input: BurnCheckedInput, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): BurnCheckedInstruction< TProgramAddress, TAccountAccount, @@ -190,7 +190,7 @@ export type ParsedBurnCheckedInstruction< export function parseBurnCheckedInstruction( instruction: Instruction & InstructionWithAccounts & - InstructionWithData + InstructionWithData, ): ParsedBurnCheckedInstruction { if (instruction.accounts.length < 3) { // TODO: Coded error. diff --git a/test/e2e/token/src/generated/instructions/closeAccount.ts b/test/e2e/token/src/generated/instructions/closeAccount.ts index 7ef01c1..efb32ee 100644 --- a/test/e2e/token/src/generated/instructions/closeAccount.ts +++ b/test/e2e/token/src/generated/instructions/closeAccount.ts @@ -98,7 +98,7 @@ export function getCloseAccountInstruction< TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS, >( input: CloseAccountInput, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): CloseAccountInstruction< TProgramAddress, TAccountAccount, @@ -167,7 +167,7 @@ export type ParsedCloseAccountInstruction< export function parseCloseAccountInstruction( instruction: Instruction & InstructionWithAccounts & - InstructionWithData + InstructionWithData, ): ParsedCloseAccountInstruction { if (instruction.accounts.length < 3) { // TODO: Coded error. diff --git a/test/e2e/token/src/generated/instructions/createAccount.ts b/test/e2e/token/src/generated/instructions/createAccount.ts index 221d8eb..87e184e 100644 --- a/test/e2e/token/src/generated/instructions/createAccount.ts +++ b/test/e2e/token/src/generated/instructions/createAccount.ts @@ -79,7 +79,7 @@ export function getCreateAccountInstructionDataEncoder(): FixedSizeEncoder ({ ...value, discriminator: CREATE_ACCOUNT_DISCRIMINATOR }) + value => ({ ...value, discriminator: CREATE_ACCOUNT_DISCRIMINATOR }), ); } @@ -113,7 +113,7 @@ export function getCreateAccountInstruction< TProgramAddress extends Address = typeof SYSTEM_PROGRAM_ADDRESS, >( input: CreateAccountInput, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): CreateAccountInstruction & InstructionWithByteDelta { // Program address. const programAddress = config?.programAddress ?? SYSTEM_PROGRAM_ADDRESS; @@ -155,7 +155,7 @@ export type ParsedCreateAccountInstruction< export function parseCreateAccountInstruction( instruction: Instruction & InstructionWithAccounts & - InstructionWithData + InstructionWithData, ): ParsedCreateAccountInstruction { if (instruction.accounts.length < 2) { // TODO: Coded error. diff --git a/test/e2e/token/src/generated/instructions/createAssociatedToken.ts b/test/e2e/token/src/generated/instructions/createAssociatedToken.ts index 3d8a6da..c54d509 100644 --- a/test/e2e/token/src/generated/instructions/createAssociatedToken.ts +++ b/test/e2e/token/src/generated/instructions/createAssociatedToken.ts @@ -84,7 +84,7 @@ export function getCreateAssociatedTokenInstructionDataCodec(): FixedSizeCodec< > { return combineCodec( getCreateAssociatedTokenInstructionDataEncoder(), - getCreateAssociatedTokenInstructionDataDecoder() + getCreateAssociatedTokenInstructionDataDecoder(), ); } @@ -127,7 +127,7 @@ export async function getCreateAssociatedTokenInstructionAsync< TAccountSystemProgram, TAccountTokenProgram >, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): Promise< CreateAssociatedTokenInstruction< TProgramAddress, @@ -232,7 +232,7 @@ export function getCreateAssociatedTokenInstruction< TAccountSystemProgram, TAccountTokenProgram >, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): CreateAssociatedTokenInstruction< TProgramAddress, TAccountPayer, @@ -317,7 +317,7 @@ export function parseCreateAssociatedTokenInstruction< >( instruction: Instruction & InstructionWithAccounts & - InstructionWithData + InstructionWithData, ): ParsedCreateAssociatedTokenInstruction { if (instruction.accounts.length < 6) { // TODO: Coded error. diff --git a/test/e2e/token/src/generated/instructions/createAssociatedTokenIdempotent.ts b/test/e2e/token/src/generated/instructions/createAssociatedTokenIdempotent.ts index 19764e2..56887d1 100644 --- a/test/e2e/token/src/generated/instructions/createAssociatedTokenIdempotent.ts +++ b/test/e2e/token/src/generated/instructions/createAssociatedTokenIdempotent.ts @@ -84,7 +84,7 @@ export function getCreateAssociatedTokenIdempotentInstructionDataCodec(): FixedS > { return combineCodec( getCreateAssociatedTokenIdempotentInstructionDataEncoder(), - getCreateAssociatedTokenIdempotentInstructionDataDecoder() + getCreateAssociatedTokenIdempotentInstructionDataDecoder(), ); } @@ -127,7 +127,7 @@ export async function getCreateAssociatedTokenIdempotentInstructionAsync< TAccountSystemProgram, TAccountTokenProgram >, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): Promise< CreateAssociatedTokenIdempotentInstruction< TProgramAddress, @@ -232,7 +232,7 @@ export function getCreateAssociatedTokenIdempotentInstruction< TAccountSystemProgram, TAccountTokenProgram >, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): CreateAssociatedTokenIdempotentInstruction< TProgramAddress, TAccountPayer, @@ -317,7 +317,7 @@ export function parseCreateAssociatedTokenIdempotentInstruction< >( instruction: Instruction & InstructionWithAccounts & - InstructionWithData + InstructionWithData, ): ParsedCreateAssociatedTokenIdempotentInstruction { if (instruction.accounts.length < 6) { // TODO: Coded error. diff --git a/test/e2e/token/src/generated/instructions/freezeAccount.ts b/test/e2e/token/src/generated/instructions/freezeAccount.ts index 43cdcc9..102fc4b 100644 --- a/test/e2e/token/src/generated/instructions/freezeAccount.ts +++ b/test/e2e/token/src/generated/instructions/freezeAccount.ts @@ -98,7 +98,7 @@ export function getFreezeAccountInstruction< TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS, >( input: FreezeAccountInput, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): FreezeAccountInstruction< TProgramAddress, TAccountAccount, @@ -167,7 +167,7 @@ export type ParsedFreezeAccountInstruction< export function parseFreezeAccountInstruction( instruction: Instruction & InstructionWithAccounts & - InstructionWithData + InstructionWithData, ): ParsedFreezeAccountInstruction { if (instruction.accounts.length < 3) { // TODO: Coded error. diff --git a/test/e2e/token/src/generated/instructions/getAccountDataSize.ts b/test/e2e/token/src/generated/instructions/getAccountDataSize.ts index 471e1e3..020593f 100644 --- a/test/e2e/token/src/generated/instructions/getAccountDataSize.ts +++ b/test/e2e/token/src/generated/instructions/getAccountDataSize.ts @@ -75,7 +75,7 @@ export function getGetAccountDataSizeInstruction< TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS, >( input: GetAccountDataSizeInput, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): GetAccountDataSizeInstruction { // Program address. const programAddress = config?.programAddress ?? TOKEN_PROGRAM_ADDRESS; @@ -110,7 +110,7 @@ export function parseGetAccountDataSizeInstruction< >( instruction: Instruction & InstructionWithAccounts & - InstructionWithData + InstructionWithData, ): ParsedGetAccountDataSizeInstruction { if (instruction.accounts.length < 1) { // TODO: Coded error. diff --git a/test/e2e/token/src/generated/instructions/initializeAccount.ts b/test/e2e/token/src/generated/instructions/initializeAccount.ts index 8697d1d..c5ceeae 100644 --- a/test/e2e/token/src/generated/instructions/initializeAccount.ts +++ b/test/e2e/token/src/generated/instructions/initializeAccount.ts @@ -99,7 +99,7 @@ export function getInitializeAccountInstruction< TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS, >( input: InitializeAccountInput, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): InitializeAccountInstruction { // Program address. const programAddress = config?.programAddress ?? TOKEN_PROGRAM_ADDRESS; @@ -156,7 +156,7 @@ export function parseInitializeAccountInstruction< >( instruction: Instruction & InstructionWithAccounts & - InstructionWithData + InstructionWithData, ): ParsedInitializeAccountInstruction { if (instruction.accounts.length < 4) { // TODO: Coded error. diff --git a/test/e2e/token/src/generated/instructions/initializeAccount2.ts b/test/e2e/token/src/generated/instructions/initializeAccount2.ts index c41a67a..6c358a9 100644 --- a/test/e2e/token/src/generated/instructions/initializeAccount2.ts +++ b/test/e2e/token/src/generated/instructions/initializeAccount2.ts @@ -70,7 +70,7 @@ export function getInitializeAccount2InstructionDataEncoder(): FixedSizeEncoder< ['discriminator', getU8Encoder()], ['owner', getAddressEncoder()], ]), - value => ({ ...value, discriminator: INITIALIZE_ACCOUNT2_DISCRIMINATOR }) + value => ({ ...value, discriminator: INITIALIZE_ACCOUNT2_DISCRIMINATOR }), ); } @@ -109,7 +109,7 @@ export function getInitializeAccount2Instruction< TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS, >( input: InitializeAccount2Input, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): InitializeAccount2Instruction { // Program address. const programAddress = config?.programAddress ?? TOKEN_PROGRAM_ADDRESS; @@ -161,7 +161,7 @@ export function parseInitializeAccount2Instruction< >( instruction: Instruction & InstructionWithAccounts & - InstructionWithData + InstructionWithData, ): ParsedInitializeAccount2Instruction { if (instruction.accounts.length < 3) { // TODO: Coded error. diff --git a/test/e2e/token/src/generated/instructions/initializeAccount3.ts b/test/e2e/token/src/generated/instructions/initializeAccount3.ts index bbae01a..76d65ee 100644 --- a/test/e2e/token/src/generated/instructions/initializeAccount3.ts +++ b/test/e2e/token/src/generated/instructions/initializeAccount3.ts @@ -68,7 +68,7 @@ export function getInitializeAccount3InstructionDataEncoder(): FixedSizeEncoder< ['discriminator', getU8Encoder()], ['owner', getAddressEncoder()], ]), - value => ({ ...value, discriminator: INITIALIZE_ACCOUNT3_DISCRIMINATOR }) + value => ({ ...value, discriminator: INITIALIZE_ACCOUNT3_DISCRIMINATOR }), ); } @@ -100,7 +100,7 @@ export function getInitializeAccount3Instruction< TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS, >( input: InitializeAccount3Input, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): InitializeAccount3Instruction { // Program address. const programAddress = config?.programAddress ?? TOKEN_PROGRAM_ADDRESS; @@ -143,7 +143,7 @@ export function parseInitializeAccount3Instruction< >( instruction: Instruction & InstructionWithAccounts & - InstructionWithData + InstructionWithData, ): ParsedInitializeAccount3Instruction { if (instruction.accounts.length < 2) { // TODO: Coded error. diff --git a/test/e2e/token/src/generated/instructions/initializeImmutableOwner.ts b/test/e2e/token/src/generated/instructions/initializeImmutableOwner.ts index 4d60f0f..b17efcb 100644 --- a/test/e2e/token/src/generated/instructions/initializeImmutableOwner.ts +++ b/test/e2e/token/src/generated/instructions/initializeImmutableOwner.ts @@ -64,7 +64,7 @@ export function getInitializeImmutableOwnerInstructionDataCodec(): FixedSizeCode > { return combineCodec( getInitializeImmutableOwnerInstructionDataEncoder(), - getInitializeImmutableOwnerInstructionDataDecoder() + getInitializeImmutableOwnerInstructionDataDecoder(), ); } @@ -78,7 +78,7 @@ export function getInitializeImmutableOwnerInstruction< TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS, >( input: InitializeImmutableOwnerInput, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): InitializeImmutableOwnerInstruction { // Program address. const programAddress = config?.programAddress ?? TOKEN_PROGRAM_ADDRESS; @@ -113,7 +113,7 @@ export function parseInitializeImmutableOwnerInstruction< >( instruction: Instruction & InstructionWithAccounts & - InstructionWithData + InstructionWithData, ): ParsedInitializeImmutableOwnerInstruction { if (instruction.accounts.length < 1) { // TODO: Coded error. diff --git a/test/e2e/token/src/generated/instructions/initializeMint.ts b/test/e2e/token/src/generated/instructions/initializeMint.ts index 2ae65e7..7dffa20 100644 --- a/test/e2e/token/src/generated/instructions/initializeMint.ts +++ b/test/e2e/token/src/generated/instructions/initializeMint.ts @@ -87,7 +87,7 @@ export function getInitializeMintInstructionDataEncoder(): Encoder( input: InitializeMintInput, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): InitializeMintInstruction { // Program address. const programAddress = config?.programAddress ?? TOKEN_PROGRAM_ADDRESS; @@ -169,7 +169,7 @@ export type ParsedInitializeMintInstruction< export function parseInitializeMintInstruction( instruction: Instruction & InstructionWithAccounts & - InstructionWithData + InstructionWithData, ): ParsedInitializeMintInstruction { if (instruction.accounts.length < 2) { // TODO: Coded error. diff --git a/test/e2e/token/src/generated/instructions/initializeMint2.ts b/test/e2e/token/src/generated/instructions/initializeMint2.ts index 0d2e879..764b1ec 100644 --- a/test/e2e/token/src/generated/instructions/initializeMint2.ts +++ b/test/e2e/token/src/generated/instructions/initializeMint2.ts @@ -81,7 +81,7 @@ export function getInitializeMint2InstructionDataEncoder(): Encoder( input: InitializeMint2Input, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): InitializeMint2Instruction { // Program address. const programAddress = config?.programAddress ?? TOKEN_PROGRAM_ADDRESS; @@ -149,7 +149,7 @@ export type ParsedInitializeMint2Instruction< export function parseInitializeMint2Instruction( instruction: Instruction & InstructionWithAccounts & - InstructionWithData + InstructionWithData, ): ParsedInitializeMint2Instruction { if (instruction.accounts.length < 1) { // TODO: Coded error. diff --git a/test/e2e/token/src/generated/instructions/initializeMultisig.ts b/test/e2e/token/src/generated/instructions/initializeMultisig.ts index fd03914..b6cf30b 100644 --- a/test/e2e/token/src/generated/instructions/initializeMultisig.ts +++ b/test/e2e/token/src/generated/instructions/initializeMultisig.ts @@ -67,7 +67,7 @@ export function getInitializeMultisigInstructionDataEncoder(): FixedSizeEncoder< ['discriminator', getU8Encoder()], ['m', getU8Encoder()], ]), - value => ({ ...value, discriminator: INITIALIZE_MULTISIG_DISCRIMINATOR }) + value => ({ ...value, discriminator: INITIALIZE_MULTISIG_DISCRIMINATOR }), ); } @@ -100,7 +100,7 @@ export function getInitializeMultisigInstruction< TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS, >( input: InitializeMultisigInput, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): InitializeMultisigInstruction { // Program address. const programAddress = config?.programAddress ?? TOKEN_PROGRAM_ADDRESS; @@ -152,7 +152,7 @@ export function parseInitializeMultisigInstruction< >( instruction: Instruction & InstructionWithAccounts & - InstructionWithData + InstructionWithData, ): ParsedInitializeMultisigInstruction { if (instruction.accounts.length < 2) { // TODO: Coded error. diff --git a/test/e2e/token/src/generated/instructions/initializeMultisig2.ts b/test/e2e/token/src/generated/instructions/initializeMultisig2.ts index 62e067b..8234760 100644 --- a/test/e2e/token/src/generated/instructions/initializeMultisig2.ts +++ b/test/e2e/token/src/generated/instructions/initializeMultisig2.ts @@ -61,7 +61,7 @@ export function getInitializeMultisig2InstructionDataEncoder(): FixedSizeEncoder ['discriminator', getU8Encoder()], ['m', getU8Encoder()], ]), - value => ({ ...value, discriminator: INITIALIZE_MULTISIG2_DISCRIMINATOR }) + value => ({ ...value, discriminator: INITIALIZE_MULTISIG2_DISCRIMINATOR }), ); } @@ -91,7 +91,7 @@ export function getInitializeMultisig2Instruction< TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS, >( input: InitializeMultisig2Input, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): InitializeMultisig2Instruction { // Program address. const programAddress = config?.programAddress ?? TOKEN_PROGRAM_ADDRESS; @@ -132,7 +132,7 @@ export function parseInitializeMultisig2Instruction< >( instruction: Instruction & InstructionWithAccounts & - InstructionWithData + InstructionWithData, ): ParsedInitializeMultisig2Instruction { if (instruction.accounts.length < 1) { // TODO: Coded error. diff --git a/test/e2e/token/src/generated/instructions/mintTo.ts b/test/e2e/token/src/generated/instructions/mintTo.ts index 23f4859..b12af04 100644 --- a/test/e2e/token/src/generated/instructions/mintTo.ts +++ b/test/e2e/token/src/generated/instructions/mintTo.ts @@ -74,7 +74,7 @@ export function getMintToInstructionDataEncoder(): FixedSizeEncoder ({ ...value, discriminator: MINT_TO_DISCRIMINATOR }) + value => ({ ...value, discriminator: MINT_TO_DISCRIMINATOR }), ); } @@ -111,7 +111,7 @@ export function getMintToInstruction< TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS, >( input: MintToInput, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): MintToInstruction< TProgramAddress, TAccountMint, @@ -180,7 +180,7 @@ export type ParsedMintToInstruction< export function parseMintToInstruction( instruction: Instruction & InstructionWithAccounts & - InstructionWithData + InstructionWithData, ): ParsedMintToInstruction { if (instruction.accounts.length < 3) { // TODO: Coded error. diff --git a/test/e2e/token/src/generated/instructions/mintToChecked.ts b/test/e2e/token/src/generated/instructions/mintToChecked.ts index 4a52c90..ed942e0 100644 --- a/test/e2e/token/src/generated/instructions/mintToChecked.ts +++ b/test/e2e/token/src/generated/instructions/mintToChecked.ts @@ -79,7 +79,7 @@ export function getMintToCheckedInstructionDataEncoder(): FixedSizeEncoder ({ ...value, discriminator: MINT_TO_CHECKED_DISCRIMINATOR }) + value => ({ ...value, discriminator: MINT_TO_CHECKED_DISCRIMINATOR }), ); } @@ -121,7 +121,7 @@ export function getMintToCheckedInstruction< TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS, >( input: MintToCheckedInput, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): MintToCheckedInstruction< TProgramAddress, TAccountMint, @@ -190,7 +190,7 @@ export type ParsedMintToCheckedInstruction< export function parseMintToCheckedInstruction( instruction: Instruction & InstructionWithAccounts & - InstructionWithData + InstructionWithData, ): ParsedMintToCheckedInstruction { if (instruction.accounts.length < 3) { // TODO: Coded error. diff --git a/test/e2e/token/src/generated/instructions/recoverNestedAssociatedToken.ts b/test/e2e/token/src/generated/instructions/recoverNestedAssociatedToken.ts index 305c7ec..2a6ea6c 100644 --- a/test/e2e/token/src/generated/instructions/recoverNestedAssociatedToken.ts +++ b/test/e2e/token/src/generated/instructions/recoverNestedAssociatedToken.ts @@ -96,7 +96,7 @@ export function getRecoverNestedAssociatedTokenInstructionDataCodec(): FixedSize > { return combineCodec( getRecoverNestedAssociatedTokenInstructionDataEncoder(), - getRecoverNestedAssociatedTokenInstructionDataDecoder() + getRecoverNestedAssociatedTokenInstructionDataDecoder(), ); } @@ -144,7 +144,7 @@ export async function getRecoverNestedAssociatedTokenInstructionAsync< TAccountWalletAddress, TAccountTokenProgram >, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): Promise< RecoverNestedAssociatedTokenInstruction< TProgramAddress, @@ -271,7 +271,7 @@ export function getRecoverNestedAssociatedTokenInstruction< TAccountWalletAddress, TAccountTokenProgram >, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): RecoverNestedAssociatedTokenInstruction< TProgramAddress, TAccountNestedAssociatedAccountAddress, @@ -361,7 +361,7 @@ export function parseRecoverNestedAssociatedTokenInstruction< >( instruction: Instruction & InstructionWithAccounts & - InstructionWithData + InstructionWithData, ): ParsedRecoverNestedAssociatedTokenInstruction { if (instruction.accounts.length < 7) { // TODO: Coded error. diff --git a/test/e2e/token/src/generated/instructions/revoke.ts b/test/e2e/token/src/generated/instructions/revoke.ts index 211a8d6..92073b0 100644 --- a/test/e2e/token/src/generated/instructions/revoke.ts +++ b/test/e2e/token/src/generated/instructions/revoke.ts @@ -86,7 +86,7 @@ export function getRevokeInstruction< TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS, >( input: RevokeInput, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): RevokeInstruction< TProgramAddress, TAccountSource, @@ -145,7 +145,7 @@ export type ParsedRevokeInstruction< export function parseRevokeInstruction( instruction: Instruction & InstructionWithAccounts & - InstructionWithData + InstructionWithData, ): ParsedRevokeInstruction { if (instruction.accounts.length < 2) { // TODO: Coded error. diff --git a/test/e2e/token/src/generated/instructions/setAuthority.ts b/test/e2e/token/src/generated/instructions/setAuthority.ts index bf5c2a3..bbcd5d5 100644 --- a/test/e2e/token/src/generated/instructions/setAuthority.ts +++ b/test/e2e/token/src/generated/instructions/setAuthority.ts @@ -82,7 +82,7 @@ export function getSetAuthorityInstructionDataEncoder(): Encoder ({ ...value, discriminator: SET_AUTHORITY_DISCRIMINATOR }) + value => ({ ...value, discriminator: SET_AUTHORITY_DISCRIMINATOR }), ); } @@ -117,7 +117,7 @@ export function getSetAuthorityInstruction< TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS, >( input: SetAuthorityInput, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): SetAuthorityInstruction< TProgramAddress, TAccountOwned, @@ -176,7 +176,7 @@ export type ParsedSetAuthorityInstruction< export function parseSetAuthorityInstruction( instruction: Instruction & InstructionWithAccounts & - InstructionWithData + InstructionWithData, ): ParsedSetAuthorityInstruction { if (instruction.accounts.length < 2) { // TODO: Coded error. diff --git a/test/e2e/token/src/generated/instructions/syncNative.ts b/test/e2e/token/src/generated/instructions/syncNative.ts index 5514cf4..35032aa 100644 --- a/test/e2e/token/src/generated/instructions/syncNative.ts +++ b/test/e2e/token/src/generated/instructions/syncNative.ts @@ -75,7 +75,7 @@ export function getSyncNativeInstruction< TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS, >( input: SyncNativeInput, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): SyncNativeInstruction { // Program address. const programAddress = config?.programAddress ?? TOKEN_PROGRAM_ADDRESS; @@ -107,7 +107,7 @@ export type ParsedSyncNativeInstruction< export function parseSyncNativeInstruction( instruction: Instruction & InstructionWithAccounts & - InstructionWithData + InstructionWithData, ): ParsedSyncNativeInstruction { if (instruction.accounts.length < 1) { // TODO: Coded error. diff --git a/test/e2e/token/src/generated/instructions/thawAccount.ts b/test/e2e/token/src/generated/instructions/thawAccount.ts index d66a097..63b435a 100644 --- a/test/e2e/token/src/generated/instructions/thawAccount.ts +++ b/test/e2e/token/src/generated/instructions/thawAccount.ts @@ -98,7 +98,7 @@ export function getThawAccountInstruction< TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS, >( input: ThawAccountInput, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): ThawAccountInstruction< TProgramAddress, TAccountAccount, @@ -167,7 +167,7 @@ export type ParsedThawAccountInstruction< export function parseThawAccountInstruction( instruction: Instruction & InstructionWithAccounts & - InstructionWithData + InstructionWithData, ): ParsedThawAccountInstruction { if (instruction.accounts.length < 3) { // TODO: Coded error. diff --git a/test/e2e/token/src/generated/instructions/transfer.ts b/test/e2e/token/src/generated/instructions/transfer.ts index 330d879..9f76610 100644 --- a/test/e2e/token/src/generated/instructions/transfer.ts +++ b/test/e2e/token/src/generated/instructions/transfer.ts @@ -74,7 +74,7 @@ export function getTransferInstructionDataEncoder(): FixedSizeEncoder ({ ...value, discriminator: TRANSFER_DISCRIMINATOR }) + value => ({ ...value, discriminator: TRANSFER_DISCRIMINATOR }), ); } @@ -114,7 +114,7 @@ export function getTransferInstruction< TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS, >( input: TransferInput, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): TransferInstruction< TProgramAddress, TAccountSource, @@ -183,7 +183,7 @@ export type ParsedTransferInstruction< export function parseTransferInstruction( instruction: Instruction & InstructionWithAccounts & - InstructionWithData + InstructionWithData, ): ParsedTransferInstruction { if (instruction.accounts.length < 3) { // TODO: Coded error. diff --git a/test/e2e/token/src/generated/instructions/transferChecked.ts b/test/e2e/token/src/generated/instructions/transferChecked.ts index 1126541..b2898b0 100644 --- a/test/e2e/token/src/generated/instructions/transferChecked.ts +++ b/test/e2e/token/src/generated/instructions/transferChecked.ts @@ -81,7 +81,7 @@ export function getTransferCheckedInstructionDataEncoder(): FixedSizeEncoder ({ ...value, discriminator: TRANSFER_CHECKED_DISCRIMINATOR }) + value => ({ ...value, discriminator: TRANSFER_CHECKED_DISCRIMINATOR }), ); } @@ -127,7 +127,7 @@ export function getTransferCheckedInstruction< TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS, >( input: TransferCheckedInput, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): TransferCheckedInstruction< TProgramAddress, TAccountSource, @@ -202,7 +202,7 @@ export type ParsedTransferCheckedInstruction< export function parseTransferCheckedInstruction( instruction: Instruction & InstructionWithAccounts & - InstructionWithData + InstructionWithData, ): ParsedTransferCheckedInstruction { if (instruction.accounts.length < 4) { // TODO: Coded error. diff --git a/test/e2e/token/src/generated/instructions/uiAmountToAmount.ts b/test/e2e/token/src/generated/instructions/uiAmountToAmount.ts index 3232527..a894446 100644 --- a/test/e2e/token/src/generated/instructions/uiAmountToAmount.ts +++ b/test/e2e/token/src/generated/instructions/uiAmountToAmount.ts @@ -62,7 +62,7 @@ export function getUiAmountToAmountInstructionDataEncoder(): Encoder ({ ...value, discriminator: UI_AMOUNT_TO_AMOUNT_DISCRIMINATOR }) + value => ({ ...value, discriminator: UI_AMOUNT_TO_AMOUNT_DISCRIMINATOR }), ); } @@ -91,7 +91,7 @@ export function getUiAmountToAmountInstruction< TProgramAddress extends Address = typeof TOKEN_PROGRAM_ADDRESS, >( input: UiAmountToAmountInput, - config?: { programAddress?: TProgramAddress } + config?: { programAddress?: TProgramAddress }, ): UiAmountToAmountInstruction { // Program address. const programAddress = config?.programAddress ?? TOKEN_PROGRAM_ADDRESS; @@ -126,7 +126,7 @@ export type ParsedUiAmountToAmountInstruction< export function parseUiAmountToAmountInstruction( instruction: Instruction & InstructionWithAccounts & - InstructionWithData + InstructionWithData, ): ParsedUiAmountToAmountInstruction { if (instruction.accounts.length < 1) { // TODO: Coded error. diff --git a/test/e2e/token/src/generated/pdas/associatedToken.ts b/test/e2e/token/src/generated/pdas/associatedToken.ts index b12cf08..413ea43 100644 --- a/test/e2e/token/src/generated/pdas/associatedToken.ts +++ b/test/e2e/token/src/generated/pdas/associatedToken.ts @@ -20,7 +20,7 @@ export type AssociatedTokenSeeds = { /** The address of the associated token account. */ export async function findAssociatedTokenPda( seeds: AssociatedTokenSeeds, - config: { programAddress?: Address | undefined } = {} + config: { programAddress?: Address | undefined } = {}, ): Promise { const { programAddress = 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' as Address<'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'>, diff --git a/test/e2e/token/src/generated/programs/associatedToken.ts b/test/e2e/token/src/generated/programs/associatedToken.ts index 4033b22..134ab13 100644 --- a/test/e2e/token/src/generated/programs/associatedToken.ts +++ b/test/e2e/token/src/generated/programs/associatedToken.ts @@ -23,7 +23,7 @@ export enum AssociatedTokenInstruction { } export function identifyAssociatedTokenInstruction( - instruction: { data: ReadonlyUint8Array } | ReadonlyUint8Array + instruction: { data: ReadonlyUint8Array } | ReadonlyUint8Array, ): AssociatedTokenInstruction { const data = 'data' in instruction ? instruction.data : instruction; if (containsBytes(data, getU8Encoder().encode(0), 0)) { diff --git a/test/e2e/token/src/generated/programs/system.ts b/test/e2e/token/src/generated/programs/system.ts index 1c3c111..44c2983 100644 --- a/test/e2e/token/src/generated/programs/system.ts +++ b/test/e2e/token/src/generated/programs/system.ts @@ -16,7 +16,7 @@ export enum SystemInstruction { } export function identifySystemInstruction( - instruction: { data: ReadonlyUint8Array } | ReadonlyUint8Array + instruction: { data: ReadonlyUint8Array } | ReadonlyUint8Array, ): SystemInstruction { const data = 'data' in instruction ? instruction.data : instruction; if (containsBytes(data, getU32Encoder().encode(0), 0)) { diff --git a/test/e2e/token/src/generated/programs/token.ts b/test/e2e/token/src/generated/programs/token.ts index 1bbabd4..5690f26 100644 --- a/test/e2e/token/src/generated/programs/token.ts +++ b/test/e2e/token/src/generated/programs/token.ts @@ -87,7 +87,7 @@ export enum TokenInstruction { } export function identifyTokenInstruction( - instruction: { data: ReadonlyUint8Array } | ReadonlyUint8Array + instruction: { data: ReadonlyUint8Array } | ReadonlyUint8Array, ): TokenInstruction { const data = 'data' in instruction ? instruction.data : instruction; if (containsBytes(data, getU8Encoder().encode(0), 0)) { diff --git a/test/e2e/token/src/generated/shared/index.ts b/test/e2e/token/src/generated/shared/index.ts index a9d9fec..7380d8c 100644 --- a/test/e2e/token/src/generated/shared/index.ts +++ b/test/e2e/token/src/generated/shared/index.ts @@ -34,7 +34,7 @@ export function expectSome(value: T | null | undefined): T { * @internal */ export function expectAddress( - value: Address | ProgramDerivedAddress | TransactionSigner | null | undefined + value: Address | ProgramDerivedAddress | TransactionSigner | null | undefined, ): Address { if (!value) { throw new Error('Expected a Address.'); @@ -53,7 +53,7 @@ export function expectAddress( * @internal */ export function expectProgramDerivedAddress( - value: Address | ProgramDerivedAddress | TransactionSigner | null | undefined + value: Address | ProgramDerivedAddress | TransactionSigner | null | undefined, ): ProgramDerivedAddress { if (!value || !Array.isArray(value) || !isProgramDerivedAddress(value)) { throw new Error('Expected a ProgramDerivedAddress.'); @@ -66,7 +66,7 @@ export function expectProgramDerivedAddress( * @internal */ export function expectTransactionSigner( - value: Address | ProgramDerivedAddress | TransactionSigner | null | undefined + value: Address | ProgramDerivedAddress | TransactionSigner | null | undefined, ): TransactionSigner { if (!value || !isTransactionSigner(value)) { throw new Error('Expected a TransactionSigner.'); @@ -119,7 +119,7 @@ export function getAccountMetaFactory(programAddress: Address, optionalAccountSt } export function isTransactionSigner( - value: Address | ProgramDerivedAddress | TransactionSigner + value: Address | ProgramDerivedAddress | TransactionSigner, ): value is TransactionSigner { return !!value && typeof value === 'object' && 'address' in value && kitIsTransactionSigner(value); }