Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion test/libsolidity/util/ContractABIUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ std::optional<ABIType> isFixedPoint(std::string const& type)

std::string functionSignatureFromABI(Json const& _functionABI)
{
soltestAssert(_functionABI.contains("name"));

auto inputs = _functionABI["inputs"];
std::string signature = {_functionABI["name"].get<std::string>() + "("};
size_t parameterCount = 0;
Expand Down Expand Up @@ -169,7 +171,9 @@ std::optional<solidity::frontend::test::ParameterList> ContractABIUtils::paramet
return std::nullopt;

for (auto const& function: _contractABI)
if (_functionSignature == functionSignatureFromABI(function))
// ABI may contain functions without names (constructor, fallback, receive). Since name is
// necessary to calculate the signature, these cannot possibly match and can be safely ignored.
if (function.contains("name") && _functionSignature == functionSignatureFromABI(function))
{
ParameterList inplaceTypeParams;
ParameterList dynamicTypeParams;
Expand Down