mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #8060 from ethereum/yul-interp-fix
Fix getExternalCodeSize in the Yul Ewasm interpreter
This commit is contained in:
commit
8511012e95
@ -286,7 +286,8 @@ u256 EWasmBuiltinInterpreter::evalBuiltin(YulString _fun, vector<u256> const& _a
|
||||
return 0;
|
||||
}
|
||||
else if (_fun == "eth.getExternalCodeSize"_yulstring)
|
||||
return u256(keccak256(h256(readAddress(arg[0])))) & 0xffffff;
|
||||
// Generate "random" code length. Make sure it fits the page size.
|
||||
return u256(keccak256(h256(readAddress(arg[0])))) & 0xfff;
|
||||
else if (_fun == "eth.getGasLeft"_yulstring)
|
||||
return 0x99;
|
||||
else if (_fun == "eth.getBlockGasLimit"_yulstring)
|
||||
|
Loading…
Reference in New Issue
Block a user