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

Method constructorType

libsolidity/ast/Types.cpp:2551–2568  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2549}
2550
2551FunctionTypePointer StructType::constructorType() const
2552{
2553 TypePointers paramTypes;
2554 strings paramNames;
2555 solAssert(!containsNestedMapping(), "");
2556 for (auto const& member: members(nullptr))
2557 {
2558 paramNames.push_back(member.name);
2559 paramTypes.push_back(TypeProvider::withLocationIfReference(DataLocation::Memory, member.type));
2560 }
2561 return TypeProvider::function(
2562 paramTypes,
2563 TypePointers{TypeProvider::withLocation(this, DataLocation::Memory, false)},
2564 paramNames,
2565 strings(1, ""),
2566 FunctionType::Kind::Internal
2567 );
2568}
2569
2570std::pair<u256, unsigned> const& StructType::storageOffsetsOfMember(std::string const& _name) const
2571{

Callers 4

visitMethod · 0.80
sortedArgumentsMethod · 0.80
visitMethod · 0.80
endVisitMethod · 0.80

Calls 1

functionFunction · 0.85

Tested by

no test coverage detected