Change AST::interfaceId() to uint32_t

This commit is contained in:
Alex Beregszaszi 2020-11-11 18:36:50 +00:00
parent 8d315ee130
commit 82997fbf5e
2 changed files with 4 additions and 4 deletions

View File

@ -198,11 +198,11 @@ vector<pair<util::FixedHash<4>, FunctionTypePointer>> const& ContractDefinition:
}); });
} }
uint64_t ContractDefinition::interfaceId() const uint32_t ContractDefinition::interfaceId() const
{ {
uint64_t result{0}; uint32_t result{0};
for (auto const& function: interfaceFunctionList(false)) for (auto const& function: interfaceFunctionList(false))
result ^= util::fromBigEndian<uint64_t>(function.first.ref()); result ^= util::fromBigEndian<uint32_t>(function.first.ref());
return result; return result;
} }

View File

@ -515,7 +515,7 @@ public:
std::map<util::FixedHash<4>, FunctionTypePointer> interfaceFunctions(bool _includeInheritedFunctions = true) const; std::map<util::FixedHash<4>, FunctionTypePointer> interfaceFunctions(bool _includeInheritedFunctions = true) const;
std::vector<std::pair<util::FixedHash<4>, FunctionTypePointer>> const& interfaceFunctionList(bool _includeInheritedFunctions = true) const; std::vector<std::pair<util::FixedHash<4>, FunctionTypePointer>> const& interfaceFunctionList(bool _includeInheritedFunctions = true) const;
/// @returns the EIP-165 compatible interface identifier. This will exclude inherited functions. /// @returns the EIP-165 compatible interface identifier. This will exclude inherited functions.
uint64_t interfaceId() const; uint32_t interfaceId() const;
/// @returns a list of all declarations in this contract /// @returns a list of all declarations in this contract
std::vector<Declaration const*> declarations() const { return filteredNodes<Declaration>(m_subNodes); } std::vector<Declaration const*> declarations() const { return filteredNodes<Declaration>(m_subNodes); }