feat: use PolkaVM disassembler (#6)

Integrate the PolkaVM disassembler to fix `--asm` output

Co-authored-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
This commit is contained in:
Chris
2024-05-03 06:31:24 -04:00
committed by GitHub
parent c547a9ef78
commit a75fc55133
28 changed files with 261 additions and 145 deletions
@@ -14,19 +14,23 @@ describe("Run with --asm by default", () => {
});
it("--asm output is presented", () => {
expect(result.output).toMatch(/(__entry:)/i);
const expectedPatterns = [/(deploy)/i, /(call)/i, /(seal_return)/i];
for (const pattern of expectedPatterns) {
expect(result.output).toMatch(pattern);
}
});
it("solc exit code == zksolc exit code", () => {
const command = `solc ${paths.pathToBasicSolContract} --asm`;
const solcResult = executeCommand(command);
expect(solcResult.exitCode).toBe(result.exitCode);
const command = `solc ${paths.pathToBasicSolContract} --asm`;
const solcResult = executeCommand(command);
expect(solcResult.exitCode).toBe(result.exitCode);
});
it("run invalid: zksolc --asm", () => {
expect(resultInvalid.output).toMatch(/(No input sources specified|Compilation aborted)/i);
});
it("Invalid command exit code = 1", () => {
expect(resultInvalid.exitCode).toBe(1);
});
@@ -36,4 +40,4 @@ describe("Run with --asm by default", () => {
const solcResult = executeCommand(command);
expect(solcResult.exitCode).toBe(resultInvalid.exitCode);
});
});
});
@@ -3,6 +3,5 @@
"target": "ES6",
"module": "CommonJS",
"outDir": "./dist",
"rootDir": "./src"
}
}