Skip to content
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): string systemId in callWithSignature typehash #2700

Merged
merged 5 commits into from
Apr 23, 2024

Conversation

yonadaa
Copy link
Contributor

@yonadaa yonadaa commented Apr 21, 2024

Making signatures more legible with a string systemId
image

Copy link

changeset-bot bot commented Apr 21, 2024

🦋 Changeset detected

Latest commit: dfe0a7b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 24 packages
Name Type
@latticexyz/world-modules Patch
@latticexyz/world Patch
@latticexyz/cli Patch
@latticexyz/dev-tools Patch
@latticexyz/store-sync Patch
mock-game-contracts Patch
@latticexyz/store-indexer Patch
@latticexyz/abi-ts Patch
@latticexyz/block-logs-stream Patch
@latticexyz/common Patch
@latticexyz/config Patch
create-mud Patch
@latticexyz/faucet Patch
@latticexyz/gas-report Patch
@latticexyz/protocol-parser Patch
@latticexyz/query Patch
@latticexyz/react Patch
@latticexyz/recs Patch
@latticexyz/schema-type Patch
@latticexyz/services Patch
solhint-config-mud Patch
solhint-plugin-mud Patch
@latticexyz/store Patch
@latticexyz/utils Patch

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

@@ -34,7 +37,9 @@ function getSignedMessageHash(
abi.encodePacked(
"\x19\x01",
domainSeperator,
keccak256(abi.encode(CALL_TYPEHASH, signer, systemId, keccak256(callData), nonce))
keccak256(
abi.encode(CALL_TYPEHASH, signer, keccak256(abi.encode(systemId.toString())), keccak256(callData), nonce)
Copy link
Member

@holic holic Apr 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we want to do a straight cast of systemId here, not systemId.toString, as toString is more meant as the human-readable version for logging/debugging (e.g. sy:<root>:Register)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I didn't think about that! thanks

@yonadaa yonadaa marked this pull request as ready for review April 22, 2024 11:13
@yonadaa yonadaa requested a review from alvrs as a code owner April 22, 2024 11:13
@yonadaa yonadaa changed the title feat(world-modules): string systemId in callWithSignature typehash feat(world-modules): string systemId in callWithSignature typehash Apr 22, 2024
holic
holic previously approved these changes Apr 22, 2024
@holic
Copy link
Member

holic commented Apr 22, 2024

changeset?

@yonadaa yonadaa merged commit 2c9b16c into main Apr 23, 2024
11 of 12 checks passed
@yonadaa yonadaa deleted the yonadaaa/call-with-sig-system-string branch April 23, 2024 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants