Merge pull request #13902 from ethereum/paris-proto

Yul proto converter: Output prevrandao for evm versions >= paris
This commit is contained in:
Bhargava Shastry 2023-01-30 11:49:48 +01:00 committed by GitHub
commit cfc62a4e07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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