Skip to content

fix(Languages/pt-br/S02_SelectorClash): align executeCrossChainTx arity with readme - #929

Open
euyua9 wants to merge 1 commit into
AmazingAng:mainfrom
euyua9:fix/ptbr-s02-selectorclash-execute-arity
Open

fix(Languages/pt-br/S02_SelectorClash): align executeCrossChainTx arity with readme#929
euyua9 wants to merge 1 commit into
AmazingAng:mainfrom
euyua9:fix/ptbr-s02-selectorclash-execute-arity

Conversation

@euyua9

@euyua9 euyua9 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • restore the four-argument executeCrossChainTx signature in the Portuguese S02 SelectorClash lesson
  • align the abi.encode call with the README example and canonical selector-collision walkthrough

This keeps the localized Solidity example consistent with its own README and the canonical S02 lesson.

Validation

  • selector arithmetic and ABI shape checks: 5/5 passed
  • Portuguese source matches the canonical function site and same-directory README example
  • Forge was unavailable locally; verification used deterministic Python/Keccak checks.

…ty with readme

The pt-br SelectorClash.sol previously declared executeCrossChainTx with
only (bytes _method, bytes _bytes), while the readme example and the
selector-collision math rely on the 4-argument form
(bytes _method, bytes _bytes, bytes _bytes1, uint64 _num) and encode
abi.encode(_bytes, _bytes1, _num). Restore the 4-arg signature and the
matching abi.encode call so the contract matches its own readme example
and the canonical selector string "(bytes,bytes,uint64)" used in the
keccak call.

Verification (verify_crosschain_selector.py):
  - keccak256("f1121318093(bytes,bytes,uint64)")[:4] == 0x41973cd9
  - selector of "putCurEpochConPubKeyBytes(bytes)" is reproducible
  - abi.encode(empty bytes, empty bytes, uint64) == 128 bytes (4 words)
  - pt-br .sol now byte-equal to canonical at executeCrossChainTx
  - pt-br .sol matches pt-br readme.md example byte-for-byte
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.

1 participant