Skip to content

Commit

Permalink
revert models changes
Browse files Browse the repository at this point in the history
  • Loading branch information
matYang committed Sep 19, 2023
1 parent 0978d8f commit 27d328d
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions core/chains/evm/gas/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,6 @@ type EvmEstimator interface {
// - be sorted in order from highest price to lowest price
// - all be of transaction type 0x2
BumpDynamicFee(ctx context.Context, original DynamicFee, gasLimit uint32, maxGasPriceWei *assets.Wei, attempts []EvmPriorAttempt) (bumped DynamicFee, chainSpecificGasLimit uint32, err error)

// GetL1BaseFeeOnL2 fetches the L1 basefee used by a rollup L2 to calculate L1 data fee. This value used by L2 may not equal to basefee on actual L1.
GetL1BaseFeeOnL2(ctx context.Context, opts ...feetypes.Opt) (gasPrice *assets.Wei, err error)
}

var _ feetypes.Fee = (*EvmFee)(nil)
Expand All @@ -141,9 +138,6 @@ type EvmFee struct {
// dynamic/EIP1559 fees
DynamicFeeCap *assets.Wei
DynamicTipCap *assets.Wei

// l1 base fee used in l1 data fee calculations on rollups
L1BaseFee *assets.Wei
}

func (fee EvmFee) String() string {
Expand Down Expand Up @@ -240,13 +234,11 @@ func (e *WrappedEvmEstimator) GetFee(ctx context.Context, calldata []byte, feeLi
dynamicFee, chainSpecificFeeLimit, err = e.EvmEstimator.GetDynamicFee(ctx, feeLimit, maxFeePrice)
fee.DynamicFeeCap = dynamicFee.FeeCap
fee.DynamicTipCap = dynamicFee.TipCap
fee.L1BaseFee, err = e.EvmEstimator.GetL1BaseFeeOnL2(ctx, opts...)
return
}

// get legacy fee
fee.Legacy, chainSpecificFeeLimit, err = e.EvmEstimator.GetLegacyGas(ctx, calldata, feeLimit, maxFeePrice, opts...)
fee.L1BaseFee, err = e.EvmEstimator.GetL1BaseFeeOnL2(ctx, opts...)
return
}

Expand Down Expand Up @@ -294,10 +286,6 @@ func (e *WrappedEvmEstimator) BumpFee(ctx context.Context, originalFee EvmFee, f
return
}

func (e WrappedEvmEstimator) GetL1BaseFeeOnL2(_ context.Context, _ ...feetypes.Opt) (gasPrice *assets.Wei, err error) {
return assets.NewWei(big.NewInt(0)), nil
}

// Config defines an interface for configuration in the gas package
//
//go:generate mockery --quiet --name Config --output ./mocks/ --case=underscore
Expand Down

0 comments on commit 27d328d

Please sign in to comment.