From 3a378eae1a57683d0f31ab54c122b2a5c6a7c8bb Mon Sep 17 00:00:00 2001 From: chriseth Date: Wed, 5 Dec 2018 20:34:27 +0100 Subject: Restrict toHex to `bytes`. --- libsolidity/ast/ASTJsonConverter.cpp | 2 +- libsolidity/interface/CompilerStack.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'libsolidity') diff --git a/libsolidity/ast/ASTJsonConverter.cpp b/libsolidity/ast/ASTJsonConverter.cpp index cfb13271..e92134a8 100644 --- a/libsolidity/ast/ASTJsonConverter.cpp +++ b/libsolidity/ast/ASTJsonConverter.cpp @@ -724,7 +724,7 @@ bool ASTJsonConverter::visit(Literal const& _node) std::vector> attributes = { make_pair(m_legacy ? "token" : "kind", literalTokenKind(_node.token())), make_pair("value", value), - make_pair(m_legacy ? "hexvalue" : "hexValue", toHex(_node.value())), + make_pair(m_legacy ? "hexvalue" : "hexValue", toHex(asBytes(_node.value()))), make_pair( "subdenomination", subdenomination == Token::Illegal ? diff --git a/libsolidity/interface/CompilerStack.cpp b/libsolidity/interface/CompilerStack.cpp index 610caea1..1e6e2330 100644 --- a/libsolidity/interface/CompilerStack.cpp +++ b/libsolidity/interface/CompilerStack.cpp @@ -552,7 +552,7 @@ Json::Value CompilerStack::methodIdentifiers(string const& _contractName) const { Json::Value methodIdentifiers(Json::objectValue); for (auto const& it: contractDefinition(_contractName).interfaceFunctions()) - methodIdentifiers[it.second->externalSignature()] = toHex(it.first.ref()); + methodIdentifiers[it.second->externalSignature()] = it.first.hex(); return methodIdentifiers; } -- cgit