synapsecns/sanguine

View on GitHub

Showing 1,971 of 13,422 total issues

SynapseBridgeTokenWithdrawAndRemove has 21 methods (exceeds 20 allowed). Consider refactoring.
Open

func (s SynapseBridgeTokenWithdrawAndRemove) GetToken() common.Address {
    return s.Token
}
Severity: Minor
Found in services/explorer/contracts/bridge/withdraw.go - About 2 hrs to fix

    SynapseBridgeTokenWithdrawAndRemove has 21 methods (exceeds 20 allowed). Consider refactoring.
    Open

    func (s SynapseBridgeTokenWithdrawAndRemove) GetToken() common.Address {
        return s.Token
    }
    Severity: Minor
    Found in services/explorer/contracts/bridge/bridgev1/withdraw.go - About 2 hrs to fix

      SynapseBridgeTokenDeposit has 21 methods (exceeds 20 allowed). Consider refactoring.
      Open

      func (s SynapseBridgeTokenDeposit) GetRaw() ethTypes.Log {
          return s.Raw
      }
      Severity: Minor
      Found in services/explorer/contracts/bridge/bridgev1/deposit.go - About 2 hrs to fix

        SynapseBridgeTokenWithdraw has 21 methods (exceeds 20 allowed). Consider refactoring.
        Open

        func (s SynapseBridgeTokenWithdraw) GetRaw() ethTypes.Log {
            return s.Raw
        }
        Severity: Minor
        Found in services/explorer/contracts/bridge/bridgev1/withdraw.go - About 2 hrs to fix

          SynapseBridgeTokenRedeemAndRemove has 21 methods (exceeds 20 allowed). Consider refactoring.
          Open

          func (s SynapseBridgeTokenRedeemAndRemove) GetRaw() ethTypes.Log {
              return s.Raw
          }
          Severity: Minor
          Found in services/explorer/contracts/bridge/redeem.go - About 2 hrs to fix

            SynapseBridgeTokenWithdraw has 21 methods (exceeds 20 allowed). Consider refactoring.
            Open

            func (s SynapseBridgeTokenWithdraw) GetRaw() ethTypes.Log {
                return s.Raw
            }
            Severity: Minor
            Found in services/explorer/contracts/bridge/withdraw.go - About 2 hrs to fix

              SynapseBridgeTokenRedeemV2 has 21 methods (exceeds 20 allowed). Consider refactoring.
              Open

              func (s SynapseBridgeTokenRedeemV2) GetRaw() ethTypes.Log {
                  return s.Raw
              }
              Severity: Minor
              Found in services/explorer/contracts/bridge/redeem.go - About 2 hrs to fix

                SynapseBridgeTokenRedeemAndRemove has 21 methods (exceeds 20 allowed). Consider refactoring.
                Open

                func (s SynapseBridgeTokenRedeemAndRemove) GetRaw() ethTypes.Log {
                    return s.Raw
                }
                Severity: Minor
                Found in services/explorer/contracts/bridge/bridgev1/redeem.go - About 2 hrs to fix

                  SynapseBridgeTokenDepositAndSwap has 21 methods (exceeds 20 allowed). Consider refactoring.
                  Open

                  func (s SynapseBridgeTokenDepositAndSwap) GetRaw() ethTypes.Log {
                      return s.Raw
                  }
                  Severity: Minor
                  Found in services/explorer/contracts/bridge/deposit.go - About 2 hrs to fix

                    Client has 21 methods (exceeds 20 allowed). Consider refactoring.
                    Open

                    type Client struct {
                        Client *client.Client
                    }
                    Severity: Minor
                    Found in services/scribe/graphql/client/client.go - About 2 hrs to fix

                      Function HeroSection has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export default function HeroSection() {
                        const t = useTranslations('Landing.HeroSection')
                      
                        return (
                          <SectionContainer dataTestId="landing-hero-section">
                      Severity: Major
                      Found in packages/synapse-interface/pages/landing/sections/HeroSection.tsx - About 2 hrs to fix

                        Function generateAllBridgeEventsQueryFromDestination has 17 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                        func generateAllBridgeEventsQueryFromDestination(chainIDTo []*int, chainIDFrom []*int, addressFrom *string, addressTo *string, maxAmount *int, minAmount *int, maxAmountUsd *int, minAmountUsd *int, startTime *int, endTime *int, tokenAddressFrom []*string, tokenAddressTo []*string, kappa *string, txHash *string, onlyCctp *bool, page int, in bool) string {
                        Severity: Major
                        Found in services/explorer/graphql/server/graph/queryutils.go - About 2 hrs to fix

                          Function generateAllBridgeEventsQueryMv has 17 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                          func generateAllBridgeEventsQueryMv(chainIDFrom []*int, chainIDTo []*int, addressFrom *string, addressTo *string, maxAmount *int, minAmount *int, maxAmountUsd *int, minAmountUsd *int, startTime *int, endTime *int, tokenAddressFrom []*string, tokenAddressTo []*string, txHash *string, kappa *string, pending *bool, onlyCctp *bool, page int) string {
                          Severity: Major
                          Found in services/explorer/graphql/server/graph/queryutils.go - About 2 hrs to fix

                            Function generateAllBridgeEventsQueryFromOrigin has 17 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                            func generateAllBridgeEventsQueryFromOrigin(chainIDFrom []*int, chainIDTo []*int, addressFrom *string, addressTo *string, maxAmount *int, minAmount *int, maxAmountUsd *int, minAmountUsd *int, startTime *int, endTime *int, tokenAddressFrom []*string, tokenAddressTo []*string, txHash *string, pending *bool, onlyCctp *bool, page int, in bool) string {
                            Severity: Major
                            Found in services/explorer/graphql/server/graph/queryutils.go - About 2 hrs to fix

                              Method Guard.handleReceiptAccepted has 78 lines of code (exceeds 50 allowed). Consider refactoring.
                              Open

                              func (g Guard) handleReceiptAccepted(ctx context.Context, log ethTypes.Log) error {
                                  fraudReceipt, err := g.inboxParser.ParseReceiptAccepted(log)
                                  if err != nil {
                                      return fmt.Errorf("could not parse receipt accepted: %w", err)
                                  }
                              Severity: Major
                              Found in agents/agents/guard/fraud.go - About 2 hrs to fix

                                Method inventoryManagerImpl.ApproveAllTokens has 78 lines of code (exceeds 50 allowed). Consider refactoring.
                                Open

                                func (i *inventoryManagerImpl) ApproveAllTokens(ctx context.Context) (err error) {
                                    ctx, span := i.handler.Tracer().Start(ctx, "approveAllTokens")
                                    defer func() {
                                        metrics.EndSpanWithErr(span, err)
                                    }()
                                Severity: Major
                                Found in services/rfq/relayer/inventory/manager.go - About 2 hrs to fix

                                  Method APISuite.TestAddressRanking has 78 lines of code (exceeds 50 allowed). Consider refactoring.
                                  Open

                                  func (g APISuite) TestAddressRanking() {
                                      var chainID uint32
                                      chainIDs := []uint32{g.chainIDs[0], g.chainIDs[1], g.chainIDs[2]}
                                      destinationChainIDA := g.chainIDs[3]
                                      destinationChainIDB := g.chainIDs[4]
                                  Severity: Major
                                  Found in services/explorer/api/resolver_test.go - About 2 hrs to fix

                                    Function eventToBridgeEvent has 78 lines of code (exceeds 50 allowed). Consider refactoring.
                                    Open

                                    func eventToBridgeEvent(event bridgeTypes.EventLog, chainID uint32) model.BridgeEvent {
                                        var recipient sql.NullString
                                    
                                        if event.GetRecipient() != nil {
                                            recipient.Valid = true
                                    Severity: Major
                                    Found in services/explorer/consumer/parser/bridgeparser.go - About 2 hrs to fix

                                      Function formatAmount has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      export const formatAmount = (
                                        amount: string,
                                        options?: FormatOptions
                                      ): string => {
                                        if (amount === '') {
                                      Severity: Major
                                      Found in packages/explorer-ui/utils/formatAmount.ts - About 2 hrs to fix

                                        File getToChainIds.ts has 255 lines of code (exceeds 250 allowed). Consider refactoring.
                                        Open

                                        import _ from 'lodash'
                                        
                                        import { EXISTING_BRIDGE_ROUTES } from '@/constants/existingBridgeRoutes'
                                        import { RouteQueryFields } from './generateRoutePossibilities'
                                        import { getTokenAndChainId } from './getTokenAndChainId'
                                        Severity: Minor
                                        Found in packages/synapse-interface/utils/routeMaker/getToChainIds.ts - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language