Compiler features:
- Supported
bool
type for function format. - Supported <TvmBuilder>.storeQ().
Fixed minor bugs.
Breaking changes:
- If the contract does not have constructor explicitly and does not have state variables with initialisation, then in
*.abi.json
file there is noconstructor
function and no_constructorFlag
field. See Deploy the contract with no constructor for more details.
Bugfixes:
- Peephole optimizer generated invalid code. See issue #153.
- Fixed segmentation fault that occurred in some cases of using incorrect types for
math.*
and some another functions. - Fixed minor bugs in TypeChecker (using bad type for mapping value).
Compiler features:
- Supported
stateInit
option for External function calls. - Supported math.mulmod().
- Supported functions to work with
TvmSlice
's: - Supported operations on a pairing friendly BLS12-381 curve.
- Supported conversion string literals to
TvmSlice
, e.g.TvmSlice s = "0189abef_";
.
Usability:
- Print function-candidates on compilation failure (for function overloading).
Optimizations:
- 14-bit numbers are used for function ids for private/internal functions for code optimizations instead of 32-bit.
32-bit numbers are still used for
onCodeUpgrade
functions for back compatibility. - peephole optimizations.
Breaking changes:
- Now
int
is alias forint257
, not forint256
. That's why*loadInt*
functions returnint257
and*storeInt*
functions takeint257
. - Deleted debots supporting.
- Now vector can contain at least 255 elements.
Bugfixes:
- Fixed minor bugs in TypeChecker.
- Fixed compilation fail when you have private and public functions with the same name in the contract.
- Fixed another minor bugs.
Compiler features:
- Supported quiet arithmetic.
- Supported StringBuilder.
- Supported int257.
- Supported <vector(T)>.last().
- Supported stack(T).
- Supported unary operators (
++
,--
,-
,delete
and~
) for varint and varuint. - Supported Free function call via object.
Other changes:
- Renamed some types. Old types are available and marked as deprecated. Renaming:
varInt
->varint
varUint
->varuint
varIntM
->varintM
varUintM
->varuintM
Update compiler frontend (from original version 0.8.17 to 0.8.24). Full changelog can be found here.
Breaking changes:
- Supported ABI 2.4.
- Deleted
tvm.insertPubkey()
function. - Deleted
address.makeAddrNone()
function. Use address.addrNone. - Default value for
address
type wasaddress(0)
but now it is address.addrNone. byteN
in*abi.json
file marked asfixedbytesN
. See ABI.md.- abi.encodeStateInit(), abi.encodeData() functions and Deploy via new generate contract's data in the new format. To deploy old contracts (with version < 0.72.0) from new ones (with version >= 0.72.0) use abi.encodeOldDataInit().
- format() no longer throws an exception if formatted value exceeds the specified width. E.g.
format("{:1d}", 10) == "10"
now is correct, no exception. - Functions and constructions previously working with
uint128
value, now usingvarUint16
: - Control construction repeat takes
uint31
instead ofuint256
. - Supported <Integer>.cast() and changed conversion.
Bugfixes:
- Fixed compiler assert fault that occurred in the case of using user-defined value types as return parameter of public/external function.
- Fixed segmentation fault of the compiler that could occur in some cases of using invalid rational number (too large or division by zero), e.g.
math.muldiv(2**500, 1, 1);
. - Now <string>.substr() does not throw an exception if
pos + count > string.byteLength()
. - Fixed minor bugs in TypeChecker.
Compiler features:
- Supported defining operators for a user-defined type.
- Supported keyword nostorage.
- Now you can use the keyword coins as an alias for
varUint16
Gas optimizations:
- Optimized functions that work with strings: concatenation, substring, format etc.
- Assorted stack optimizations.
Other changes:
- Renamed some functions. Old functions are available and marked as deprecated. Renaming:
tvm.buildDataInit()
->abi.encodeData()
<TvmSlice>.loadStateVars()
->abi.decodeData()
tvm.buildStateInit()
->abi.encodeStateInit()
tvm.stateInitHash()
->abi.stateInitHash()
tvm.codeSalt()
->abi.codeSalt()
tvm.setCodeSalt()
->abi.setCodeSalt()
tvm.functionId()
->abi.functionId()
tvm.buildExtMsg()
->abi.encodeExtMsg()
tvm.buildIntMsg()
->abi.encodeIntMsg()
tvm.encodeBody()
->abi.encodeBody()
<TvmSlice>.loadFunctionParams()
->abi.decodeFunctionParams()
- Marked functions
<TvmSlice>.loadTons()
and<TvmBuilder>.storeTons()
as deprecated. Use<TvmSlice>.load()
and<TvmBuilder>.store()
that takevarUint16
type.
Use sold to compile contracts. If you used solc
+tvm_linker
, then use solc
+asm. Generated *.code
files have some another format.
Breaking changes:
- The conversion for integer type is only allowed when there is at most one change in sign, width or type-category (
int
,address
,bytesNN
, etc.). To perform multiple changes, use multiple conversions. See Solidity v0.8.0 Breaking Changes. For example, to convertint8 x;
touint
you can use at least two ways: 1)uint(uint8(x))
, 2)uint(int(x))
. - Deleted
ExtraCurrencyCollection
type. Usemapping(uint32 => varUint32)
instead of it.
Bugfixes:
- Fixed bug when recursive calling of library function via object corrupted the stack.
- Fixed minor bug that caused compilation failure.
- Fixed bug when you use string literals for
bytesN constant
.
Compiler features:
- Supported unchecked blocks.
- Supported defining events in libraries.
- Supported require(bool condition, string text).
- Supported functions for working with exotic cells:
- Supported command line option
--overwrite
that is used together with--ast-compact-json -o
options. - Warning about storing too big structs via
<TvmBuilder>.store()
. - Change function signature
<TvmSlice>.skip(uint10 bits, uint2 refs)
-><TvmSlice>.skip(uint10 bits, uint3 refs)
to allow to skip 4 references.
Bugfixes:
- Fixed segmentation fault of the compiler that could occur in some cases of using
try-catch
(experimental feature). - Fixed compilation error in case of using operator
+
for constant strings. - Fixed segmentation fault of the compiler that could occur in the case of using
constructor
withfunctionID()
. - Fixed an exception which could occur on contract upgrade in case of state variables number being reduced, yet still exceeding 16.
Breaking changes:
- Now msg.data returns the whole message instead of the message body. Use msg.body to get the message body (payload).
<address>.unpack
returns(int32, uint256)
instead of(int8, uint256)
.
Compiler features:
- Supported <optional(T)>.getOr() and <optional(T)>.getOrDefault().
- Supported creating empty cell via
TvmCell()
. - Supported
<TvmBuilder>.store()
forvarInt
/varUint
. - Supported msg.forwardFee.
- Supported msg.importFee.
- Supported gasleft.
- Supported <mapping>.getDel().
Gas optimizations:
- Assorted stack optimizations.
Compiler features:
- Supported inline assembly.
- Supported overriding
onCodeUpgrade
function. - Supported User-defined Value Types. You can also use this type in public functions.
- Supported
type(T).min
andtype(T).max
. - New
<TvmBuilder>.store*()
functions:<TvmBuilder>.storeIntLE2()
<TvmBuilder>.storeIntLE4()
<TvmBuilder>.storeIntLE8()
<TvmBuilder>.storeUintLE2()
<TvmBuilder>.storeUintLE4()
<TvmBuilder>.storeUintLE8()
- New
<TvmSlice>.load*()
functions:<TvmSlice>.loadIntQ()
<TvmSlice>.loadUintQ()
<TvmSlice>.loadSliceQ()
<TvmSlice>.loadIntLE2()
<TvmSlice>.loadIntLE4()
<TvmSlice>.loadIntLE8()
<TvmSlice>.loadUintLE2()
<TvmSlice>.loadUintLE4()
<TvmSlice>.loadUintLE8()
<TvmSlice>.loadIntLE4Q()
<TvmSlice>.loadIntLE8Q()
<TvmSlice>.loadUintLE4Q()
<TvmSlice>.loadUintLE8Q()
- New
<TvmSlice>.preload*()
functions:<TvmSlice>.preload()
<TvmSlice>.preloadQ()
<TvmSlice>.preloadRef()
<TvmSlice>.preloadInt()
<TvmSlice>.preloadIntQ()
<TvmSlice>.preloadUint()
<TvmSlice>.preloadUintQ()
<TvmSlice>.preloadSlice()
<TvmSlice>.preloadSliceQ()
<TvmSlice>.preloadIntLE4()
<TvmSlice>.preloadIntLE8()
<TvmSlice>.preloadUintLE4()
<TvmSlice>.preloadUintLE8()
<TvmSlice>.preloadIntLE4Q()
<TvmSlice>.preloadIntLE8Q()
<TvmSlice>.preloadUintLE4Q()
<TvmSlice>.preloadUintLE8Q()
- Supported
variable integer
type in arguments ofmath.*
functions. - Supported conversion
bytes
/string
<=>TvmSlice
.
Gas optimizations:
- Assorted stack optimizations.
Bugfixes:
- Fixed compilation fail if you use
<TvmSlice>.loadSlice(l)
wherel
is constant andl == 0
orl > 256
.
Other changes:
- Renamed some functions. Old functions are available and marked as deprecated. Renaming:
<TvmSlice>.decode()
-><TvmSlice>.load()
<TvmSlice>.decodeQ()
-><TvmSlice>.loadQ()
<TvmSlice>.decodeFunctionParams()
-><TvmSlice>.loadFunctionParams()
<TvmSlice>.decodeStateVars()
-><TvmSlice>.loadStateVars()
<TvmSlice>.loadSigned()
-><TvmSlice>.loadInt()
<TvmSlice>.loadUnsigned()
-><TvmSlice>.loadUint()
<TvmBuilder>.storeSigned()
-><TvmSlice>.storeInt()
<TvmBuilder>.storeUnsigned()
-><TvmSlice>.storeUint()
- Improved
try-catch
(experimental feature). - Now
tx.storageFee
returnsuint120
(notuint64
). - Renamed
tx.timestamp
totx.logicaltime
.tx.timestamp
is available and marked as deprecated.
Breaking changes:
pragma AbiHeader time
is no longer allowed for use. Timestamp in header of external message is enabled by default and can be disabled withpragma AbiHeader notime
.
Compiler features:
- Supported generating code for The Open Network. Use command line option
--tvm-version ton
. We don't useZERO(SWAP|ROTR)IF[NOT][2]
,COPYLEFT
,INITCODEHASH
,MYCODE
,STORAGEFEE
,LDCONT
,STCONT
and another opcodes for ton.
Optimizations:
- Improved constant analyzer that compile more optimal code for
require
/revert
functions and another cases.
Bugfixes:
- Fixed segmentation fault that could occur in some cases of using
variable integer
types. - Fixed segmentation fault that occurred in constructions
optional(T1, T2) x = null;
and some another cases.
Breaking changes:
require()
andrevert()
takeuint16
exception code instead ofuint256
.tvm.rawConfigParam(...)
returnsoptional(TvmCell)
instead of(TvmCell, bool)
.- Exit status of
solc
/sold
is equal to0
and it printsCompiler run successful, no output requested.
if the source contain no deployable contracts.
Compiler features:
- Supported free functions.
- Supported
<TvmSlice>.loadZeroes()
,<TvmSlice>.loadOnes()
and<TvmSlice>.loadSame()
. - Supported
<TvmBuilder>.storeSame()
.
Bugfixes:
- Fixed a problem with lvalue expressions. The problem caused type check error.
- Fixed the bug that caused an exception in decoding the parameters of public function.
- Fixed compilation fail if you use
tvm.functionID(ContractName)
orexternalMsg
/internalMsg
. - Fixed bug when AST (
solc --ast-compact-json
) was generated with ignoring options in return statements (return {value: ..., flag: ..., bounce: ...}(...);
). - Fixed compilation fail when you have 2 files with the same names in your project.
sold:
- Supported
--userdoc
/--devdoc
options. --ast-compact-json
option outputs to stdout now.
Update compiler frontend (from original version 0.6.3 to 0.8.17):
- Breaking changes:
block.timestamp
returns opcodeNOW
instead of opcodeBLOCKLT
.block.logicaltime
returns opcodeBLOCKLT
.- Type
byte
is deleted. Usebytes1
. - And another breaking changes from original compiler.
- Files are imported according this. Use cmd options
--base-path
,--include-path
and another options. - Downloading files in import section from the Internet is forbidden. Use remapping.
- Update NatSpec, code analyzer, etc.
Bugfixes:
- Fixed problem with getting inherited function
afterSignatureCheck
. - Support overloading for function
onCodeUpgrade
.
Breaking changes:
- Function
onCodeUpgrade
had function id = 2. Now, it has another id, but you can setfunctionID(2)
in new contracts to upgrade old ones.
Compiler features:
- Supported
delete
and binary operators forvarUintN/varIntN
types. - Supported function references for library function, e.g.
function(int, int) internal returns (int) op = Math.add;
- Supported
gosh
functions:applyBinPatch
/applyBinPatchQ
/applyZipBinPatch
/applyZipBinPatchQ
. - Supported conversion
uint32
to private function, e.g.function(uint, uint) internal pure returns (uint) fun = uint32(123456)
. - Support command line option
--private-function-ids
for printing private function ids. - Support
pragma upgrade func/oldsol;
to upgrade old contracts.
Fixed build sold for Windows and macOS.
Compiler features:
- Supported ABI v2.3.
- Supported try-catch (experimental feature).
- Supported type
variant
.
Typo:
- Rename function
storeZeros
->storeZeroes
.
Compiler features:
- Supported operator
!=
forbytes
. - Added
valueToGas
/gasToValue
withoutwid
. - Supported
tvm.buyGas()
.
Bugfixes:
- Fixed compilation issue with inline arrays in inline arrays.
- Fixed compilation failure caused by such expressions:
<struct>.libFunc
. - Fixed compilation issue with comparison
bytes
and string literals. - Fixed problem with wrong encoding/decoding structures with optional types in arrays.
Compiler features:
- Supported
<string>.toUpperCase()
and<string>.toLowerCase()
. - Supported function overloading for private/internal functions.
Bugfixes:
- Fixed mutability for public functions: it didn't respect function modifiers.
- Fixed compilation issue with inline arrays, e.g.
byte[] barr = [byte('a'), 'A'];
.
Gas optimizations:
- Assorted stack optimizations.
Bugfixes:
- Optimizer: fix bug that caused generating bad code.
Added sold
sources.
Fix problem of using mapping(string => ValueType) map
in loop for ((uint k, ValueType v) : map)
.
Use bytes
instead of TvmCell
in gosh
functions.
Compiler features:
- Supported experimental functions
gosh.diff
,gosh.applyPatch
,gosh.applyPatchQ
,gosh.zip
,gosh.unzip
,gosh.zipDiff
,gosh.applyZipPatch
andgosh.applyZipPatchQ
. - Supported experimental
tx.storageFee
.
Gas optimizations:
- Use opcode
MYCODE
for Solidity functiontvm.code()
. - Assorted stack optimizations.
Solidity compilation driver:
- Added new sold tool which combines Solidity compiler with linker library into a standalone compiler driver able to produce tvc out of sol in one pass.
Compiler features:
- Supported
pragma copyleft <type>, <wallet_address>;
. - Supported explicit conversion from
bytesN
tobytes
. - Supported
<TvmSlice>.decode
forenum
type. - Supported
<TvmSlice>.decodeQ
. - Supported
<map>.keys()
and<map>.values()
.
Bugfixes:
- Fixed problem with fetching
varInt
from mappings that usevarInt
as value. - Fixed problem with control flow in
do{ ...} while(...)
construction.
Breaking changes:
value
,bounce
andflag
options in return statement ofresponsible
function must be explicitly defined.
Gas optimizations:
- Peephole optimizations: use
PUSHPOW2
,PUSHPOW2DEC
,PUSHNEGPOW2
opcodes instead ofPUSHINT
in same cases.
Compiler features:
- Supported
<TvmSlice>.decodeStateVars(...)
. - Added
tvm.initCodeHash
.
Bugfixes:
- Fixed
rawReserve()
mutability to pure. - Fixed issue with explicit conversion in return statement.
Delete warnings about options callbackId
, onErrorId
.
Use pragma ever-solidity
instead of pragma ton-solidity
.
Bugfixes:
- Type checker: fix wrong conversion from
byte1[]
tobytes
.
Bugfixes:
- Optimizer: fix bug that caused generating bad code.
Bugfixes:
- Peephole optimizer: fix bug that caused infinitive loops.
- Type checker: fix bug that caused compilation fail if you define a recursive struct.
Bugfixes:
- Code size optimizer: fix bug that caused compilation error.
- Fix bug that caused compilation error if some arguments of
store[Unsigned|signed]
were not constants.
Assorted peephole stack optimizations.
Bugfixes:
- Code optimizer: fix bug that caused swapping some opcodes.
Compiler features:
- Added
--include-path
option to support import from different folders. - Supported
msg.hasStateInit
.
Bugfix:
- Fixed
<string>.substr()
,bytes[x:y]
that threw an exception if the length is equal to127
,2*127
,3*127
...,startIndex
is equal tostring
/bytes
length and length of substring is equal to zero.
Code size optimization. Assorted peephole stack optimizations.
Bugfix:
- Fixed issue with using recursion in libraries that causes tvm-linker fault.
Compiler features:
- Supported
abi.encode()
/abi.decode()
. - Supported keyword
emptyMap
.
Breaking changes:
- Supported
mapping
's in constructor of structures.
Bugfix:
- Fixed issue with optional type that caused compilation fail.
- Fixed issue with implicit conversion of optional types.
- Fixed issue with optimizer.
Bugfixes:
- Fix issue when it was impossible to import 2 files from each other.
Breaking changes:
- Output AST JSON as pure json without
====
separators or something else. - Deleted option "abiVer" from
tvm.buildExtMsg()
and sending external inbound message for debots.
Compiler features:
- Supported
varInt
/varInt16
/varInt32
andvarUint
/varUint16
/varUint32
types. - Supported
ever
units.
Gas optimizations:
- Assorted stack optimizations.
Compiler features:
- Supported
continue
/break
/return
inside ofrepeat(n) { /*...*/ }
block. - Supported
uintX
in steps of1
:uint1
,uint2
,uint3
...uint256
. - Supported
intX
in steps of1
:int1
,int2
,int3
...int256
. - Supported
tvm.setGasLimit(uint)
. - Supported constant arrays, e.g.
uint[] public constant fib = [uint(2), 3, 5, 8, 12, 20, 32];
.
Breaking changes:
- Changed
stoi()
return type tooptional(int)
. - Output AST JSON to the file instead of standard output.
Gas optimizations:
- Optimized gas consumption of
view
andpure
functions. - Assorted stack optimizations.
Compiler features:
- Supported function identifier instead of uint32 for
callbackId
oronErrorId
in expressionstvm.buildExtMsg(...)
andContractName.funcName().extMsg
. - Supported ABI 2.2.
- Checked if
stateInit
is valid before deploying. - Supported tvm.buildDataInit().
Breaking changes:
- Deleted
tvm.buildEmptyData()
. Usetvm.buildDataInit()
.
Gas optimizations:
- Assorted stack optimizations.
Compiler features:
- Added the option
stateInit
fortvm.buildIntMsg
and\<address\>.transfer()
. - Added function
tvm.stateInitHash()
to calculate stateInit hash based on code and data cells. - Added keyword
null
. - Supported concatenation
string
andbytesN
types.
Breaking changes:
- Deleted
\<TvmSlice\>.bitsAndRefs()
. Please, use\<TvmSlice\>.size()
. - Renamed
\<TvmBuilder\>.bitsAndRefs()
->\<TvmSlice\>.size()
. - Deleted
tvm.deploy()
. Please, use\<address\>.transfer({stateInit: ..., ...})
. - Changed
TvmSlice
,TvmCell
andTvmBuilder
.depth()
method return type fromuint64
touint16
.
Gas optimizations:
- Assorted stack optimizations.
Compiler features:
- Added string search methods:
<string>.find()
and<string>.findLast()
. - Added
<TvmSlice\>.bitsAndRefs()
. - Added
bitSize()
anduBitSize()
for computing bit length of an integer.
Gas optimizations:
- Assorted stack optimizations.
Compiler features:
- Added
tvm.setData()
andtvm.getData()
builtins for accessing raw content ofC4
register. - Added support of
bytes
tobytesN
conversion.
Support ABI 2.1:
- Field
fields
appeared in abi file. You can parse state variable. Seeever-cli decode account --help
. - Supported
string
type in abi.
Bugfixes:
- Fixed an issue when a function can be called but constructor hasn't been called yet.
Breaking changes:
- Syntax of creating and sending of an external inbound message changed from option
{extMsg: true}
to suffix.extMsg
. - Rename
_answer_id
toanswerId
for responsible functions. - Removed syntax
.value()
and.flag()
for remote call customizing.
Compiler features:
- Added support for byte arrays slices ("bytes" type).
- Added serialization to builder and deserialization from slice for "enum" type values.
- Support synchronous calls with
.await
suffix.
Breaking changes:
- Throw exception with code 72 on external message invocations for the functions with modifier
internalMsg
.
Bugfixes:
- Fixed an issue with generating source files in JSON format.
- Fixed conversion of integer to the fixed point type.
Gas optimizations:
- Optimize away, if unused, deployed contract address returned by expression
new Contr{...}(...)
. - Assorted peephole stack optimizations.
Compiler features:
- Support
internalMsg
/externalMsg
specifiers for public and external functions. - Support
msg.isInternal
,msg.isExternal
andmsg.isTickTock
. - Support
storeOnes
andstoreZeroes
forTvmBuilder
.
Breaking changes:
- 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 changes:
- 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 TVM-specific functionality:
- Supported tick and tock transactions. See onTickTock function. Bug fixes.
APIs for common TVM-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 TVM-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 TVM-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