From bf3e6fc62d048f7d0726f892e3b79ae7d2dbd1d4 Mon Sep 17 00:00:00 2001 From: arkpar Date: Sat, 31 Jan 2015 01:21:45 +0100 Subject: [PATCH 1/2] fixed ABI generator --- libsolidity/InterfaceHandler.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libsolidity/InterfaceHandler.cpp b/libsolidity/InterfaceHandler.cpp index 92cd51562..c4bed99f7 100644 --- a/libsolidity/InterfaceHandler.cpp +++ b/libsolidity/InterfaceHandler.cpp @@ -59,6 +59,7 @@ std::unique_ptr InterfaceHandler::getABIInterface(ContractDefinitio } return params; }; + method["type"] = "function"; method["name"] = it.second->getDeclaration().getName(); method["constant"] = it.second->isConstant(); method["inputs"] = populateParameters(it.second->getParameterNames(), From fa19c9678807c47d0772a53d4b5a8a55c5f1299c Mon Sep 17 00:00:00 2001 From: arkpar Date: Sat, 31 Jan 2015 01:28:43 +0100 Subject: [PATCH 2/2] updated json abi tests --- test/SolidityABIJSON.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/SolidityABIJSON.cpp b/test/SolidityABIJSON.cpp index edafb1686..aa5fcb0e0 100644 --- a/test/SolidityABIJSON.cpp +++ b/test/SolidityABIJSON.cpp @@ -75,6 +75,7 @@ BOOST_AUTO_TEST_CASE(basic_test) { "name": "f", "constant": false, + "type": "function", "inputs": [ { "name": "a", @@ -114,6 +115,7 @@ BOOST_AUTO_TEST_CASE(multiple_methods) { "name": "f", "constant": false, + "type": "function", "inputs": [ { "name": "a", @@ -130,6 +132,7 @@ BOOST_AUTO_TEST_CASE(multiple_methods) { "name": "g", "constant": false, + "type": "function", "inputs": [ { "name": "b", @@ -158,6 +161,7 @@ BOOST_AUTO_TEST_CASE(multiple_params) { "name": "f", "constant": false, + "type": "function", "inputs": [ { "name": "a", @@ -192,6 +196,7 @@ BOOST_AUTO_TEST_CASE(multiple_methods_order) { "name": "c", "constant": false, + "type": "function", "inputs": [ { "name": "b", @@ -208,6 +213,7 @@ BOOST_AUTO_TEST_CASE(multiple_methods_order) { "name": "f", "constant": false, + "type": "function", "inputs": [ { "name": "a", @@ -237,6 +243,7 @@ BOOST_AUTO_TEST_CASE(const_function) { "name": "foo", "constant": false, + "type": "function", "inputs": [ { "name": "a", @@ -257,6 +264,7 @@ BOOST_AUTO_TEST_CASE(const_function) { "name": "boo", "constant": true, + "type": "function", "inputs": [{ "name": "a", "type": "uint32"