Some more base fees.

This commit is contained in:
chriseth
2021-08-12 16:37:21 +02:00
committed by Leo Alt
parent 23b16a1e20
commit 90c4623460
7 changed files with 14 additions and 1 deletions
@@ -1854,6 +1854,7 @@ BOOST_AUTO_TEST_CASE(builtins)
abi.encodePacked;
abi.encodeWithSelector;
abi.encodeWithSignature;
block.basefee;
block.chainid;
block.coinbase;
block.difficulty;
@@ -413,6 +413,11 @@ u256 EwasmBuiltinInterpreter::evalEthBuiltin(string const& _fun, vector<uint64_t
writeAddress(arg[3], h160(0xcccccc + arg[1]));
return 1;
}
else if (_fun == "getBlockBaseFee")
{
writeU128(arg[0], m_state.basefee);
return 0;
}
else if (_fun == "getBlockDifficulty")
{
writeU256(arg[0], m_state.difficulty);