Introduce fallback entry in the ABI

This commit is contained in:
Alex Beregszaszi 2016-06-18 10:56:01 +01:00
parent fb7836d87b
commit 36a567cd61

View File

@ -74,7 +74,15 @@ string InterfaceHandler::abiInterface(ContractDefinition const& _contractDef)
); );
abi.append(method); 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()) for (auto const& it: _contractDef.interfaceEvents())
{ {
Json::Value event; Json::Value event;