Skip to content

Commit

Permalink
fix: broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lgalabru committed Aug 7, 2024
1 parent d6dd586 commit c82b8d3
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 36 deletions.
10 changes: 5 additions & 5 deletions unit-tests/pyth/oracle.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import { ParsedTransactionResult } from "@hirosystems/clarinet-sdk";
import { pnauMainnetVaas } from "./fixtures";
import { wormhole } from "../wormhole/helpers";

const pythOracleContractName = "pyth-oracle-v2";
const pythDecoderPnauContractName = "pyth-pnau-decoder-v1";
const pythStorageContractName = "pyth-store-v1";
const wormholeCoreContractName = "wormhole-core-v2";
const pythOracleContractName = "pyth-oracle";
const pythDecoderPnauContractName = "pyth-pnau-decoder";
const pythStorageContractName = "pyth-store";
const wormholeCoreContractName = "wormhole-core";

describe("pyth-oracle-v2::decode-and-verify-price-feeds mainnet VAAs", () => {
describe("pyth-oracle::decode-and-verify-price-feeds mainnet VAAs", () => {
const accounts = simnet.getAccounts();
const sender = accounts.get("wallet_1")!;

Expand Down
14 changes: 7 additions & 7 deletions unit-tests/pyth/pnau.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { beforeEach, describe, expect, it } from "vitest";
import { wormhole } from "../wormhole/helpers";
import { pyth } from "./helpers";

const pythOracleContractName = "pyth-oracle-v2";
const pythDecoderPnauContractName = "pyth-pnau-decoder-v1";
const pythGovernanceContractName = "pyth-governance-v1";
const pythStorageContractName = "pyth-store-v1";
const wormholeCoreContractName = "wormhole-core-v2";
const pythOracleContractName = "pyth-oracle";
const pythDecoderPnauContractName = "pyth-pnau-decoder";
const pythGovernanceContractName = "pyth-governance";
const pythStorageContractName = "pyth-store";
const wormholeCoreContractName = "wormhole-core";

describe("pyth-pnau-decoder-v1::decode-and-verify-price-feeds success", () => {
describe("pyth-pnau-decoder::decode-and-verify-price-feeds success", () => {
const accounts = simnet.getAccounts();
const sender = accounts.get("wallet_1")!;
const guardianSet = wormhole.generateGuardianSetKeychain(19);
Expand Down Expand Up @@ -130,7 +130,7 @@ describe("pyth-pnau-decoder-v1::decode-and-verify-price-feeds success", () => {
});
});

describe("pyth-pnau-decoder-v1::decode-and-verify-price-feeds failures", () => {
describe("pyth-pnau-decoder::decode-and-verify-price-feeds failures", () => {
const accounts = simnet.getAccounts();
const sender = accounts.get("wallet_1")!;
const guardianSet = wormhole.generateGuardianSetKeychain(19);
Expand Down
34 changes: 17 additions & 17 deletions unit-tests/pyth/ptgm.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ import { Cl, ClarityType } from "@stacks/transactions";
import { beforeEach, describe, expect, it } from "vitest";
import { wormhole } from "../wormhole/helpers";
import { pyth } from "./helpers";
import { bytesToHex, hexToBytes } from "@noble/hashes/utils";
import { hexToBytes } from "@noble/hashes/utils";
import { ParsedTransactionResult } from "@hirosystems/clarinet-sdk";
import { ptgmTestnetVaas } from "./fixtures";

const pythOracleContractName = "pyth-oracle-v2";
const pythStorageContractName = "pyth-store-v1";
const pythDecoderPnauContractName = "pyth-pnau-decoder-v1";
const pythGovernanceContractName = "pyth-governance-v1";
const wormholeCoreContractName = "wormhole-core-v2";
const pythOracleContractName = "pyth-oracle";
const pythStorageContractName = "pyth-store";
const pythDecoderPnauContractName = "pyth-pnau-decoder";
const pythGovernanceContractName = "pyth-governance";
const wormholeCoreContractName = "wormhole-core";
const initialFeeRecipient = "ST3CRXBDXQ2N5P7E25Q39MEX1HSMRDSEAP1JST19D";

describe("pyth-governance-v1::update-fee-value mainnet VAAs", () => {
describe("pyth-governance::update-fee-value mainnet VAAs", () => {
const accounts = simnet.getAccounts();
const sender = accounts.get("wallet_1")!;

Expand Down Expand Up @@ -72,7 +72,7 @@ describe("pyth-governance-v1::update-fee-value mainnet VAAs", () => {
});


describe("pyth-governance-v1::update-fee-value", () => {
describe("pyth-governance::update-fee-value", () => {
const accounts = simnet.getAccounts();
const sender = accounts.get("wallet_1")!;
const guardianSet = wormhole.generateGuardianSetKeychain(19);
Expand Down Expand Up @@ -158,7 +158,7 @@ describe("pyth-governance-v1::update-fee-value", () => {
});
});

describe("pyth-governance-v1::update-fee-recipient", () => {
describe("pyth-governance::update-fee-recipient", () => {
const accounts = simnet.getAccounts();
const sender = accounts.get("wallet_1")!;
const guardianSet = wormhole.generateGuardianSetKeychain(19);
Expand Down Expand Up @@ -237,14 +237,14 @@ describe("pyth-governance-v1::update-fee-recipient", () => {
});
});

describe("pyth-governance-v1::update-wormhole-core-contract", () => {
describe("pyth-governance::update-wormhole-core-contract", () => {
const accounts = simnet.getAccounts();
const sender = accounts.get("wallet_1")!;
const deployer = accounts.get("deployer")!;
const guardianSet = wormhole.generateGuardianSetKeychain(19);
let updateWormholeContract = {
address: "ST2CY5V39NHDPWSXMW9QDT3HC3GD6Q6XX4CFRK9AG",
contractName: "wormhole-core-v3",
contractName: "wormhole-core-v2",
};
let ptgmVaaPayload = pyth.buildPtgmVaaPayload({ updateWormholeContract });

Expand Down Expand Up @@ -353,7 +353,7 @@ describe("pyth-governance-v1::update-wormhole-core-contract", () => {
});
});

describe("pyth-governance-v1::update-pyth-decoder-contract", () => {
describe("pyth-governance::update-pyth-decoder-contract", () => {
const accounts = simnet.getAccounts();
const sender = accounts.get("wallet_1")!;
const deployer = accounts.get("deployer")!;
Expand Down Expand Up @@ -482,7 +482,7 @@ describe("pyth-governance-v1::update-pyth-decoder-contract", () => {
});
});

describe("pyth-governance-v1::update-pyth-store-contract", () => {
describe("pyth-governance::update-pyth-store-contract", () => {
const accounts = simnet.getAccounts();
const sender = accounts.get("wallet_1")!;
const deployer = accounts.get("deployer")!;
Expand Down Expand Up @@ -609,7 +609,7 @@ describe("pyth-governance-v1::update-pyth-store-contract", () => {
});
});

describe("pyth-governance-v1::update-pyth-oracle-contract", () => {
describe("pyth-governance::update-pyth-oracle-contract", () => {
const accounts = simnet.getAccounts();
const sender = accounts.get("wallet_1")!;
const deployer = accounts.get("deployer")!;
Expand Down Expand Up @@ -715,7 +715,7 @@ describe("pyth-governance-v1::update-pyth-oracle-contract", () => {
});
});

describe("pyth-governance-v1::update-prices-data-sources", () => {
describe("pyth-governance::update-prices-data-sources", () => {
const accounts = simnet.getAccounts();
const sender = accounts.get("wallet_1")!;
const guardianSet = wormhole.generateGuardianSetKeychain(19);
Expand Down Expand Up @@ -803,7 +803,7 @@ describe("pyth-governance-v1::update-prices-data-sources", () => {
});
});

describe("pyth-governance-v1::update-governance-data-source", () => {
describe("pyth-governance::update-governance-data-source", () => {
const accounts = simnet.getAccounts();
const sender = accounts.get("wallet_1")!;
const guardianSet = wormhole.generateGuardianSetKeychain(19);
Expand Down Expand Up @@ -1047,7 +1047,7 @@ describe("pyth-governance-v1::update-governance-data-source", () => {
});
});

describe("pyth-governance-v1::update-stale-price-threshold", () => {
describe("pyth-governance::update-stale-price-threshold", () => {
const accounts = simnet.getAccounts();
const sender = accounts.get("wallet_1")!;
const guardianSet = wormhole.generateGuardianSetKeychain(19);
Expand Down
14 changes: 7 additions & 7 deletions unit-tests/wormhole/vaa.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import { wormhole } from "./helpers";
import { ParsedTransactionResult, tx } from "@hirosystems/clarinet-sdk";
import { hexToBytes } from "@noble/hashes/utils";

const contractName = "wormhole-core-v2";
const contractName = "wormhole-core";
const verbosity = 0;

describe("wormhole-core-v2::parse-vaa success", () => {
describe("wormhole-core::parse-vaa success", () => {
const accounts = simnet.getAccounts();
const sender = accounts.get("wallet_1")!;
const keychain = wormhole.generateGuardianSetKeychain(19);
Expand Down Expand Up @@ -60,7 +60,7 @@ describe("wormhole-core-v2::parse-vaa success", () => {
});
});

describe("wormhole-core-v2::update-guardians-set failures", () => {
describe("wormhole-core::update-guardians-set failures", () => {
const accounts = simnet.getAccounts();
const sender = accounts.get("wallet_1")!;
const keychain = wormhole.generateGuardianSetKeychain(19);
Expand Down Expand Up @@ -275,7 +275,7 @@ describe("wormhole-core-v2::update-guardians-set failures", () => {
});
});

describe("wormhole-core-v2::update-guardians-set success", () => {
describe("wormhole-core::update-guardians-set success", () => {
const accounts = simnet.getAccounts();
const sender = accounts.get("wallet_1")!;
const guardianSet1Keys = wormhole.generateGuardianSetKeychain(19);
Expand Down Expand Up @@ -439,7 +439,7 @@ describe("wormhole-core-v2::update-guardians-set success", () => {
});
});

describe("wormhole-core-v2::parse-and-verify-vaa success", () => {
describe("wormhole-core::parse-and-verify-vaa success", () => {
const accounts = simnet.getAccounts();
const sender = accounts.get("wallet_1")!;
const guardianSet1Keys = wormhole.generateGuardianSetKeychain(19);
Expand Down Expand Up @@ -525,7 +525,7 @@ describe("wormhole-core-v2::parse-and-verify-vaa success", () => {
});
});

describe("wormhole-core-v2::parse-and-verify-vaa failures", () => {
describe("wormhole-core::parse-and-verify-vaa failures", () => {
const accounts = simnet.getAccounts();
const sender = accounts.get("wallet_1")!;
const guardianSet1Keys = wormhole.generateGuardianSetKeychain(19);
Expand Down Expand Up @@ -662,7 +662,7 @@ describe("wormhole-core-v2::parse-and-verify-vaa failures", () => {
});
});

describe("wormhole-core-v2::update-guardians-set mainnet guardian rotations", () => {
describe("wormhole-core::update-guardians-set mainnet guardian rotations", () => {
const accounts = simnet.getAccounts();
const sender = accounts.get("wallet_1")!;
let block: ParsedTransactionResult[] | undefined = undefined;
Expand Down

0 comments on commit c82b8d3

Please sign in to comment.