Remove receive Id tracking from ERC7786Recipient#6346
Remove receive Id tracking from ERC7786Recipient#6346Amxx merged 4 commits intoOpenZeppelin:masterfrom
Conversation
|
The latest updates on your security scan. Learn more about OpenZeppelin Platform.
|
|
WalkthroughThis change removes the internal replay-protection mechanism from the ERC7786Recipient contract that tracked previously processed message IDs using BitMaps storage. The duplicate-message validation logic is eliminated, and a new authorization error is introduced to replace the previous message-already-processed error. The message flow is simplified to directly process messages after gateway authorization, without maintaining state for duplicate receiveId detection. Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@contracts/crosschain/ERC7786Recipient.sol`:
- Around line 24-25: Update the NatSpec comment for the error
ERC7786RecipientUnauthorizedGateway to fix the typo by changing "is the gateway
is not authorized" to "if the gateway is not authorized" so the doc reads:
"Error thrown if the gateway is not authorized to send messages to this contract
on behalf of the sender." Locate the comment immediately above the error
declaration ERC7786RecipientUnauthorizedGateway and replace the incorrect word.
gonzaotc
left a comment
There was a problem hiding this comment.
Would be a good idea to add a recommendation in the ERC-7786 to implement replay-ability protection in gateways?; "A gateway MAY implement replayability protection for unique receiveIds"
Signed-off-by: Hadrien Croubois <hadrien.croubois@gmail.com>
Fixes 5.6 audit M02
Note: The storage layout error is fine since this was never released.
PR Checklist
npx changeset add)