Skip to content

Commit d186dd3

Browse files
committed
update format
1 parent 2ec9374 commit d186dd3

File tree

3 files changed

+13
-16
lines changed

3 files changed

+13
-16
lines changed

basics/processing-instructions/poseidon/tests/bankrun.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ describe('custom-instruction-data', async () => {
2020
await program.methods.processingInstructions(3).accounts({}).rpc();
2121
await program.methods.processingInstructions(10).accounts({}).rpc();
2222
});
23-
});
23+
});
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
import * as anchor from "@coral-xyz/anchor";
2-
import { Program } from "@coral-xyz/anchor";
3-
import { ProcessingInstructionsProgram } from "../target/types/processing_instructions_program";
1+
import { describe, it } from 'node:test';
2+
import * as anchor from '@coral-xyz/anchor';
3+
import { Program } from '@coral-xyz/anchor';
4+
import { ProcessingInstructionsProgram } from '../target/types/processing_instructions_program';
45

5-
describe("processing-instructions", () => {
6+
describe('processing-instructions', () => {
67
// Configure the client to use the local cluster.
78
const provider = anchor.AnchorProvider.env();
89
anchor.setProvider(provider);
910

1011
const program = anchor.workspace.ProcessingInstructions as Program<ProcessingInstructionsProgram>;
1112

12-
it("It process an instruction!", async () => {
13+
it('It process an instruction!', async () => {
1314
// Add your test here.
1415
await program.methods.processingInstructions(3).accounts({}).rpc();
1516
await program.methods.processingInstructions(10).accounts({}).rpc();
1617
});
1718
});
18-
Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
1-
import { Pubkey, Result, u32 } from "@solanaturbine/poseidon";
1+
import { Pubkey, Result, u32 } from '@solanaturbine/poseidon';
22

33
export default class ProcessingInstructionsProgram {
4-
static PROGRAM_ID = new Pubkey("6Ra6xuBTuL8ytoHsGEzaAQcHHqNyGjjzemHpFyYrpGdV");
4+
static PROGRAM_ID = new Pubkey('6Ra6xuBTuL8ytoHsGEzaAQcHHqNyGjjzemHpFyYrpGdV');
55

66
// for processing instruction in poseidon we need to just write a method that will transpile into anchor instruction
77

8-
processingInstructions(height:u32): Result {
9-
8+
processingInstructions(height: u32): Result {
109
if (Number(height) > 8) {
11-
console.log(`You can jump from this height length`);
10+
console.log('You can jump from this height length');
1211
} else {
13-
console.log(`you can not jump because you are too short to handle height`);
14-
};
15-
12+
console.log('you can not jump because you are too short to handle height');
13+
}
1614
}
17-
1815
}

0 commit comments

Comments
 (0)