From 564cf85725639f47558fcc1dc2d02366aeb6a391 Mon Sep 17 00:00:00 2001 From: Bhargava Shastry Date: Mon, 30 Jan 2023 09:19:33 +0100 Subject: [PATCH] Yul proto converter: Output prevrandao for evm versions >= paris --- test/tools/ossfuzz/protoToYul.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/tools/ossfuzz/protoToYul.cpp b/test/tools/ossfuzz/protoToYul.cpp index cd2898e12..991b25e75 100644 --- a/test/tools/ossfuzz/protoToYul.cpp +++ b/test/tools/ossfuzz/protoToYul.cpp @@ -715,7 +715,10 @@ void ProtoConverter::visit(NullaryOp const& _x) m_output << "number()"; break; case NullaryOp::DIFFICULTY: - m_output << "difficulty()"; + if (m_evmVersion >= EVMVersion::paris()) + m_output << "prevrandao()"; + else + m_output << "difficulty()"; break; case NullaryOp::GASLIMIT: m_output << "gaslimit()";