diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2016-06-18 17:56:01 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2016-08-27 02:03:46 +0800 |
commit | 36a567cd61bf88a5b23ceb9d7eee97f1a3069f80 (patch) | |
tree | acf10d10ceed44dc6588891d8acb9a8979f354e1 /libsolidity | |
parent | fb7836d87bba0eacb2454d6c50b1209365a89b6d (diff) | |
download | dexon-solidity-36a567cd61bf88a5b23ceb9d7eee97f1a3069f80.tar dexon-solidity-36a567cd61bf88a5b23ceb9d7eee97f1a3069f80.tar.gz dexon-solidity-36a567cd61bf88a5b23ceb9d7eee97f1a3069f80.tar.bz2 dexon-solidity-36a567cd61bf88a5b23ceb9d7eee97f1a3069f80.tar.lz dexon-solidity-36a567cd61bf88a5b23ceb9d7eee97f1a3069f80.tar.xz dexon-solidity-36a567cd61bf88a5b23ceb9d7eee97f1a3069f80.tar.zst dexon-solidity-36a567cd61bf88a5b23ceb9d7eee97f1a3069f80.zip |
Introduce fallback entry in the ABI
Diffstat (limited to 'libsolidity')
-rw-r--r-- | libsolidity/interface/InterfaceHandler.cpp | 10 |
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; |