From 341b7c2adf33e039d623610af7cfae1be86fcfaa Mon Sep 17 00:00:00 2001 From: Alexandre Paillier Date: Tue, 2 Aug 2022 16:30:10 +0200 Subject: [PATCH] Modified all the nominal eip712 test input files --- .../input_files/00-simple_mail-test.json | 4 +- .../01-addresses_array_mail-test.json | 4 +- .../02-recipients_array_mail-test.json | 4 +- .../input_files/03-long_string-test.json | 6 +- .../input_files/04-long_bytes-test.json | 6 +- .../input_files/05-signed_ints-test.json | 4 +- .../eip712/input_files/06-boolean-test.json | 4 +- .../input_files/07-fixed_bytes-test.json | 16 +++- .../10-multidimensional_arrays-test.json | 86 ++++--------------- .../input_files/11-complex_structs-test.json | 4 +- 10 files changed, 48 insertions(+), 90 deletions(-) diff --git a/tests/ragger/eip712/input_files/00-simple_mail-test.json b/tests/ragger/eip712/input_files/00-simple_mail-test.json index ef5ce4e..0b4fa66 100644 --- a/tests/ragger/eip712/input_files/00-simple_mail-test.json +++ b/tests/ragger/eip712/input_files/00-simple_mail-test.json @@ -1,7 +1,7 @@ { "domain": { - "chainId": 5, - "name": "Ether Mail", + "chainId": 1, + "name": "Simple Mail", "verifyingContract": "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC", "version": "1" }, diff --git a/tests/ragger/eip712/input_files/01-addresses_array_mail-test.json b/tests/ragger/eip712/input_files/01-addresses_array_mail-test.json index e17e626..cc54d8c 100644 --- a/tests/ragger/eip712/input_files/01-addresses_array_mail-test.json +++ b/tests/ragger/eip712/input_files/01-addresses_array_mail-test.json @@ -1,7 +1,7 @@ { "domain": { - "chainId": 1337, - "name": "Ether Mail", + "chainId": 1, + "name": "Addresses Array Mail", "verifyingContract": "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC", "version": "1" }, diff --git a/tests/ragger/eip712/input_files/02-recipients_array_mail-test.json b/tests/ragger/eip712/input_files/02-recipients_array_mail-test.json index 51e8fef..1d27ff0 100644 --- a/tests/ragger/eip712/input_files/02-recipients_array_mail-test.json +++ b/tests/ragger/eip712/input_files/02-recipients_array_mail-test.json @@ -1,7 +1,7 @@ { "domain": { - "chainId": 5, - "name": "Ether Mail", + "chainId": 1, + "name": "Recipients Array Mail", "verifyingContract": "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC", "version": "1" }, diff --git a/tests/ragger/eip712/input_files/03-long_string-test.json b/tests/ragger/eip712/input_files/03-long_string-test.json index 03ee734..d286934 100644 --- a/tests/ragger/eip712/input_files/03-long_string-test.json +++ b/tests/ragger/eip712/input_files/03-long_string-test.json @@ -1,12 +1,12 @@ { "domain": { - "chainId": 5, - "name": "Ether Mail", + "chainId": 1, + "name": "Long String Mail", "verifyingContract": "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC", "version": "1" }, "message": { - "contents": "Hello, Bob! 012345678012345678012345678012345678012345678012345678012345678012345678012345678012345678012345678012345678012345678012345678012345678012345678012345678012345678012345678012345678012345678012345678012345678012345678012345678012345678012345678012312345678012345678012345678012345678012312345678012345678012345678012345678012312345678012345678012345678012345678012312345678012345678012345678012345678012312345678012345678012345678012345678012312345678012345678012345678012345678012312345678012345678012345678012345678012312345678012345678012345678012345678012312345678012345678012345678012345678012312345678012345678012345678012345678012312345678012345678012345678012345678012312345678012345678012345678012345678012312345678012345678012345678012345678012312345678012345678012345678012345678012312345678012345678012345678012345678012312345678012345678012345678012345678012312345678012345678012345678012345678012312345678012345678012345678012345678012312345678012345678012345678012345678012344444444444444444444123456780123456780123456780123456780123456780123456780123456789999999999999999999999999999990123456789", + "contents": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam fermentum interdum tortor, nec elementum enim dignissim ac. Proin at leo sit amet nisl ultrices mollis quis a nunc. Aliquam lobortis a libero non lobortis. Morbi elementum eleifend ante et malesuada. Proin eget fermentum risus. Vestibulum cursus dignissim mollis. In viverra, mi ac accumsan elementum, tellus metus dictum nisi, vel tincidunt odio erat in odio. Aenean nec lorem auctor, tempor ante eget, aliquet purus. Donec fringilla felis iaculis, venenatis ligula egestas, dignissim orci. Aliquam id rhoncus ante, cursus consectetur mauris. Nunc porttitor urna urna, et tristique eros maximus vestibulum. Curabitur pretium a est non porttitor. Cras mollis efficitur sem ut porta. Proin commodo volutpat iaculis. Maecenas ut nulla mi. Aenean ultrices sollicitudin enim, non luctus magna efficitur et. Sed varius sem odio, in sodales erat porta in. Nunc blandit finibus maximus. Mauris nunc tellus, interdum non laoreet sed, aliquet non.", "from": { "name": "Cow", "wallets": [ diff --git a/tests/ragger/eip712/input_files/04-long_bytes-test.json b/tests/ragger/eip712/input_files/04-long_bytes-test.json index c7dc888..5bcfe55 100644 --- a/tests/ragger/eip712/input_files/04-long_bytes-test.json +++ b/tests/ragger/eip712/input_files/04-long_bytes-test.json @@ -1,12 +1,12 @@ { "domain": { - "chainId": 5, - "name": "Ether Mail", + "chainId": 1, + "name": "Long Bytes Mail", "verifyingContract": "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC", "version": "1" }, "message": { - "contents": "0x1123456789123456789123453678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678912345678991234567892345678991234567892345678991234567892345678991234567892345678991234567892345678912345678923456789", + "contents": "0x11223344556677889900112233445566778899001122334455667788990011223344556677889900112233445566778899001122334455667788990011223344556677889900112233445566778899001122334455667788990011223344556677889900112233445566778899001122334455667788990011223344556677889900112233445566778899001122334455667788990011223344556677889900112233445566778899001122334455667788990011223344556677889900112233445566778899001122334455667788990011223344556677889900112233445566778899001122334455667788990011223344556677889900112233445566778899001122334455667788990011223344556677889900112233445566778899001122334455667788990011223344556677889900112233445566778899001122334455667788990011223344556677889900112233445566778899001122334455667788990011223344556677889900112233445566778899001122334455667788990011223344556677889900", "from": { "name": "Cow", "wallets": [ diff --git a/tests/ragger/eip712/input_files/05-signed_ints-test.json b/tests/ragger/eip712/input_files/05-signed_ints-test.json index 8a94649..a6279d6 100644 --- a/tests/ragger/eip712/input_files/05-signed_ints-test.json +++ b/tests/ragger/eip712/input_files/05-signed_ints-test.json @@ -1,7 +1,7 @@ { "domain": { - "chainId": 5, - "name": "Ether Mail", + "chainId": 1, + "name": "Signed Ints test", "verifyingContract": "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC", "version": "1" }, diff --git a/tests/ragger/eip712/input_files/06-boolean-test.json b/tests/ragger/eip712/input_files/06-boolean-test.json index 5effe8d..6b29025 100644 --- a/tests/ragger/eip712/input_files/06-boolean-test.json +++ b/tests/ragger/eip712/input_files/06-boolean-test.json @@ -1,7 +1,7 @@ { "domain": { - "chainId": 5, - "name": "Ether Mail", + "chainId": 1, + "name": "Boolean test", "verifyingContract": "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC", "version": "1" }, diff --git a/tests/ragger/eip712/input_files/07-fixed_bytes-test.json b/tests/ragger/eip712/input_files/07-fixed_bytes-test.json index cb00886..bf2db40 100644 --- a/tests/ragger/eip712/input_files/07-fixed_bytes-test.json +++ b/tests/ragger/eip712/input_files/07-fixed_bytes-test.json @@ -1,12 +1,16 @@ { "domain": { - "chainId": 5, - "name": "Ether Mail", + "chainId": 1, + "name": "Fixed bytes test", "verifyingContract": "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC", "version": "1" }, "message": { - "val" : "0x973bb640" + "val1": "0xae", + "val4": "0x973bb640", + "val8": "0xac3608fa074a22a0", + "val16": "0x24e62129cc3ed3df6f8f3cd1e95b812a", + "val32": "0xb5d679d10bf948280080e802ce9fde218b0f8c442c47bf4ab05657d8da04d1da" }, "primaryType": "Test", "types": { @@ -17,7 +21,11 @@ { "name": "verifyingContract", "type": "address" } ], "Test": [ - { "name": "val", "type": "bytes4" } + { "name": "val1", "type": "bytes1" }, + { "name": "val4", "type": "bytes4" }, + { "name": "val8", "type": "bytes8" }, + { "name": "val16", "type": "bytes16" }, + { "name": "val32", "type": "bytes32" } ] } } diff --git a/tests/ragger/eip712/input_files/10-multidimensional_arrays-test.json b/tests/ragger/eip712/input_files/10-multidimensional_arrays-test.json index 92d7963..716193b 100644 --- a/tests/ragger/eip712/input_files/10-multidimensional_arrays-test.json +++ b/tests/ragger/eip712/input_files/10-multidimensional_arrays-test.json @@ -1,29 +1,21 @@ { "types": { "EIP712Domain": [ - { - "type": "string", - "name": "name" - } + { "name": "name", "type": "string" }, + { "name": "version", "type": "string" }, + { "name": "chainId", "type": "uint256" }, + { "name": "verifyingContract", "type": "address" } ], - "LDPSigningRequest": [ - { - "type": "string[3][]", - "name": "document" - }, - { - "type": "string[][4]", - "name": "proof" - }, - { - "type": "uint8[][][][]", - "name": "depthy" - } + "Test": [ + { "type": "uint8[][][][]", "name": "depthy" } ] }, - "primaryType": "LDPSigningRequest", + "primaryType": "Test", "domain": { - "name": "Eip712Method2021" + "chainId": 1, + "name": "Depth Test", + "verifyingContract": "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC", + "version": "1" }, "message": { "depthy": [ @@ -36,57 +28,15 @@ [ "3" ] + ], + [ + [ + "4", + "5", + "6" + ] ] ] - ], - "document": [ - [ - "", - "", - "\"did:ethr:0xf7398bacf610bb4e3b567811279fcb3c41919f89\"" - ], - [ - "", - "", - "" - ], - [ - "", - "", - "\"2021-03-04T21:08:22.615Z\"^^" - ], - [ - "", - "", - "" - ], - [ - "", - "", - "" - ] - ], - "proof": [ - [ - "_:c14n0", - "", - "\"2021-03-04T21:08:22.616Z\"^^" - ], - [ - "_:c14n0", - "", - "" - ], - [ - "_:c14n0", - "", - "" - ], - [ - "_:c14n0", - "", - "" - ] ] } } diff --git a/tests/ragger/eip712/input_files/11-complex_structs-test.json b/tests/ragger/eip712/input_files/11-complex_structs-test.json index 3433564..a3ad755 100644 --- a/tests/ragger/eip712/input_files/11-complex_structs-test.json +++ b/tests/ragger/eip712/input_files/11-complex_structs-test.json @@ -1,7 +1,7 @@ { "domain": { - "chainId": 5, - "name": "Ether Mail", + "chainId": 1, + "name": "Complex Structs Mail", "verifyingContract": "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC", "version": "1" },