From 27d328ddf3a0611e2a004f410824d1b4b002975f Mon Sep 17 00:00:00 2001 From: Matt Yang Date: Tue, 19 Sep 2023 17:59:10 -0400 Subject: [PATCH] revert models changes --- core/chains/evm/gas/models.go | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/core/chains/evm/gas/models.go b/core/chains/evm/gas/models.go index 99b9b24c05..c6f8edbf04 100644 --- a/core/chains/evm/gas/models.go +++ b/core/chains/evm/gas/models.go @@ -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) @@ -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 { @@ -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 } @@ -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