Repository navigation
document the 20-byte address requirement for TRON identifiers - #196
Conversation
|
Note
|
| 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
- openintentsframework/oif-contracts#186: Introduces the
InputSettlerEscrowTroncontract documented by this change.
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.
Comment @coderabbitai help to get the list of available commands.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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 leaves0x41above the low 20 bytes, soLibAddress.validatedCleanAddressreverts withHasDirtyBits— a safe failure, but an opaque one for an integrator who doesn't know the two encodings differ.Summary by CodeRabbit
0x41prefix before encoding to prevent validation failures.