Skip to content

Releases: tronprotocol/solidity

0.7.0_Plato_v4.2

03 Jun 02:55
Compare
Choose a tag to compare

TRON Solidity compiler 0.7.0 is fully compatible with Ethereum Solidity 0.7.0.

Breaking Changes

  • Inline Assembly: Disallow . in user-defined function and variable names.
  • Inline Assembly: Slot and offset of storage pointer variable x are accessed via x.slot and x.offset instead of x_slot and x_offset.
  • Parser: Disallow dot syntax for value and gas.
  • Parser: Remove the identifier now (replaced by block.timestamp).
  • Reference Resolver: using A for B only affects the contract it is mentioned in and not all derived contracts.
  • Type Checker: Disallow virtual for library functions.
  • Type Checker: Disallow assignments to state variables that contain nested mappings.
  • Type checker: Disallow events with same name and parameter types in inheritance hierarchy.
  • Type Checker: Disallow shifts by signed types.
  • Type Checker: Disallow structs and arrays in memory or calldata if they contain nested mappings.
  • Type Checker: Exponentiation and shifts of literals by non-literals will always use uint256 or int256 as a type.

New Features

  • Inheritance: Allow overrides to have stricter state mutability: view can override nonpayable and pure can override view.
  • Parser: Deprecate visibility for constructors.
  • State mutability: Do not issue recommendation for stricter mutability for virtual functions but do issue it for functions that override.

Compiler Feature

  • Variable declarations using the var keyword are not recognized anymore.

Bugfixes

  • Inheritance: Disallow public state variables overwriting pure functions.
  • State Mutability: Constant public state variables are considered pure functions.
  • Type Checker: Fixing deduction issues on function types when function call has named arguments.

0.6.12_Plato_v4.2

27 May 08:32
Compare
Choose a tag to compare

TRON Solidity compiler 0.6.12 is fully compatible with Ethereum Solidity 0.6.12.
Note the binary size of the solc-js increase because of the Z3 SMT solver built-in.

New Feature

  • Permit calldata location for all variables.

Important Bugfix

  • Fixed a bug related to internal library functions with calldata parameters called via using for.

Compiler Features

  • Build system: Update the soljson.js build to emscripten 1.39.15 and boost 1.73.0 and include Z3 for integrated SMTChecker support without the callback mechanism.
  • Build system: Switch the emscripten build from the fastcomp backend to the upstream backend.

Bugfixes

  • Type Checker: Disallow constructor parameters with calldata data location.
  • Type Checker: Do not disallow assigning to calldata variables.
  • Type Checker: Fix internal error related to using for applied to non-libraries.
  • Type Checker: Fix overload resolution in combination with {value: ...}.
  • Type Checker: Disallow assignments to storage variables of type mapping.
  • Type Checker: Disallow usage of override with non-public state variables.
  • Type Checker: Fix wrong compiler error when referencing an overridden function without calling it.

0.6.8_Plato_v4.2

17 May 10:23
f8ac115
Compare
Choose a tag to compare

TRON Solidity compiler 0.6.8 is fully compatible with Ethereum Solidity 0.6.8.

New Features

  • Implemented type(T).min and type(T).max for every integer type T that returns the smallest and largest value representable by the type.
  • Allow using abi encoding functions for calldata array slices without explicit casts.
  • Add support for TIP 165 interface identifiers with type(I).interfaceId.
  • Allow virtual modifiers inside abstract contracts to have empty body.
  • Allow local storage variables to be declared without initialization, as long as they are assigned before they are accessed.
  • State variables can be marked immutable which causes them to be read-only, but assignable in the constructor. The value will be stored directly in the code.
  • Deprecated value(...) and gas(...) in favor of {value: ...} and {gas: ...}
  • Inline Assembly: Allow assigning to _slot of local storage variable pointers.

Important Bugfixes

  • Add missing callvalue check to the creation code of a contract that does not define a constructor but has a base that does define a constructor.
  • Disallow array slices of arrays with dynamically encoded base types.
  • String literals containing backslash characters can no longer cause incorrect code to be generated when passed directly to function calls or encoding functions when ABIEncoderV2 is active.
  • Fix tuple assignments with components occupying multiple stack slots and different stack size on left- and right-hand-side.
  • Restrict the length of dynamic memory arrays to 64 bits during creation at runtime fixing a possible overflow.

Bugfix

  • Type Checker: Disallow accessing runtimeCode for contract types that contain immutable state variables.

0.6.2_Plato_v4.2

06 May 03:38
e3d402b
Compare
Choose a tag to compare

TRON Solidity compiler 0.6.2 already supports Ethereum Solidity 0.6.2.
This release supports three new instructions introduced in TIP-157.

Requirements

  • Developers can only use these new instructions after proposal TIP-157 has been approved in TRON mainnet.
  • Developers can use other feature before proposal TIP-157 has been approved in TRON mainnet.

New Features

  • Add FREEZE instruction: Smart contract can freeze balance to get resources or delegate resources for others.
  • Add UNFREEZE instruction: Smart contract can unfreeze balance.
  • Add FREEZEEXPIRETIME instruction: Smart contract can get freeze expire time, return in seconds.
  • Allow accessing external functions via contract and interface names to obtain their selector.
  • Allow interfaces to inherit from other interfaces.
  • Allow gas and value to be set in external function calls using c.f{gas: 10000, value: 4 trx}().
  • Allow specifying the salt for contract creations and thus the create2 opcode using new C{salt: 0x1234, value: 1 trx}(arg1, arg2).
  • Inline Assembly: Support literals true and false.

Important Bugfixes

  • Commandline interface: Only activate yul optimizer if --optimize is given.
  • Fixes internal compiler error on explicitly calling unimplemented base functions.

Build System

  • Switch to building soljson.js with an embedded base64-encoded wasm binary.

0.5.17_Plato_v4.2

27 Apr 03:51
44338cd
Compare
Choose a tag to compare

TRON Solidity compiler 0.5.17 already supports Ethereum Solidity 0.5.17, which fixes a bug that a private function can be overridden in a derived contract by a private function of the same name and types.

This release also supports three new instructions introduced in TIP-157. These instructions will be supported in >=0.6.2.

Requirements

  • Developers can only use these new instructions after proposal TIP-157 has been approved in TRON mainnet.
  • Developers can use other feature before proposal TIP-157 has been approved in TRON mainnet.

New Features

  • Add FREEZE instruction: Smart contract can freeze balance to get resources or delegate resources for others.
  • Add UNFREEZE instruction: Smart contract can unfreeze balance.
  • Add FREEZEEXPIRETIME instruction: Smart contract can get freeze expire time, return in seconds.

Important Bugfix

  • Type Checker: Disallow overriding of private functions.

0.5.16_GreatVoyage_v4.1.2

08 Mar 06:22
Compare
Choose a tag to compare

New Feature

  • Update to version 0.5.16 TIP-241.

Important Bugfix

  • Yul Optimizer: Fix bug in redundant assignment remover in combination with break and continue statements.

0.6.0_GreatVoyage_v4.1.2

19 Jan 15:10
5d5a877
Compare
Choose a tag to compare

New Features

  • Update to version 0.6.0 in TVM TIP-209.
  • New reserved keywords: virtual, override and receive.
  • Introduce virtual and override keywords and private cannot be used together with virtual.
  • Abstract contracts need to be marked explicitly as abstract by using the abstract keyword.
  • Split unnamed fallback functions into two cases defined using fallback() and receive().
  • Introduce try/catch-statement (revert and require can be caught now, others will be supported soon).
  • Introduce push() for dynamic storage arrays. It returns a reference to the newly allocated element, if applicable.
  • Allow explicit conversions from address to address payable via payable(...).
  • Disallow explicit conversions from external function types to address and add a member called address to them as replacement.

Changes

  • ABI: Remove the deprecated constant and payable fields.
  • ABI: The type field is now required and no longer specified to default to function.
  • Modify push(element) for dynamic storage arrays such that it does not return the new length anymore.
  • length member of arrays is now always read-only, even for storage arrays.
  • Enable Yul optimizer as part of standard optimization.

Compiler Features:

  • Allow revert strings to be stripped from the binary using the --revert-strings option or the settings.debug.revertStrings setting.
  • Do not warn about enabled ABIEncoderV2 anymore (the pragma is still needed, though).

0.5.15_GreatVoyage_v4.1

14 Dec 07:23
ed412d1
Compare
Choose a tag to compare

New Feature

  • Update to version 0.5.15.

Important Bugfix

  • Yul Optimizer: Fix incorrect redundant load optimization crossing user-defined functions that contain for-loops with memory / storage writes.

0.5.14_GreatVoyage_v4.1

23 Nov 04:27
5ce5daf
Compare
Choose a tag to compare

New Features

  • Update to version 0.5.14.
  • Set the default TVM version to "Istanbul".
  • Allow to obtain the selector of public or external library functions via a member .selector.
  • Parser: Allow splitting string and hexadecimal string literals into multiple parts.
  • Inline Assembly: Support constants that reference other constants.

Important Bugfix

  • Version Checker: ^0 should match 0.5.14+, but no prerelease.

0.5.13_GreatVoyage_v4.1

16 Nov 12:10
9a0da31
Compare
Choose a tag to compare

New Features

  • Update to version 0.5.13
  • Provides Istanbul-TVM compatibility.
  • Add CHAINID instruction in TVM TIP-174
  • Add SELFBALANCE instruction in TVM TIP-175
  • Code Generator: Use SELFBALANCE opcode for balance of current address if using Istanbul TVM.
  • Allow to obtain the address of a linked library with address(LibraryName).

Important Bugfix

  • Code Generator: Fixed a faulty assert that would wrongly trigger for array sizes exceeding unsigned integer.