From 78c202cae4dc1dcb87d28d7580813003358d63dd Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Sun, 21 Dec 2014 16:28:46 +0100 Subject: [PATCH] Fixed #683 --- libsolidity/InterfaceHandler.cpp | 2 +- libsolidity/Token.h | 2 +- test/SolidityABIJSON.cpp | 16 ++++++++-------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/libsolidity/InterfaceHandler.cpp b/libsolidity/InterfaceHandler.cpp index 60971fbb9..224234cbd 100644 --- a/libsolidity/InterfaceHandler.cpp +++ b/libsolidity/InterfaceHandler.cpp @@ -56,7 +56,7 @@ std::unique_ptr InterfaceHandler::getABIInterface(ContractDefinitio }; method["name"] = f->getName(); - method["const"] = f->isDeclaredConst(); + method["constant"] = f->isDeclaredConst(); method["inputs"] = populateParameters(f->getParameters()); method["outputs"] = populateParameters(f->getReturnParameters()); methods.append(method); diff --git a/libsolidity/Token.h b/libsolidity/Token.h index 897d6eaaa..f2ffd076a 100644 --- a/libsolidity/Token.h +++ b/libsolidity/Token.h @@ -142,7 +142,7 @@ namespace solidity /* Keywords */ \ K(BREAK, "break", 0) \ K(CASE, "case", 0) \ - K(CONST, "const", 0) \ + K(CONST, "constant", 0) \ K(CONTINUE, "continue", 0) \ K(CONTRACT, "contract", 0) \ K(DEFAULT, "default", 0) \ diff --git a/test/SolidityABIJSON.cpp b/test/SolidityABIJSON.cpp index 62ab0458c..4c7c23815 100644 --- a/test/SolidityABIJSON.cpp +++ b/test/SolidityABIJSON.cpp @@ -76,7 +76,7 @@ BOOST_AUTO_TEST_CASE(basic_test) char const* interface = R"([ { "name": "f", - "const": false, + "constant": false, "inputs": [ { "name": "a", @@ -115,7 +115,7 @@ BOOST_AUTO_TEST_CASE(multiple_methods) char const* interface = R"([ { "name": "f", - "const": false, + "constant": false, "inputs": [ { "name": "a", @@ -131,7 +131,7 @@ BOOST_AUTO_TEST_CASE(multiple_methods) }, { "name": "g", - "const": false, + "constant": false, "inputs": [ { "name": "b", @@ -159,7 +159,7 @@ BOOST_AUTO_TEST_CASE(multiple_params) char const* interface = R"([ { "name": "f", - "const": false, + "constant": false, "inputs": [ { "name": "a", @@ -193,7 +193,7 @@ BOOST_AUTO_TEST_CASE(multiple_methods_order) char const* interface = R"([ { "name": "c", - "const": false, + "constant": false, "inputs": [ { "name": "b", @@ -209,7 +209,7 @@ BOOST_AUTO_TEST_CASE(multiple_methods_order) }, { "name": "f", - "const": false, + "constant": false, "inputs": [ { "name": "a", @@ -238,7 +238,7 @@ BOOST_AUTO_TEST_CASE(const_function) char const* interface = R"([ { "name": "boo", - "const": true, + "constant": true, "inputs": [{ "name": "a", "type": "uint32" @@ -252,7 +252,7 @@ BOOST_AUTO_TEST_CASE(const_function) }, { "name": "foo", - "const": false, + "constant": false, "inputs": [ { "name": "a",