-
Notifications
You must be signed in to change notification settings - Fork 29
fix(permits): support salt for eip712 #1056
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
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
I have read the CLA Document and I hereby sign the CLA |
WalkthroughThe changes introduce an optional Changes
Sequence Diagram(s)sequenceDiagram
participant CLI
participant fetchPermitInfoByChain
participant fetchPermitInfo
participant TokenList
CLI->>fetchPermitInfoByChain: Call with chainId, recheck, output, token
fetchPermitInfoByChain->>fetchPermitInfo: Pass options (including token)
fetchPermitInfo->>TokenList: Load tokens
alt token specified
fetchPermitInfo->>TokenList: Filter tokens by address
alt token found
fetchPermitInfo->>fetchPermitInfo: Fetch permit info for filtered token
else token not found
fetchPermitInfo->>fetchPermitInfo: Log and return early
end
else no token specified
fetchPermitInfo->>fetchPermitInfo: Fetch permit info for all tokens
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested reviewers
Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
🔇 Additional comments (7)
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
As mentioned on cowprotocol/cowswap#6086 (comment), let's update DAI on Polygon too
token-lists/src/public/PermitInfo.137.json
Lines 2219 to 2221 in 73a0f03
| "0x8f3cf7ad23cd3cadbd9735aff958023239c6a063": { | |
| "type": "unsupported", | |
| "name": "(PoS) Dai Stablecoin" |
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.
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 for checking, never mind that one for now.

Summary
Fixes #6082
This token contract accepts salt for eip712 domain structure instead of chainId

permit-utils lib that we use supports this type of permits, I've just added the flag to add this check for this token:
https://github.com/1inch/permit-signed-approvals-utils/blob/fde3bc38d6179f4d3ab9fac8b1b5f9834521eace/src/eip-2612-permit.const.ts#L31
Also I added an ability to check only specific token address by adding new parameter in cli
Summary by CodeRabbit