MCPcopy Create free account
hub / github.com/argotorg/solidity / checkKeys

Function checkKeys

libsolidity/interface/StandardCompiler.cpp:456–466  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

454}
455
456std::optional<Json> checkKeys(Json const& _input, std::set<std::string> const& _keys, std::string const& _name)
457{
458 if (!_input.empty() && !_input.is_object())
459 return formatFatalError(Error::Type::JSONError, "\"" + _name + "\" must be an object");
460
461 for (auto const& [member, _]: _input.items())
462 if (!_keys.count(member))
463 return formatFatalError(Error::Type::JSONError, "Unknown key \"" + member + "\"");
464
465 return std::nullopt;
466}
467
468std::optional<Json> checkRootKeys(Json const& _input)
469{

Callers 10

checkRootKeysFunction · 0.85
checkSourceKeysFunction · 0.85
checkAuxiliaryInputKeysFunction · 0.85
checkSettingsKeysFunction · 0.85
checkOptimizerKeysFunction · 0.85
checkMetadataKeysFunction · 0.85
parseOptimizerSettingsFunction · 0.85
parseInputMethod · 0.85

Calls 3

formatFatalErrorFunction · 0.85
emptyMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected