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

Method checkHashCollisions

libsolidity/analysis/ContractLevelChecker.cpp:503–517  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

501}
502
503void ContractLevelChecker::checkHashCollisions(ContractDefinition const& _contract)
504{
505 std::set<util::FixedHash<4>> hashes;
506 for (auto const& it: _contract.interfaceFunctionList())
507 {
508 util::FixedHash<4> const& hash = it.first;
509 if (hashes.count(hash))
510 m_errorReporter.fatalTypeError(
511 1860_error,
512 _contract.location(),
513 std::string("Function signature hash collision for ") + it.second->externalSignature()
514 );
515 hashes.insert(hash);
516 }
517}
518
519void ContractLevelChecker::checkLibraryRequirements(ContractDefinition const& _contract)
520{

Callers

nothing calls this directly

Calls 5

fatalTypeErrorMethod · 0.80
insertMethod · 0.80
countMethod · 0.45
locationMethod · 0.45
externalSignatureMethod · 0.45

Tested by

no test coverage detected