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

Function staticEncodingSize

libsolidity/codegen/YulUtilFunctions.cpp:45–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43{
44
45std::optional<size_t> staticEncodingSize(std::vector<Type const*> const& _parameterTypes)
46{
47 size_t encodedSize = 0;
48 for (auto* type: _parameterTypes)
49 {
50 if (type->isDynamicallyEncoded())
51 return std::nullopt;
52 encodedSize += type->calldataHeadSize();
53 }
54 return encodedSize;
55}
56
57}
58

Callers 1

revertWithErrorMethod · 0.85

Calls 2

calldataHeadSizeMethod · 0.80
isDynamicallyEncodedMethod · 0.45

Tested by

no test coverage detected