diff --git a/tests/toolchain/abigen-pass/nested_container.abi b/tests/toolchain/abigen-pass/nested_container.abi index 0f9d9055ce..dab639473f 100644 --- a/tests/toolchain/abigen-pass/nested_container.abi +++ b/tests/toolchain/abigen-pass/nested_container.abi @@ -31,11 +31,11 @@ "base": "", "fields": [ { - "name": "key", + "name": "first", "type": "string" }, { - "name": "value", + "name": "second", "type": "B_map_string_string_E" } ] @@ -45,11 +45,11 @@ "base": "", "fields": [ { - "name": "key", + "name": "first", "type": "string" }, { - "name": "value", + "name": "second", "type": "string" } ] @@ -107,4 +107,4 @@ "ricardian_clauses": [], "variants": [], "action_results": [] -} \ No newline at end of file +} diff --git a/tools/include/eosio/abigen.hpp b/tools/include/eosio/abigen.hpp index 0a152fe8ca..cf44e35c26 100644 --- a/tools/include/eosio/abigen.hpp +++ b/tools/include/eosio/abigen.hpp @@ -178,8 +178,8 @@ namespace eosio { namespace cdt { return name.substr(0,i+1); }; map_info.name = remove_ending_brackets(name); - map_info.fields.push_back( {"key", get_template_argument_as_string(type)} ); - map_info.fields.push_back( {"value", get_template_argument_as_string(type, 1)} ); + map_info.fields.push_back( {"first", get_template_argument_as_string(type)} ); + map_info.fields.push_back( {"second", get_template_argument_as_string(type, 1)} ); add_type(std::get(get_template_argument(type))); add_type(std::get(get_template_argument(type, 1))); _abi.structs.insert(map_info); @@ -326,8 +326,8 @@ namespace eosio { namespace cdt { abi_struct kv; kv.name = "pair_" + inside_type_name[0] + "_" + inside_type_name[1]; - kv.fields.push_back( {"key", inside_type_name[0]} ); - kv.fields.push_back( {"value", inside_type_name[1]} ); + kv.fields.push_back( {"first", inside_type_name[0]} ); + kv.fields.push_back( {"second", inside_type_name[1]} ); _abi.structs.insert(kv); gottype = true;