Skip to content

Commit

Permalink
Never mind, this looks correct
Browse files Browse the repository at this point in the history
  • Loading branch information
Pandapip1 authored Feb 22, 2023
1 parent 92b0d2b commit 75be219
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions EIPS/eip-712.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ Here we outline a scheme to encode data along with its structure which allows it
## Specification

The set of signable messages is extended from transactions and bytestrings `𝕋 βˆͺ 𝔹⁸ⁿ` to also include structured data `π•Š`. The new set of signable messages is thus `𝕋 βˆͺ 𝔹⁸ⁿ βˆͺ π•Š`. They are encoded to bytestrings suitable for hashing and signing as follows:
=* `encode(transaction : 𝕋) = RLP_encode(transaction)`
* `encode(message : 𝔹⁸ⁿ) = ""\x19\x01" β€– domainSeparator β€– hashStruct(message)`
* `encode(transaction : 𝕋) = RLP_encode(transaction)`
* `encode(message : 𝔹⁸ⁿ) = "\x19Ethereum Signed Message:\n" β€– len(message) β€– message` where `len(message)` is the _non-zero-padded_ ascii-decimal encoding of the number of bytes in `message`.
* `encode(domainSeparator : 𝔹²⁡⁢, message : π•Š) = "\x19\x01" β€– domainSeparator β€– hashStruct(message)` where `domainSeparator` and `hashStruct(message)` are defined below.

This encoding is deterministic because the individual components are. The encoding is injective because the three cases always differ in first byte. (`RLP_encode(transaction)` does not start with `\x19`.)
Expand Down

0 comments on commit 75be219

Please sign in to comment.