Added the basefee instruction in YulInterpreter

This commit is contained in:
hrkrshnn
2021-08-09 16:18:08 +02:00
parent 95091f6b58
commit 543ccf5287
2 changed files with 4 additions and 1 deletions
@@ -220,6 +220,8 @@ u256 EVMInstructionInterpreter::eval(
return m_state.gasprice;
case Instruction::CHAINID:
return m_state.chainid;
case Instruction::BASEFEE:
return m_state.basefee;
case Instruction::EXTCODESIZE:
return u256(keccak256(h256(arg[0]))) & 0xffffff;
case Instruction::EXTCODEHASH:
+2 -1
View File
@@ -90,6 +90,8 @@ struct InterpreterState
u256 difficulty = 0x9999999;
u256 gaslimit = 4000000;
u256 chainid = 0x01;
/// The minimum value of basefee: 7 wei.
u256 basefee = 0x07;
/// Log of changes / effects. Sholud be structured data in the future.
std::vector<std::string> trace;
/// This is actually an input parameter that more or less limits the runtime.
@@ -227,4 +229,3 @@ private:
};
}