Let's say I have a tx that requires 10,000 gas units.

Let's say I want to pay upto 50gwei per gas unit.

When I send maxFeePerGas, do I set it to:

  1. 50 * 10^-9 ? // i.e. 50gwei, as in "this is the max price I'm willing to pay per unit of gas", or
  2. 50 * 10^-9 * 10,000 // i.e. 10,000 * 50gwei as in "this is the max amount I am willing to pay for this tx"

1 Answer 1


When setting the maxFeePerGas parameter, you should choose option 1 i.e., 50 * 10^-9, which represents 50 gwei. This parameter indicates the maximum price you're willing to pay per unit of gas for the transaction.

The maxPriorityFeePerGas parameter is used to specify an additional fee that is paid on top of maxFeePerGas in order to prioritise the transaction's inclusion in a block.

However, in your scenario, you only mentioned maxFeePerGas, so you would set that to 50 * 10^-9, indicating your willingness to pay up to 50 gwei per gas unit.

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.