aboutsummaryrefslogtreecommitdiffstats
path: root/Types.cpp
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2014-12-12 23:49:26 +0800
committerChristian <c@ethdev.com>2014-12-15 20:05:18 +0800
commit2f64c56ef3a49f7551a708f63c4ed836efce7b73 (patch)
tree6dd2a10b9ef7b0a67206991416dd0a74639f66ea /Types.cpp
parentc8586996059c3d2ae3c7025c2d4247073468ed73 (diff)
downloaddexon-solidity-2f64c56ef3a49f7551a708f63c4ed836efce7b73.tar.gz
dexon-solidity-2f64c56ef3a49f7551a708f63c4ed836efce7b73.tar.zst
dexon-solidity-2f64c56ef3a49f7551a708f63c4ed836efce7b73.zip
Create contracts.
Diffstat (limited to 'Types.cpp')
-rw-r--r--Types.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/Types.cpp b/Types.cpp
index c2d48841..f1cd7c22 100644
--- a/Types.cpp
+++ b/Types.cpp
@@ -310,6 +310,19 @@ MemberList const& ContractType::getMembers() const
return *m_members;
}
+shared_ptr<FunctionType const> const& ContractType::getConstructorType() const
+{
+ if (!m_constructorType)
+ {
+ FunctionDefinition const* constr = m_contract.getConstructor();
+ if (constr)
+ m_constructorType = make_shared<FunctionType const>(*constr);
+ else
+ m_constructorType = make_shared<FunctionType const>(TypePointers(), TypePointers());
+ }
+ return m_constructorType;
+}
+
unsigned ContractType::getFunctionIndex(string const& _functionName) const
{
unsigned index = 0;