Updated EIP712 filtering signature specs to start with a magic number

Making it impossible for a signature of one type to be valid as another
This commit is contained in:
Alexandre Paillier
2022-08-17 10:45:43 +02:00
parent 3ee1fa419a
commit 9e4df4b655
4 changed files with 23 additions and 2 deletions

View File

@@ -246,6 +246,7 @@ def send_filtering_contract_name(display_name: str):
global sig_ctx
msg = bytearray()
msg.append(183)
msg += sig_ctx["chainid"]
msg += sig_ctx["caddr"]
msg += sig_ctx["schema_hash"]
@@ -262,6 +263,7 @@ def send_filtering_field_name(display_name):
path_str = ".".join(current_path)
msg = bytearray()
msg.append(72)
msg += sig_ctx["chainid"]
msg += sig_ctx["caddr"]
msg += sig_ctx["schema_hash"]