From 01f9db42b4e8f0e5a7168cb13ade8568dfbbde28 Mon Sep 17 00:00:00 2001 From: Alexandre Paillier Date: Fri, 22 Mar 2024 17:35:57 +0100 Subject: [PATCH] Improve EIP712 empty array test --- .../13-empty_arrays-data.json | 52 +++++++++++++++---- 1 file changed, 41 insertions(+), 11 deletions(-) diff --git a/tests/ragger/eip712_input_files/13-empty_arrays-data.json b/tests/ragger/eip712_input_files/13-empty_arrays-data.json index 7a1f939..4bbf129 100644 --- a/tests/ragger/eip712_input_files/13-empty_arrays-data.json +++ b/tests/ragger/eip712_input_files/13-empty_arrays-data.json @@ -6,19 +6,36 @@ "version": "1" }, "message": { - "list1": [], - "list2": [], - "list3": [ + "test1": [], + "test2": [ [ - "1", - "2" + "one", + "two" ], [], [ - "3", - "4" + "three", + "four" ] - ] + ], + "test3": [ + { + "sub": [ + { + "sub": [], + "value": 3 + } + ], + "value": 1 + } + ], + "test4": [ + { + "sub": [], + "value": 2 + } + ], + "test5": [] }, "primaryType": "Struct", "types": { @@ -29,9 +46,22 @@ { "name": "verifyingContract", "type": "address" } ], "Struct": [ - { "name": "list1", "type": "EIP712Domain[]" }, - { "name": "list2", "type": "uint8[]" }, - { "name": "list3", "type": "string[][]" } + { "name": "test1", "type": "uint8[]" }, + { "name": "test2", "type": "string[][]" }, + { "name": "test3", "type": "Top[]" }, + { "name": "test4", "type": "Top[]" }, + { "name": "test5", "type": "Top[]" } + ], + "Bottom": [ + { "name": "value", "type": "uint8" } + ], + "Mid": [ + { "name": "sub", "type": "Bottom[]" }, + { "name": "value", "type": "uint8" } + ], + "Top": [ + { "name": "sub", "type": "Mid[]" }, + { "name": "value", "type": "uint8" } ] } }