mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Added EVMVersion london.
Also set the value of `block_base_fee` for testing to 7 wei.
This commit is contained in:
@@ -51,10 +51,11 @@ public:
|
||||
static EVMVersion petersburg() { return {Version::Petersburg}; }
|
||||
static EVMVersion istanbul() { return {Version::Istanbul}; }
|
||||
static EVMVersion berlin() { return {Version::Berlin}; }
|
||||
static EVMVersion london() { return {Version::London}; }
|
||||
|
||||
static std::optional<EVMVersion> fromString(std::string const& _version)
|
||||
{
|
||||
for (auto const& v: {homestead(), tangerineWhistle(), spuriousDragon(), byzantium(), constantinople(), petersburg(), istanbul(), berlin()})
|
||||
for (auto const& v: {homestead(), tangerineWhistle(), spuriousDragon(), byzantium(), constantinople(), petersburg(), istanbul(), berlin(), london()})
|
||||
if (_version == v.name())
|
||||
return v;
|
||||
return std::nullopt;
|
||||
@@ -75,6 +76,7 @@ public:
|
||||
case Version::Petersburg: return "petersburg";
|
||||
case Version::Istanbul: return "istanbul";
|
||||
case Version::Berlin: return "berlin";
|
||||
case Version::London: return "london";
|
||||
}
|
||||
return "INVALID";
|
||||
}
|
||||
@@ -87,6 +89,7 @@ public:
|
||||
bool hasExtCodeHash() const { return *this >= constantinople(); }
|
||||
bool hasChainID() const { return *this >= istanbul(); }
|
||||
bool hasSelfBalance() const { return *this >= istanbul(); }
|
||||
bool hasBaseFee() const { return *this >= london(); }
|
||||
|
||||
bool hasOpcode(evmasm::Instruction _opcode) const;
|
||||
|
||||
@@ -95,7 +98,7 @@ public:
|
||||
bool canOverchargeGasForCall() const { return *this >= tangerineWhistle(); }
|
||||
|
||||
private:
|
||||
enum class Version { Homestead, TangerineWhistle, SpuriousDragon, Byzantium, Constantinople, Petersburg, Istanbul, Berlin };
|
||||
enum class Version { Homestead, TangerineWhistle, SpuriousDragon, Byzantium, Constantinople, Petersburg, Istanbul, Berlin, London };
|
||||
|
||||
EVMVersion(Version _version): m_version(_version) {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user