@@ -51,10 +51,11 @@ class EVMVersion:
51
51
static EVMVersion petersburg () { return {Version::Petersburg}; }
52
52
static EVMVersion istanbul () { return {Version::Istanbul}; }
53
53
static EVMVersion berlin () { return {Version::Berlin}; }
54
+ static EVMVersion london () { return {Version::London}; }
54
55
55
56
static std::optional<EVMVersion> fromString (std::string const & _version)
56
57
{
57
- for (auto const & v: {homestead (), tangerineWhistle (), spuriousDragon (), byzantium (), constantinople (), petersburg (), istanbul (), berlin ()})
58
+ for (auto const & v: {homestead (), tangerineWhistle (), spuriousDragon (), byzantium (), constantinople (), petersburg (), istanbul (), berlin (), london () })
58
59
if (_version == v.name ())
59
60
return v;
60
61
return std::nullopt;
@@ -75,6 +76,7 @@ class EVMVersion:
75
76
case Version::Petersburg: return " petersburg" ;
76
77
case Version::Istanbul: return " istanbul" ;
77
78
case Version::Berlin: return " berlin" ;
79
+ case Version::London: return " london" ;
78
80
}
79
81
return " INVALID" ;
80
82
}
@@ -87,6 +89,7 @@ class EVMVersion:
87
89
bool hasExtCodeHash () const { return *this >= constantinople (); }
88
90
bool hasChainID () const { return *this >= istanbul (); }
89
91
bool hasSelfBalance () const { return *this >= istanbul (); }
92
+ bool hasBaseFee () const { return *this >= london (); }
90
93
91
94
bool hasOpcode (evmasm::Instruction _opcode) const ;
92
95
@@ -95,7 +98,7 @@ class EVMVersion:
95
98
bool canOverchargeGasForCall () const { return *this >= tangerineWhistle (); }
96
99
97
100
private:
98
- enum class Version { Homestead, TangerineWhistle, SpuriousDragon, Byzantium, Constantinople, Petersburg, Istanbul, Berlin };
101
+ enum class Version { Homestead, TangerineWhistle, SpuriousDragon, Byzantium, Constantinople, Petersburg, Istanbul, Berlin, London };
99
102
100
103
EVMVersion (Version _version): m_version(_version) {}
101
104
0 commit comments