diff --git a/test/EVMHost.cpp b/test/EVMHost.cpp index c61e579c0..e2dd7bf17 100644 --- a/test/EVMHost.cpp +++ b/test/EVMHost.cpp @@ -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; diff --git a/test/libsolidity/SolidityEndToEndTest.cpp b/test/libsolidity/SolidityEndToEndTest.cpp index af940e0ef..ce6ef619e 100644 --- a/test/libsolidity/SolidityEndToEndTest.cpp +++ b/test/libsolidity/SolidityEndToEndTest.cpp @@ -43,6 +43,7 @@ using namespace std; using namespace std::placeholders; using namespace dev::test; +using namespace langutil; #define ALSO_VIA_YUL(CODE) \ { \ @@ -12888,6 +12889,9 @@ BOOST_AUTO_TEST_CASE(address_overload_resolution) BOOST_AUTO_TEST_CASE(snark) { + if (dev::test::Options::get().evmVersion() <= EVMVersion::byzantium()) + return; + char const* sourceCode = R"( library Pairing { struct G1Point {