Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Gusarich committed Apr 10, 2024
1 parent cd27e69 commit 59038b4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
8 changes: 6 additions & 2 deletions src/test/feature-constants.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,12 @@ describe("feature-constants", () => {
expect(await contract.getSomething6()).toEqual(10n);
expect(await contract.getSomething7()).toEqual(5n);
expect(await contract.getSomething8()).toEqual(4n);
expect((await contract.getSomething9()).toRawString()).toEqual("0:4a81708d2cf7b15a1b362fbf64880451d698461f52f05f145b36c08517d76873");
expect((await contract.getSomething10()).toRawString()).toEqual("0:4a81708d2cf7b15a1b362fbf64880451d698461f52f05f145b36c08517d76873");
expect((await contract.getSomething9()).toRawString()).toEqual(
"0:4a81708d2cf7b15a1b362fbf64880451d698461f52f05f145b36c08517d76873",
);
expect((await contract.getSomething10()).toRawString()).toEqual(
"0:4a81708d2cf7b15a1b362fbf64880451d698461f52f05f145b36c08517d76873",
);
expect(await contract.getGlobalConst()).toEqual(100n);
});
});
7 changes: 5 additions & 2 deletions src/types/resolveConstantValue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,13 @@ function reduceAddress(ast: ASTExpression, ctx: CompilerContext): Address {
}
return address;
}
} else if (ast.name === 'newAddress') {
} else if (ast.name === "newAddress") {
if (ast.args.length === 2) {
const wc = reduceInt(ast.args[0]);
const addr = Buffer.from(reduceInt(ast.args[1]).toString(16), 'hex');
const addr = Buffer.from(
reduceInt(ast.args[1]).toString(16),
"hex",
);
if (!enabledMasterchain(ctx)) {
if (wc !== 0n) {
throwError(
Expand Down

0 comments on commit 59038b4

Please sign in to comment.