Skip to content

Commit

Permalink
double encode
Browse files Browse the repository at this point in the history
  • Loading branch information
SynthLuvr committed Sep 18, 2024
1 parent e8a5da6 commit 59ccc72
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/script.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import fs from "fs/promises";
import { dirname, join } from "path";
import { fileURLToPath } from "url";
import { applyDoubleCborEncoding } from "@lucid-evolution/lucid";
import { type } from "arktype";
import { Err, Ok, Result } from "ts-handling";

Expand All @@ -25,7 +26,7 @@ const loadPlutus = async (
const plutusPath = join(here, "..", "plutus.json");
const plutus = Plutus(JSON.parse(await fs.readFile(plutusPath, "utf8")));
if (plutus instanceof type.errors) return Err(plutus.summary);
return Ok(plutus[validator]);
return Ok(applyDoubleCborEncoding(plutus[validator]));
};

export { loadPlutus };

0 comments on commit 59ccc72

Please sign in to comment.