Skip to content

Commit

Permalink
Revert "feat(txmgr): compare gasUsed and estimateGas (#11)"
Browse files Browse the repository at this point in the history
This reverts commit 7871b0e.
  • Loading branch information
YoGhurt111 committed Jun 27, 2024
1 parent f20313c commit 0aafda3
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions op-service/txmgr/txmgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,8 @@ func (m *SimpleTxManager) craftTx(ctx context.Context, candidate TxCandidate) (*
Data: candidate.TxData,
Value: candidate.Value,
}
// Set includeAccessList as default
includeAccessList := true
providedAccessList, gasUsed, _, err := m.backend.CreateAccessList(ctx, callArgs)

accessList, _, _, err := m.backend.CreateAccessList(ctx, callArgs)
if err != nil {
return nil, err
}
Expand All @@ -299,9 +298,6 @@ func (m *SimpleTxManager) craftTx(ctx context.Context, candidate TxCandidate) (*
if err != nil {
return nil, fmt.Errorf("failed to estimate gas: %w", errutil.TryAddRevertReason(err))
}
if gasUsed >= gas {
includeAccessList = false
}
gasLimit = gas
}

Expand All @@ -316,11 +312,6 @@ func (m *SimpleTxManager) craftTx(ctx context.Context, candidate TxCandidate) (*
}
}

accessList := &types.AccessList{}
if includeAccessList {
accessList = providedAccessList
}

var txMessage types.TxData
if sidecar != nil {
if blobBaseFee == nil {
Expand Down

0 comments on commit 0aafda3

Please sign in to comment.