synapsecns/sanguine

View on GitHub
services/explorer/db/sql/writer.go

Summary

Maintainability
A
2 hrs
Test Coverage

Method Store.StoreSwapFee has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

func (s *Store) StoreSwapFee(ctx context.Context, chainID uint32, blockNumber uint64, contractAddress string, fee uint64, feeType string) error {
Severity: Minor
Found in services/explorer/db/sql/writer.go - About 45 mins to fix

    Method Store.StoreEvents has 6 return statements (exceeds 4 allowed).
    Open

    func (s *Store) StoreEvents(ctx context.Context, events []interface{}) error {
        var bridgeEvents []*BridgeEvent
        var swapEvents []SwapEvent
        var messageBusEvents []MessageBusEvent
        var cctpEvents []*CCTPEvent
    Severity: Major
    Found in services/explorer/db/sql/writer.go - About 40 mins to fix

      Method Store.StoreEvent has 6 return statements (exceeds 4 allowed).
      Open

      func (s *Store) StoreEvent(ctx context.Context, event interface{}) error {
          switch conv := event.(type) {
          case *BridgeEvent:
              dbTx := s.db.WithContext(ctx).Create(conv)
              if dbTx.Error != nil {
      Severity: Major
      Found in services/explorer/db/sql/writer.go - About 40 mins to fix

        Method Store.StoreTokenIndex has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        func (s *Store) StoreTokenIndex(ctx context.Context, chainID uint32, tokenIndex uint8, tokenAddress string, contractAddress string) error {
        Severity: Minor
        Found in services/explorer/db/sql/writer.go - About 35 mins to fix

          There are no issues that match your filters.

          Category
          Status