aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Changelog.md3
-rw-r--r--libevmasm/Assembly.cpp6
-rw-r--r--test/libsolidity/StandardCompiler.cpp3
3 files changed, 10 insertions, 2 deletions
diff --git a/Changelog.md b/Changelog.md
index 5315dc59..878a78df 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -1,8 +1,9 @@
### 0.4.12 (unreleased)
Features:
- * Assembly: renamed ``SHA3`` to ``KECCAK256``.
* Assembly: Add ``CREATE2`` (EIP86), ``RETURNDATASIZE`` and ``RETURNDATACOPY`` (EIP211) instructions.
+ * Assembly: Display auxiliary data in the assembly output.
+ * Assembly: Renamed ``SHA3`` to ``KECCAK256``.
* AST: export all attributes to JSON format.
* Inline Assembly: Present proper error message when not supplying enough arguments to a functional
instruction.
diff --git a/libevmasm/Assembly.cpp b/libevmasm/Assembly.cpp
index 72571b56..f2a292b0 100644
--- a/libevmasm/Assembly.cpp
+++ b/libevmasm/Assembly.cpp
@@ -216,6 +216,9 @@ ostream& Assembly::streamAsm(ostream& _out, string const& _prefix, StringMap con
}
}
+ if (m_auxiliaryData.size() > 0)
+ _out << endl << _prefix << "auxdata: 0x" << toHex(m_auxiliaryData) << endl;
+
return _out;
}
@@ -317,6 +320,9 @@ Json::Value Assembly::streamAsmJson(ostream& _out, StringMap const& _sourceCodes
root[".data"] = data;
}
+ if (m_auxiliaryData.size() > 0)
+ root[".auxdata"] = toHex(m_auxiliaryData);
+
_out << root;
return root;
diff --git a/test/libsolidity/StandardCompiler.cpp b/test/libsolidity/StandardCompiler.cpp
index 92bb471b..6dd64130 100644
--- a/test/libsolidity/StandardCompiler.cpp
+++ b/test/libsolidity/StandardCompiler.cpp
@@ -205,7 +205,8 @@ BOOST_AUTO_TEST_CASE(basic_compilation)
" /* \"fileA\":0:14 contract A { } */\n mstore(0x40, 0x60)\n jumpi(tag_1, iszero(callvalue))\n"
" invalid\ntag_1:\ntag_2:\n dataSize(sub_0)\n dup1\n dataOffset(sub_0)\n 0x0\n codecopy\n 0x0\n"
" return\nstop\n\nsub_0: assembly {\n /* \"fileA\":0:14 contract A { } */\n"
- " mstore(0x40, 0x60)\n tag_1:\n invalid\n}\n");
+ " mstore(0x40, 0x60)\n tag_1:\n invalid\n\n"
+ " auxdata: 0xa165627a7a72305820e4855da8c6a5e8a35933acba62e02f4842146bb9655b81cb06547caf8ea743b40029\n}\n");
BOOST_CHECK(contract["evm"]["gasEstimates"].isObject());
BOOST_CHECK(dev::jsonCompactPrint(contract["evm"]["gasEstimates"]) ==
"{\"creation\":{\"codeDepositCost\":\"10200\",\"executionCost\":\"62\",\"totalCost\":\"10262\"}}");