aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2016-06-18 17:56:01 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2016-08-27 02:03:46 +0800
commit36a567cd61bf88a5b23ceb9d7eee97f1a3069f80 (patch)
treeacf10d10ceed44dc6588891d8acb9a8979f354e1
parentfb7836d87bba0eacb2454d6c50b1209365a89b6d (diff)
downloaddexon-solidity-36a567cd61bf88a5b23ceb9d7eee97f1a3069f80.tar.gz
dexon-solidity-36a567cd61bf88a5b23ceb9d7eee97f1a3069f80.tar.zst
dexon-solidity-36a567cd61bf88a5b23ceb9d7eee97f1a3069f80.zip
Introduce fallback entry in the ABI
-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;