aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/interface
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2016-08-30 21:21:19 +0800
committerGitHub <noreply@github.com>2016-08-30 21:21:19 +0800
commitcf974fd103dbb56313eee40ce9ffe4d03d6c1b04 (patch)
tree8fd3ec7a2fa41ffdd5f0442b78e34b0204f6ef46 /libsolidity/interface
parent29b8965b9541e75905bb688954649ee7b0b0fefc (diff)
parent4019c832cad989ddb246d2189d19f38273d29661 (diff)
downloaddexon-solidity-cf974fd103dbb56313eee40ce9ffe4d03d6c1b04.tar.gz
dexon-solidity-cf974fd103dbb56313eee40ce9ffe4d03d6c1b04.tar.zst
dexon-solidity-cf974fd103dbb56313eee40ce9ffe4d03d6c1b04.zip
Merge pull request #664 from axic/feature/interface-fallback
Introduce fallback entry in the ABI
Diffstat (limited to 'libsolidity/interface')
-rw-r--r--libsolidity/interface/InterfaceHandler.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/libsolidity/interface/InterfaceHandler.cpp b/libsolidity/interface/InterfaceHandler.cpp
index f5c10356..5d24e1bf 100644
--- a/libsolidity/interface/InterfaceHandler.cpp
+++ b/libsolidity/interface/InterfaceHandler.cpp
@@ -74,7 +74,15 @@ string InterfaceHandler::abiInterface(ContractDefinition const& _contractDef)
);
abi.append(method);
}
-
+ if (_contractDef.fallbackFunction())
+ {
+ auto externalFunctionType = FunctionType(*_contractDef.fallbackFunction()).interfaceFunctionType();
+ solAssert(!!externalFunctionType, "");
+ Json::Value method;
+ method["type"] = "fallback";
+ method["constant"] = externalFunctionType->isConstant();
+ abi.append(method);
+ }
for (auto const& it: _contractDef.interfaceEvents())
{
Json::Value event;