Skip to content

How to calculate maxFeePerGas/maxPriorityFeePerGas #239

Answered by jxom
jackmellis asked this question in Question
Discussion options

You must be logged in to vote

Are you using a JSON-RPC Account or a Local Account (private key, mnemonic, etc)?

For a JSON-RPC Account, it is recommended to defer fee calculation to the wallet (as they have better mechanisms to determine best fee data), meaning you don't need to pass through fee data at all.
For a Local Account, we do fee calculations automatically in the internal prepareRequest util – however, if you want to do something more custom, we can extract this out into a utility quite easily. Would you rather do this manually and we extract it out into a util?

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@quagliero
Comment options

@melonges
Comment options

@kanishkatn
Comment options

@gvash
Comment options

@nikola-bozin-txfusion
Comment options

Answer selected by jxom
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
8 participants