-
Notifications
You must be signed in to change notification settings - Fork 196
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
feat(world-modules): callWithSignature chain id is salt #2648
Conversation
🦋 Changeset detectedLatest commit: b1b9153 The changes in this PR will be included in the next version bump. This PR includes changesets to release 24 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
packages/world-modules/src/modules/delegation/getSignedMessageHash.sol
Outdated
Show resolved
Hide resolved
Co-authored-by: Kevin Ingersoll <[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.
left a comment in Discord but this directory name doesn't make much sense anymore and also kinda confusing alongside modules/std-delegations
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.
I can still see the old file, I think it needs to be manually deleted because we're not yet putting these files under a codegen dir
https://github.com/latticexyz/mud/blob/2720170c211fd1eec2502ff851cd68556afaa1bd/packages/world-modules/src/modules/delegation/tables/CallWithSignatureNonces.sol
As per the EIP712 spec, wallets attempt to switch networks based on the
chainId
field in the domain: https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparatorWe work around this by including the chain ID in the
salt
field instead. As the salt is still present in the message we still avoid replay attacks.