Skip to content

0.8.6_Bacon_v4.3

Compare
Choose a tag to compare
@Lredhdx Lredhdx released this 10 Aug 08:17

TRON Solidity_v0.8.6 is fully compatible with Ethereum Solidity_v0.8.6.
In addition, this release supports two new instructions and six precompile contracts introduced in TIP-271.
Please see the usage-example to use.

Requirement

  • Developers can only use these new instructions and precompile contracts after proposal TIP-271 has been approved in TRON mainnet.

New Features from TRON

  • Add VOTEWITNESS instruction: Smart contract can vote for witness and get reward from the system.
  • Add WITHDRAWREWARD instruction: Smart contract can withdraw allowance and reward to it's balance.
  • Add RewardBalance precompile contract: Smart contract can query it's own allowance and reward.
  • Add IsSrCandidate precompile contract: Smart contract can judge whether the address is a candidate address.
  • Add VoteCount precompile contract: Smart contract can query the vote count of from address votes for to address.
  • Add UsedVoteCount precompile contract: Smart contract can query account's used vote count.
  • Add ReceivedVoteCount precompile contract: Smart contract can query account's recevied vote count.
  • Add TotalVoteCount precompile contract: Smart contract can query account's total vote count.

New Features from Ethereum Solidity 0.8.6

  • Possibility to use catch Panic(uint code) to catch a panic failure from an external call.
  • Code Generator: Reduce the cost of <address>.code.length by using extcodesize directly.
  • Allowing conversion from bytes and bytes slices to bytes1...bytes32.

Important Bugfixes

  • Optimizer: Fix bug on incorrect caching of Keccak-256 hashes.
  • ABI Decoder V2: For two-dimensional arrays and specially crafted data in memory, the result of abi.decode can depend on data elsewhere in memory. Calldata decoding is not affected.

Build System

  • Update the soljson.js build to emscripten 2.0.12 and boost 1.75.0.