aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/ast/AST.cpp
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2019-01-18 03:08:17 +0800
committerchriseth <chris@ethereum.org>2019-01-18 03:36:48 +0800
commita9fa2658d8690f18aa14c599a305cf59a5cd4e3c (patch)
tree7a22383ee804bee3b730db86adb2adf63240b600 /libsolidity/ast/AST.cpp
parent01ad4bffe7e16251efdf17121479369cabe5f993 (diff)
downloaddexon-solidity-a9fa2658d8690f18aa14c599a305cf59a5cd4e3c.tar.gz
dexon-solidity-a9fa2658d8690f18aa14c599a305cf59a5cd4e3c.tar.zst
dexon-solidity-a9fa2658d8690f18aa14c599a305cf59a5cd4e3c.zip
Add helper to show if contract can be deployed.
Diffstat (limited to 'libsolidity/ast/AST.cpp')
-rw-r--r--libsolidity/ast/AST.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/libsolidity/ast/AST.cpp b/libsolidity/ast/AST.cpp
index f379d758..4cf8b1e8 100644
--- a/libsolidity/ast/AST.cpp
+++ b/libsolidity/ast/AST.cpp
@@ -138,6 +138,11 @@ bool ContractDefinition::constructorIsPublic() const
return !f || f->isPublic();
}
+bool ContractDefinition::canBeDeployed() const
+{
+ return constructorIsPublic() && annotation().unimplementedFunctions.empty();
+}
+
FunctionDefinition const* ContractDefinition::fallbackFunction() const
{
for (ContractDefinition const* contract: annotation().linearizedBaseContracts)