diff --git a/libsolidity/interface/EVMVersion.h b/libsolidity/interface/EVMVersion.h index 954a9f8f1..738bf2030 100644 --- a/libsolidity/interface/EVMVersion.h +++ b/libsolidity/interface/EVMVersion.h @@ -45,6 +45,7 @@ public: static EVMVersion tangerineWhistle() { return {Version::TangerineWhistle}; } static EVMVersion spuriousDragon() { return {Version::SpuriousDragon}; } static EVMVersion byzantium() { return {Version::Byzantium}; } + static EVMVersion constantinople() { return {Version::Constantinople}; } static boost::optional fromString(std::string const& _version) { @@ -61,10 +62,11 @@ public: { switch (m_version) { - case Version::Byzantium: return "byzantium"; + case Version::Homestead: return "homestead"; case Version::TangerineWhistle: return "tangerineWhistle"; case Version::SpuriousDragon: return "spuriousDragon"; - case Version::Homestead: return "homestead"; + case Version::Byzantium: return "byzantium"; + case Version::Constantinople: return "constantinople"; } return "INVALID"; } @@ -78,7 +80,7 @@ public: bool canOverchargeGasForCall() const { return *this >= tangerineWhistle(); } private: - enum class Version { Homestead, TangerineWhistle, SpuriousDragon, Byzantium }; + enum class Version { Homestead, TangerineWhistle, SpuriousDragon, Byzantium, Constantinople }; EVMVersion(Version _version): m_version(_version) {} diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp index caa564bc3..fd079656d 100644 --- a/solc/CommandLineInterface.cpp +++ b/solc/CommandLineInterface.cpp @@ -539,7 +539,7 @@ Allowed options)", ( g_strEVMVersion.c_str(), po::value()->value_name("version"), - "Select desired EVM version. Either homestead, tangerineWhistle, spuriousDragon or byzantium (default)." + "Select desired EVM version. Either homestead, tangerineWhistle, spuriousDragon, byzantium (default) or constantinople." ) (g_argOptimize.c_str(), "Enable bytecode optimizer.") (