diff --git a/core/state_transition.go b/core/state_transition.go index 89da53ecaa..28ab6f6d1c 100644 --- a/core/state_transition.go +++ b/core/state_transition.go @@ -283,6 +283,14 @@ func NewStateTransition(evm *vm.EVM, msg *Message, gp *GasPool) *StateTransition } } +// to returns the recipient of the message. +func (st *StateTransition) to() common.Address { + if st.msg == nil || st.msg.To == nil /* contract creation */ { + return common.Address{} + } + return *st.msg.To +} + // CalculateL1Cost calculates the L1 cost for a transaction without modifying the state. func (st *StateTransition) CalculateL1Cost() (*big.Int, error) { var l1Cost *big.Int @@ -300,14 +308,6 @@ func (st *StateTransition) CalculateL1Cost() (*big.Int, error) { return l1Cost, nil } -// to returns the recipient of the message. -func (st *StateTransition) to() common.Address { - if st.msg == nil || st.msg.To == nil /* contract creation */ { - return common.Address{} - } - return *st.msg.To -} - func (st *StateTransition) buyGas() (*big.Int, error) { if err := st.applyMetaTransaction(); err != nil { return nil, err @@ -324,7 +324,6 @@ func (st *StateTransition) buyGas() (*big.Int, error) { if l1Cost != nil && (st.msg.RunMode == GasEstimationMode || st.msg.RunMode == GasEstimationWithSkipCheckBalanceMode) { mgval = mgval.Add(mgval, l1Cost) } - balanceCheck := new(big.Int).Set(mgval) if st.msg.GasFeeCap != nil { balanceCheck.SetUint64(st.msg.GasLimit) diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index fac92139cb..ef4cedfd00 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -1157,9 +1157,6 @@ func DoCall(ctx context.Context, b Backend, args TransactionArgs, blockNrOrHash return nil, err } - log.Info("Args after ToMessage", "GasPrice", msg.GasPrice, - "GasFeeCap", msg.GasFeeCap, "GasTipCap", msg.GasTipCap) - evm, vmError, err := b.GetEVM(ctx, msg, state, header, &vm.Config{NoBaseFee: true}) if err != nil { return nil, err