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

Support Tact 1.5.0 #44

Closed
anton-trunov opened this issue Sep 15, 2024 · 4 comments · Fixed by #45
Closed

Support Tact 1.5.0 #44

anton-trunov opened this issue Sep 15, 2024 · 4 comments · Fixed by #45

Comments

@anton-trunov
Copy link
Member

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.
@logvik
Copy link
Member

logvik commented Sep 15, 2024

I will try to dedicate next weekend to this...

@novusnota
Copy link
Member

novusnota commented Sep 16, 2024

@logvik As a heads up — the TextMate grammar for 1.5.0 is completed, so just reuse it :)

@logvik
Copy link
Member

logvik commented Oct 8, 2024

@novusnota did you include all changes from the checklist to the #45 patch? Just this issue was closed after the merging, but I am not sure on 100% that all needed features were implemented. If yes, that I will close, if no, then let's specify what we should add more.

@novusnota
Copy link
Member

@logvik yes, I believe:

  1. Added all the new global functions (+ some missing ones, like send())
  2. Added all the extension functions (Builder.storeBit(), etc.)
  3. Added new map methods (.exists(), .deepEquals()) and Struct and Message method toSlice()
  4. Omitting semicolons in contracts/traits was already there due to ASI of JavaScript (EOS rule in pegjs grammar)
  5. Wider range of serialization options (uint1-256, etc.) was added in the highlighting, while the parser supported any already
  6. asm functions — both in the parser and in highlighting

@logvik logvik closed this as completed Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants