Skip to content

Commit

Permalink
evaluated at
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberhorsey committed Sep 17, 2024
1 parent 4303582 commit d7a56c6
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions packages/relayer/processor/is_profitable.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package processor
import (
"context"
"log/slog"
"time"

"github.com/pkg/errors"
"github.com/taikoxyz/taiko-mono/packages/relayer"
Expand Down Expand Up @@ -51,12 +52,13 @@ func (p *Processor) isProfitable(
)

opts := relayer.UpdateFeesAndProfitabilityOpts{
Fee: fee,
DestChainBaseFee: destChainBaseFee,
GasTipCap: gasTipCap,
GasLimit: gasLimit,
IsProfitable: shouldProcess,
EstimatedOnchainFee: estimatedOnchainFee,
Fee: fee,
DestChainBaseFee: destChainBaseFee,
GasTipCap: gasTipCap,
GasLimit: gasLimit,
IsProfitable: shouldProcess,
EstimatedOnchainFee: estimatedOnchainFee,
IsProfitableEvaluatedAt: time.Now().UTC(),
}

if err := p.eventRepo.UpdateFeesAndProfitability(ctx, id, &opts); err != nil {
Expand Down

0 comments on commit d7a56c6

Please sign in to comment.