Skip to content

fix: clean token IDs and decode wrapped TRON addresses - #158

Merged
CodeNinjaEvan merged 1 commit into
tronprotocol:release_0.8.33from
yanghang8612:fix-tron-token-address-cleanup-0833
Nov 12, 2026
Merged

CodeNinjaEvan merged 1 commit into
tronprotocol:release_0.8.33from
yanghang8612:fix-tron-token-address-cleanup-0833

Conversation

@yanghang8612

Copy link
Copy Markdown

Legacy transferToken(amount, uint24(x)) could consume dirty upper bits instead of the narrowed token ID. Convert the second argument to its declared trcToken type before the existing range checks.

User-defined address types now reuse the underlying TRON address decoder and validator in both backends, including calldata array reads. This preserves historical 21-byte input compatibility and cleans decoded scalar addresses to 160 bits.

Regression coverage includes constant and runtime token IDs with optimization on/off; standard, prefixed and oversized address inputs; payable address wrappers; memory decoding and calldata/memory arrays; and invalid integer, boolean and fixed-bytes inputs. The new regressions were confirmed to fail before the fix.

Validation:

  • Built solc and soltest.
  • StandardCompiler: 66 tests and 1,995 assertions passed.
  • User-defined value type syntax suite: 37 tests passed.
  • New address ABI semantic test passed with optimization on/off, covering legacy and via-IR using the generic EVMC host (London).
  • git diff --check passed.

Related: JT-892, JT-893, JT-894.

@github-actions

Copy link
Copy Markdown

Thank you for your contribution to the Solidity compiler! A team member will follow up shortly.

If you haven't read our contributing guidelines and our review checklist before, please do it now, this makes the reviewing process and accepting your contribution smoother.

If you have any questions or need our help, feel free to post them in the PR or talk to us directly on the #solidity-dev channel on Matrix.

@CodeNinjaEvan
CodeNinjaEvan merged commit 4f63609 into tronprotocol:release_0.8.33 Nov 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants