Skip to content

Commit

Permalink
Merge pull request #956 from roberto-bayardo/patch-1
Browse files Browse the repository at this point in the history
fix broken link to GasPriceOracle.sol
  • Loading branch information
sbvegan authored Nov 14, 2023
2 parents f0bb900 + 470dbad commit 4569f8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/docs/developers/build/transaction-fees.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,15 @@ As a result, you should display the sum of both of these fees to give users the

[See here for a code sample using the JavaScript SDK](https://github.com/ethereum-optimism/optimism-tutorial/tree/main/sdk-estimate-gas)

#### Estimating the L2 execution fee
#### the L2 execution fee

You can estimate the L2 execution fee by multiplying the gas price by the gas limit, just like on Ethereum.

#### Estimating the L1 data fee

You can use the SDK [(see here)](https://github.com/ethereum-optimism/optimism-tutorial/tree/main/sdk-estimate-gas).
Alternatively, you can estimate the L1 data fee using the `GasPriceOracle` predeployed smart contract located at [`0x420000000000000000000000000000000000000F`](https://explorer.optimism.io/address/0x420000000000000000000000000000000000000F).
[The `GasPriceOracle` contract](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts/contracts/L2/predeploys/OVM_GasPriceOracle.sol) is located at the same address on every Optimism network (mainnet and testnet).
[The `GasPriceOracle` contract](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/GasPriceOracle.sol) is located at the same address on every Optimism network (mainnet and testnet).
To do so, call `GasPriceOracle.getL1Fee(<unsigned RLP encoded transaction>)`.

#### Estimating the total fee
Expand Down

0 comments on commit 4569f8f

Please sign in to comment.