diff --git a/Changelog.md b/Changelog.md index a6d9ab65f..e0d9a9fef 100644 --- a/Changelog.md +++ b/Changelog.md @@ -38,6 +38,7 @@ Language Features: * Introduce ``virtual`` and ``override`` keywords. * Modify ``push(element)`` for dynamic storage arrays such that it does not return the new length anymore. * Yul: Introduce ``leave`` statement that exits the current function. + * JSON AST: Add the function selector of each externally-visible FunctonDefinition to the AST JSON export. Compiler Features: * Allow revert strings to be stripped from the binary using the ``--revert-strings`` option or the ``settings.debug.revertStrings`` setting. diff --git a/libsolidity/ast/AST.cpp b/libsolidity/ast/AST.cpp index 34035d536..140fe7a99 100644 --- a/libsolidity/ast/AST.cpp +++ b/libsolidity/ast/AST.cpp @@ -368,6 +368,11 @@ string FunctionDefinition::externalSignature() const return TypeProvider::function(*this)->externalSignature(); } +string FunctionDefinition::externalIdentifierHex() const +{ + return TypeProvider::function(*this)->externalIdentifierHex(); +} + FunctionDefinitionAnnotation& FunctionDefinition::annotation() const { if (!m_annotation) @@ -596,6 +601,12 @@ set VariableDeclaration::allowedDataLocations() c return set{ Location::Unspecified }; } +string VariableDeclaration::externalIdentifierHex() const +{ + solAssert(isStateVariable() && isPublic(), "Can only be called for public state variables"); + return TypeProvider::function(*this)->externalIdentifierHex(); +} + TypePointer VariableDeclaration::type() const { return annotation().type; diff --git a/libsolidity/ast/AST.h b/libsolidity/ast/AST.h index 7ca665890..f761fe7af 100644 --- a/libsolidity/ast/AST.h +++ b/libsolidity/ast/AST.h @@ -708,6 +708,9 @@ public: /// arguments separated by commas all enclosed in parentheses without any spaces. std::string externalSignature() const; + /// @returns the external identifier of this function (the hash of the signature) as a hex string. + std::string externalIdentifierHex() const; + ContractDefinition::ContractKind inContractKind() const; TypePointer type() const override; @@ -807,6 +810,9 @@ public: /// @returns a set of allowed storage locations for the variable. std::set allowedDataLocations() const; + /// @returns the external identifier of this variable (the hash of the signature) as a hex string (works only for public state variables). + std::string externalIdentifierHex() const; + TypePointer type() const override; /// @param _internal false indicates external interface is concerned, true indicates internal interface is concerned. diff --git a/libsolidity/ast/ASTJsonConverter.cpp b/libsolidity/ast/ASTJsonConverter.cpp index 798b71b88..b7b8e9cbc 100644 --- a/libsolidity/ast/ASTJsonConverter.cpp +++ b/libsolidity/ast/ASTJsonConverter.cpp @@ -362,6 +362,8 @@ bool ASTJsonConverter::visit(FunctionDefinition const& _node) make_pair("implemented", _node.isImplemented()), make_pair("scope", idOrNull(_node.scope())) }; + if (_node.isPartOfExternalInterface()) + attributes.emplace_back("functionSelector", _node.externalIdentifierHex()); if (!_node.annotation().baseFunctions.empty()) attributes.emplace_back(make_pair("baseFunctions", getContainerIds(_node.annotation().baseFunctions, true))); if (m_legacy) @@ -384,6 +386,8 @@ bool ASTJsonConverter::visit(VariableDeclaration const& _node) make_pair("scope", idOrNull(_node.scope())), make_pair("typeDescriptions", typePointerToJson(_node.annotation().type, true)) }; + if (_node.isStateVariable() && _node.isPublic()) + attributes.emplace_back("functionSelector", _node.externalIdentifierHex()); if (m_inEvent) attributes.emplace_back("indexed", _node.isIndexed()); if (!_node.annotation().baseFunctions.empty()) diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp index bf407b112..b8228f121 100644 --- a/libsolidity/ast/Types.cpp +++ b/libsolidity/ast/Types.cpp @@ -3174,6 +3174,11 @@ u256 FunctionType::externalIdentifier() const return FixedHash<4>::Arith(FixedHash<4>(dev::keccak256(externalSignature()))); } +string FunctionType::externalIdentifierHex() const +{ + return FixedHash<4>(dev::keccak256(externalSignature())).hex(); +} + bool FunctionType::isPure() const { // TODO: replace this with m_stateMutability == StateMutability::Pure once diff --git a/libsolidity/ast/Types.h b/libsolidity/ast/Types.h index 588e8b8cf..3bc2aa0ae 100644 --- a/libsolidity/ast/Types.h +++ b/libsolidity/ast/Types.h @@ -1190,6 +1190,8 @@ public: std::string externalSignature() const; /// @returns the external identifier of this function (the hash of the signature). u256 externalIdentifier() const; + /// @returns the external identifier of this function (the hash of the signature) as a hex string. + std::string externalIdentifierHex() const; Declaration const& declaration() const { solAssert(m_declaration, "Requested declaration from a FunctionType that has none"); diff --git a/test/cmdlineTests/recovery_ast_constructor/output b/test/cmdlineTests/recovery_ast_constructor/output index ce6a9c935..e7dd79791 100644 --- a/test/cmdlineTests/recovery_ast_constructor/output +++ b/test/cmdlineTests/recovery_ast_constructor/output @@ -123,6 +123,7 @@ JSON AST: "attributes": { "documentation": null, + "functionSelector": "af11c34c", "implemented": true, "isConstructor": false, "kind": "function", diff --git a/test/cmdlineTests/standard_only_ast_requested/output.json b/test/cmdlineTests/standard_only_ast_requested/output.json index d5622c85a..6ba921abf 100644 --- a/test/cmdlineTests/standard_only_ast_requested/output.json +++ b/test/cmdlineTests/standard_only_ast_requested/output.json @@ -1 +1 @@ -{"sources":{"A":{"ast":{"absolutePath":"A","exportedSymbols":{"C":[6]},"id":7,"nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">=","0.0"],"nodeType":"PragmaDirective","src":"0:22:0"},{"abstract":false,"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":6,"linearizedBaseContracts":[6],"name":"C","nodeType":"ContractDefinition","nodes":[{"body":{"id":4,"nodeType":"Block","src":"61:2:0","statements":[]},"documentation":null,"id":5,"implemented":true,"kind":"function","modifiers":[],"name":"f","nodeType":"FunctionDefinition","overrides":null,"parameters":{"id":2,"nodeType":"ParameterList","parameters":[],"src":"46:2:0"},"returnParameters":{"id":3,"nodeType":"ParameterList","parameters":[],"src":"61:0:0"},"scope":6,"src":"36:27:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":7,"src":"23:42:0"}],"src":"0:65:0"},"id":0}}} +{"sources":{"A":{"ast":{"absolutePath":"A","exportedSymbols":{"C":[6]},"id":7,"nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">=","0.0"],"nodeType":"PragmaDirective","src":"0:22:0"},{"abstract":false,"baseContracts":[],"contractDependencies":[],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":6,"linearizedBaseContracts":[6],"name":"C","nodeType":"ContractDefinition","nodes":[{"body":{"id":4,"nodeType":"Block","src":"61:2:0","statements":[]},"documentation":null,"functionSelector":"26121ff0","id":5,"implemented":true,"kind":"function","modifiers":[],"name":"f","nodeType":"FunctionDefinition","overrides":null,"parameters":{"id":2,"nodeType":"ParameterList","parameters":[],"src":"46:2:0"},"returnParameters":{"id":3,"nodeType":"ParameterList","parameters":[],"src":"61:0:0"},"scope":6,"src":"36:27:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":7,"src":"23:42:0"}],"src":"0:65:0"},"id":0}}} diff --git a/test/libsolidity/ASTJSON/address_payable.json b/test/libsolidity/ASTJSON/address_payable.json index 88439df4a..fbab520af 100644 --- a/test/libsolidity/ASTJSON/address_payable.json +++ b/test/libsolidity/ASTJSON/address_payable.json @@ -29,6 +29,7 @@ [ { "constant": false, + "functionSelector": "97682884", "id": 4, "name": "m", "nodeType": "VariableDeclaration", @@ -489,6 +490,7 @@ ] }, "documentation": null, + "functionSelector": "fc68521a", "id": 38, "implemented": true, "kind": "function", diff --git a/test/libsolidity/ASTJSON/address_payable_legacy.json b/test/libsolidity/ASTJSON/address_payable_legacy.json index 0b36e3ebd..b5f4cf2ff 100644 --- a/test/libsolidity/ASTJSON/address_payable_legacy.json +++ b/test/libsolidity/ASTJSON/address_payable_legacy.json @@ -40,6 +40,7 @@ "attributes": { "constant": false, + "functionSelector": "97682884", "name": "m", "overrides": null, "scope": 39, @@ -93,6 +94,7 @@ "attributes": { "documentation": null, + "functionSelector": "fc68521a", "implemented": true, "isConstructor": false, "kind": "function", diff --git a/test/libsolidity/ASTJSON/assembly/call.json b/test/libsolidity/ASTJSON/assembly/call.json index 60b626076..25558da84 100644 --- a/test/libsolidity/ASTJSON/assembly/call.json +++ b/test/libsolidity/ASTJSON/assembly/call.json @@ -132,6 +132,7 @@ ] }, "documentation": null, + "functionSelector": "b582ec5f", "id": 5, "implemented": true, "kind": "function", diff --git a/test/libsolidity/ASTJSON/assembly/call_legacy.json b/test/libsolidity/ASTJSON/assembly/call_legacy.json index afb4690e7..478365834 100644 --- a/test/libsolidity/ASTJSON/assembly/call_legacy.json +++ b/test/libsolidity/ASTJSON/assembly/call_legacy.json @@ -40,6 +40,7 @@ "attributes": { "documentation": null, + "functionSelector": "b582ec5f", "implemented": true, "isConstructor": false, "kind": "function", diff --git a/test/libsolidity/ASTJSON/assembly/function.json b/test/libsolidity/ASTJSON/assembly/function.json index 58ff22cf7..93a5be76a 100644 --- a/test/libsolidity/ASTJSON/assembly/function.json +++ b/test/libsolidity/ASTJSON/assembly/function.json @@ -119,6 +119,7 @@ ] }, "documentation": null, + "functionSelector": "b8c9d365", "id": 5, "implemented": true, "kind": "function", diff --git a/test/libsolidity/ASTJSON/assembly/function_legacy.json b/test/libsolidity/ASTJSON/assembly/function_legacy.json index ec13e011a..9af45691c 100644 --- a/test/libsolidity/ASTJSON/assembly/function_legacy.json +++ b/test/libsolidity/ASTJSON/assembly/function_legacy.json @@ -40,6 +40,7 @@ "attributes": { "documentation": null, + "functionSelector": "b8c9d365", "implemented": true, "isConstructor": false, "kind": "function", diff --git a/test/libsolidity/ASTJSON/assembly/leave.json b/test/libsolidity/ASTJSON/assembly/leave.json index 625e2118a..0ccbab2cf 100644 --- a/test/libsolidity/ASTJSON/assembly/leave.json +++ b/test/libsolidity/ASTJSON/assembly/leave.json @@ -69,6 +69,7 @@ ] }, "documentation": null, + "functionSelector": "ece866b9", "id": 5, "implemented": true, "kind": "function", diff --git a/test/libsolidity/ASTJSON/assembly/leave_legacy.json b/test/libsolidity/ASTJSON/assembly/leave_legacy.json index 7b80029f2..a1a4f7591 100644 --- a/test/libsolidity/ASTJSON/assembly/leave_legacy.json +++ b/test/libsolidity/ASTJSON/assembly/leave_legacy.json @@ -40,6 +40,7 @@ "attributes": { "documentation": null, + "functionSelector": "ece866b9", "implemented": true, "isConstructor": false, "kind": "function", diff --git a/test/libsolidity/ASTJSON/assembly/loop.json b/test/libsolidity/ASTJSON/assembly/loop.json index f10e8d371..9ad3f4f88 100644 --- a/test/libsolidity/ASTJSON/assembly/loop.json +++ b/test/libsolidity/ASTJSON/assembly/loop.json @@ -132,6 +132,7 @@ ] }, "documentation": null, + "functionSelector": "e2179b8e", "id": 5, "implemented": true, "kind": "function", diff --git a/test/libsolidity/ASTJSON/assembly/loop_legacy.json b/test/libsolidity/ASTJSON/assembly/loop_legacy.json index fd67460c1..109962d01 100644 --- a/test/libsolidity/ASTJSON/assembly/loop_legacy.json +++ b/test/libsolidity/ASTJSON/assembly/loop_legacy.json @@ -40,6 +40,7 @@ "attributes": { "documentation": null, + "functionSelector": "e2179b8e", "implemented": true, "isConstructor": false, "kind": "function", diff --git a/test/libsolidity/ASTJSON/assembly/slot_offset.json b/test/libsolidity/ASTJSON/assembly/slot_offset.json index fc02ed2e7..e7f4c6089 100644 --- a/test/libsolidity/ASTJSON/assembly/slot_offset.json +++ b/test/libsolidity/ASTJSON/assembly/slot_offset.json @@ -200,6 +200,7 @@ ] }, "documentation": null, + "functionSelector": "ffae15ba", "id": 10, "implemented": true, "kind": "function", diff --git a/test/libsolidity/ASTJSON/assembly/slot_offset_legacy.json b/test/libsolidity/ASTJSON/assembly/slot_offset_legacy.json index 5c677f0b2..51783a58b 100644 --- a/test/libsolidity/ASTJSON/assembly/slot_offset_legacy.json +++ b/test/libsolidity/ASTJSON/assembly/slot_offset_legacy.json @@ -117,6 +117,7 @@ "attributes": { "documentation": null, + "functionSelector": "ffae15ba", "implemented": true, "isConstructor": false, "kind": "function", diff --git a/test/libsolidity/ASTJSON/assembly/stringlit.json b/test/libsolidity/ASTJSON/assembly/stringlit.json index 623c4c72b..1f328d970 100644 --- a/test/libsolidity/ASTJSON/assembly/stringlit.json +++ b/test/libsolidity/ASTJSON/assembly/stringlit.json @@ -73,6 +73,7 @@ ] }, "documentation": null, + "functionSelector": "5a2ee019", "id": 5, "implemented": true, "kind": "function", diff --git a/test/libsolidity/ASTJSON/assembly/stringlit_legacy.json b/test/libsolidity/ASTJSON/assembly/stringlit_legacy.json index 19d900525..549ed5b40 100644 --- a/test/libsolidity/ASTJSON/assembly/stringlit_legacy.json +++ b/test/libsolidity/ASTJSON/assembly/stringlit_legacy.json @@ -40,6 +40,7 @@ "attributes": { "documentation": null, + "functionSelector": "5a2ee019", "implemented": true, "isConstructor": false, "kind": "function", diff --git a/test/libsolidity/ASTJSON/assembly/switch.json b/test/libsolidity/ASTJSON/assembly/switch.json index 0d09a23b4..b159fb8e4 100644 --- a/test/libsolidity/ASTJSON/assembly/switch.json +++ b/test/libsolidity/ASTJSON/assembly/switch.json @@ -165,6 +165,7 @@ ] }, "documentation": null, + "functionSelector": "26121ff0", "id": 5, "implemented": true, "kind": "function", diff --git a/test/libsolidity/ASTJSON/assembly/switch_legacy.json b/test/libsolidity/ASTJSON/assembly/switch_legacy.json index 50d37f6fd..ea3bfd3d1 100644 --- a/test/libsolidity/ASTJSON/assembly/switch_legacy.json +++ b/test/libsolidity/ASTJSON/assembly/switch_legacy.json @@ -40,6 +40,7 @@ "attributes": { "documentation": null, + "functionSelector": "26121ff0", "implemented": true, "isConstructor": false, "kind": "function", diff --git a/test/libsolidity/ASTJSON/assembly/var_access.json b/test/libsolidity/ASTJSON/assembly/var_access.json index 246d15d09..d6f02aa7d 100644 --- a/test/libsolidity/ASTJSON/assembly/var_access.json +++ b/test/libsolidity/ASTJSON/assembly/var_access.json @@ -124,6 +124,7 @@ ] }, "documentation": null, + "functionSelector": "26121ff0", "id": 8, "implemented": true, "kind": "function", diff --git a/test/libsolidity/ASTJSON/assembly/var_access_legacy.json b/test/libsolidity/ASTJSON/assembly/var_access_legacy.json index 2e6968be1..595da142b 100644 --- a/test/libsolidity/ASTJSON/assembly/var_access_legacy.json +++ b/test/libsolidity/ASTJSON/assembly/var_access_legacy.json @@ -40,6 +40,7 @@ "attributes": { "documentation": null, + "functionSelector": "26121ff0", "implemented": true, "isConstructor": false, "kind": "function", diff --git a/test/libsolidity/ASTJSON/documentation.json b/test/libsolidity/ASTJSON/documentation.json index 4d4458470..8c700498c 100644 --- a/test/libsolidity/ASTJSON/documentation.json +++ b/test/libsolidity/ASTJSON/documentation.json @@ -150,6 +150,7 @@ "statements": [] }, "documentation": "Some comment on fn.", + "functionSelector": "a4a2c40b", "id": 14, "implemented": true, "kind": "function", diff --git a/test/libsolidity/ASTJSON/documentation_legacy.json b/test/libsolidity/ASTJSON/documentation_legacy.json index 37698f287..cd8012d9c 100644 --- a/test/libsolidity/ASTJSON/documentation_legacy.json +++ b/test/libsolidity/ASTJSON/documentation_legacy.json @@ -109,6 +109,7 @@ "attributes": { "documentation": "Some comment on fn.", + "functionSelector": "a4a2c40b", "implemented": true, "isConstructor": false, "kind": "function", diff --git a/test/libsolidity/ASTJSON/function_type.json b/test/libsolidity/ASTJSON/function_type.json index e95857853..33ba4b22a 100644 --- a/test/libsolidity/ASTJSON/function_type.json +++ b/test/libsolidity/ASTJSON/function_type.json @@ -36,6 +36,7 @@ "statements": [] }, "documentation": null, + "functionSelector": "d6cd4974", "id": 16, "implemented": true, "kind": "function", diff --git a/test/libsolidity/ASTJSON/function_type_legacy.json b/test/libsolidity/ASTJSON/function_type_legacy.json index 83249e1dd..8fa58f9c9 100644 --- a/test/libsolidity/ASTJSON/function_type_legacy.json +++ b/test/libsolidity/ASTJSON/function_type_legacy.json @@ -40,6 +40,7 @@ "attributes": { "documentation": null, + "functionSelector": "d6cd4974", "implemented": true, "isConstructor": false, "kind": "function", diff --git a/test/libsolidity/ASTJSON/long_type_name_binary_operation.json b/test/libsolidity/ASTJSON/long_type_name_binary_operation.json index 1e9ac7166..e6d8b4d20 100644 --- a/test/libsolidity/ASTJSON/long_type_name_binary_operation.json +++ b/test/libsolidity/ASTJSON/long_type_name_binary_operation.json @@ -142,6 +142,7 @@ ] }, "documentation": null, + "functionSelector": "26121ff0", "id": 10, "implemented": true, "kind": "function", diff --git a/test/libsolidity/ASTJSON/long_type_name_binary_operation_legacy.json b/test/libsolidity/ASTJSON/long_type_name_binary_operation_legacy.json index 25f88d840..977f783dd 100644 --- a/test/libsolidity/ASTJSON/long_type_name_binary_operation_legacy.json +++ b/test/libsolidity/ASTJSON/long_type_name_binary_operation_legacy.json @@ -40,6 +40,7 @@ "attributes": { "documentation": null, + "functionSelector": "26121ff0", "implemented": true, "isConstructor": false, "kind": "function", diff --git a/test/libsolidity/ASTJSON/long_type_name_identifier.json b/test/libsolidity/ASTJSON/long_type_name_identifier.json index 9e13dc887..5c8951d29 100644 --- a/test/libsolidity/ASTJSON/long_type_name_identifier.json +++ b/test/libsolidity/ASTJSON/long_type_name_identifier.json @@ -149,6 +149,7 @@ ] }, "documentation": null, + "functionSelector": "26121ff0", "id": 14, "implemented": true, "kind": "function", diff --git a/test/libsolidity/ASTJSON/long_type_name_identifier_legacy.json b/test/libsolidity/ASTJSON/long_type_name_identifier_legacy.json index ffcbd47a9..caf807c24 100644 --- a/test/libsolidity/ASTJSON/long_type_name_identifier_legacy.json +++ b/test/libsolidity/ASTJSON/long_type_name_identifier_legacy.json @@ -83,6 +83,7 @@ "attributes": { "documentation": null, + "functionSelector": "26121ff0", "implemented": true, "isConstructor": false, "kind": "function", diff --git a/test/libsolidity/ASTJSON/modifier_definition.json b/test/libsolidity/ASTJSON/modifier_definition.json index 9b1a0ff98..19f7ed184 100644 --- a/test/libsolidity/ASTJSON/modifier_definition.json +++ b/test/libsolidity/ASTJSON/modifier_definition.json @@ -99,6 +99,7 @@ "statements": [] }, "documentation": null, + "functionSelector": "28811f59", "id": 13, "implemented": true, "kind": "function", diff --git a/test/libsolidity/ASTJSON/modifier_definition_legacy.json b/test/libsolidity/ASTJSON/modifier_definition_legacy.json index 8d47ded4f..8f028a474 100644 --- a/test/libsolidity/ASTJSON/modifier_definition_legacy.json +++ b/test/libsolidity/ASTJSON/modifier_definition_legacy.json @@ -107,6 +107,7 @@ "attributes": { "documentation": null, + "functionSelector": "28811f59", "implemented": true, "isConstructor": false, "kind": "function", diff --git a/test/libsolidity/ASTJSON/modifier_invocation.json b/test/libsolidity/ASTJSON/modifier_invocation.json index 9b1a0ff98..19f7ed184 100644 --- a/test/libsolidity/ASTJSON/modifier_invocation.json +++ b/test/libsolidity/ASTJSON/modifier_invocation.json @@ -99,6 +99,7 @@ "statements": [] }, "documentation": null, + "functionSelector": "28811f59", "id": 13, "implemented": true, "kind": "function", diff --git a/test/libsolidity/ASTJSON/modifier_invocation_legacy.json b/test/libsolidity/ASTJSON/modifier_invocation_legacy.json index 8d47ded4f..8f028a474 100644 --- a/test/libsolidity/ASTJSON/modifier_invocation_legacy.json +++ b/test/libsolidity/ASTJSON/modifier_invocation_legacy.json @@ -107,6 +107,7 @@ "attributes": { "documentation": null, + "functionSelector": "28811f59", "implemented": true, "isConstructor": false, "kind": "function", diff --git a/test/libsolidity/ASTJSON/non_utf8.json b/test/libsolidity/ASTJSON/non_utf8.json index 8c2a27e1a..18f6b12dc 100644 --- a/test/libsolidity/ASTJSON/non_utf8.json +++ b/test/libsolidity/ASTJSON/non_utf8.json @@ -89,6 +89,7 @@ ] }, "documentation": null, + "functionSelector": "26121ff0", "id": 7, "implemented": true, "kind": "function", diff --git a/test/libsolidity/ASTJSON/non_utf8_legacy.json b/test/libsolidity/ASTJSON/non_utf8_legacy.json index 5c0260cf2..9f7933020 100644 --- a/test/libsolidity/ASTJSON/non_utf8_legacy.json +++ b/test/libsolidity/ASTJSON/non_utf8_legacy.json @@ -40,6 +40,7 @@ "attributes": { "documentation": null, + "functionSelector": "26121ff0", "implemented": true, "isConstructor": false, "kind": "function", diff --git a/test/libsolidity/ASTJSON/override.json b/test/libsolidity/ASTJSON/override.json index a80070ad7..cb3d0268b 100644 --- a/test/libsolidity/ASTJSON/override.json +++ b/test/libsolidity/ASTJSON/override.json @@ -44,6 +44,7 @@ "statements": [] }, "documentation": null, + "functionSelector": "a399b6a2", "id": 4, "implemented": true, "kind": "function", @@ -120,6 +121,7 @@ { "body": null, "documentation": null, + "functionSelector": "c2985578", "id": 10, "implemented": false, "kind": "function", @@ -160,6 +162,7 @@ "statements": [] }, "documentation": null, + "functionSelector": "a399b6a2", "id": 15, "implemented": true, "kind": "function", @@ -254,6 +257,7 @@ "statements": [] }, "documentation": null, + "functionSelector": "c2985578", "id": 23, "implemented": true, "kind": "function", @@ -300,6 +304,7 @@ "statements": [] }, "documentation": null, + "functionSelector": "a399b6a2", "id": 30, "implemented": true, "kind": "function", diff --git a/test/libsolidity/ASTJSON/override_legacy.json b/test/libsolidity/ASTJSON/override_legacy.json index 5a594d9f8..a9bece4ac 100644 --- a/test/libsolidity/ASTJSON/override_legacy.json +++ b/test/libsolidity/ASTJSON/override_legacy.json @@ -48,6 +48,7 @@ "attributes": { "documentation": null, + "functionSelector": "a399b6a2", "implemented": true, "isConstructor": false, "kind": "function", @@ -163,6 +164,7 @@ { "body": null, "documentation": null, + "functionSelector": "c2985578", "implemented": false, "isConstructor": false, "kind": "function", @@ -218,6 +220,7 @@ 4 ], "documentation": null, + "functionSelector": "a399b6a2", "implemented": true, "isConstructor": false, "kind": "function", @@ -349,6 +352,7 @@ 10 ], "documentation": null, + "functionSelector": "c2985578", "implemented": true, "isConstructor": false, "kind": "function", @@ -428,6 +432,7 @@ 15 ], "documentation": null, + "functionSelector": "a399b6a2", "implemented": true, "isConstructor": false, "kind": "function", diff --git a/test/libsolidity/ASTJSON/short_type_name.json b/test/libsolidity/ASTJSON/short_type_name.json index a21e2d8d7..887f29a1d 100644 --- a/test/libsolidity/ASTJSON/short_type_name.json +++ b/test/libsolidity/ASTJSON/short_type_name.json @@ -93,6 +93,7 @@ ] }, "documentation": null, + "functionSelector": "26121ff0", "id": 10, "implemented": true, "kind": "function", diff --git a/test/libsolidity/ASTJSON/short_type_name_legacy.json b/test/libsolidity/ASTJSON/short_type_name_legacy.json index 99d2f3eee..4d1de106b 100644 --- a/test/libsolidity/ASTJSON/short_type_name_legacy.json +++ b/test/libsolidity/ASTJSON/short_type_name_legacy.json @@ -40,6 +40,7 @@ "attributes": { "documentation": null, + "functionSelector": "26121ff0", "implemented": true, "isConstructor": false, "kind": "function", diff --git a/test/libsolidity/ASTJSON/short_type_name_ref.json b/test/libsolidity/ASTJSON/short_type_name_ref.json index a53ec783d..0aa3d2984 100644 --- a/test/libsolidity/ASTJSON/short_type_name_ref.json +++ b/test/libsolidity/ASTJSON/short_type_name_ref.json @@ -105,6 +105,7 @@ ] }, "documentation": null, + "functionSelector": "26121ff0", "id": 11, "implemented": true, "kind": "function", diff --git a/test/libsolidity/ASTJSON/short_type_name_ref_legacy.json b/test/libsolidity/ASTJSON/short_type_name_ref_legacy.json index 6811d0014..4eec368b6 100644 --- a/test/libsolidity/ASTJSON/short_type_name_ref_legacy.json +++ b/test/libsolidity/ASTJSON/short_type_name_ref_legacy.json @@ -40,6 +40,7 @@ "attributes": { "documentation": null, + "functionSelector": "26121ff0", "implemented": true, "isConstructor": false, "kind": "function", diff --git a/test/libsolidity/ASTJSON/source_location.json b/test/libsolidity/ASTJSON/source_location.json index 6b32a51cf..cc6dd33c9 100644 --- a/test/libsolidity/ASTJSON/source_location.json +++ b/test/libsolidity/ASTJSON/source_location.json @@ -127,6 +127,7 @@ ] }, "documentation": null, + "functionSelector": "26121ff0", "id": 10, "implemented": true, "kind": "function", diff --git a/test/libsolidity/ASTJSON/source_location_legacy.json b/test/libsolidity/ASTJSON/source_location_legacy.json index 36b939504..dfde18975 100644 --- a/test/libsolidity/ASTJSON/source_location_legacy.json +++ b/test/libsolidity/ASTJSON/source_location_legacy.json @@ -40,6 +40,7 @@ "attributes": { "documentation": null, + "functionSelector": "26121ff0", "implemented": true, "isConstructor": false, "kind": "function", diff --git a/test/libsolidity/ASTJSON/two_base_functions.json b/test/libsolidity/ASTJSON/two_base_functions.json index 95a4cb142..7e6e15395 100644 --- a/test/libsolidity/ASTJSON/two_base_functions.json +++ b/test/libsolidity/ASTJSON/two_base_functions.json @@ -44,6 +44,7 @@ "statements": [] }, "documentation": null, + "functionSelector": "26121ff0", "id": 4, "implemented": true, "kind": "function", @@ -100,6 +101,7 @@ "statements": [] }, "documentation": null, + "functionSelector": "26121ff0", "id": 9, "implemented": true, "kind": "function", @@ -209,6 +211,7 @@ "statements": [] }, "documentation": null, + "functionSelector": "26121ff0", "id": 21, "implemented": true, "kind": "function", diff --git a/test/libsolidity/ASTJSON/two_base_functions_legacy.json b/test/libsolidity/ASTJSON/two_base_functions_legacy.json index f12a8b995..bc9e4545c 100644 --- a/test/libsolidity/ASTJSON/two_base_functions_legacy.json +++ b/test/libsolidity/ASTJSON/two_base_functions_legacy.json @@ -48,6 +48,7 @@ "attributes": { "documentation": null, + "functionSelector": "26121ff0", "implemented": true, "isConstructor": false, "kind": "function", @@ -141,6 +142,7 @@ "attributes": { "documentation": null, + "functionSelector": "26121ff0", "implemented": true, "isConstructor": false, "kind": "function", @@ -286,6 +288,7 @@ 9 ], "documentation": null, + "functionSelector": "26121ff0", "implemented": true, "isConstructor": false, "kind": "function",