When Solidity contracts execute block.basefee, they're reading the current transaction's gas price. However, the BASEFEE opcode handler in pallet-revive is ignoring the transaction-specific gas price.
In order to complete the task correctly, we need to update in polkadot-sdk line 88
from: interpreter.stack.push(crate::Pallet::<E::T>::evm_base_fee())?;
to: interpreter.stack.push(interpreter.ext.effective_gas_price())?;
This implementation would handle gas price that was set. If no gas price is set, the method has a fallback to the system default. This modification is also compliant with other opcodes (line 51, line 61, etc).
When Solidity contracts execute block.basefee, they're reading the current transaction's gas price. However, the BASEFEE opcode handler in pallet-revive is ignoring the transaction-specific gas price.
In order to complete the task correctly, we need to update in polkadot-sdk line 88
from: interpreter.stack.push(crate::Pallet::<E::T>::evm_base_fee())?;
to: interpreter.stack.push(interpreter.ext.effective_gas_price())?;
This implementation would handle gas price that was set. If no gas price is set, the method has a fallback to the system default. This modification is also compliant with other opcodes (line 51, line 61, etc).