Skip to content
Open
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"dependencies": {
"@hono/node-server": "^1.19.11",
"@percolator/shared": "github:dcccrypto/percolator-shared#489f5b48b6d7826ce62bae6734bb3d078c392730",
"@percolatorct/sdk": "file:../../percolator-sdk",
"@percolatorct/sdk": "github:dcccrypto/percolator-sdk#673bc4717480f54f678c0f07246b26b84d703212",
"@sentry/node": "^10.39.0",
"@solana/web3.js": "^1.98.0",
"@supabase/supabase-js": "^2.49.1",
Expand Down
17 changes: 9 additions & 8 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 21 additions & 2 deletions tests/sdk-smoke.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ import {
getMatcherProgramId,
getCurrentNetwork,
PROGRAM_IDS,
V17_PROGRAMS_DEPLOYED,
// oracle/price-router.ts (used by oracle-router.ts route)
resolvePrice,
// v17 crank encoder
Expand Down Expand Up @@ -262,13 +263,31 @@ describe("@percolatorct/sdk exports — PDA derivation", () => {
// ── 7. Program IDs ────────────────────────────────────────────────────────────

describe("@percolatorct/sdk exports — program IDs", () => {
it("getProgramId returns a valid PublicKey for devnet", () => {
// The v17 SDK fails closed until the converged v17 programs are deployed
// (Phase 7 cutover gate): rather than hand back a legacy address that cannot
// decode v17 instruction payloads, getProgramId()/getMatcherProgramId() throw
// while V17_PROGRAMS_DEPLOYED === false. Assert whichever half of that
// contract is live so this smoke test stays honest across the cutover.
// Widened to boolean — the SDK types the constant as the literal `false`.
const v17Deployed: boolean = V17_PROGRAMS_DEPLOYED;

it("getProgramId honours the v17 deployment gate for devnet", () => {
if (!v17Deployed) {
expect(() => getProgramId("devnet")).toThrow(/v17 program is not deployed/);
return;
}
const id = getProgramId("devnet");
expect(id).toBeInstanceOf(PublicKey);
expect(id.toBase58().length).toBeGreaterThan(0);
});

it("getMatcherProgramId returns a valid PublicKey for devnet", () => {
it("getMatcherProgramId honours the v17 deployment gate for devnet", () => {
if (!v17Deployed) {
expect(() => getMatcherProgramId("devnet")).toThrow(
/v17 matcher program is not deployed/,
);
return;
}
const id = getMatcherProgramId("devnet");
expect(id).toBeInstanceOf(PublicKey);
});
Expand Down
Loading