File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -142,6 +142,8 @@ std::optional<ABIType> isFixedPoint(std::string const& type)
142142
143143std::string functionSignatureFromABI (Json const & _functionABI)
144144{
145+ soltestAssert (_functionABI.contains (" name" ));
146+
145147 auto inputs = _functionABI[" inputs" ];
146148 std::string signature = {_functionABI[" name" ].get <std::string>() + " (" };
147149 size_t parameterCount = 0 ;
@@ -169,7 +171,9 @@ std::optional<solidity::frontend::test::ParameterList> ContractABIUtils::paramet
169171 return std::nullopt ;
170172
171173 for (auto const & function: _contractABI)
172- if (_functionSignature == functionSignatureFromABI (function))
174+ // ABI may contain functions without names (constructor, fallback, receive). Since name is
175+ // necessary to calculate the signature, these cannot possibly match and can be safely ignored.
176+ if (function.contains (" name" ) && _functionSignature == functionSignatureFromABI (function))
173177 {
174178 ParameterList inplaceTypeParams;
175179 ParameterList dynamicTypeParams;
You can’t perform that action at this time.
0 commit comments