Skip to content

add type #1228

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
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
10 changes: 6 additions & 4 deletions contracts/tests/ocr2.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as anchor from "@coral-xyz/anchor";
import { ProgramError, BN } from "@coral-xyz/anchor";
import { ProgramError, BN, Program } from "@coral-xyz/anchor";
import * as borsh from "borsh";
import {
LAMPORTS_PER_SOL,
Expand All @@ -26,6 +26,8 @@ import { randomBytes, createHash } from "crypto";
import * as secp256k1 from "secp256k1";
import { keccak256 } from "ethereum-cryptography/keccak";
import { Round as OCRRound, OCR2Feed } from "@chainlink/solana-sdk";
import { Ocr2 } from "../target/types/ocr_2";
import { AccessController } from "../target/types/access_controller";

// generate a new keypair using `solana-keygen new -o id.json`

Expand Down Expand Up @@ -86,8 +88,8 @@ describe("ocr2", () => {
const rounds = 15; // number of rounds submitted

const workspace = anchor.workspace;
const program = anchor.workspace.Ocr2;
const accessController = anchor.workspace.AccessController;
const program = anchor.workspace.Ocr2 as Program<Ocr2>;
const accessController = anchor.workspace.AccessController as Program<AccessController>;

let token: PublicKey;
let storeAuthority: PublicKey, storeNonce: number;
Expand Down Expand Up @@ -577,7 +579,7 @@ describe("ocr2", () => {
let proposalAccount = await program.account.proposal.fetch(
proposal.publicKey
);
console.log(proposalAccount);
console.log('proposal account', proposalAccount);

let proposalOracles = proposalAccount.oracles.xs.slice(
0,
Expand Down
Loading