fix(Languages/pt-br/S02_SelectorClash): align executeCrossChainTx arity with readme - #929
Open
euyua9 wants to merge 1 commit into
Open
fix(Languages/pt-br/S02_SelectorClash): align executeCrossChainTx arity with readme#929euyua9 wants to merge 1 commit into
euyua9 wants to merge 1 commit into
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
executeCrossChainTxsignature in the Portuguese S02 SelectorClash lessonabi.encodecall with the README example and canonical selector-collision walkthroughThis keeps the localized Solidity example consistent with its own README and the canonical S02 lesson.
Validation