-
Notifications
You must be signed in to change notification settings - Fork 12.3k
docs: clarify 20-byte calldata minimum requirement in ERC2771Context #6037
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: clarify 20-byte calldata minimum requirement in ERC2771Context #6037
Conversation
|
WalkthroughThe pull request adds a NOTE to the docblock of the ERC2771Context contract. This NOTE documents that ERC-2771 forwarded calls require calldata of at least 20 bytes. The note explains that if calldata from a trusted forwarder is shorter than this requirement, the _msgSender() function will return the forwarder address instead of extracting the original signer. The documentation also addresses potential fallback behavior and calldata length assumptions. No code logic or public API changes are introduced. Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
🔇 Additional comments (1)
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 |
Co-authored-by: Ernesto García <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
Add documentation note explaining that forwarded calls require at least 20 bytes of calldata for proper ERC-2771 meta-transaction processing.
Calls with shorter calldata will fall back to returning the forwarder address instead of extracting the original signer.