Skip to content
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

Tact141fix #72

Merged
merged 12 commits into from
Aug 12, 2024
13 changes: 13 additions & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"@types/mkdirp": "^1.0.2",
"@types/multer": "^1.4.7",
"@types/node": "^16.11.45",
"@types/semver": "^7.5.8",
"husky": "^8.0.0",
"jest-mock-extended": "^2.0.7",
"ts-jest": "^28.0.7",
Expand Down
32 changes: 32 additions & 0 deletions src/source-verifier/tact-source-verifier.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import { TactSourceVerifier } from "./tact-source-verifier";
const pkg =
"eyJuYW1lIjoiRWNobyIsImNvZGUiOiJ0ZTZjY2dFQ0VBRUFBczBBQVJUL0FQU2tFL1M4OHNnTEFRSUJZZ0lEQXVyUUFkRFRBd0Z4c01BQmtYK1JjT0lCK2tBQklOZEpnUUVMdXZMZ2lDRFhDd29nZ3dtNklZRUUvN3F4OHVDSWd3bTY4dUNKVkZCVEEyOEUrR0VDK0dMdFJORFVBZmhqMGdBQmtqQnRqcFg0S05jTENvTUp1dkxnaVlFQkFkY0FBUUhSMnp6aVdkczhNRERJK0VNQnpIOEJ5Z0RKN1ZRTkJBSUJXQXNNQTE3dG91MzdjQ0hYU2NJZmxUQWcxd3NmM2dLU1czL2dBY0FBanhNZzEwbkNINDhMZ0NEWElkczgyengvMnpIZzNnVUlCZ0ZDeUhBQnl4OXZBQUZ2akcxdmpBSGJQRzhpQWNtVElXNnpsZ0Z2SWxuTXllZ3hEd0lLMnp6YlBIOEhDQUFLeUFIUEZza0JHbi80UW5CWUE0QkNBVzF0Mnp3SkFjN0ljUUhLQVZBSEFjb0Fj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VzRnYVdRb0tUb2dTVzUwSUhzS0lDQWdJQ0FnSUNCeVpYUjFjbTRnYzJWc1ppNXBaRHNLSUNBZ0lIMEtmUW89In0sImNvbXBpbGVyIjp7Im5hbWUiOiJ0YWN0IiwidmVyc2lvbiI6IjEuNC4xIiwicGFyYW1ldGVycyI6IntcImVudHJ5cG9pbnRcIjpcImNvbnRyYWN0cy90ZXN0MTQxLnRhY3RcIixcIm9wdGlvbnNcIjp7XCJkZWJ1Z1wiOnRydWV9fSJ9fQ==";

describe("TactSourceVerifier", () => {
it("compiles", async function () {
const tactVerifier = new TactSourceVerifier({
Expand Down Expand Up @@ -33,6 +36,35 @@ describe("TactSourceVerifier", () => {
expect(res.result).toEqual("similar");
});

it("compiles141", async function () {
const tactVerifier = new TactSourceVerifier({
writeFile: async (_path, content) => {},
readFile: async (path) => {
if (path === "echo.pkg") return Buffer.from(pkg141, "base64");
throw new Error("Unknown path");
},
readdir: async () => [],
});

const res = await tactVerifier.verify({
compiler: "tact",
compilerSettings: { tactVersion: "1.4.1" },
knownContractAddress: "",
knownContractHash: "XhyDRMeBeZs7IK/pJ0XFWNjeKTx2g6n0+hGQ/9Ne2SA=",
senderAddress: "",
sources: [
{
path: "echo.pkg",
},
],
tmpDir: "",
});

console.log(res.error);

expect(res.result).toEqual("not_similar");
});

it("invalid file format", async function () {
const tactVerifier = new TactSourceVerifier({
writeFile: async (_path, content) => {},
Expand Down
Loading
Loading