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

Bump func-js-bin to v0.5.0, update contracts to modern syntax #12

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ton-community/func-js",
"version": "0.7.0",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v0.5.0

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏

"version": "0.8.0",
"description": "The TON FunC smart-contract compiler",
"main": "dist/index.js",
"bin": {
Expand Down Expand Up @@ -29,7 +29,7 @@
"typescript": "^4.9.5"
},
"dependencies": {
"@ton-community/func-js-bin": "0.4.4-newops.1",
"@ton-community/func-js-bin": "0.5.0",
"arg": "^5.0.2"
}
}
15 changes: 7 additions & 8 deletions test/compiler.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,16 @@ import fs from 'fs';
import {Cell} from 'ton-core';

describe('func-js', () => {
const walletCodeCellHash = Buffer.from("hA3nAz+xEJePYGrDyjJ+BXBcxSp9Y2xaAFLRgGntfDs=", 'base64');
const walletCodeCellHash = "8OtG02lbUYFZHJXjmAjKn0p69Ih9Y0V+4eS5KKH/Io0=";

const compilerVersionExpected = {
funcVersion: "0.4.4",
funcFiftLibCommitDate: "2024-03-27 12:57:15 +0300",
funcFiftLibCommitHash: "ffe0a1c63073dda0a0dd0e14f199b83fe5b05e66",
funcVersion: "0.5.0",
funcFiftLibCommitHash: "3c02cbfcbb83739c5138f33ae58ae3abf8d593f4",
};

it('should return compiler version', async () => {
let version = await compilerVersion();
expect(version).toEqual(compilerVersionExpected);
expect(version).toMatchObject(compilerVersionExpected);
});

it('should compile', async () => {
Expand All @@ -30,7 +29,7 @@ describe('func-js', () => {
result = result as SuccessResult;

let codeCell = Cell.fromBoc(Buffer.from(result.codeBoc, "base64"))[0];
expect(codeCell.hash().equals(walletCodeCellHash)).toBe(true);
expect(codeCell.hash().toString('base64')).toBe(walletCodeCellHash);
});

it('should compile using map source resolver', async () => {
Expand All @@ -47,7 +46,7 @@ describe('func-js', () => {
result = result as SuccessResult;

let codeCell = Cell.fromBoc(Buffer.from(result.codeBoc, "base64"))[0];
expect(codeCell.hash().equals(walletCodeCellHash)).toBe(true);
expect(codeCell.hash().toString('base64')).toBe(walletCodeCellHash);
});

it('should handle includes', async () => {
Expand All @@ -65,7 +64,7 @@ describe('func-js', () => {
result = result as SuccessResult;

let codeCell = Cell.fromBoc(Buffer.from(result.codeBoc, "base64"))[0];
expect(codeCell.hash().equals(walletCodeCellHash)).toBe(true);
expect(codeCell.hash().toString('base64')).toBe(walletCodeCellHash);
});

it('should fail if entry point source is not provided', async () => {
Expand Down
Loading