This page is being upgraded for a great mobile experience.
Please use a desktop or laptop for now.
Switch to a larger device to access all features.
Calculate L1 fee for a transaction using current base fee per gas
In this challenge, you need to retrieve L1 gas pricing information from the ArbGasInfo precompile and calculate the transaction fee.
Create a function called calculateL1Fee
that:
// This should return the current L1 data fee in wei
calculateL1Fee()
Ready to test your solution?
Complete the exercise and submit to check your results.