Compiler features:
- Support
internalMsg
/externalMsg
specifiers for public and external functions - Support
msg.isInternal
,msg.isExternal
andmsg.isTickTock
- Support
storeOnes
andstoreZeroes
forTvmBuilder
.
Breaking change:
- Change behavior of function
<string>.substr()
. - Use
{dest: ...}
instead of.extAddr(...)
in emit statement to set destination address.
Gas optimizations.
Compiler features:
- Compiler version is added in the contract's code.
- Decoding struct type from
TvmSlice
. - Added new container type
vector
.
Bugfixes:
- Fixed segmentation fault when using format function
- Fixed problem with comparisons
==
and!=
forTvmCell
types. - Fixed bugs in TypeChecker.
Gas optimizations: encoding parameters to builders.
Compiler features:
- Support
<array>.empty()
,<bytes>.empty()
and<string>.empty()
. - Support self deploying of a contract (see sample #21).
- Support
tvm.buildIntMsg()
to generate cell, that contains an internal message. - Support
tvm.sendrawmsg()
to send internal/external messages. - Support command line option
--function-ids
for printing function ids.
Bugfixes:
- Public functions (that return public state variables) emited an external message (which is paid by the contract). Now these functions emit external messages only on external messages.
- Fix problem with generating inbound external messages (for debots) and responsible functions.
In message body there wasn't
_answer_id
. Now it's added. - TypeChecker checks
call
parameter oftvm.buildExtMsg()
. - Fix problem (what caused underflow exception) with encoding/decoding of state variables.
Compiler features:
- Support mappings/arrays containing big structs (or another structs) as input/output parameters of public/external functions.
- Support
tvm.code()
,tvm.codeSalt()
andtvm.setCodeSalt
.
Some gas optimizations.
Changes:
selfdestruct
appends 0 tons to the internal message (instead of 1000 nanotons).
Breaking change:
- Calling a fallback function (instead of throwing error) in cases:
- Bit length of the internal input message is between 1 and 31.
- The message has zero bit size and not zero count of references.
Compiler features:
- Added ability to import files via net link.
Compiler features:
- Support indices > 127 for
bytes
. - Support iteration over
bytes
usingfor
loop. For example:for (byte b : byteArray) { ... }
.
Bugfixes:
- Fixed minor bugs in TypeChecker.
- Fixed segmentation fault on using library functions.
Improvements:
- '--tvm-optimize' option is now enabled by default.
- Debot feature
signBoxHandle
is supported intvm.buildExtMsg()
andextMsg
call.
Compiler features:
- Support
tvm.setPubkey(...);
- Support command line option
--debug
for generating debug info.
Some gas optimizations and bugfixes.
Compiler Features:
- Gas consumption optimizations
- Support
sha256
forstring
andbytes
types - Support applying twice the modifier with parameter(s) for the function.
- Delete restriction about function id of public functions.
Bugfixes:
- Fixed minor bugs in TypeChecker.
Bugfixes:
- Fix contract execution fail on internal message if the function returns some value.
Breaking changes:
- Default value of parameter
flag
is equal to0
. The parameter is used fortvm.transfer
and external function calls. - Introduce keyword
responsible
used to mark functions that can call a callback function. - Change behavior for command line option
-o [ --output-dir ] path/to/dir
and introduce option-f [ --file ] prefixName
.
Bugfixes:
- Fixed minor bugs in TypeChecker that cause fails of the compiler.
Use another opcodes for working with mapping(KeyType => TvmSlice) map;
So if you used it then be
sure that sum of bit length of KeyType
and bit length of TvmSlice
is less than 1023 bit.
Documentation:
- Write about parameter
flag
used fortvm.transfer
and external function calls. Add sample offlag
usage.
Compiler Features:
- Support fixed point numbers (
fixed
/ufixed
). - Support functions to convert gas to tons (
gasToValue()
) and vice versa (valueToGas()
). - Support
string
methodsbyteLength()
andsubstr()
to work with long strings (which are stored in more than one cell). - Add methods
skip()
,compare()
,hasNBits()
,hasNRefs()
andhasNBitsAndRefs()
for TvmSlice type. - Support proper
string
type comparison which works right with long strings. - Removed deprecated function
hexstring()
and explicit int to string conversion.
Bugfixes:
- Fixed a bug with slices comparison.
Assorted features requested by DeBot support:
format
function now can create long strings (which does not fit one cell), can take string arguments and format integers width and fill settings.- Some additional parameters were added for
tvm.buildExtMsg()
andextMsg
call to support DeBot external function calls and deploy.
Compiler Features:
- Support callback functions used for intercontract communication.
- Added string type method
append
that allows to concatenate long strings. - Support function
sha256(TvmSlice slice) returns (uint256)
- Added api function
tvm.buildExtMsg()
to generate an external inbound message to call contract function. - Support constant variables of address type.
Breaking changes:
- Use
pragma ton-solidity ...;
instead ofpragma solidity ...;
to restrict compiler version
Bugfixes:
- Fixed an issue with modifier.
- Fixed a function type issue.
Compiler Features:
- Struct type can be used as a key of a mapping. Some restrictions are imposed on such structs.
- Support
bounce
andcurrencies
options to deploy contact via new. - Support range-based for loop
for ( range_declaration : range_expression ) loop_statement
whererange_expression
is array or mapping type - Expanded api function
tvm.buildStateInit()
to generate aStateInit
of the contract with arbitrary parameters.
Breaking changes:
- fallback function is not called on plain tons transfers if there is no receive function in the contract. In this case default receive function is called.
Bugfixes:
- Fixed an issue with generating
*.abi.json
file.
Compiler Features:
- Support
varInit
andpubkey
options innew
expression. - Support optional type in complex lvalue expressions. e.g.
m[11].get()[22] = 33
wherem
ismapping(uint => optional(uint[]))
. - Support option
splitDepth
innew
expression and intvm.buildStateInit(...)
.
Breaking changes:
public
state variable don't create record in *.abi.json in sectiondata
. Use keywordstatic
for that goal. Forpublic
state variable, getter function is automatically generated. That function can be called locally only.- Change function interface for
tvm.deploy
Bugfixes:
- Code Generator: Fixed a runtime fail if
receive
orfallback
functions are declared aspure
orview
. - Type checker: Compiler failed during parsing wrong parameter names.
Compiler Features:
- Support some math function:
math.divc()
andmath.divr()
. - Support
tvm.exit()
andtvm.exit1()
. - Support
bytes.toSlice()
. - Support
tvm.functionId
andtvm.decodeFunctionParams
for contract constructor. - Support
mapping.at
. - Support api for SmartContractInfo:
tx.timestamp
,block.timestamp
. - Support api for getting info about size of DAG:
cell.dataSize
,slice.dataSize
and another. - Support api functions for converting integer or address to a string:
format()
,string(int)
andhexstring
. - Support api for pseudo-random number generator:
rnd.next()
,rnd.shuffle()
and another. - Support function library calls via library name and object.
- Support pragma to specify default message value:
pragma msgValue
. - Support api function for converting string into an integer
stoi()
. - Support control structure
repeat
which repeats block of code arbitrary amount of times. - Changed mapping api function
delMin
to return optional.
Some little gas optimizations.
Breaking changes:
- The
now
returnsuint32
value, notuint256
- The
msg.value
returnsuint128
value, notuint256
- Change round mode for
math.muldiv()
Compiler Features:
- Optimize runtime code (delete duplicate code and useless checks)
- Add new math operations:
math.muldivr()
andmath.muldivc()
- Support setting workchain id for deploying contracts via
new
- Support
tvm.buildEmptyData(publicKey)
used for deploying contracts
Bugfixes:
- fixed an issue with overridden functionID
- fixed an issue with inline function
APIs for common TON-specific functionality:
- Supported tick and tock transactions. See onTickTock function. Bug fixes.
APIs for common TON-specific functionality:
- Supported optional type
- Added methods for optional type: set, hasValue, get
Changed APIs to handle mappings: fetch, min, max, prev, next and ect.
APIs for common TON-specific functionality:
-
Migrated frontend to 0.6.3
-
Native types support
- TvmCell: toSlice()
- TvmSlice: decode(), size(), loadRef(), loadRefAsSlice()
-
Native TVM operations as tvm member functions
- Custom message builders: sendMsg(), sendRawMsg()
- Account state access: setCode(), setCurrentCode(), commit(), resetStorage()
- Misc: cdatasize(), transLT(), configParam()
-
Multiple stability fixes
-
Gas consumption optimizations
APIs for common TON-specific functionality:
- Address constructors and accessors
- Extended address format that includes workchain ID
- Members for workchain ID and the actual address part
- isZero() and unpack() functions
- External addresses support
New APIs to handle mappings:
- next(), exists(), min(), empty(), fetch(), delMin()
Optimizations:
- Smarter parsing of inbound messages to build SmartContractInfo
- Reduced gas consumption when working with smart-contract persistent memory
Enum support