Conversation
…in 29_Selector_es The Selector.sol example for the Spanish tutorial wrapped the address parameter in double quotes, making it a string literal. The mint function expects an address, so the example would not match the expected selector layout. Pass the 0x2c44... literal as an address (no quotes) so the sample matches the mint(address) signature and is directly compilable.
There was a problem hiding this comment.
🟡 Changes recommended
The Spanish tutorial README still contains the incorrect string-literal example, so the tutorial remains inconsistent and copy/paste instructions are still wrong.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Fixes the Spanish Selector tutorial’s calldata encoding example so abi.encodeWithSelector receives an address-typed argument (rather than a string literal), aligning the encoded payload with the mint(address) signature.
Changes:
- Replace the quoted
"0x..."string argument with an address hex literal inSelector.solfor themint(address)selector example.
File summaries
| File | Description |
|---|---|
| Languages/es/29_Selector_es/Selector.sol | Fixes the tutorial’s abi.encodeWithSelector example to pass an address literal for correct mint(address) calldata encoding. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
24
to
28
| (bool success, bytes memory data) = address(this).call( | ||
| abi.encodeWithSelector( | ||
| 0x6a627842, | ||
| "0x2c44b726ADF1963cA47Af88B284C06f30380fC78" | ||
| 0x2c44b726ADF1963cA47Af88B284C06f30380fC78 | ||
| ) |
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.
The Spanish tutorial sample
Languages/es/29_Selector_es/Selector.solpasses the address argument toabi.encodeWithSelectorwrapped in double quotes, turning it into a string literal. Because the target selector ismint(address), the example does not match the expected selector layout when compiled.This change removes the quotes so the parameter is passed as an
addressliteral, matching themint(address)signature and the call output shown in the README (0x6a6278420000000000000000000000002c44...).The same bug exists in the English counterpart
Languages/en/29_Selector_en/Selector.sol; this PR intentionally fixes only the Spanish file per the task scope.