synapsecns/sanguine

View on GitHub

Showing 1,971 of 13,422 total issues

Method synapseCCTPHandler.FetchAndProcessSentEvent has 81 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (s *synapseCCTPHandler) FetchAndProcessSentEvent(parentCtx context.Context, txhash common.Hash, originChain uint32) (msg *relayTypes.Message, err error) {
    ctx, span := s.handler.Tracer().Start(parentCtx, "FetchAndProcessSentEvent", trace.WithAttributes(
        attribute.String(metrics.TxHash, txhash.String()),
        attribute.Int(metrics.ChainID, int(originChain)),
    ))
Severity: Major
Found in services/cctp-relayer/relayer/synapse.go - About 2 hrs to fix

    Method Indexer.Index has 81 lines of code (exceeds 50 allowed). Consider refactoring.
    Open

    func (x *Indexer) Index(parentCtx context.Context, startHeight uint64, endHeight uint64) (err error) {
        ctx, span := x.handler.Tracer().Start(parentCtx, "contract.Backfill", trace.WithAttributes(
            attribute.Int("chain", int(x.indexerConfig.ChainID)),
            attribute.String("address", x.addressesToString(x.indexerConfig.Addresses)),
            attribute.Int("start", int(startHeight)),
    Severity: Major
    Found in services/scribe/service/indexer/indexer.go - About 2 hrs to fix

      Function extraReducers has 56 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        extraReducers: (builder) => {
          builder
            .addCase(fetchSynPrices.pending, (state) => {
              state.isLoadingSynPrices = true
            })
      Severity: Major
      Found in packages/synapse-interface/slices/priceDataSlice.ts - About 2 hrs to fix

        File SynapseLogoSvg.tsx has 259 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        export const SynapseLogoSvg = ({ className = '' }) => {
          return (
            <svg
              className={`w-8 ${className}`}
              fillRule="nonzero"
        Severity: Minor
        Found in packages/explorer-ui/components/icons/SynapseLogoSvg.tsx - About 2 hrs to fix

          Function ExplorerSection has 55 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export default function ExplorerSection() {
            const totalBridgeVolume = getTotalBridgeVolume()
            const totalTxCount = getTotalTxCount()
            const totalValueLocked = getTotalValueLocked()
          
          
          Severity: Major
          Found in packages/synapse-interface/pages/landing/sections/ExplorerSection.tsx - About 2 hrs to fix

            Function PoolPage has 55 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const PoolPage = () => {
              const dispatch = useAppDispatch()
              const router = useRouter()
              const { poolId } = router.query
              const { address } = useAccount()
            Severity: Major
            Found in packages/synapse-interface/pages/pool/[poolId].tsx - About 2 hrs to fix

              Function SearchBar has 55 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export const SearchBar = () => {
                const dispatch = useAppDispatch()
                const { onSearchInput, clearSearchInput } = usePortfolioActionHandlers()
                const { activeTab, searchInput, searchedBalances }: PortfolioState =
                  usePortfolioState()

                File index.ts has 257 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                import _ from 'lodash'
                
                import { Token } from '../../types/index'
                import * as CHAINS from '../chains/master'
                import * as all from './bridgeable'
                Severity: Minor
                Found in packages/synapse-constants/src/constants/tokens/index.ts - About 2 hrs to fix

                  File Grid.tsx has 257 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  /*
                  @NOTE: super repetitive code here is actually necessary...
                  */
                  
                  interface StyleLookUpInterface {
                  Severity: Minor
                  Found in packages/synapse-interface/components/ui/tailwind/Grid.tsx - About 2 hrs to fix

                    Function standardizeResponse has 24 return statements (exceeds 4 allowed).
                    Open

                    func standardizeResponse(ctx context.Context, req *rpc.Request, rpcMessage JSONRPCMessage) (out []byte, err error) {
                        // TODO: use a sync.pool for acquiring/releasing these structs
                        method := req.Method
                    
                    OUTER:
                    Severity: Major
                    Found in services/omnirpc/proxy/standardize.go - About 2 hrs to fix

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

                      func (s SynapseBridgeTokenRedeem) GetRaw() ethTypes.Log {
                          return s.Raw
                      }
                      Severity: Minor
                      Found in services/explorer/contracts/bridge/redeem.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/deposit.go - About 2 hrs to fix

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

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

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

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

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

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

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

                                func (s SynapseBridgeTokenMint) GetRaw() ethTypes.Log {
                                    return s.Raw
                                }
                                Severity: Minor
                                Found in services/explorer/contracts/bridge/mint.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/bridgev1/deposit.go - About 2 hrs to fix

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

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

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

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

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

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