Skip to content

document the 20-byte address requirement for TRON identifiers - #196

Merged
luiz-lvj merged 1 commit into
mainfrom
docs/tron-address-encoding
Aug 20, 2026
Merged

luiz-lvj merged 1 commit into
mainfrom
docs/tron-address-encoding

Conversation

@luiz-lvj

@luiz-lvj luiz-lvj commented Aug 19, 2026 •

Copy link
Copy Markdown
Collaborator

Document the 20-byte address requirement on TRON

Adds a paragraph to InputSettlerEscrowTron's contract NatSpec stating that addresses carried in OIF identifiers must be the 20-byte TVM account.

The 21-byte 0x41-prefixed form that TRON wallets and explorers display is an off-chain encoding only. Supplied as an identifier it leaves 0x41 above the low 20 bytes, so LibAddress.validatedCleanAddress reverts with HasDirtyBits — a safe failure, but an opaque one for an integrator who doesn't know the two encodings differ.

Summary by CodeRabbit

  • Documentation
    • Clarified that OIF identifiers for TRON must encode the account’s low 20-byte address.
    • Documented removing TRON’s off-chain 0x41 prefix before encoding to prevent validation failures.

@coderabbitai

coderabbitai Bot commented Aug 19, 2026 •

Copy link
Copy Markdown

Review Change Stack

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key: "enabled"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: ec023eee-e4cd-4c25-ae3e-a89dbeda19c9

📥 Commits

Reviewing files that changed from the base of the PR and between 48b1430 and 54f0ab4.

📒 Files selected for processing (1)
  • src/input/escrow/InputSettlerEscrowTron.sol

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The contract documentation now requires TRON’s 0x41-prefixed display address to be converted to its 20-byte account form before OIF identifier encoding.

Changes

TRON address encoding

Layer / File(s) Summary
Document TRON account address encoding
src/input/escrow/InputSettlerEscrowTron.sol
The documentation states that the 0x41 prefix must be removed because it causes LibAddress.validatedCleanAddress to reject the identifier.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to 54f0a

This localized documentation-only change clarifies the required TRON address encoding without changing runtime behavior; no actionable merge-blocking risk remains.

Possibly related PRs

Suggested reviewers: reednaa

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main documentation change for TRON address identifiers.
Description check ✅ Passed The description clearly explains the documentation change, the two address encodings, and the resulting HasDirtyBits failure.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/tron-address-encoding

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Aug 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@luiz-lvj
luiz-lvj requested review from pepebndc and reednaa August 19, 2026 14:43
@luiz-lvj
luiz-lvj merged commit 8e38b9b into main Aug 20, 2026
5 checks passed
@luiz-lvj
luiz-lvj deleted the docs/tron-address-encoding branch August 20, 2026 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants