From 824cab5d2402da9b329aa1da65bcaf08dec077f6 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Fri, 4 Nov 2022 00:25:39 +0100 Subject: [PATCH] update tests: abijson --- test/libsolidity/ABIJson/basic_test.sol | 6 ++-- test/libsolidity/ABIJson/constructor_abi.sol | 3 +- ...ty_name_input_parameter_with_named_one.sol | 6 ++-- .../ABIJson/empty_name_return_parameters.sol | 6 ++-- test/libsolidity/ABIJson/errors.sol | 15 ++++------ .../libsolidity/ABIJson/errors_referenced.sol | 9 ++---- test/libsolidity/ABIJson/event_structs.sol | 12 +++----- test/libsolidity/ABIJson/events.sol | 12 +++----- test/libsolidity/ABIJson/function_type.sol | 3 +- .../ABIJson/function_type_extended.sol | 3 +- test/libsolidity/ABIJson/global_struct.sol | 12 +++----- test/libsolidity/ABIJson/inherited.sol | 27 ++++++----------- test/libsolidity/ABIJson/library_function.sol | 6 ++-- test/libsolidity/ABIJson/multiple_methods.sol | 12 +++----- .../ABIJson/multiple_methods_order.sol | 12 +++----- test/libsolidity/ABIJson/multiple_params.sol | 6 ++-- .../ABIJson/payable_constructor_abi.sol | 3 +- test/libsolidity/ABIJson/pure_function.sol | 12 +++----- .../ABIJson/return_param_in_abi.sol | 6 ++-- test/libsolidity/ABIJson/return_structs.sol | 9 ++---- .../ABIJson/return_structs_with_contracts.sol | 6 ++-- .../ABIJson/structs_and_arrays.sol | 3 +- .../ABIJson/structs_in_libraries.sol | 9 ++---- .../ABIJson/user_defined_value_type.sol | 30 +++++++------------ test/libsolidity/ABIJson/view_function.sol | 12 +++----- 25 files changed, 80 insertions(+), 160 deletions(-) diff --git a/test/libsolidity/ABIJson/basic_test.sol b/test/libsolidity/ABIJson/basic_test.sol index 37c833bcf..8f60eb728 100644 --- a/test/libsolidity/ABIJson/basic_test.sol +++ b/test/libsolidity/ABIJson/basic_test.sol @@ -5,8 +5,7 @@ contract test { // :test // [ // { -// "inputs": -// [ +// "inputs": [ // { // "internalType": "uint256", // "name": "a", @@ -14,8 +13,7 @@ contract test { // } // ], // "name": "f", -// "outputs": -// [ +// "outputs": [ // { // "internalType": "uint256", // "name": "d", diff --git a/test/libsolidity/ABIJson/constructor_abi.sol b/test/libsolidity/ABIJson/constructor_abi.sol index ae07c9401..406927f0a 100644 --- a/test/libsolidity/ABIJson/constructor_abi.sol +++ b/test/libsolidity/ABIJson/constructor_abi.sol @@ -5,8 +5,7 @@ contract test { // :test // [ // { -// "inputs": -// [ +// "inputs": [ // { // "internalType": "uint256", // "name": "param1", diff --git a/test/libsolidity/ABIJson/empty_name_input_parameter_with_named_one.sol b/test/libsolidity/ABIJson/empty_name_input_parameter_with_named_one.sol index d412e755a..c3ba37b0e 100644 --- a/test/libsolidity/ABIJson/empty_name_input_parameter_with_named_one.sol +++ b/test/libsolidity/ABIJson/empty_name_input_parameter_with_named_one.sol @@ -9,8 +9,7 @@ contract test { // :test // [ // { -// "inputs": -// [ +// "inputs": [ // { // "internalType": "uint256", // "name": "", @@ -23,8 +22,7 @@ contract test { // } // ], // "name": "f", -// "outputs": -// [ +// "outputs": [ // { // "internalType": "uint256", // "name": "ret_k", diff --git a/test/libsolidity/ABIJson/empty_name_return_parameters.sol b/test/libsolidity/ABIJson/empty_name_return_parameters.sol index 1415276fd..56c4de8a2 100644 --- a/test/libsolidity/ABIJson/empty_name_return_parameters.sol +++ b/test/libsolidity/ABIJson/empty_name_return_parameters.sol @@ -7,8 +7,7 @@ contract test { // :test // [ // { -// "inputs": -// [ +// "inputs": [ // { // "internalType": "uint256", // "name": "k", @@ -16,8 +15,7 @@ contract test { // } // ], // "name": "f", -// "outputs": -// [ +// "outputs": [ // { // "internalType": "uint256", // "name": "", diff --git a/test/libsolidity/ABIJson/errors.sol b/test/libsolidity/ABIJson/errors.sol index 91c76ce6f..86b16dd85 100644 --- a/test/libsolidity/ABIJson/errors.sol +++ b/test/libsolidity/ABIJson/errors.sol @@ -13,8 +13,7 @@ contract X { // :X // [ // { -// "inputs": -// [ +// "inputs": [ // { // "internalType": "uint256", // "name": "", @@ -25,8 +24,7 @@ contract X { // "type": "error" // }, // { -// "inputs": -// [ +// "inputs": [ // { // "internalType": "uint256", // "name": "a", @@ -42,8 +40,7 @@ contract X { // "type": "error" // }, // { -// "inputs": -// [ +// "inputs": [ // { // "internalType": "uint256", // "name": "a", @@ -59,11 +56,9 @@ contract X { // "type": "error" // }, // { -// "inputs": -// [ +// "inputs": [ // { -// "components": -// [ +// "components": [ // { // "internalType": "uint256", // "name": "x", diff --git a/test/libsolidity/ABIJson/errors_referenced.sol b/test/libsolidity/ABIJson/errors_referenced.sol index ecb5b1003..a624bda10 100644 --- a/test/libsolidity/ABIJson/errors_referenced.sol +++ b/test/libsolidity/ABIJson/errors_referenced.sol @@ -34,8 +34,7 @@ contract X is C { // :D // [ // { -// "inputs": -// [ +// "inputs": [ // { // "internalType": "uint256", // "name": "", @@ -61,8 +60,7 @@ contract X is C { // "type": "error" // }, // { -// "inputs": -// [ +// "inputs": [ // { // "internalType": "uint256", // "name": "", @@ -78,8 +76,7 @@ contract X is C { // "type": "error" // }, // { -// "inputs": -// [ +// "inputs": [ // { // "internalType": "uint256", // "name": "x", diff --git a/test/libsolidity/ABIJson/event_structs.sol b/test/libsolidity/ABIJson/event_structs.sol index 83431907a..6c1ec3b17 100644 --- a/test/libsolidity/ABIJson/event_structs.sol +++ b/test/libsolidity/ABIJson/event_structs.sol @@ -9,11 +9,9 @@ contract C { // [ // { // "anonymous": false, -// "inputs": -// [ +// "inputs": [ // { -// "components": -// [ +// "components": [ // { // "internalType": "uint256[2]", // "name": "x", @@ -26,16 +24,14 @@ contract C { // "type": "tuple" // }, // { -// "components": -// [ +// "components": [ // { // "internalType": "uint256", // "name": "a", // "type": "uint256" // }, // { -// "components": -// [ +// "components": [ // { // "internalType": "uint256[2]", // "name": "x", diff --git a/test/libsolidity/ABIJson/events.sol b/test/libsolidity/ABIJson/events.sol index bab6a7436..8c8cfc4a2 100644 --- a/test/libsolidity/ABIJson/events.sol +++ b/test/libsolidity/ABIJson/events.sol @@ -10,8 +10,7 @@ contract test { // [ // { // "anonymous": false, -// "inputs": -// [ +// "inputs": [ // { // "indexed": false, // "internalType": "uint256", @@ -36,8 +35,7 @@ contract test { // }, // { // "anonymous": false, -// "inputs": -// [ +// "inputs": [ // { // "indexed": false, // "internalType": "uint256", @@ -55,8 +53,7 @@ contract test { // "type": "event" // }, // { -// "inputs": -// [ +// "inputs": [ // { // "internalType": "uint256", // "name": "a", @@ -64,8 +61,7 @@ contract test { // } // ], // "name": "f", -// "outputs": -// [ +// "outputs": [ // { // "internalType": "uint256", // "name": "d", diff --git a/test/libsolidity/ABIJson/function_type.sol b/test/libsolidity/ABIJson/function_type.sol index 51e36b92b..ab20bbb14 100644 --- a/test/libsolidity/ABIJson/function_type.sol +++ b/test/libsolidity/ABIJson/function_type.sol @@ -5,8 +5,7 @@ contract test { // :test // [ // { -// "inputs": -// [ +// "inputs": [ // { // "internalType": "function (uint256) external returns (uint256)", // "name": "x", diff --git a/test/libsolidity/ABIJson/function_type_extended.sol b/test/libsolidity/ABIJson/function_type_extended.sol index 6257bb4c4..cac235d6c 100644 --- a/test/libsolidity/ABIJson/function_type_extended.sol +++ b/test/libsolidity/ABIJson/function_type_extended.sol @@ -5,8 +5,7 @@ contract test { // :test // [ // { -// "inputs": -// [ +// "inputs": [ // { // "internalType": "function (contract test) external returns (contract test[])", // "name": "x", diff --git a/test/libsolidity/ABIJson/global_struct.sol b/test/libsolidity/ABIJson/global_struct.sol index 11ce8246f..960cda232 100644 --- a/test/libsolidity/ABIJson/global_struct.sol +++ b/test/libsolidity/ABIJson/global_struct.sol @@ -8,11 +8,9 @@ contract C { // :C // [ // { -// "inputs": -// [ +// "inputs": [ // { -// "components": -// [ +// "components": [ // { // "internalType": "uint256", // "name": "a", @@ -30,11 +28,9 @@ contract C { // "type": "function" // }, // { -// "inputs": -// [ +// "inputs": [ // { -// "components": -// [ +// "components": [ // { // "internalType": "uint256", // "name": "a", diff --git a/test/libsolidity/ABIJson/inherited.sol b/test/libsolidity/ABIJson/inherited.sol index cdd8296d8..681cc892b 100644 --- a/test/libsolidity/ABIJson/inherited.sol +++ b/test/libsolidity/ABIJson/inherited.sol @@ -11,8 +11,7 @@ contract Derived is Base { // [ // { // "anonymous": false, -// "inputs": -// [ +// "inputs": [ // { // "indexed": true, // "internalType": "bytes32", @@ -24,8 +23,7 @@ contract Derived is Base { // "type": "event" // }, // { -// "inputs": -// [ +// "inputs": [ // { // "internalType": "uint256", // "name": "p", @@ -33,8 +31,7 @@ contract Derived is Base { // } // ], // "name": "baseFunction", -// "outputs": -// [ +// "outputs": [ // { // "internalType": "uint256", // "name": "i", @@ -51,8 +48,7 @@ contract Derived is Base { // [ // { // "anonymous": false, -// "inputs": -// [ +// "inputs": [ // { // "indexed": true, // "internalType": "bytes32", @@ -65,8 +61,7 @@ contract Derived is Base { // }, // { // "anonymous": false, -// "inputs": -// [ +// "inputs": [ // { // "indexed": true, // "internalType": "uint256", @@ -78,8 +73,7 @@ contract Derived is Base { // "type": "event" // }, // { -// "inputs": -// [ +// "inputs": [ // { // "internalType": "uint256", // "name": "p", @@ -87,8 +81,7 @@ contract Derived is Base { // } // ], // "name": "baseFunction", -// "outputs": -// [ +// "outputs": [ // { // "internalType": "uint256", // "name": "i", @@ -99,8 +92,7 @@ contract Derived is Base { // "type": "function" // }, // { -// "inputs": -// [ +// "inputs": [ // { // "internalType": "bytes32", // "name": "p", @@ -108,8 +100,7 @@ contract Derived is Base { // } // ], // "name": "derivedFunction", -// "outputs": -// [ +// "outputs": [ // { // "internalType": "bytes32", // "name": "i", diff --git a/test/libsolidity/ABIJson/library_function.sol b/test/libsolidity/ABIJson/library_function.sol index 5fe404e95..2a27729fc 100644 --- a/test/libsolidity/ABIJson/library_function.sol +++ b/test/libsolidity/ABIJson/library_function.sol @@ -12,8 +12,7 @@ library test { // :test // [ // { -// "inputs": -// [ +// "inputs": [ // { // "internalType": "uint256[]", // "name": "c", @@ -26,8 +25,7 @@ library test { // } // ], // "name": "f1", -// "outputs": -// [ +// "outputs": [ // { // "internalType": "uint256[]", // "name": "e", diff --git a/test/libsolidity/ABIJson/multiple_methods.sol b/test/libsolidity/ABIJson/multiple_methods.sol index f4738e6ea..6ff81c4a6 100644 --- a/test/libsolidity/ABIJson/multiple_methods.sol +++ b/test/libsolidity/ABIJson/multiple_methods.sol @@ -6,8 +6,7 @@ contract test { // :test // [ // { -// "inputs": -// [ +// "inputs": [ // { // "internalType": "uint256", // "name": "a", @@ -15,8 +14,7 @@ contract test { // } // ], // "name": "f", -// "outputs": -// [ +// "outputs": [ // { // "internalType": "uint256", // "name": "d", @@ -27,8 +25,7 @@ contract test { // "type": "function" // }, // { -// "inputs": -// [ +// "inputs": [ // { // "internalType": "uint256", // "name": "b", @@ -36,8 +33,7 @@ contract test { // } // ], // "name": "g", -// "outputs": -// [ +// "outputs": [ // { // "internalType": "uint256", // "name": "e", diff --git a/test/libsolidity/ABIJson/multiple_methods_order.sol b/test/libsolidity/ABIJson/multiple_methods_order.sol index 606c80db3..fdc9b6d64 100644 --- a/test/libsolidity/ABIJson/multiple_methods_order.sol +++ b/test/libsolidity/ABIJson/multiple_methods_order.sol @@ -7,8 +7,7 @@ contract test { // :test // [ // { -// "inputs": -// [ +// "inputs": [ // { // "internalType": "uint256", // "name": "b", @@ -16,8 +15,7 @@ contract test { // } // ], // "name": "c", -// "outputs": -// [ +// "outputs": [ // { // "internalType": "uint256", // "name": "e", @@ -28,8 +26,7 @@ contract test { // "type": "function" // }, // { -// "inputs": -// [ +// "inputs": [ // { // "internalType": "uint256", // "name": "a", @@ -37,8 +34,7 @@ contract test { // } // ], // "name": "f", -// "outputs": -// [ +// "outputs": [ // { // "internalType": "uint256", // "name": "d", diff --git a/test/libsolidity/ABIJson/multiple_params.sol b/test/libsolidity/ABIJson/multiple_params.sol index e223fc3eb..9657905c9 100644 --- a/test/libsolidity/ABIJson/multiple_params.sol +++ b/test/libsolidity/ABIJson/multiple_params.sol @@ -5,8 +5,7 @@ contract test { // :test // [ // { -// "inputs": -// [ +// "inputs": [ // { // "internalType": "uint256", // "name": "a", @@ -19,8 +18,7 @@ contract test { // } // ], // "name": "f", -// "outputs": -// [ +// "outputs": [ // { // "internalType": "uint256", // "name": "d", diff --git a/test/libsolidity/ABIJson/payable_constructor_abi.sol b/test/libsolidity/ABIJson/payable_constructor_abi.sol index 579e83efb..aa74e2a3f 100644 --- a/test/libsolidity/ABIJson/payable_constructor_abi.sol +++ b/test/libsolidity/ABIJson/payable_constructor_abi.sol @@ -5,8 +5,7 @@ contract test { // :test // [ // { -// "inputs": -// [ +// "inputs": [ // { // "internalType": "uint256", // "name": "param1", diff --git a/test/libsolidity/ABIJson/pure_function.sol b/test/libsolidity/ABIJson/pure_function.sol index c98431eb2..38c51ebf5 100644 --- a/test/libsolidity/ABIJson/pure_function.sol +++ b/test/libsolidity/ABIJson/pure_function.sol @@ -6,8 +6,7 @@ contract test { // :test // [ // { -// "inputs": -// [ +// "inputs": [ // { // "internalType": "uint32", // "name": "a", @@ -15,8 +14,7 @@ contract test { // } // ], // "name": "boo", -// "outputs": -// [ +// "outputs": [ // { // "internalType": "uint256", // "name": "b", @@ -27,8 +25,7 @@ contract test { // "type": "function" // }, // { -// "inputs": -// [ +// "inputs": [ // { // "internalType": "uint256", // "name": "a", @@ -41,8 +38,7 @@ contract test { // } // ], // "name": "foo", -// "outputs": -// [ +// "outputs": [ // { // "internalType": "uint256", // "name": "d", diff --git a/test/libsolidity/ABIJson/return_param_in_abi.sol b/test/libsolidity/ABIJson/return_param_in_abi.sol index 23995d62a..754c474a0 100644 --- a/test/libsolidity/ABIJson/return_param_in_abi.sol +++ b/test/libsolidity/ABIJson/return_param_in_abi.sol @@ -11,8 +11,7 @@ contract test { // :test // [ // { -// "inputs": -// [ +// "inputs": [ // { // "internalType": "enum test.ActionChoices", // "name": "param", @@ -25,8 +24,7 @@ contract test { // { // "inputs": [], // "name": "ret", -// "outputs": -// [ +// "outputs": [ // { // "internalType": "enum test.ActionChoices", // "name": "", diff --git a/test/libsolidity/ABIJson/return_structs.sol b/test/libsolidity/ABIJson/return_structs.sol index 9a1e493d5..a0bcb84b4 100644 --- a/test/libsolidity/ABIJson/return_structs.sol +++ b/test/libsolidity/ABIJson/return_structs.sol @@ -11,24 +11,21 @@ contract C { // { // "inputs": [], // "name": "f", -// "outputs": -// [ +// "outputs": [ // { // "internalType": "uint256", // "name": "x", // "type": "uint256" // }, // { -// "components": -// [ +// "components": [ // { // "internalType": "uint256", // "name": "a", // "type": "uint256" // }, // { -// "components": -// [ +// "components": [ // { // "internalType": "uint256[2]", // "name": "x", diff --git a/test/libsolidity/ABIJson/return_structs_with_contracts.sol b/test/libsolidity/ABIJson/return_structs_with_contracts.sol index 135c3295f..9c8e81d14 100644 --- a/test/libsolidity/ABIJson/return_structs_with_contracts.sol +++ b/test/libsolidity/ABIJson/return_structs_with_contracts.sol @@ -10,11 +10,9 @@ contract C { // { // "inputs": [], // "name": "f", -// "outputs": -// [ +// "outputs": [ // { -// "components": -// [ +// "components": [ // { // "internalType": "contract C[]", // "name": "x", diff --git a/test/libsolidity/ABIJson/structs_and_arrays.sol b/test/libsolidity/ABIJson/structs_and_arrays.sol index b2c6bc0ad..a4f1bc4d6 100644 --- a/test/libsolidity/ABIJson/structs_and_arrays.sol +++ b/test/libsolidity/ABIJson/structs_and_arrays.sol @@ -6,8 +6,7 @@ contract test { // :test // [ // { -// "inputs": -// [ +// "inputs": [ // { // "internalType": "string", // "name": "a", diff --git a/test/libsolidity/ABIJson/structs_in_libraries.sol b/test/libsolidity/ABIJson/structs_in_libraries.sol index 3f278337f..edc76327a 100644 --- a/test/libsolidity/ABIJson/structs_in_libraries.sol +++ b/test/libsolidity/ABIJson/structs_in_libraries.sol @@ -9,19 +9,16 @@ library L { // :L // [ // { -// "inputs": -// [ +// "inputs": [ // { -// "components": -// [ +// "components": [ // { // "internalType": "uint256", // "name": "a", // "type": "uint256" // }, // { -// "components": -// [ +// "components": [ // { // "internalType": "uint256[2]", // "name": "x", diff --git a/test/libsolidity/ABIJson/user_defined_value_type.sol b/test/libsolidity/ABIJson/user_defined_value_type.sol index 3bd034e6a..d20ff9903 100644 --- a/test/libsolidity/ABIJson/user_defined_value_type.sol +++ b/test/libsolidity/ABIJson/user_defined_value_type.sol @@ -33,8 +33,7 @@ contract C { // { // "inputs": [], // "name": "myAddress", -// "outputs": -// [ +// "outputs": [ // { // "internalType": "C.MyAddress", // "name": "", @@ -47,8 +46,7 @@ contract C { // { // "inputs": [], // "name": "myByte1", -// "outputs": -// [ +// "outputs": [ // { // "internalType": "MyByte1", // "name": "", @@ -61,8 +59,7 @@ contract C { // { // "inputs": [], // "name": "myBytes32", -// "outputs": -// [ +// "outputs": [ // { // "internalType": "C.MyBytes32", // "name": "", @@ -75,8 +72,7 @@ contract C { // { // "inputs": [], // "name": "myInt", -// "outputs": -// [ +// "outputs": [ // { // "internalType": "MyInt", // "name": "", @@ -89,8 +85,7 @@ contract C { // { // "inputs": [], // "name": "myUInt8", -// "outputs": -// [ +// "outputs": [ // { // "internalType": "C.MyUInt8", // "name": "", @@ -101,8 +96,7 @@ contract C { // "type": "function" // }, // { -// "inputs": -// [ +// "inputs": [ // { // "internalType": "C.MyAddress", // "name": "a", @@ -115,8 +109,7 @@ contract C { // "type": "function" // }, // { -// "inputs": -// [ +// "inputs": [ // { // "internalType": "MyByte1", // "name": "a", @@ -129,8 +122,7 @@ contract C { // "type": "function" // }, // { -// "inputs": -// [ +// "inputs": [ // { // "internalType": "C.MyBytes32", // "name": "a", @@ -143,8 +135,7 @@ contract C { // "type": "function" // }, // { -// "inputs": -// [ +// "inputs": [ // { // "internalType": "MyInt", // "name": "a", @@ -157,8 +148,7 @@ contract C { // "type": "function" // }, // { -// "inputs": -// [ +// "inputs": [ // { // "internalType": "C.MyUInt8", // "name": "a", diff --git a/test/libsolidity/ABIJson/view_function.sol b/test/libsolidity/ABIJson/view_function.sol index d5f54ecde..88f03d636 100644 --- a/test/libsolidity/ABIJson/view_function.sol +++ b/test/libsolidity/ABIJson/view_function.sol @@ -6,8 +6,7 @@ contract test { // :test // [ // { -// "inputs": -// [ +// "inputs": [ // { // "internalType": "uint32", // "name": "a", @@ -15,8 +14,7 @@ contract test { // } // ], // "name": "boo", -// "outputs": -// [ +// "outputs": [ // { // "internalType": "uint256", // "name": "b", @@ -27,8 +25,7 @@ contract test { // "type": "function" // }, // { -// "inputs": -// [ +// "inputs": [ // { // "internalType": "uint256", // "name": "a", @@ -41,8 +38,7 @@ contract test { // } // ], // "name": "foo", -// "outputs": -// [ +// "outputs": [ // { // "internalType": "uint256", // "name": "d",