2

I have found that there are two columns in rpc calls.

  1. For getting transaction eth_getTransactionByHash
gasPrice: QUANTITY - gas price provided by the sender in Wei.
  1. For getting transaction receipt eth_getTransactionReceipt
effectiveGasPrice : QUANTITY - The sum of the base fee and tip paid per unit of gas.

What's the difference? I found that for some transactions both values are the same, but for some they are different.

1 Answer 1

3

General explanation:

1.gasPrice: Used prior to EIP-1559, it was the fee that users set for each unit of gas to execute their transactions. You had to guess the right fee to have the transaction processed quickly, leading to less predictability and potential bidding wars.

2.effectiveGasPrice: Introduced after EIP-1559, it represents the actual fee per unit of gas, which includes a base_fee (automatically adjusted by the network) and an optional miner_tip to prioritize transactions.

So, while both gasPrice and effectiveGasPrice represent fees paid for transactions, they are used in different contexts (before and after EIP-1559)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.