Yul proto converter: Output prevrandao for evm versions >= paris

This commit is contained in:
Bhargava Shastry 2023-01-30 09:19:33 +01:00
parent 206e7cf5db
commit 564cf85725

View File

@ -715,6 +715,9 @@ void ProtoConverter::visit(NullaryOp const& _x)
m_output << "number()"; m_output << "number()";
break; break;
case NullaryOp::DIFFICULTY: case NullaryOp::DIFFICULTY:
if (m_evmVersion >= EVMVersion::paris())
m_output << "prevrandao()";
else
m_output << "difficulty()"; m_output << "difficulty()";
break; break;
case NullaryOp::GASLIMIT: case NullaryOp::GASLIMIT: