Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions basics/checking-accounts/anchor/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"type": "module",
"dependencies": {
"@coral-xyz/anchor": "^0.30.0",
"@solana/web3.js": "^1.95.2"
Expand Down
6 changes: 3 additions & 3 deletions basics/checking-accounts/anchor/tests/bankrun.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ import { Keypair, SystemProgram, Transaction, sendAndConfirmTransaction } from '
import { PublicKey } from '@solana/web3.js';
import { BankrunProvider } from 'anchor-bankrun';
import { startAnchor } from 'solana-bankrun';
import type { AnchorProgramExample } from '../target/types/anchor_program_example';
import type { AnchorProgramExample } from '../target/types/anchor_program_example.ts';

const IDL = require('../target/idl/anchor_program_example.json');
import IDL from '../target/idl/anchor_program_example.json' with { type: 'json' };
const PROGRAM_ID = new PublicKey(IDL.address);

describe('Bankrun example', async () => {
const context = await startAnchor('', [{ name: 'anchor_program_example', programId: PROGRAM_ID }], []);
const provider = new BankrunProvider(context);

const wallet = provider.wallet as anchor.Wallet;
const program = new anchor.Program<AnchorProgramExample>(IDL, provider);
const program = new anchor.Program<AnchorProgramExample>(IDL as AnchorProgramExample, provider);
const client = context.banksClient;

// We'll create this ahead of time.
Expand Down
2 changes: 1 addition & 1 deletion basics/checking-accounts/anchor/tests/test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as anchor from '@coral-xyz/anchor';
import { Keypair, SystemProgram, Transaction, sendAndConfirmTransaction } from '@solana/web3.js';
import type { AnchorProgramExample } from '../target/types/anchor_program_example';
import type { AnchorProgramExample } from '../target/types/anchor_program_example.ts';

describe('Anchor example', () => {
const provider = anchor.AnchorProvider.env();
Expand Down
4 changes: 2 additions & 2 deletions basics/checking-accounts/anchor/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"types": ["mocha", "chai"],
"typeRoots": ["./node_modules/@types"],
"lib": ["es2015"],
"module": "commonjs",
"module": "nodenext",
"target": "es6",
"esModuleInterop": true
"resolveJsonModule": true
}
}