Browse Source

fixed biome

Ayush 5 months ago
parent
commit
1c278cb049

+ 1 - 1
basics/close-account/steel/tests/close-account.test.ts

@@ -1,7 +1,7 @@
 import { describe, test } from 'node:test';
 import { PublicKey, Transaction } from '@solana/web3.js';
 import { start } from 'solana-bankrun';
-import { createCreateUserInstruction, createCloseUserInstruction } from '../ts';
+import { createCloseUserInstruction, createCreateUserInstruction } from '../ts';
 
 describe('Close Account!', async () => {
   const PROGRAM_ID = new PublicKey('z7msBPQHDJjTvdQRoEcKyENgXDhSRYeHieN1ZMTqo35');

+ 1 - 1
basics/close-account/steel/ts/instructions/close.ts

@@ -1,6 +1,6 @@
 import { Buffer } from 'node:buffer';
 import { type PublicKey, SystemProgram, TransactionInstruction } from '@solana/web3.js';
-import { closeAccountSchema, MyInstruction } from '.';
+import { MyInstruction, closeAccountSchema } from '.';
 
 export class Close {
   instruction: MyInstruction;

+ 3 - 3
basics/close-account/steel/ts/instructions/create.ts

@@ -1,10 +1,10 @@
 import { Buffer } from 'node:buffer';
 import { PublicKey, SystemProgram, TransactionInstruction } from '@solana/web3.js';
-import { closeAccountSchema, MyInstruction } from '.';
+import { MyInstruction, closeAccountSchema } from '.';
 
 export class Create {
   instruction: MyInstruction;
-  name: String;
+  name: string;
 
   constructor(props: { instruction: MyInstruction; name: string }) {
     this.instruction = props.instruction;
@@ -13,7 +13,7 @@ export class Create {
 
   toBuffer() {
     const textBuffer = Buffer.alloc(64);
-    let buffer = Buffer.alloc(1000);
+    const buffer = Buffer.alloc(1000);
 
     textBuffer.write('foobarbaz', 0, 'utf-8');
 

+ 95 - 81
basics/favorites/native/tests/test.ts

@@ -1,9 +1,9 @@
-import { describe, test } from 'mocha';
-import { assert, expect } from 'chai';
 import { Blockhash, Keypair, PublicKey, SystemProgram, Transaction, TransactionInstruction } from '@solana/web3.js';
-import { BanksClient, ProgramTestContext, Rent, start , } from 'solana-bankrun';
 import { BN } from 'bn.js';
-import * as borsh from "borsh"
+import * as borsh from 'borsh';
+import { assert, expect } from 'chai';
+import { describe, test } from 'mocha';
+import { BanksClient, ProgramTestContext, Rent, start } from 'solana-bankrun';
 
 // This is a helper class to assign properties to the class
 class Assignable {
@@ -20,7 +20,6 @@ enum MyInstruction {
 }
 
 class CreateFav extends Assignable {
-
   number: number;
   instruction: MyInstruction;
   color: string;
@@ -31,30 +30,34 @@ class CreateFav extends Assignable {
   }
 
   static fromBuffer(buffer: Buffer): CreateFav {
-    return borsh.deserialize({
-      struct: {
-        number: "u64",
-        color: "string",
-        hobbies: {
-          array: {
-            type: "string"
-          }
-        }
-      }}, buffer) as CreateFav;
+    return borsh.deserialize(
+      {
+        struct: {
+          number: 'u64',
+          color: 'string',
+          hobbies: {
+            array: {
+              type: 'string',
+            },
+          },
+        },
+      },
+      buffer,
+    ) as CreateFav;
   }
 }
 const CreateNewAccountSchema = {
-  "struct": {
-    instruction: "u8",
-    number: "u64",
-    color: "string",
+  struct: {
+    instruction: 'u8',
+    number: 'u64',
+    color: 'string',
     hobbies: {
       array: {
-        type: "string"
-      }
-    }
-  }
-}
+        type: 'string',
+      },
+    },
+  },
+};
 
 class GetFav extends Assignable {
   toBuffer() {
@@ -62,35 +65,39 @@ class GetFav extends Assignable {
   }
 }
 const GetFavSchema = {
-  "struct": {
-    instruction: "u8"
-  }
-}
+  struct: {
+    instruction: 'u8',
+  },
+};
+
+describe('Favorites Solana Native', () => {
+  // Randomly generate the program keypair and load the program to solana-bankrun
+  const programId = PublicKey.unique();
+
+  let context: ProgramTestContext;
+  let client: BanksClient;
+  let payer: Keypair;
+  let blockhash: Blockhash;
+
+  beforeEach(async () => {
+    context = await start([{ name: 'favorites_native', programId }], []);
+    client = context.banksClient;
+    // Get the payer keypair from the context, this will be used to sign transactions with enough lamports
+    payer = context.payer;
+    blockhash = context.lastBlockhash;
+  });
 
-describe('Favorites Solana Native',  () => {
-  
-// Randomly generate the program keypair and load the program to solana-bankrun
-const programId = PublicKey.unique();
-
-let context: ProgramTestContext, client:BanksClient, payer: Keypair, blockhash: Blockhash; 
-beforeEach(async () => {
-  context = await start([{ name: 'favorites_native', programId }], []);
-  client = context.banksClient;
-  // Get the payer keypair from the context, this will be used to sign transactions with enough lamports
-  payer = context.payer;
-  blockhash = context.lastBlockhash;
-})
-  
-test('Set the favorite pda and cross-check the updated data', async () => {
-    const favoritesPda = PublicKey.findProgramAddressSync([Buffer.from("favorite"), payer.publicKey.toBuffer()], programId)[0];
-    const favData = {instruction: MyInstruction.CreateFav, number: 42, color: "blue", hobbies: ["coding", "reading", "traveling"]}
+  test('Set the favorite pda and cross-check the updated data', async () => {
+    const favoritesPda = PublicKey.findProgramAddressSync([Buffer.from('favorite'), payer.publicKey.toBuffer()], programId)[0];
+    const favData = { instruction: MyInstruction.CreateFav, number: 42, color: 'blue', hobbies: ['coding', 'reading', 'traveling'] };
     const favorites = new CreateFav(favData);
 
     const ix = new TransactionInstruction({
       keys: [
-        {pubkey: payer.publicKey, isSigner: true, isWritable: true}, 
-        {pubkey: favoritesPda, isSigner: false, isWritable: true}, 
-        {pubkey: SystemProgram.programId, isSigner: false, isWritable: false}],
+        { pubkey: payer.publicKey, isSigner: true, isWritable: true },
+        { pubkey: favoritesPda, isSigner: false, isWritable: true },
+        { pubkey: SystemProgram.programId, isSigner: false, isWritable: false },
+      ],
       programId,
       data: favorites.toBuffer(),
     });
@@ -98,8 +105,8 @@ test('Set the favorite pda and cross-check the updated data', async () => {
     const tx = new Transaction().add(ix);
 
     tx.feePayer = payer.publicKey;
-    tx.recentBlockhash = blockhash
-    tx.sign(payer)
+    tx.recentBlockhash = blockhash;
+    tx.sign(payer);
     tx.recentBlockhash = blockhash;
     await client.processTransaction(tx);
 
@@ -108,21 +115,25 @@ test('Set the favorite pda and cross-check the updated data', async () => {
 
     const favoritesData = CreateFav.fromBuffer(data);
 
-    console.log("Deserialized data:", favoritesData);
+    console.log('Deserialized data:', favoritesData);
 
     expect(new BN(favoritesData.number as any, 'le').toNumber()).to.equal(favData.number);
     expect(favoritesData.color).to.equal(favData.color);
     expect(favoritesData.hobbies).to.deep.equal(favData.hobbies);
   });
 
-  test('Check if the test fails if the pda seeds aren\'t same', async () => {
+  test("Check if the test fails if the pda seeds aren't same", async () => {
     // We put the wrong seeds knowingly to see if the test fails because of checks
-    const favoritesPda = PublicKey.findProgramAddressSync([Buffer.from("favorite"), payer.publicKey.toBuffer()], programId)[0];
-    const favData = {instruction: MyInstruction.CreateFav, number: 42, color: "blue", hobbies: ["coding", "reading", "traveling"]}
+    const favoritesPda = PublicKey.findProgramAddressSync([Buffer.from('favorite'), payer.publicKey.toBuffer()], programId)[0];
+    const favData = { instruction: MyInstruction.CreateFav, number: 42, color: 'blue', hobbies: ['coding', 'reading', 'traveling'] };
     const favorites = new CreateFav(favData);
 
     const ix = new TransactionInstruction({
-      keys: [{pubkey: payer.publicKey, isSigner: true, isWritable: true}, {pubkey: favoritesPda, isSigner: false, isWritable: true}, {pubkey: SystemProgram.programId, isSigner: false, isWritable: false}],
+      keys: [
+        { pubkey: payer.publicKey, isSigner: true, isWritable: true },
+        { pubkey: favoritesPda, isSigner: false, isWritable: true },
+        { pubkey: SystemProgram.programId, isSigner: false, isWritable: false },
+      ],
       programId,
       data: favorites.toBuffer(),
     });
@@ -130,57 +141,60 @@ test('Set the favorite pda and cross-check the updated data', async () => {
     const tx = new Transaction().add(ix);
 
     tx.feePayer = payer.publicKey;
-    tx.recentBlockhash = blockhash
-    tx.sign(payer)
+    tx.recentBlockhash = blockhash;
+    tx.sign(payer);
     tx.recentBlockhash = blockhash;
     try {
-      await client.processTransaction(tx)
-      console.error("Expected the test to fail")
-    } catch(err) {
-      assert(true)
+      await client.processTransaction(tx);
+      console.error('Expected the test to fail');
+    } catch (err) {
+      assert(true);
     }
   });
 
   test('Get the favorite pda and cross-check the data', async () => {
     // Creating a new account with payer's pubkey
-    const favoritesPda = PublicKey.findProgramAddressSync([Buffer.from("favorite"), payer.publicKey.toBuffer()], programId)[0];
-    const favData = {instruction: MyInstruction.CreateFav, number: 42, color: "hazel", hobbies: ["singing", "dancing", "skydiving"]}
+    const favoritesPda = PublicKey.findProgramAddressSync([Buffer.from('favorite'), payer.publicKey.toBuffer()], programId)[0];
+    const favData = { instruction: MyInstruction.CreateFav, number: 42, color: 'hazel', hobbies: ['singing', 'dancing', 'skydiving'] };
     const favorites = new CreateFav(favData);
-    
+
     const ix = new TransactionInstruction({
       keys: [
-        {pubkey: payer.publicKey, isSigner: true, isWritable: true}, 
-        {pubkey: favoritesPda, isSigner: false, isWritable: true}, 
-        {pubkey: SystemProgram.programId, isSigner: false, isWritable: false}],
+        { pubkey: payer.publicKey, isSigner: true, isWritable: true },
+        { pubkey: favoritesPda, isSigner: false, isWritable: true },
+        { pubkey: SystemProgram.programId, isSigner: false, isWritable: false },
+      ],
       programId,
       data: favorites.toBuffer(),
     });
 
     const tx1 = new Transaction().add(ix);
-    
+
     tx1.feePayer = payer.publicKey;
-    tx1.recentBlockhash = blockhash
-    tx1.sign(payer)
     tx1.recentBlockhash = blockhash;
-    await client.processTransaction(tx1)
-
+    tx1.sign(payer);
+    tx1.recentBlockhash = blockhash;
+    await client.processTransaction(tx1);
 
     // Getting the user's data through the get_pda instruction
-    const getfavData = {instruction: MyInstruction.GetFav}
+    const getfavData = { instruction: MyInstruction.GetFav };
     const getfavorites = new GetFav(getfavData);
-    
+
     const ix2 = new TransactionInstruction({
-      keys: [{pubkey: payer.publicKey, isSigner: true, isWritable: true}, {pubkey: favoritesPda, isSigner: false, isWritable: false}],
+      keys: [
+        { pubkey: payer.publicKey, isSigner: true, isWritable: true },
+        { pubkey: favoritesPda, isSigner: false, isWritable: false },
+      ],
       programId,
-      data:getfavorites.toBuffer(),
-    }); 
+      data: getfavorites.toBuffer(),
+    });
 
     const tx = new Transaction().add(ix2);
 
     tx.feePayer = payer.publicKey;
-    tx.recentBlockhash = blockhash
-    tx.sign(payer)
+    tx.recentBlockhash = blockhash;
+    tx.sign(payer);
     tx.recentBlockhash = blockhash;
     await client.processTransaction(tx);
-  })
-})
+  });
+});

+ 1 - 3
package.json

@@ -12,9 +12,7 @@
     "prepare": "husky"
   },
   "lint-staged": {
-    "*": [
-      "biome check --apply --no-errors-on-unmatched --files-ignore-unknown=true"
-    ]
+    "*": ["biome check --apply --no-errors-on-unmatched --files-ignore-unknown=true"]
   },
   "keywords": [],
   "author": "Solana Foundation",

+ 9 - 28
tokens/create-token/steel/tests/bankrun.test.ts

@@ -1,19 +1,8 @@
 import { Buffer } from 'node:buffer';
 import { describe, test } from 'node:test';
 import { PROGRAM_ID as TOKEN_METADATA_PROGRAM_ID } from '@metaplex-foundation/mpl-token-metadata';
-import {
-  ASSOCIATED_TOKEN_PROGRAM_ID,
-  TOKEN_PROGRAM_ID,
-  getAssociatedTokenAddressSync,
-} from '@solana/spl-token';
-import {
-  Keypair,
-  PublicKey,
-  SYSVAR_RENT_PUBKEY,
-  SystemProgram,
-  Transaction,
-  TransactionInstruction,
-} from '@solana/web3.js';
+import { ASSOCIATED_TOKEN_PROGRAM_ID, TOKEN_PROGRAM_ID, getAssociatedTokenAddressSync } from '@solana/spl-token';
+import { Keypair, PublicKey, SYSVAR_RENT_PUBKEY, SystemProgram, Transaction, TransactionInstruction } from '@solana/web3.js';
 import { start } from 'solana-bankrun';
 import { CreateTokenArgs } from './instructions';
 
@@ -24,7 +13,7 @@ describe('Create Tokens!', async () => {
       { name: 'steel_program', programId: PROGRAM_ID },
       { name: 'token_metadata', programId: TOKEN_METADATA_PROGRAM_ID },
     ],
-    []
+    [],
   );
   const client = context.banksClient;
   const payer = context.payer;
@@ -34,12 +23,8 @@ describe('Create Tokens!', async () => {
 
   test('Create an SPL Token!', async () => {
     const metadataPDA = PublicKey.findProgramAddressSync(
-      [
-        Buffer.from('metadata'),
-        TOKEN_METADATA_PROGRAM_ID.toBuffer(),
-        tokenMintKeypair.publicKey.toBuffer(),
-      ],
-      TOKEN_METADATA_PROGRAM_ID
+      [Buffer.from('metadata'), TOKEN_METADATA_PROGRAM_ID.toBuffer(), tokenMintKeypair.publicKey.toBuffer()],
+      TOKEN_METADATA_PROGRAM_ID,
     )[0];
 
     // SPL Token default = 9 decimals
@@ -48,7 +33,7 @@ describe('Create Tokens!', async () => {
       'Solana Gold',
       'GOLDSOL',
       'https://raw.githubusercontent.com/solana-developers/program-examples/new-examples/tokens/tokens/.assets/spl-token.json',
-      9
+      9,
     );
 
     const createTokenIx = new TransactionInstruction({
@@ -90,12 +75,8 @@ describe('Create Tokens!', async () => {
 
   test('Create an NFT!', async () => {
     const metadataPDA = PublicKey.findProgramAddressSync(
-      [
-        Buffer.from('metadata'),
-        TOKEN_METADATA_PROGRAM_ID.toBuffer(),
-        nftMintKeypair.publicKey.toBuffer(),
-      ],
-      TOKEN_METADATA_PROGRAM_ID
+      [Buffer.from('metadata'), TOKEN_METADATA_PROGRAM_ID.toBuffer(), nftMintKeypair.publicKey.toBuffer()],
+      TOKEN_METADATA_PROGRAM_ID,
     )[0];
 
     // NFT default = 0 decimals
@@ -104,7 +85,7 @@ describe('Create Tokens!', async () => {
       'Homer NFT',
       'HOMR',
       'https://raw.githubusercontent.com/solana-developers/program-examples/new-examples/tokens/tokens/.assets/nft.json',
-      0
+      0,
     );
 
     const createTokenIx = new TransactionInstruction({

+ 6 - 6
tokens/escrow/steel/tests/bankrun.test.ts

@@ -1,8 +1,8 @@
-import { PublicKey, Keypair, SystemProgram, Transaction, TransactionInstruction, LAMPORTS_PER_SOL } from '@solana/web3.js';
-import { ProgramTestContext, BanksClient, start } from 'solana-bankrun';
-import { createAMint, deserializeOfferAccount, encodeBigint, getMakeOfferInstructionData, getTakeOfferInstructionData, mintTo } from './utils';
-import { AccountLayout, ASSOCIATED_TOKEN_PROGRAM_ID, getAssociatedTokenAddressSync, TOKEN_PROGRAM_ID } from '@solana/spl-token';
+import { ASSOCIATED_TOKEN_PROGRAM_ID, AccountLayout, TOKEN_PROGRAM_ID, getAssociatedTokenAddressSync } from '@solana/spl-token';
+import { Keypair, LAMPORTS_PER_SOL, PublicKey, SystemProgram, Transaction, TransactionInstruction } from '@solana/web3.js';
 import { assert } from 'chai';
+import { BanksClient, ProgramTestContext, start } from 'solana-bankrun';
+import { createAMint, deserializeOfferAccount, encodeBigint, getMakeOfferInstructionData, getTakeOfferInstructionData, mintTo } from './utils';
 
 const PROGRAM_ID = new PublicKey('z7msBPQHDJjTvdQRoEcKyENgXDhSRYeHieN1ZMTqo35');
 
@@ -10,8 +10,8 @@ describe('Escrow Program', () => {
   let context: ProgramTestContext;
   let client: BanksClient;
   let payer: Keypair;
-  let maker = Keypair.generate();
-  let taker = Keypair.generate();
+  const maker = Keypair.generate();
+  const taker = Keypair.generate();
 
   const mint_a = Keypair.generate();
   const mint_b = Keypair.generate();

+ 4 - 4
tokens/escrow/steel/tests/utils.ts

@@ -1,14 +1,14 @@
 import {
   MINT_SIZE,
   TOKEN_PROGRAM_ID,
-  createInitializeMint2Instruction,
-  getAssociatedTokenAddressSync,
   createAssociatedTokenAccountInstruction,
+  createInitializeMint2Instruction,
   createMintToInstruction,
+  getAssociatedTokenAddressSync,
 } from '@solana/spl-token';
-import { Keypair, Transaction, SystemProgram, PublicKey, LAMPORTS_PER_SOL } from '@solana/web3.js';
-import { ProgramTestContext } from 'solana-bankrun';
+import { Keypair, LAMPORTS_PER_SOL, PublicKey, SystemProgram, Transaction } from '@solana/web3.js';
 import * as borsh from 'borsh';
+import { ProgramTestContext } from 'solana-bankrun';
 
 export const instructionDiscriminators = {
   MakeOffer: Buffer.from([0]),

+ 1 - 1
tokens/external-delegate-token-master/anchor/package.json

@@ -31,4 +31,4 @@
     "typescript": "^4.9.5",
     "@testing-library/jest-dom": "^6.1.6"
   }
-}
+}

+ 16 - 20
tokens/external-delegate-token-master/anchor/tests/external-delegate-token-master.test.ts

@@ -1,7 +1,7 @@
-import { start } from 'solana-bankrun';
-import { expect } from 'chai';
-import { PublicKey, SystemProgram, Keypair, Connection } from '@solana/web3.js';
 import { TOKEN_PROGRAM_ID, createMint, getOrCreateAssociatedTokenAccount, mintTo } from '@solana/spl-token';
+import { Connection, Keypair, PublicKey, SystemProgram } from '@solana/web3.js';
+import { expect } from 'chai';
+import { start } from 'solana-bankrun';
 
 jest.setTimeout(30000); // Set timeout to 30 seconds
 
@@ -12,7 +12,7 @@ async function retryWithBackoff(fn: () => Promise<any>, retries = 5, delay = 500
     return await fn();
   } catch (err) {
     if (retries === 0) throw err;
-    await new Promise(resolve => setTimeout(resolve, delay));
+    await new Promise((resolve) => setTimeout(resolve, delay));
     return retryWithBackoff(fn, retries - 1, delay * 2);
   }
 }
@@ -34,15 +34,15 @@ describe('External Delegate Token Master Tests', () => {
 
     const programs = [
       {
-        name: "external_delegate_token_master",
-        programId: new PublicKey("FYPkt5VWMvtyWZDMGCwoKFkE3wXTzphicTpnNGuHWVbD"),
-        program: "target/deploy/external_delegate_token_master.so",
+        name: 'external_delegate_token_master',
+        programId: new PublicKey('FYPkt5VWMvtyWZDMGCwoKFkE3wXTzphicTpnNGuHWVbD'),
+        program: 'target/deploy/external_delegate_token_master.so',
       },
     ];
 
     context = await retryWithBackoff(async () => await start(programs, []));
 
-    const connection = new Connection("https://api.devnet.solana.com", "confirmed");
+    const connection = new Connection('https://api.devnet.solana.com', 'confirmed');
     context.connection = connection;
 
     // Airdrop SOL to authority with retry logic
@@ -51,28 +51,24 @@ describe('External Delegate Token Master Tests', () => {
     });
 
     // Create mint with retry logic
-    mint = await retryWithBackoff(async () =>
-      await createMint(connection, authority, authority.publicKey, null, 6)
-    );
+    mint = await retryWithBackoff(async () => await createMint(connection, authority, authority.publicKey, null, 6));
 
-    const userTokenAccountInfo = await retryWithBackoff(async () =>
-      await getOrCreateAssociatedTokenAccount(connection, authority, mint, authority.publicKey)
+    const userTokenAccountInfo = await retryWithBackoff(
+      async () => await getOrCreateAssociatedTokenAccount(connection, authority, mint, authority.publicKey),
     );
     userTokenAccount = userTokenAccountInfo.address;
 
-    const recipientTokenAccountInfo = await retryWithBackoff(async () =>
-      await getOrCreateAssociatedTokenAccount(connection, authority, mint, Keypair.generate().publicKey)
+    const recipientTokenAccountInfo = await retryWithBackoff(
+      async () => await getOrCreateAssociatedTokenAccount(connection, authority, mint, Keypair.generate().publicKey),
     );
     recipientTokenAccount = recipientTokenAccountInfo.address;
 
     // Mint tokens to the user's account
-    await retryWithBackoff(async () =>
-      await mintTo(connection, authority, mint, userTokenAccount, authority, 1000000000)
-    );
+    await retryWithBackoff(async () => await mintTo(connection, authority, mint, userTokenAccount, authority, 1000000000));
 
     // Find program-derived address (PDA)
-    [userPda, bumpSeed] = await retryWithBackoff(async () =>
-      await PublicKey.findProgramAddress([userAccount.publicKey.toBuffer()], context.program.programId)
+    [userPda, bumpSeed] = await retryWithBackoff(
+      async () => await PublicKey.findProgramAddress([userAccount.publicKey.toBuffer()], context.program.programId),
     );
   });
 

+ 0 - 17
tokens/external-delegate-token-master/anchor/tests/types.js

@@ -1,17 +0,0 @@
-// tests/types.ts
-import { PublicKey } from '@solana/web3.js';
-
-export interface ProgramTestContext {
-    connection: any;
-    programs: {
-        programId: PublicKey;
-        program: string;
-    }[];
-    grantLamports: (address: PublicKey, amount: number) => Promise<void>;
-    terminate: () => Promise<void>;
-}
-
-export interface UserAccount {
-    authority: PublicKey;
-    ethereumAddress: number[];
-}

+ 17 - 0
tokens/external-delegate-token-master/anchor/tests/types.ts

@@ -0,0 +1,17 @@
+// tests/types.ts
+import { PublicKey } from '@solana/web3.js';
+
+export interface ProgramTestContext {
+  connection: any;
+  programs: {
+    programId: PublicKey;
+    program: string;
+  }[];
+  grantLamports: (address: PublicKey, amount: number) => Promise<void>;
+  terminate: () => Promise<void>;
+}
+
+export interface UserAccount {
+  authority: PublicKey;
+  ethereumAddress: number[];
+}

+ 7 - 27
tokens/external-delegate-token-master/anchor/tsconfig.json

@@ -1,19 +1,8 @@
 {
   "compilerOptions": {
-    "types": [
-      "jest",
-      "node"
-    ],
-    "typeRoots": [
-      "./node_modules/@types"
-    ],
-    "lib": [
-      "es2015",
-      "dom",
-      "es6",
-      "es2017",
-      "esnext.asynciterable"
-    ],
+    "types": ["jest", "node"],
+    "typeRoots": ["./node_modules/@types"],
+    "lib": ["es2015", "dom", "es6", "es2017", "esnext.asynciterable"],
     "module": "commonjs",
     "target": "es6",
     "esModuleInterop": true,
@@ -30,19 +19,10 @@
     "forceConsistentCasingInFileNames": true,
     "baseUrl": ".",
     "paths": {
-      "@/*": [
-        "src/*"
-      ]
+      "@/*": ["src/*"]
     },
     "outDir": "dist"
   },
-  "include": [
-    "tests/**/*",
-    "programs/**/*",
-    "jest.setup.js",
-    "jest.config.js"
-  ],
-  "exclude": [
-    "node_modules"
-  ]
-}
+  "include": ["tests/**/*", "programs/**/*", "jest.setup.js", "jest.config.js"],
+  "exclude": ["node_modules"]
+}

+ 2 - 2
tokens/token-swap/steel/tests/create_pool_and_swap.test.ts

@@ -1,5 +1,5 @@
-import { Connection, Keypair, PublicKey, SystemProgram, SYSVAR_RENT_PUBKEY, Transaction, TransactionInstruction } from '@solana/web3.js';
-import { AccountLayout, ASSOCIATED_TOKEN_PROGRAM_ID, getAssociatedTokenAddressSync, MintLayout, TOKEN_PROGRAM_ID } from '@solana/spl-token';
+import { ASSOCIATED_TOKEN_PROGRAM_ID, AccountLayout, MintLayout, TOKEN_PROGRAM_ID, getAssociatedTokenAddressSync } from '@solana/spl-token';
+import { Connection, Keypair, PublicKey, SYSVAR_RENT_PUBKEY, SystemProgram, Transaction, TransactionInstruction } from '@solana/web3.js';
 import { assert } from 'chai';
 import { describe, it } from 'mocha';
 import { BanksClient, ProgramTestContext, start } from 'solana-bankrun';

+ 2 - 2
tokens/token-swap/steel/tests/create_pool_and_withdraw_all_liquid.test.ts

@@ -1,5 +1,5 @@
-import { Connection, Keypair, PublicKey, SystemProgram, SYSVAR_RENT_PUBKEY, Transaction, TransactionInstruction } from '@solana/web3.js';
-import { AccountLayout, ASSOCIATED_TOKEN_PROGRAM_ID, getAssociatedTokenAddressSync, MintLayout, TOKEN_PROGRAM_ID } from '@solana/spl-token';
+import { ASSOCIATED_TOKEN_PROGRAM_ID, AccountLayout, MintLayout, TOKEN_PROGRAM_ID, getAssociatedTokenAddressSync } from '@solana/spl-token';
+import { Connection, Keypair, PublicKey, SYSVAR_RENT_PUBKEY, SystemProgram, Transaction, TransactionInstruction } from '@solana/web3.js';
 import { assert } from 'chai';
 import { describe, it } from 'mocha';
 import { BanksClient, ProgramTestContext, start } from 'solana-bankrun';