diff --git a/tests/ragger/eip712_input_files/00-simple_mail.ini b/tests/ragger/eip712_input_files/00-simple_mail.ini deleted file mode 100644 index 62d03bd73..000000000 --- a/tests/ragger/eip712_input_files/00-simple_mail.ini +++ /dev/null @@ -1,4 +0,0 @@ -[signature] -v = 1b -r = 23599abd6c4b631e42770c112b5955907fe91339f1ea1e102f7682262ca178b9 -s = 29fc94518588165114b4c4acb4d73e6d028dfb051d90e517b3b4746e04eb0f5f diff --git a/tests/ragger/eip712_input_files/01-addresses_array_mail.ini b/tests/ragger/eip712_input_files/01-addresses_array_mail.ini deleted file mode 100644 index d9726585f..000000000 --- a/tests/ragger/eip712_input_files/01-addresses_array_mail.ini +++ /dev/null @@ -1,4 +0,0 @@ -[signature] -v = 1c -r = 3f084a471e6158bce792287500d62d40061acc1864180ed2da7a704bf3aced0f -s = 3b799ced9e48cda152b4b9a4b7f45e3119dc7acdf16710a73800b4e336fa1b40 diff --git a/tests/ragger/eip712_input_files/02-recipients_array_mail-data.json b/tests/ragger/eip712_input_files/02-recipients_array_mail-data.json index 1d27ff068..97a4cb9cb 100644 --- a/tests/ragger/eip712_input_files/02-recipients_array_mail-data.json +++ b/tests/ragger/eip712_input_files/02-recipients_array_mail-data.json @@ -38,10 +38,6 @@ { "name": "chainId", "type": "uint256" }, { "name": "verifyingContract", "type": "address" } ], - "Group": [ - { "name": "name", "type": "string" }, - { "name": "members", "type": "Person[]" } - ], "Mail": [ { "name": "from", "type": "Person" }, { "name": "to", "type": "Person[]" }, diff --git a/tests/ragger/eip712_input_files/02-recipients_array_mail.ini b/tests/ragger/eip712_input_files/02-recipients_array_mail.ini deleted file mode 100644 index 8e8dcff86..000000000 --- a/tests/ragger/eip712_input_files/02-recipients_array_mail.ini +++ /dev/null @@ -1,4 +0,0 @@ -[signature] -v = 1b -r = 49dd2aa96d7494e0cd9111f19f87ac50194e4bbc61ea9f4bb86d674da0ae7721 -s = 7a12ddd9083b4caaabd2fb80df6de1d5d926c0e8a73bf371a45e231d409d79d6 diff --git a/tests/ragger/eip712_input_files/03-long_string-data.json b/tests/ragger/eip712_input_files/03-long_string-data.json index d28693441..e2917c4f8 100644 --- a/tests/ragger/eip712_input_files/03-long_string-data.json +++ b/tests/ragger/eip712_input_files/03-long_string-data.json @@ -33,10 +33,6 @@ { "name": "chainId", "type": "uint256" }, { "name": "verifyingContract", "type": "address" } ], - "Group": [ - { "name": "name", "type": "string" }, - { "name": "members", "type": "Person[]" } - ], "Mail": [ { "name": "from", "type": "Person" }, { "name": "to", "type": "Person[]" }, diff --git a/tests/ragger/eip712_input_files/03-long_string.ini b/tests/ragger/eip712_input_files/03-long_string.ini deleted file mode 100644 index 9b2740acf..000000000 --- a/tests/ragger/eip712_input_files/03-long_string.ini +++ /dev/null @@ -1,4 +0,0 @@ -[signature] -v = 1c -r = b23ffac2cb350fd6e7d06ec4b981fe016d33426d753c870e7e753797cc43bb1f -s = 37948a656fa3403e21956ef10c8d3152f7ce22cc252d958c9f9249435090f426 diff --git a/tests/ragger/eip712_input_files/04-long_bytes-data.json b/tests/ragger/eip712_input_files/04-long_bytes-data.json index 5bcfe55df..d52677473 100644 --- a/tests/ragger/eip712_input_files/04-long_bytes-data.json +++ b/tests/ragger/eip712_input_files/04-long_bytes-data.json @@ -33,10 +33,6 @@ { "name": "chainId", "type": "uint256" }, { "name": "verifyingContract", "type": "address" } ], - "Group": [ - { "name": "name", "type": "string" }, - { "name": "members", "type": "Person[]" } - ], "Mail": [ { "name": "from", "type": "Person" }, { "name": "to", "type": "Person[]" }, diff --git a/tests/ragger/eip712_input_files/04-long_bytes.ini b/tests/ragger/eip712_input_files/04-long_bytes.ini deleted file mode 100644 index 14018b742..000000000 --- a/tests/ragger/eip712_input_files/04-long_bytes.ini +++ /dev/null @@ -1,4 +0,0 @@ -[signature] -v = 1b -r = db18ea1b9757773385138d0802fb2f8107c3e45882962b8e0c6789eccdbfab05 -s = 3d66d4dee47916fb7fec39a538ad8d5e94fbc92f99327410716180ab07591218 diff --git a/tests/ragger/eip712_input_files/05-signed_ints.ini b/tests/ragger/eip712_input_files/05-signed_ints.ini deleted file mode 100644 index 754b2b332..000000000 --- a/tests/ragger/eip712_input_files/05-signed_ints.ini +++ /dev/null @@ -1,4 +0,0 @@ -[signature] -v = 1c -r = 50fb2861367daf3b5b73cac277e698b27bf7627a462fade1acb5a2ef285ba8ae -s = 131a62515a0a5c4b35c5cb672b46f562151c45508d8efcdf78c4608bc14c5f30 diff --git a/tests/ragger/eip712_input_files/06-boolean.ini b/tests/ragger/eip712_input_files/06-boolean.ini deleted file mode 100644 index e7de2b321..000000000 --- a/tests/ragger/eip712_input_files/06-boolean.ini +++ /dev/null @@ -1,4 +0,0 @@ -[signature] -v = 1c -r = 929681d77ed88cd1adef57185a0cd7b3a268aca5d4122b8c0acfd2ce4c0afb18 -s = 5afe8e3004c182b6b02fe7559c26f20f4133ad9b17223658ccd9061b33b021cf diff --git a/tests/ragger/eip712_input_files/07-fixed_bytes.ini b/tests/ragger/eip712_input_files/07-fixed_bytes.ini deleted file mode 100644 index e2f661ea4..000000000 --- a/tests/ragger/eip712_input_files/07-fixed_bytes.ini +++ /dev/null @@ -1,4 +0,0 @@ -[signature] -v = 1b -r = e021d88afc50079b0341b01193c4687c47b85bcd6749fe69e0b87521d65a1847 -s = 5b7670d2a67c781a11164920403db0f7707161e81d88226cdbf91298390dfeda diff --git a/tests/ragger/eip712_input_files/08-opensea.ini b/tests/ragger/eip712_input_files/08-opensea.ini deleted file mode 100644 index dfef6bbe5..000000000 --- a/tests/ragger/eip712_input_files/08-opensea.ini +++ /dev/null @@ -1,4 +0,0 @@ -[signature] -v = 1b -r = 1539547ae7cf8ebcd3eabfb57cd2b1fb7775ce757c3f4a307c7425d35b7bfff7 -s = 47248cb61e554c1f90af6331d9c9e51cbb8655667514194f509abe097a032319 diff --git a/tests/ragger/eip712_input_files/09-rarible.ini b/tests/ragger/eip712_input_files/09-rarible.ini deleted file mode 100644 index d880f0c8f..000000000 --- a/tests/ragger/eip712_input_files/09-rarible.ini +++ /dev/null @@ -1,4 +0,0 @@ -[signature] -v = 1c -r = 341bca1c0dfd805d4befc21500084424dbe559c7aafd78d8fb461c0c76dfea1d -s = 33ebb7b6fe0691961cd8b263faac20ecbbdcaef3febb57eb76614cad629080ea diff --git a/tests/ragger/eip712_input_files/10-multidimensional_arrays.ini b/tests/ragger/eip712_input_files/10-multidimensional_arrays.ini deleted file mode 100644 index 63113beec..000000000 --- a/tests/ragger/eip712_input_files/10-multidimensional_arrays.ini +++ /dev/null @@ -1,4 +0,0 @@ -[signature] -v = 1b -r = d11a91bdf7836288818875d046452061d565cc6dc1bf3dd6216ab27ef9a2844f -s = 4f6bda8ac4c39721aff7ae08989897ede9d573085a192d03ab0eb7735d2ef403 diff --git a/tests/ragger/eip712_input_files/11-complex_structs.ini b/tests/ragger/eip712_input_files/11-complex_structs.ini deleted file mode 100644 index ec35ea3f4..000000000 --- a/tests/ragger/eip712_input_files/11-complex_structs.ini +++ /dev/null @@ -1,4 +0,0 @@ -[signature] -v = 1c -r = cce2e63aaac6a5f9a74684d8fdddcbc7f3b27aa17235bfab89226821ead933b6 -s = 3f3c93977abcc3f8cc9a3dc1ecc02dbca14aca1a6ecb2fb6ca3d7c713ace1ec4 diff --git a/tests/ragger/eip712_input_files/12-sign_in.ini b/tests/ragger/eip712_input_files/12-sign_in.ini deleted file mode 100644 index 83047ab6c..000000000 --- a/tests/ragger/eip712_input_files/12-sign_in.ini +++ /dev/null @@ -1,4 +0,0 @@ -[signature] -v = 1b -r = 7be1671577753c13bfd1da8b234b6df8484daf47351c2366637fd291dd4aa4d9 -s = 1a7ffbb01dc8a64e9ee97d19b8f154e9eecbe0b1bfb9dcfa781a65e474573963 diff --git a/tests/ragger/eip712_input_files/13-empty_arrays.ini b/tests/ragger/eip712_input_files/13-empty_arrays.ini deleted file mode 100644 index 4784a4884..000000000 --- a/tests/ragger/eip712_input_files/13-empty_arrays.ini +++ /dev/null @@ -1,4 +0,0 @@ -[signature] -v = 1b -r = 5d0635a868602e29366da6328f8fadf2d6a9b4e69ee7a65928e85ca56fb1b515 -s = 257364d6faaf5687edf90c3984f4240b0ce7b2dee55aa1f8f39c32d0d4d8c93d diff --git a/tests/ragger/eip712_input_files/14-rabby_bug-data.json b/tests/ragger/eip712_input_files/14-rabby_bug-data.json index 806a392e3..feb160de7 100644 --- a/tests/ragger/eip712_input_files/14-rabby_bug-data.json +++ b/tests/ragger/eip712_input_files/14-rabby_bug-data.json @@ -45,7 +45,7 @@ "expiryTime": "1709280466", "startNonce": "7", "erc20Token": "0x09bc4e0d864854c6afb6eb9a9cdf58ac190d0df9", - "platformFeeRecipient": "0x7538262ae993ca117a0e481f908209137a4626e", + "platformFeeRecipient": "0x07538262ae993ca117a0e481f908209137a4626e", "basicCollections": [ { "nftAddress": "0xaaaea1fb9f3de3f70e89f37b69ab11b47eb9ce6f", diff --git a/tests/ragger/snapshots/nanosp/eip712_address_substitution/00000.png b/tests/ragger/snapshots/nanosp/test_eip712_address_substitution/00000.png similarity index 100% rename from tests/ragger/snapshots/nanosp/eip712_address_substitution/00000.png rename to tests/ragger/snapshots/nanosp/test_eip712_address_substitution/00000.png diff --git a/tests/ragger/snapshots/nanosp/eip712_address_substitution/00001.png b/tests/ragger/snapshots/nanosp/test_eip712_address_substitution/00001.png similarity index 100% rename from tests/ragger/snapshots/nanosp/eip712_address_substitution/00001.png rename to tests/ragger/snapshots/nanosp/test_eip712_address_substitution/00001.png diff --git a/tests/ragger/snapshots/nanosp/eip712_address_substitution/00002.png b/tests/ragger/snapshots/nanosp/test_eip712_address_substitution/00002.png similarity index 100% rename from tests/ragger/snapshots/nanosp/eip712_address_substitution/00002.png rename to tests/ragger/snapshots/nanosp/test_eip712_address_substitution/00002.png diff --git a/tests/ragger/snapshots/nanosp/eip712_address_substitution/00003.png b/tests/ragger/snapshots/nanosp/test_eip712_address_substitution/00003.png similarity index 100% rename from tests/ragger/snapshots/nanosp/eip712_address_substitution/00003.png rename to tests/ragger/snapshots/nanosp/test_eip712_address_substitution/00003.png diff --git a/tests/ragger/snapshots/nanosp/eip712_address_substitution/00004.png b/tests/ragger/snapshots/nanosp/test_eip712_address_substitution/00004.png similarity index 100% rename from tests/ragger/snapshots/nanosp/eip712_address_substitution/00004.png rename to tests/ragger/snapshots/nanosp/test_eip712_address_substitution/00004.png diff --git a/tests/ragger/snapshots/nanosp/eip712_address_substitution/00005.png b/tests/ragger/snapshots/nanosp/test_eip712_address_substitution/00005.png similarity index 100% rename from tests/ragger/snapshots/nanosp/eip712_address_substitution/00005.png rename to tests/ragger/snapshots/nanosp/test_eip712_address_substitution/00005.png diff --git a/tests/ragger/snapshots/nanosp/eip712_address_substitution/00006.png b/tests/ragger/snapshots/nanosp/test_eip712_address_substitution/00006.png similarity index 100% rename from tests/ragger/snapshots/nanosp/eip712_address_substitution/00006.png rename to tests/ragger/snapshots/nanosp/test_eip712_address_substitution/00006.png diff --git a/tests/ragger/snapshots/nanosp/eip712_address_substitution_verbose/00000.png b/tests/ragger/snapshots/nanosp/test_eip712_address_substitution_verbose/00000.png similarity index 100% rename from tests/ragger/snapshots/nanosp/eip712_address_substitution_verbose/00000.png rename to tests/ragger/snapshots/nanosp/test_eip712_address_substitution_verbose/00000.png diff --git a/tests/ragger/snapshots/nanosp/eip712_address_substitution_verbose/00001.png b/tests/ragger/snapshots/nanosp/test_eip712_address_substitution_verbose/00001.png similarity index 100% rename from tests/ragger/snapshots/nanosp/eip712_address_substitution_verbose/00001.png rename to tests/ragger/snapshots/nanosp/test_eip712_address_substitution_verbose/00001.png diff --git a/tests/ragger/snapshots/nanosp/eip712_address_substitution_verbose/00002.png b/tests/ragger/snapshots/nanosp/test_eip712_address_substitution_verbose/00002.png similarity index 100% rename from tests/ragger/snapshots/nanosp/eip712_address_substitution_verbose/00002.png rename to tests/ragger/snapshots/nanosp/test_eip712_address_substitution_verbose/00002.png diff --git a/tests/ragger/snapshots/nanosp/eip712_address_substitution_verbose/00003.png b/tests/ragger/snapshots/nanosp/test_eip712_address_substitution_verbose/00003.png similarity index 100% rename from tests/ragger/snapshots/nanosp/eip712_address_substitution_verbose/00003.png rename to tests/ragger/snapshots/nanosp/test_eip712_address_substitution_verbose/00003.png diff --git a/tests/ragger/snapshots/nanosp/eip712_address_substitution_verbose/00004.png b/tests/ragger/snapshots/nanosp/test_eip712_address_substitution_verbose/00004.png similarity index 100% rename from tests/ragger/snapshots/nanosp/eip712_address_substitution_verbose/00004.png rename to tests/ragger/snapshots/nanosp/test_eip712_address_substitution_verbose/00004.png diff --git a/tests/ragger/snapshots/nanosp/eip712_address_substitution_verbose/00005.png b/tests/ragger/snapshots/nanosp/test_eip712_address_substitution_verbose/00005.png similarity index 100% rename from tests/ragger/snapshots/nanosp/eip712_address_substitution_verbose/00005.png rename to tests/ragger/snapshots/nanosp/test_eip712_address_substitution_verbose/00005.png diff --git a/tests/ragger/snapshots/nanosp/eip712_address_substitution_verbose/00006.png b/tests/ragger/snapshots/nanosp/test_eip712_address_substitution_verbose/00006.png similarity index 100% rename from tests/ragger/snapshots/nanosp/eip712_address_substitution_verbose/00006.png rename to tests/ragger/snapshots/nanosp/test_eip712_address_substitution_verbose/00006.png diff --git a/tests/ragger/snapshots/nanosp/eip712_address_substitution_verbose/00007.png b/tests/ragger/snapshots/nanosp/test_eip712_address_substitution_verbose/00007.png similarity index 100% rename from tests/ragger/snapshots/nanosp/eip712_address_substitution_verbose/00007.png rename to tests/ragger/snapshots/nanosp/test_eip712_address_substitution_verbose/00007.png diff --git a/tests/ragger/snapshots/nanosp/eip712_address_substitution_verbose/00008.png b/tests/ragger/snapshots/nanosp/test_eip712_address_substitution_verbose/00008.png similarity index 100% rename from tests/ragger/snapshots/nanosp/eip712_address_substitution_verbose/00008.png rename to tests/ragger/snapshots/nanosp/test_eip712_address_substitution_verbose/00008.png diff --git a/tests/ragger/snapshots/nanosp/eip712_address_substitution_verbose/00009.png b/tests/ragger/snapshots/nanosp/test_eip712_address_substitution_verbose/00009.png similarity index 100% rename from tests/ragger/snapshots/nanosp/eip712_address_substitution_verbose/00009.png rename to tests/ragger/snapshots/nanosp/test_eip712_address_substitution_verbose/00009.png diff --git a/tests/ragger/snapshots/nanosp/eip712_address_substitution_verbose/00010.png b/tests/ragger/snapshots/nanosp/test_eip712_address_substitution_verbose/00010.png similarity index 100% rename from tests/ragger/snapshots/nanosp/eip712_address_substitution_verbose/00010.png rename to tests/ragger/snapshots/nanosp/test_eip712_address_substitution_verbose/00010.png diff --git a/tests/ragger/snapshots/nanosp/eip712_address_substitution_verbose/00011.png b/tests/ragger/snapshots/nanosp/test_eip712_address_substitution_verbose/00011.png similarity index 100% rename from tests/ragger/snapshots/nanosp/eip712_address_substitution_verbose/00011.png rename to tests/ragger/snapshots/nanosp/test_eip712_address_substitution_verbose/00011.png diff --git a/tests/ragger/snapshots/nanosp/eip712_address_substitution_verbose/00012.png b/tests/ragger/snapshots/nanosp/test_eip712_address_substitution_verbose/00012.png similarity index 100% rename from tests/ragger/snapshots/nanosp/eip712_address_substitution_verbose/00012.png rename to tests/ragger/snapshots/nanosp/test_eip712_address_substitution_verbose/00012.png diff --git a/tests/ragger/snapshots/nanox/eip712_address_substitution/00000.png b/tests/ragger/snapshots/nanox/test_eip712_address_substitution/00000.png similarity index 100% rename from tests/ragger/snapshots/nanox/eip712_address_substitution/00000.png rename to tests/ragger/snapshots/nanox/test_eip712_address_substitution/00000.png diff --git a/tests/ragger/snapshots/nanox/eip712_address_substitution/00001.png b/tests/ragger/snapshots/nanox/test_eip712_address_substitution/00001.png similarity index 100% rename from tests/ragger/snapshots/nanox/eip712_address_substitution/00001.png rename to tests/ragger/snapshots/nanox/test_eip712_address_substitution/00001.png diff --git a/tests/ragger/snapshots/nanox/eip712_address_substitution/00002.png b/tests/ragger/snapshots/nanox/test_eip712_address_substitution/00002.png similarity index 100% rename from tests/ragger/snapshots/nanox/eip712_address_substitution/00002.png rename to tests/ragger/snapshots/nanox/test_eip712_address_substitution/00002.png diff --git a/tests/ragger/snapshots/nanox/eip712_address_substitution/00003.png b/tests/ragger/snapshots/nanox/test_eip712_address_substitution/00003.png similarity index 100% rename from tests/ragger/snapshots/nanox/eip712_address_substitution/00003.png rename to tests/ragger/snapshots/nanox/test_eip712_address_substitution/00003.png diff --git a/tests/ragger/snapshots/nanox/eip712_address_substitution/00004.png b/tests/ragger/snapshots/nanox/test_eip712_address_substitution/00004.png similarity index 100% rename from tests/ragger/snapshots/nanox/eip712_address_substitution/00004.png rename to tests/ragger/snapshots/nanox/test_eip712_address_substitution/00004.png diff --git a/tests/ragger/snapshots/nanox/eip712_address_substitution/00005.png b/tests/ragger/snapshots/nanox/test_eip712_address_substitution/00005.png similarity index 100% rename from tests/ragger/snapshots/nanox/eip712_address_substitution/00005.png rename to tests/ragger/snapshots/nanox/test_eip712_address_substitution/00005.png diff --git a/tests/ragger/snapshots/nanox/eip712_address_substitution/00006.png b/tests/ragger/snapshots/nanox/test_eip712_address_substitution/00006.png similarity index 100% rename from tests/ragger/snapshots/nanox/eip712_address_substitution/00006.png rename to tests/ragger/snapshots/nanox/test_eip712_address_substitution/00006.png diff --git a/tests/ragger/snapshots/nanox/eip712_address_substitution_verbose/00000.png b/tests/ragger/snapshots/nanox/test_eip712_address_substitution_verbose/00000.png similarity index 100% rename from tests/ragger/snapshots/nanox/eip712_address_substitution_verbose/00000.png rename to tests/ragger/snapshots/nanox/test_eip712_address_substitution_verbose/00000.png diff --git a/tests/ragger/snapshots/nanox/eip712_address_substitution_verbose/00001.png b/tests/ragger/snapshots/nanox/test_eip712_address_substitution_verbose/00001.png similarity index 100% rename from tests/ragger/snapshots/nanox/eip712_address_substitution_verbose/00001.png rename to tests/ragger/snapshots/nanox/test_eip712_address_substitution_verbose/00001.png diff --git a/tests/ragger/snapshots/nanox/eip712_address_substitution_verbose/00002.png b/tests/ragger/snapshots/nanox/test_eip712_address_substitution_verbose/00002.png similarity index 100% rename from tests/ragger/snapshots/nanox/eip712_address_substitution_verbose/00002.png rename to tests/ragger/snapshots/nanox/test_eip712_address_substitution_verbose/00002.png diff --git a/tests/ragger/snapshots/nanox/eip712_address_substitution_verbose/00003.png b/tests/ragger/snapshots/nanox/test_eip712_address_substitution_verbose/00003.png similarity index 100% rename from tests/ragger/snapshots/nanox/eip712_address_substitution_verbose/00003.png rename to tests/ragger/snapshots/nanox/test_eip712_address_substitution_verbose/00003.png diff --git a/tests/ragger/snapshots/nanox/eip712_address_substitution_verbose/00004.png b/tests/ragger/snapshots/nanox/test_eip712_address_substitution_verbose/00004.png similarity index 100% rename from tests/ragger/snapshots/nanox/eip712_address_substitution_verbose/00004.png rename to tests/ragger/snapshots/nanox/test_eip712_address_substitution_verbose/00004.png diff --git a/tests/ragger/snapshots/nanox/eip712_address_substitution_verbose/00005.png b/tests/ragger/snapshots/nanox/test_eip712_address_substitution_verbose/00005.png similarity index 100% rename from tests/ragger/snapshots/nanox/eip712_address_substitution_verbose/00005.png rename to tests/ragger/snapshots/nanox/test_eip712_address_substitution_verbose/00005.png diff --git a/tests/ragger/snapshots/nanox/eip712_address_substitution_verbose/00006.png b/tests/ragger/snapshots/nanox/test_eip712_address_substitution_verbose/00006.png similarity index 100% rename from tests/ragger/snapshots/nanox/eip712_address_substitution_verbose/00006.png rename to tests/ragger/snapshots/nanox/test_eip712_address_substitution_verbose/00006.png diff --git a/tests/ragger/snapshots/nanox/eip712_address_substitution_verbose/00007.png b/tests/ragger/snapshots/nanox/test_eip712_address_substitution_verbose/00007.png similarity index 100% rename from tests/ragger/snapshots/nanox/eip712_address_substitution_verbose/00007.png rename to tests/ragger/snapshots/nanox/test_eip712_address_substitution_verbose/00007.png diff --git a/tests/ragger/snapshots/nanox/eip712_address_substitution_verbose/00008.png b/tests/ragger/snapshots/nanox/test_eip712_address_substitution_verbose/00008.png similarity index 100% rename from tests/ragger/snapshots/nanox/eip712_address_substitution_verbose/00008.png rename to tests/ragger/snapshots/nanox/test_eip712_address_substitution_verbose/00008.png diff --git a/tests/ragger/snapshots/nanox/eip712_address_substitution_verbose/00009.png b/tests/ragger/snapshots/nanox/test_eip712_address_substitution_verbose/00009.png similarity index 100% rename from tests/ragger/snapshots/nanox/eip712_address_substitution_verbose/00009.png rename to tests/ragger/snapshots/nanox/test_eip712_address_substitution_verbose/00009.png diff --git a/tests/ragger/snapshots/nanox/eip712_address_substitution_verbose/00010.png b/tests/ragger/snapshots/nanox/test_eip712_address_substitution_verbose/00010.png similarity index 100% rename from tests/ragger/snapshots/nanox/eip712_address_substitution_verbose/00010.png rename to tests/ragger/snapshots/nanox/test_eip712_address_substitution_verbose/00010.png diff --git a/tests/ragger/snapshots/nanox/eip712_address_substitution_verbose/00011.png b/tests/ragger/snapshots/nanox/test_eip712_address_substitution_verbose/00011.png similarity index 100% rename from tests/ragger/snapshots/nanox/eip712_address_substitution_verbose/00011.png rename to tests/ragger/snapshots/nanox/test_eip712_address_substitution_verbose/00011.png diff --git a/tests/ragger/snapshots/nanox/eip712_address_substitution_verbose/00012.png b/tests/ragger/snapshots/nanox/test_eip712_address_substitution_verbose/00012.png similarity index 100% rename from tests/ragger/snapshots/nanox/eip712_address_substitution_verbose/00012.png rename to tests/ragger/snapshots/nanox/test_eip712_address_substitution_verbose/00012.png diff --git a/tests/ragger/snapshots/stax/eip712_address_substitution/00000.png b/tests/ragger/snapshots/stax/test_eip712_address_substitution/00000.png similarity index 100% rename from tests/ragger/snapshots/stax/eip712_address_substitution/00000.png rename to tests/ragger/snapshots/stax/test_eip712_address_substitution/00000.png diff --git a/tests/ragger/snapshots/stax/eip712_address_substitution/00001.png b/tests/ragger/snapshots/stax/test_eip712_address_substitution/00001.png similarity index 100% rename from tests/ragger/snapshots/stax/eip712_address_substitution/00001.png rename to tests/ragger/snapshots/stax/test_eip712_address_substitution/00001.png diff --git a/tests/ragger/snapshots/stax/eip712_address_substitution/00002.png b/tests/ragger/snapshots/stax/test_eip712_address_substitution/00002.png similarity index 100% rename from tests/ragger/snapshots/stax/eip712_address_substitution/00002.png rename to tests/ragger/snapshots/stax/test_eip712_address_substitution/00002.png diff --git a/tests/ragger/snapshots/stax/eip712_address_substitution/00003.png b/tests/ragger/snapshots/stax/test_eip712_address_substitution/00003.png similarity index 100% rename from tests/ragger/snapshots/stax/eip712_address_substitution/00003.png rename to tests/ragger/snapshots/stax/test_eip712_address_substitution/00003.png diff --git a/tests/ragger/snapshots/stax/eip712_address_substitution/00004.png b/tests/ragger/snapshots/stax/test_eip712_address_substitution/00004.png similarity index 100% rename from tests/ragger/snapshots/stax/eip712_address_substitution/00004.png rename to tests/ragger/snapshots/stax/test_eip712_address_substitution/00004.png diff --git a/tests/ragger/snapshots/stax/eip712_address_substitution/00005.png b/tests/ragger/snapshots/stax/test_eip712_address_substitution/00005.png similarity index 100% rename from tests/ragger/snapshots/stax/eip712_address_substitution/00005.png rename to tests/ragger/snapshots/stax/test_eip712_address_substitution/00005.png diff --git a/tests/ragger/snapshots/stax/eip712_address_substitution/00006.png b/tests/ragger/snapshots/stax/test_eip712_address_substitution/00006.png similarity index 100% rename from tests/ragger/snapshots/stax/eip712_address_substitution/00006.png rename to tests/ragger/snapshots/stax/test_eip712_address_substitution/00006.png diff --git a/tests/ragger/snapshots/stax/eip712_address_substitution_verbose/00000.png b/tests/ragger/snapshots/stax/test_eip712_address_substitution_verbose/00000.png similarity index 100% rename from tests/ragger/snapshots/stax/eip712_address_substitution_verbose/00000.png rename to tests/ragger/snapshots/stax/test_eip712_address_substitution_verbose/00000.png diff --git a/tests/ragger/snapshots/stax/eip712_address_substitution_verbose/00001.png b/tests/ragger/snapshots/stax/test_eip712_address_substitution_verbose/00001.png similarity index 100% rename from tests/ragger/snapshots/stax/eip712_address_substitution_verbose/00001.png rename to tests/ragger/snapshots/stax/test_eip712_address_substitution_verbose/00001.png diff --git a/tests/ragger/snapshots/stax/eip712_address_substitution_verbose/00002.png b/tests/ragger/snapshots/stax/test_eip712_address_substitution_verbose/00002.png similarity index 100% rename from tests/ragger/snapshots/stax/eip712_address_substitution_verbose/00002.png rename to tests/ragger/snapshots/stax/test_eip712_address_substitution_verbose/00002.png diff --git a/tests/ragger/snapshots/stax/eip712_address_substitution_verbose/00003.png b/tests/ragger/snapshots/stax/test_eip712_address_substitution_verbose/00003.png similarity index 100% rename from tests/ragger/snapshots/stax/eip712_address_substitution_verbose/00003.png rename to tests/ragger/snapshots/stax/test_eip712_address_substitution_verbose/00003.png diff --git a/tests/ragger/snapshots/stax/eip712_address_substitution_verbose/00004.png b/tests/ragger/snapshots/stax/test_eip712_address_substitution_verbose/00004.png similarity index 100% rename from tests/ragger/snapshots/stax/eip712_address_substitution_verbose/00004.png rename to tests/ragger/snapshots/stax/test_eip712_address_substitution_verbose/00004.png diff --git a/tests/ragger/snapshots/stax/eip712_address_substitution_verbose/00005.png b/tests/ragger/snapshots/stax/test_eip712_address_substitution_verbose/00005.png similarity index 100% rename from tests/ragger/snapshots/stax/eip712_address_substitution_verbose/00005.png rename to tests/ragger/snapshots/stax/test_eip712_address_substitution_verbose/00005.png diff --git a/tests/ragger/snapshots/stax/eip712_address_substitution_verbose/00006.png b/tests/ragger/snapshots/stax/test_eip712_address_substitution_verbose/00006.png similarity index 100% rename from tests/ragger/snapshots/stax/eip712_address_substitution_verbose/00006.png rename to tests/ragger/snapshots/stax/test_eip712_address_substitution_verbose/00006.png diff --git a/tests/ragger/snapshots/stax/eip712_address_substitution_verbose/00007.png b/tests/ragger/snapshots/stax/test_eip712_address_substitution_verbose/00007.png similarity index 100% rename from tests/ragger/snapshots/stax/eip712_address_substitution_verbose/00007.png rename to tests/ragger/snapshots/stax/test_eip712_address_substitution_verbose/00007.png diff --git a/tests/ragger/snapshots/stax/eip712_address_substitution_verbose/00008.png b/tests/ragger/snapshots/stax/test_eip712_address_substitution_verbose/00008.png similarity index 100% rename from tests/ragger/snapshots/stax/eip712_address_substitution_verbose/00008.png rename to tests/ragger/snapshots/stax/test_eip712_address_substitution_verbose/00008.png diff --git a/tests/ragger/snapshots/stax/eip712_address_substitution_verbose/00009.png b/tests/ragger/snapshots/stax/test_eip712_address_substitution_verbose/00009.png similarity index 100% rename from tests/ragger/snapshots/stax/eip712_address_substitution_verbose/00009.png rename to tests/ragger/snapshots/stax/test_eip712_address_substitution_verbose/00009.png diff --git a/tests/ragger/snapshots/stax/eip712_address_substitution_verbose/00010.png b/tests/ragger/snapshots/stax/test_eip712_address_substitution_verbose/00010.png similarity index 100% rename from tests/ragger/snapshots/stax/eip712_address_substitution_verbose/00010.png rename to tests/ragger/snapshots/stax/test_eip712_address_substitution_verbose/00010.png diff --git a/tests/ragger/snapshots/stax/eip712_address_substitution_verbose/00011.png b/tests/ragger/snapshots/stax/test_eip712_address_substitution_verbose/00011.png similarity index 100% rename from tests/ragger/snapshots/stax/eip712_address_substitution_verbose/00011.png rename to tests/ragger/snapshots/stax/test_eip712_address_substitution_verbose/00011.png diff --git a/tests/ragger/snapshots/stax/eip712_address_substitution_verbose/00012.png b/tests/ragger/snapshots/stax/test_eip712_address_substitution_verbose/00012.png similarity index 100% rename from tests/ragger/snapshots/stax/eip712_address_substitution_verbose/00012.png rename to tests/ragger/snapshots/stax/test_eip712_address_substitution_verbose/00012.png diff --git a/tests/ragger/test_eip712.py b/tests/ragger/test_eip712.py index 99865ef52..45c210974 100644 --- a/tests/ragger/test_eip712.py +++ b/tests/ragger/test_eip712.py @@ -1,12 +1,12 @@ import fnmatch import os import time -from configparser import ConfigParser from functools import partial from pathlib import Path import json from typing import Optional import pytest +from eth_account.messages import encode_typed_data import client.response_parser as ResponseParser from client.utils import recover_message @@ -29,7 +29,8 @@ def __init__(self, test_name: str, idx: int = 0): BIP32_PATH = "m/44'/60'/0'/0/0" -snaps_config: Optional[SnapshotsConfig] = None +SNAPS_CONFIG: Optional[SnapshotsConfig] = None +WALLET_ADDR: Optional[bytes] = None def eip712_json_path() -> str: @@ -59,33 +60,44 @@ def filtering_fixture(request) -> bool: return request.param +def get_wallet_addr(client: EthAppClient) -> bytes: + global WALLET_ADDR + + # don't ask again if we already have it + if WALLET_ADDR is None: + with client.get_public_addr(display=False): + pass + _, WALLET_ADDR, _ = ResponseParser.pk_addr(client.response().data) + return WALLET_ADDR + + def test_eip712_legacy(firmware: Firmware, backend: BackendInterface, navigator: Navigator): app_client = EthAppClient(backend) - with app_client.eip712_sign_legacy( - BIP32_PATH, - bytes.fromhex('6137beb405d9ff777172aa879e33edb34a1460e701802746c5ef96e741710e59'), - bytes.fromhex('eb4221181ff3f1a83ea7313993ca9218496e424604ba9492bb4052c03d5c3df8')): - moves = [] - if firmware.device.startswith("nano"): - moves += [NavInsID.RIGHT_CLICK] - if firmware.device == "nanos": - screens_per_hash = 4 + + with open(input_files()[0]) as file: + data = json.load(file) + smsg = encode_typed_data(full_message=data) + with app_client.eip712_sign_legacy(BIP32_PATH, smsg.header, smsg.body): + moves = [] + if firmware.device.startswith("nano"): + moves += [NavInsID.RIGHT_CLICK] + if firmware.device == "nanos": + screens_per_hash = 4 + else: + screens_per_hash = 2 + moves += [NavInsID.RIGHT_CLICK] * screens_per_hash * 2 + moves += [NavInsID.BOTH_CLICK] else: - screens_per_hash = 2 - moves += [NavInsID.RIGHT_CLICK] * screens_per_hash * 2 - moves += [NavInsID.BOTH_CLICK] - else: - moves += [NavInsID.USE_CASE_REVIEW_TAP] * 2 - moves += [NavInsID.USE_CASE_REVIEW_CONFIRM] - navigator.navigate(moves) + moves += [NavInsID.USE_CASE_REVIEW_TAP] * 2 + moves += [NavInsID.USE_CASE_REVIEW_CONFIRM] + navigator.navigate(moves) - v, r, s = ResponseParser.signature(app_client.response().data) + vrs = ResponseParser.signature(app_client.response().data) + recovered_addr = recover_message(data, vrs) - assert v == bytes.fromhex("1c") - assert r == bytes.fromhex("ea66f747173762715751c889fea8722acac3fc35db2c226d37a2e58815398f64") - assert s == bytes.fromhex("52d8ba9153de9255da220ffd36762c0b027701a3b5110f0a765f94b16a9dfb55") + assert recovered_addr == get_wallet_addr(app_client) def autonext(firmware: Firmware, navigator: Navigator, default_screenshot_path: Path): @@ -94,18 +106,18 @@ def autonext(firmware: Firmware, navigator: Navigator, default_screenshot_path: moves = [NavInsID.RIGHT_CLICK] else: moves = [NavInsID.USE_CASE_REVIEW_TAP] - if snaps_config is not None: + if SNAPS_CONFIG is not None: navigator.navigate_and_compare(default_screenshot_path, - snaps_config.test_name, + SNAPS_CONFIG.test_name, moves, screen_change_before_first_instruction=False, screen_change_after_last_instruction=False, - snap_start_idx=snaps_config.idx) - snaps_config.idx += 1 + snap_start_idx=SNAPS_CONFIG.idx) + SNAPS_CONFIG.idx += 1 else: navigator.navigate(moves, - screen_change_before_first_instruction=False, - screen_change_after_last_instruction=False) + screen_change_before_first_instruction=False, + screen_change_after_last_instruction=False) def eip712_new_common(firmware: Firmware, @@ -132,12 +144,12 @@ def eip712_new_common(firmware: Firmware, if not verbose and filters is None: moves += [NavInsID.USE_CASE_REVIEW_TAP] moves += [NavInsID.USE_CASE_REVIEW_CONFIRM] - if snaps_config is not None: + if SNAPS_CONFIG is not None: navigator.navigate_and_compare(default_screenshot_path, - snaps_config.test_name, - moves, - snap_start_idx=snaps_config.idx) - snaps_config.idx += 1 + SNAPS_CONFIG.test_name, + moves, + snap_start_idx=SNAPS_CONFIG.idx) + SNAPS_CONFIG.idx += 1 else: navigator.navigate(moves) return ResponseParser.signature(app_client.response().data) @@ -155,7 +167,6 @@ def test_eip712_new(firmware: Firmware, pytest.skip("Not supported on LNS") test_path = f"{input_file.parent}/{'-'.join(input_file.stem.split('-')[:-1])}" - conf_file = f"{test_path}.ini" filters = None if filtering: @@ -166,51 +177,39 @@ def test_eip712_new(firmware: Firmware, except (IOError, json.decoder.JSONDecodeError) as e: pytest.skip(f"{filterfile.name}: {e.strerror}") - config = ConfigParser() - config.read(conf_file) - - # sanity check - assert "signature" in config.sections() - assert "v" in config["signature"] - assert "r" in config["signature"] - assert "s" in config["signature"] - if verbose: settings_toggle(firmware, navigator, [SettingID.VERBOSE_EIP712]) with open(input_file, encoding="utf-8") as file: - v, r, s = eip712_new_common(firmware, - navigator, - default_screenshot_path, - app_client, - json.load(file), - filters, - verbose) + data = json.load(file) + vrs = eip712_new_common(firmware, + navigator, + default_screenshot_path, + app_client, + data, + filters, + verbose) - assert v == bytes.fromhex(config["signature"]["v"]) - assert r == bytes.fromhex(config["signature"]["r"]) - assert s == bytes.fromhex(config["signature"]["s"]) + recovered_addr = recover_message(data, vrs) + + assert recovered_addr == get_wallet_addr(app_client) def test_eip712_address_substitution(firmware: Firmware, backend: BackendInterface, navigator: Navigator, default_screenshot_path: Path, + test_name: str, verbose: bool): - global snaps_config + global SNAPS_CONFIG app_client = EthAppClient(backend) if firmware.device == "nanos": pytest.skip("Not supported on LNS") - with app_client.get_public_addr(display=False): - pass - _, DEVICE_ADDR, _ = ResponseParser.pk_addr(app_client.response().data) - - test_name = "eip712_address_substitution" if verbose: test_name += "_verbose" - snaps_config = SnapshotsConfig(test_name) + SNAPS_CONFIG = SnapshotsConfig(test_name) with open(f"{eip712_json_path()}/address_substitution.json", encoding="utf-8") as file: data = json.load(file) @@ -247,4 +246,4 @@ def test_eip712_address_substitution(firmware: Firmware, # verify signature addr = recover_message(data, vrs) - assert addr == DEVICE_ADDR + assert addr == get_wallet_addr(app_client)