From c82b8d3491ac7862d6e2901fbae6f2d5fb10b685 Mon Sep 17 00:00:00 2001 From: Ludo Galabru Date: Wed, 7 Aug 2024 08:07:25 -0400 Subject: [PATCH] fix: broken tests --- unit-tests/pyth/oracle.test.ts | 10 +++++----- unit-tests/pyth/pnau.test.ts | 14 +++++++------- unit-tests/pyth/ptgm.test.ts | 34 ++++++++++++++++----------------- unit-tests/wormhole/vaa.test.ts | 14 +++++++------- 4 files changed, 36 insertions(+), 36 deletions(-) diff --git a/unit-tests/pyth/oracle.test.ts b/unit-tests/pyth/oracle.test.ts index 2026d8a..745c07a 100644 --- a/unit-tests/pyth/oracle.test.ts +++ b/unit-tests/pyth/oracle.test.ts @@ -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")!; diff --git a/unit-tests/pyth/pnau.test.ts b/unit-tests/pyth/pnau.test.ts index ebb3147..10f81bc 100644 --- a/unit-tests/pyth/pnau.test.ts +++ b/unit-tests/pyth/pnau.test.ts @@ -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); @@ -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); diff --git a/unit-tests/pyth/ptgm.test.ts b/unit-tests/pyth/ptgm.test.ts index 8980613..654df12 100644 --- a/unit-tests/pyth/ptgm.test.ts +++ b/unit-tests/pyth/ptgm.test.ts @@ -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")!; @@ -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); @@ -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); @@ -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 }); @@ -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")!; @@ -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")!; @@ -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")!; @@ -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); @@ -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); @@ -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); diff --git a/unit-tests/wormhole/vaa.test.ts b/unit-tests/wormhole/vaa.test.ts index d574024..1114879 100644 --- a/unit-tests/wormhole/vaa.test.ts +++ b/unit-tests/wormhole/vaa.test.ts @@ -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); @@ -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); @@ -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); @@ -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); @@ -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); @@ -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;