Add helper to show if contract can be deployed.

This commit is contained in:
chriseth
2019-01-17 20:36:48 +01:00
parent 01ad4bffe7
commit a9fa2658d8
4 changed files with 11 additions and 6 deletions
+1 -1
View File
@@ -3423,7 +3423,7 @@ MemberList::MemberMap MagicType::nativeMembers(ContractDefinition const*) const
"Only contracts supported for now"
);
ContractDefinition const& contract = dynamic_cast<ContractType const&>(*m_typeArgument).contractDefinition();
if (contract.annotation().unimplementedFunctions.empty() && contract.constructorIsPublic())
if (contract.canBeDeployed())
return MemberList::MemberMap({
{"creationCode", std::make_shared<ArrayType>(DataLocation::Memory)},
{"runtimeCode", std::make_shared<ArrayType>(DataLocation::Memory)}