Closed m-Peter closed 1 month ago
cc @sideninja @ramtinms
Since we don't have any basefee on the network the effective gas price is always with this formula Min(GasTipCap, GasFeeCap)
hmm, I don't EVM Gateway operators can set any value, basically they can ignore transactions that has GasTipCap below their target. so anyway the effective gas used by transactions can be computed using the formula I mentioned.
As described in https://docs.infura.io/api/networks/ethereum/json-rpc-methods/eth_gettransactionreceipt:
Currently we use the gas price the sender is willing to pay (https://github.com/onflow/flow-evm-gateway/blob/main/models/receipt.go#L158), which is not necessarily the charged value. We need to be using the gas price that was charged for a given transaction.
Using the gas price that is set by the EVM Gateway operators, at the time the transaction was processed, is also not sufficient, as different EVM Gateway operators, will set different gas prices.
Most likely, this value has to be included in the payload of
EVM.TransactionExecuted
event.