Skip to content

Update BASEFEE opcode hardcoded system value #367

@filip-parity

Description

@filip-parity

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions