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

Add salt to the EIP-712 domain type #176

Merged
merged 1 commit into from
Aug 16, 2021
Merged

Conversation

Gudahtt
Copy link
Member

@Gudahtt Gudahtt commented Aug 12, 2021

The type for the domain property of an EIP-712 typed message has been updated to include salt, which is in the EIP-712 specification.

The tests have been updated to include this property.

This is an optional property, so this is a non-breaking change.

@Gudahtt
Copy link
Member Author

Gudahtt commented Aug 12, 2021

This depends upon #173

@Gudahtt Gudahtt force-pushed the add-eip-712-hash-tests branch 2 times, most recently from b9402a2 to 030b96b Compare August 16, 2021 19:24
Base automatically changed from add-eip-712-hash-tests to main August 16, 2021 20:06
The type for the `domain` property of an EIP-712 typed message has been
updated to include `salt`, which is in the EIP-712 specification [1].

The tests have been updated to include this property.

This is an optional property, so this is a non-breaking change.

[1]: https://eips.ethereum.org/EIPS/eip-712#definition-of-encodedata
@Gudahtt Gudahtt marked this pull request as ready for review August 16, 2021 20:06
@Gudahtt Gudahtt requested a review from a team as a code owner August 16, 2021 20:06
@@ -47,6 +47,7 @@ export interface TypedMessage<T extends MessageTypes> {
version?: string;
chainId?: number;
verifyingContract?: string;
salt?: ArrayBuffer;
Copy link
Member Author

Choose a reason for hiding this comment

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

I chose ArrayBuffer for the expected type because it seemed like the most reasonable way to communicate raw bytes, since it's the underlying data structure for typed arrays. This is the only cross-platform way to represent bytes I think 🤔.

Copy link
Member

@rekmarks rekmarks left a comment

Choose a reason for hiding this comment

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

LGTM!

@Gudahtt Gudahtt merged commit 574e06e into main Aug 16, 2021
@Gudahtt Gudahtt deleted the add-eip-712-domain-salt branch August 16, 2021 21:37
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