Commit ff2d4875 authored by protolambda's avatar protolambda

op-e2e: run with l1 fees enabled by default

parent 6c76ac76
......@@ -99,8 +99,8 @@ func DefaultSystemConfig(t *testing.T) SystemConfig {
OptimismL1FeeRecipient: predeploys.L1FeeVaultAddr,
L2CrossDomainMessengerOwner: common.Address{0: 0x52, 19: 0xf3}, // tbd
GasPriceOracleOwner: addresses.Alice, // tbd
GasPriceOracleOverhead: 0,
GasPriceOracleScalar: 0,
GasPriceOracleOverhead: 2100,
GasPriceOracleScalar: 1_000_000,
DeploymentWaitConfirmations: 1,
EIP1559Elasticity: 2,
......
......@@ -665,6 +665,7 @@ func TestL1InfoContract(t *testing.T) {
}
// calcGasFees determines the actual cost of the transaction given a specific basefee
// This does not include the L1 data fee charged from L2 transactions.
func calcGasFees(gasUsed uint64, gasTipCap *big.Int, gasFeeCap *big.Int, baseFee *big.Int) *big.Int {
x := new(big.Int).Add(gasTipCap, baseFee)
// If tip + basefee > gas fee cap, clamp it to the gas fee cap
......@@ -793,6 +794,7 @@ func TestWithdrawals(t *testing.T) {
// Take fee into account
diff = new(big.Int).Sub(startBalance, endBalance)
fees := calcGasFees(receipt.GasUsed, tx.GasTipCap(), tx.GasFeeCap(), header.BaseFee)
fees = fees.Add(fees, receipt.L1Fee)
diff = diff.Sub(diff, fees)
require.Equal(t, withdrawAmount, diff)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment