Merge pull request #8051 from ethereum/yul-interp-log

Fix tracing LOG instruction in the Yul Ewasm interpreter
This commit is contained in:
chriseth 2019-12-18 15:08:06 +01:00 committed by GitHub
commit b74f357c5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -248,7 +248,10 @@ u256 EWasmBuiltinInterpreter::evalBuiltin(YulString _fun, vector<u256> const& _a
return writeU128(arg[0], m_state.gasprice);
else if (_fun == "eth.log"_yulstring)
{
logTrace(eth::Instruction::LOG0, {});
uint64_t numberOfTopics = arg[2];
if (numberOfTopics > 4)
throw ExplicitlyTerminated();
logTrace(eth::logInstruction(numberOfTopics), {});
return 0;
}
else if (_fun == "eth.getBlockNumber"_yulstring)