Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit a66f323

Browse files
author
Joe C
authored
Account Compression SDK: Add back linting (#6613)
* add `tests` to `tsconfig.json` * run `pnpm eslint . --ext .js,.ts --fix` * manually fix two tests * run `pnpm pretty -w` * enable linting in CI
1 parent 25c6145 commit a66f323

21 files changed

+87
-82
lines changed

account-compression/sdk/src/constants/index.ts

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ export const SPL_NOOP_PROGRAM_ID = new PublicKey(SPL_NOOP_ADDRESS);
99
* creating a new {@link ConcurrentMerkleTreeAccount}.
1010
*/
1111
export type DepthSizePair = {
12-
maxDepth: number;
1312
maxBufferSize: number;
13+
maxDepth: number;
1414
};
1515

1616
const allPairs: number[][] = [
@@ -61,37 +61,37 @@ export const ALL_DEPTH_SIZE_PAIRS: ValidDepthSizePair[] = allPairs.map(pair => {
6161
});
6262

6363
export type ValidDepthSizePair =
64-
| { maxDepth: 3; maxBufferSize: 8 }
65-
| { maxDepth: 5; maxBufferSize: 8 }
66-
| { maxDepth: 6; maxBufferSize: 16 }
67-
| { maxDepth: 7; maxBufferSize: 16 }
68-
| { maxDepth: 8; maxBufferSize: 16 }
69-
| { maxDepth: 9; maxBufferSize: 16 }
70-
| { maxDepth: 10; maxBufferSize: 32 }
71-
| { maxDepth: 11; maxBufferSize: 32 }
72-
| { maxDepth: 12; maxBufferSize: 32 }
73-
| { maxDepth: 13; maxBufferSize: 32 }
74-
| { maxDepth: 14; maxBufferSize: 64 }
75-
| { maxDepth: 14; maxBufferSize: 256 }
76-
| { maxDepth: 14; maxBufferSize: 1024 }
77-
| { maxDepth: 14; maxBufferSize: 2048 }
78-
| { maxDepth: 15; maxBufferSize: 64 }
79-
| { maxDepth: 16; maxBufferSize: 64 }
80-
| { maxDepth: 17; maxBufferSize: 64 }
81-
| { maxDepth: 18; maxBufferSize: 64 }
82-
| { maxDepth: 19; maxBufferSize: 64 }
83-
| { maxDepth: 20; maxBufferSize: 64 }
84-
| { maxDepth: 20; maxBufferSize: 256 }
85-
| { maxDepth: 20; maxBufferSize: 1024 }
86-
| { maxDepth: 20; maxBufferSize: 2048 }
87-
| { maxDepth: 24; maxBufferSize: 64 }
88-
| { maxDepth: 24; maxBufferSize: 256 }
89-
| { maxDepth: 24; maxBufferSize: 512 }
90-
| { maxDepth: 24; maxBufferSize: 1024 }
91-
| { maxDepth: 24; maxBufferSize: 2048 }
92-
| { maxDepth: 26; maxBufferSize: 512 }
93-
| { maxDepth: 26; maxBufferSize: 1024 }
94-
| { maxDepth: 26; maxBufferSize: 2048 }
95-
| { maxDepth: 30; maxBufferSize: 512 }
96-
| { maxDepth: 30; maxBufferSize: 1024 }
97-
| { maxDepth: 30; maxBufferSize: 2048 };
64+
| { maxBufferSize: 8; maxDepth: 3 }
65+
| { maxBufferSize: 8; maxDepth: 5 }
66+
| { maxBufferSize: 16; maxDepth: 6 }
67+
| { maxBufferSize: 16; maxDepth: 7 }
68+
| { maxBufferSize: 16; maxDepth: 8 }
69+
| { maxBufferSize: 16; maxDepth: 9 }
70+
| { maxBufferSize: 32; maxDepth: 10 }
71+
| { maxBufferSize: 32; maxDepth: 11 }
72+
| { maxBufferSize: 32; maxDepth: 12 }
73+
| { maxBufferSize: 32; maxDepth: 13 }
74+
| { maxBufferSize: 64; maxDepth: 14 }
75+
| { maxBufferSize: 64; maxDepth: 15 }
76+
| { maxBufferSize: 64; maxDepth: 16 }
77+
| { maxBufferSize: 64; maxDepth: 17 }
78+
| { maxBufferSize: 64; maxDepth: 18 }
79+
| { maxBufferSize: 64; maxDepth: 19 }
80+
| { maxBufferSize: 64; maxDepth: 20 }
81+
| { maxBufferSize: 64; maxDepth: 24 }
82+
| { maxBufferSize: 256; maxDepth: 14 }
83+
| { maxBufferSize: 256; maxDepth: 20 }
84+
| { maxBufferSize: 256; maxDepth: 24 }
85+
| { maxBufferSize: 512; maxDepth: 24 }
86+
| { maxBufferSize: 512; maxDepth: 26 }
87+
| { maxBufferSize: 512; maxDepth: 30 }
88+
| { maxBufferSize: 1024; maxDepth: 14 }
89+
| { maxBufferSize: 1024; maxDepth: 20 }
90+
| { maxBufferSize: 1024; maxDepth: 24 }
91+
| { maxBufferSize: 1024; maxDepth: 26 }
92+
| { maxBufferSize: 1024; maxDepth: 30 }
93+
| { maxBufferSize: 2048; maxDepth: 14 }
94+
| { maxBufferSize: 2048; maxDepth: 20 }
95+
| { maxBufferSize: 2048; maxDepth: 24 }
96+
| { maxBufferSize: 2048; maxDepth: 26 }
97+
| { maxBufferSize: 2048; maxDepth: 30 };

account-compression/sdk/src/generated/instructions/append.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ export const appendStruct = new beet.BeetArgsStruct<
4343
* @category generated
4444
*/
4545
export type AppendInstructionAccounts = {
46-
merkleTree: web3.PublicKey;
46+
anchorRemainingAccounts?: web3.AccountMeta[];
4747
authority: web3.PublicKey;
48+
merkleTree: web3.PublicKey;
4849
noop: web3.PublicKey;
49-
anchorRemainingAccounts?: web3.AccountMeta[];
5050
};
5151

5252
export const appendInstructionDiscriminator = [149, 120, 18, 222, 236, 225, 88, 203];

account-compression/sdk/src/generated/instructions/closeEmptyTree.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ export const closeEmptyTreeStruct = new beet.BeetArgsStruct<{
2727
* @category generated
2828
*/
2929
export type CloseEmptyTreeInstructionAccounts = {
30-
merkleTree: web3.PublicKey;
30+
anchorRemainingAccounts?: web3.AccountMeta[];
3131
authority: web3.PublicKey;
32+
merkleTree: web3.PublicKey;
3233
recipient: web3.PublicKey;
33-
anchorRemainingAccounts?: web3.AccountMeta[];
3434
};
3535

3636
export const closeEmptyTreeInstructionDiscriminator = [50, 14, 219, 107, 78, 103, 16, 103];

account-compression/sdk/src/generated/instructions/initEmptyMerkleTree.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import * as web3 from '@solana/web3.js';
1414
* @category generated
1515
*/
1616
export type InitEmptyMerkleTreeInstructionArgs = {
17-
maxDepth: number;
1817
maxBufferSize: number;
18+
maxDepth: number;
1919
};
2020
/**
2121
* @category Instructions
@@ -45,10 +45,10 @@ export const initEmptyMerkleTreeStruct = new beet.BeetArgsStruct<
4545
* @category generated
4646
*/
4747
export type InitEmptyMerkleTreeInstructionAccounts = {
48-
merkleTree: web3.PublicKey;
48+
anchorRemainingAccounts?: web3.AccountMeta[];
4949
authority: web3.PublicKey;
50+
merkleTree: web3.PublicKey;
5051
noop: web3.PublicKey;
51-
anchorRemainingAccounts?: web3.AccountMeta[];
5252
};
5353

5454
export const initEmptyMerkleTreeInstructionDiscriminator = [191, 11, 119, 7, 180, 107, 220, 110];

account-compression/sdk/src/generated/instructions/insertOrAppend.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ import * as web3 from '@solana/web3.js';
1414
* @category generated
1515
*/
1616
export type InsertOrAppendInstructionArgs = {
17-
root: number[] /* size: 32 */;
18-
leaf: number[] /* size: 32 */;
1917
index: number;
18+
leaf: number[] /* size: 32 */;
19+
root: number[] /* size: 32 */;
2020
};
2121
/**
2222
* @category Instructions
@@ -47,10 +47,10 @@ export const insertOrAppendStruct = new beet.BeetArgsStruct<
4747
* @category generated
4848
*/
4949
export type InsertOrAppendInstructionAccounts = {
50-
merkleTree: web3.PublicKey;
50+
anchorRemainingAccounts?: web3.AccountMeta[];
5151
authority: web3.PublicKey;
52+
merkleTree: web3.PublicKey;
5253
noop: web3.PublicKey;
53-
anchorRemainingAccounts?: web3.AccountMeta[];
5454
};
5555

5656
export const insertOrAppendInstructionDiscriminator = [6, 42, 50, 190, 51, 109, 178, 168];

account-compression/sdk/src/generated/instructions/replaceLeaf.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ import * as web3 from '@solana/web3.js';
1414
* @category generated
1515
*/
1616
export type ReplaceLeafInstructionArgs = {
17-
root: number[] /* size: 32 */;
18-
previousLeaf: number[] /* size: 32 */;
19-
newLeaf: number[] /* size: 32 */;
2017
index: number;
18+
newLeaf: number[] /* size: 32 */;
19+
previousLeaf: number[] /* size: 32 */;
20+
root: number[] /* size: 32 */;
2121
};
2222
/**
2323
* @category Instructions
@@ -49,10 +49,10 @@ export const replaceLeafStruct = new beet.BeetArgsStruct<
4949
* @category generated
5050
*/
5151
export type ReplaceLeafInstructionAccounts = {
52-
merkleTree: web3.PublicKey;
52+
anchorRemainingAccounts?: web3.AccountMeta[];
5353
authority: web3.PublicKey;
54+
merkleTree: web3.PublicKey;
5455
noop: web3.PublicKey;
55-
anchorRemainingAccounts?: web3.AccountMeta[];
5656
};
5757

5858
export const replaceLeafInstructionDiscriminator = [204, 165, 76, 100, 73, 147, 0, 128];

account-compression/sdk/src/generated/instructions/transferAuthority.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ export const transferAuthorityStruct = new beet.BeetArgsStruct<
4343
* @category generated
4444
*/
4545
export type TransferAuthorityInstructionAccounts = {
46-
merkleTree: web3.PublicKey;
47-
authority: web3.PublicKey;
4846
anchorRemainingAccounts?: web3.AccountMeta[];
47+
authority: web3.PublicKey;
48+
merkleTree: web3.PublicKey;
4949
};
5050

5151
export const transferAuthorityInstructionDiscriminator = [48, 169, 76, 72, 229, 180, 55, 161];

account-compression/sdk/src/generated/instructions/verifyLeaf.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ import * as web3 from '@solana/web3.js';
1414
* @category generated
1515
*/
1616
export type VerifyLeafInstructionArgs = {
17-
root: number[] /* size: 32 */;
18-
leaf: number[] /* size: 32 */;
1917
index: number;
18+
leaf: number[] /* size: 32 */;
19+
root: number[] /* size: 32 */;
2020
};
2121
/**
2222
* @category Instructions
@@ -45,8 +45,8 @@ export const verifyLeafStruct = new beet.BeetArgsStruct<
4545
* @category generated
4646
*/
4747
export type VerifyLeafInstructionAccounts = {
48-
merkleTree: web3.PublicKey;
4948
anchorRemainingAccounts?: web3.AccountMeta[];
49+
merkleTree: web3.PublicKey;
5050
};
5151

5252
export const verifyLeafInstructionDiscriminator = [124, 220, 22, 223, 104, 10, 250, 224];

account-compression/sdk/src/generated/types/AccountCompressionEvent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ import { ChangeLogEvent, changeLogEventBeet } from './ChangeLogEvent';
1919
* @private
2020
*/
2121
export type AccountCompressionEventRecord = {
22-
ChangeLog: { fields: [ChangeLogEvent] };
2322
ApplicationData: { fields: [ApplicationDataEvent] };
23+
ChangeLog: { fields: [ChangeLogEvent] };
2424
};
2525

2626
/**

account-compression/sdk/src/generated/types/ChangeLogEventV1.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ import * as web3 from '@solana/web3.js';
1212
import { PathNode, pathNodeBeet } from './PathNode';
1313
export type ChangeLogEventV1 = {
1414
id: web3.PublicKey;
15+
index: number;
1516
path: PathNode[];
1617
seq: beet.bignum;
17-
index: number;
1818
};
1919

2020
/**

0 commit comments

Comments
 (0)