mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
EVMHost: disallow Byzantium precompiles on earlier EVM versions
This commit is contained in:
parent
e349973396
commit
ddf6e067ed
@ -123,13 +123,13 @@ evmc::result EVMHost::call(evmc_message const& _message) noexcept
|
||||
return precompileRipeMD160(_message);
|
||||
else if (_message.destination == 0x0000000000000000000000000000000000000004_address)
|
||||
return precompileIdentity(_message);
|
||||
else if (_message.destination == 0x0000000000000000000000000000000000000005_address)
|
||||
else if (_message.destination == 0x0000000000000000000000000000000000000005_address && m_evmVersion >= langutil::EVMVersion::byzantium())
|
||||
return precompileModExp(_message);
|
||||
else if (_message.destination == 0x0000000000000000000000000000000000000006_address)
|
||||
else if (_message.destination == 0x0000000000000000000000000000000000000006_address && m_evmVersion >= langutil::EVMVersion::byzantium())
|
||||
return precompileALTBN128G1Add(_message);
|
||||
else if (_message.destination == 0x0000000000000000000000000000000000000007_address)
|
||||
else if (_message.destination == 0x0000000000000000000000000000000000000007_address && m_evmVersion >= langutil::EVMVersion::byzantium())
|
||||
return precompileALTBN128G1Mul(_message);
|
||||
else if (_message.destination == 0x0000000000000000000000000000000000000008_address)
|
||||
else if (_message.destination == 0x0000000000000000000000000000000000000008_address && m_evmVersion >= langutil::EVMVersion::byzantium())
|
||||
return precompileALTBN128PairingProduct(_message);
|
||||
|
||||
State stateBackup = m_state;
|
||||
|
Loading…
Reference in New Issue
Block a user