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

Tracking issue: Tact v1.5.0 #39

Open
6 of 8 tasks
anton-trunov opened this issue Sep 15, 2024 · 2 comments
Open
6 of 8 tasks

Tracking issue: Tact v1.5.0 #39

anton-trunov opened this issue Sep 15, 2024 · 2 comments
Assignees
Labels
tact update tact-lang/tact: features and related updates

Comments

@anton-trunov
Copy link
Member

anton-trunov commented Sep 15, 2024

Full changelog for Tact v1.5.0: https://github.com/tact-lang/tact/blob/main/CHANGELOG.md#150---2024-09-15

New Tact features:

  • asm functions: asm fun keccak256(s: Slice): Int { 1 INT HASHEXT_KECCAK256 };
  • Wider range of serialization options for integers — uint1 through uint256 and int1 through int257: counter: Int as uint48;
  • Allow omitting last semicolons in contract/trait declarations and definitions: trait Test { abstract fun foo() } -- the semicolon after foo() is not required anymore.

New builtin and stdlib functions and methods:

  • The exists method for the Map type: m.exists(key), equivalent to m.get(key) != null;
  • The deepEquals method for the Map type: m1.deepEquals(m2);
  • The toSlice method for structs and messages: struct.toSlice();
  • The storeBit method for Builder type and the loadBit method for Slice type (aliases for storeBool and loadBool respectively): b.storeBit(true), sl.loadBit();
  • slice, rawSlice, ascii and crc32 built-in functions;
  • Corresponding stdlib functions for the new TVM instructions from 2023.07 and 2024.04 upgrades: storeBuilder extension function and gasConsumed, getComputeFee, getStorageFee, getForwardFee, getSimpleComputeFee, getSimpleForwardFee, getOriginalFwdFee, myStorageDue functions.
  • Builder.storeMaybeRef, parseStdAddress and parseVarAddress stdlib functions.

Tracking progress

P.S.: Consider removing the built-in functions from highlighting queries, as this generally hurts the highlighting more than it helps. New structs, messages and constants are better candidates for inclusion into queries.

@novusnota novusnota self-assigned this Sep 15, 2024
@novusnota novusnota added the tact update tact-lang/tact: features and related updates label Sep 15, 2024
@novusnota
Copy link
Member

novusnota commented Sep 24, 2024

Because of lack of lookaheads, implementing correct-ish asm function block parsing without resorting to external scanner (scanner.c) is quite tough. I'll try some more without it, but probably would have to make it anyways.

On the up side, making an external scanner here will help making tact-lang/tact#837 later on

@anton-trunov
Copy link
Member Author

Let's just support some reasonable subset of Fift-asm for now, without creating an external scanner. For instance, the stuff in stdlib.fc and other common and important FunC contracts. Our wiki has a list of those: https://github.com/tact-lang/tact/wiki/FunC-contracts.

And document somewhere that our tree-sitter does not support the full syntax.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tact update tact-lang/tact: features and related updates
Projects
None yet
Development

No branches or pull requests

2 participants