feat: add description field to EIP-712 intent signatures#74
Merged
ScreamingHawk merged 6 commits intomasterfrom Nov 26, 2025
Merged
feat: add description field to EIP-712 intent signatures#74ScreamingHawk merged 6 commits intomasterfrom
ScreamingHawk merged 6 commits intomasterfrom
Conversation
- Add `description` field to TRAILS_INTENT_TYPEHASH for human-readable intent descriptions - Update depositToIntentWithPermit and depositToIntent to accept description parameter - Refactor signature parameters to use Signature struct to reduce stack depth - Include description hash in intent hash calculation via assembly optimization - Update assembly block size from 0x140 to 0x160 bytes to accommodate description hash This allows clients to include human-readable descriptions (e.g., "Transfer 5 USDC") in intent signatures, improving UX and transaction clarity.
…t parameter - Modified TRAILS_INTENT_TYPEHASH to place the `description` field at the beginning of the parameter list for better clarity. - Adjusted the intent hash calculation in the assembly block to reflect the new parameter order. - Updated the interface version in ITrailsIntentEntrypoint.sol to 0.8.30 for compatibility. - Ensured all related tests are updated to accommodate the changes in parameter ordering. This change enhances the structure of the intent signature, improving readability and maintainability.
Contributor
While we are changing the signature format, let's consider using EIP-2098 to reduce call data size further. |
ScreamingHawk
previously approved these changes
Nov 25, 2025
Contributor
ScreamingHawk
left a comment
There was a problem hiding this comment.
LGTM! Happy to push the signature encoding changes another time.
pkieltyka
previously approved these changes
Nov 26, 2025
cd08dca
pkieltyka
approved these changes
Nov 26, 2025
shunkakinoki
added a commit
that referenced
this pull request
Nov 26, 2025
This reverts commit 37b4984.
pkieltyka
pushed a commit
that referenced
this pull request
Nov 26, 2025
…" (#79) * Revert "feat: add description field to EIP-712 intent signatures (#74)" This reverts commit 37b4984. * Refactor TrailsIntentEntrypoint to improve permit handling and update test cases - Updated permit handling in TrailsIntentEntrypoint to enhance clarity and maintainability, adjusting the try-catch structure. - Removed the description parameter from the _verifyAndMarkIntent function call to streamline the code. - Updated test cases to reflect changes in signature parameters, ensuring consistency and accuracy in intent hash calculations. - Adjusted gas snapshots for TrailsIntentEntrypoint tests to align with recent performance optimizations. * Refactor permit handling in TrailsIntentEntrypoint for improved clarity - Simplified the try-catch structure in the permit execution to enhance readability and maintainability. - Removed unnecessary line breaks to streamline the code flow.
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.
descriptionfield to TRAILS_INTENT_TYPEHASH for human-readable intent descriptionsThis allows clients to include human-readable descriptions (e.g., "Transfer 5 USDC") in intent signatures, improving UX and transaction clarity.
Related