Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/build-decentralized-apps/02-how-to-estimate-gas.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ TXFEES = P * (L2G + ((L1P * L1S) / P))

We'll use one resource available in Arbitrum: the [`NodeInterface`](/build-decentralized-apps/nodeinterface/02-reference.mdx).

- B (Extra Buffer) ⇒ The extra buffer is the amount of gas required for posting the transaction on L1, priced in L2 gas.
- Call `NodeInterface.GasEstimateComponents()` and get the second element, `baseFee`.
- P (L2 Gas Price) ⇒ Price to pay for each gas unit. It starts at @@arbOneGasFloorGwei=0.01@@ gwei on Arbitrum One (@@novaGasFloorGwei=0.01@@ gwei on Arbitrum Nova) and can increase depending on the demand for network resources.
- Call `NodeInterface.GasEstimateComponents()` and get the third element, `baseFee`.
- L2G (Gas used on L2) ⇒ Gas used to compute the transaction on the child chain. This does not include the _“posting on L1”_ part of the calculations. The value of L2G will depend on the transaction itself, but having the data of the transaction, we can calculate it as follows:
Expand Down