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

Method checkStorageSize

libsolidity/analysis/ContractLevelChecker.cpp:592–606  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

590}
591
592void ContractLevelChecker::checkStorageSize(ContractDefinition const& _contract)
593{
594 using enum VariableDeclaration::Location;
595 for (VariableDeclaration::Location location: {Unspecified, Transient})
596 {
597 bigint size = contractStorageSizeUpperBound(_contract, location);
598 if (size >= bigint(1) << 256)
599 {
600 if (location == Unspecified)
601 m_errorReporter.typeError(7676_error, _contract.location(), "Contract requires too much storage.");
602 else
603 m_errorReporter.typeError(5026_error, _contract.location(), "Contract requires too much transient storage.");
604 }
605 }
606}

Callers

nothing calls this directly

Calls 3

typeErrorMethod · 0.80
locationMethod · 0.45

Tested by

no test coverage detected