synapsecns/sanguine

View on GitHub

Showing 1,971 of 13,422 total issues

Function Start has 12 return statements (exceeds 4 allowed).
Open

func Start(ctx context.Context, cfg Config, handler metrics.Handler) error {
    logger.Warnf("starting api server")
    router := ginhelper.New(logger)
    // wrap gin with metrics
    router.GET(ginhelper.MetricsEndpoint, gin.WrapH(handler.Handler()))
Severity: Major
Found in services/scribe/api/server.go - About 1 hr to fix

    Method Indexer.Index has 12 return statements (exceeds 4 allowed).
    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 1 hr to fix

      Method exporter.fetchRelayerBalances has 54 lines of code (exceeds 50 allowed). Consider refactoring.
      Open

      func (e *exporter) fetchRelayerBalances(ctx context.Context, url string) error {
          // Fetch relayer addresses
          quotes, err := e.fetchAllQuotes(ctx, url)
          if err != nil {
              return fmt.Errorf("could not fetch relayer addresses: %w", err)
      Severity: Minor
      Found in contrib/promexporter/exporters/relayer.go - About 1 hr to fix

        Method Executor.setMinimumTime has 54 lines of code (exceeds 50 allowed). Consider refactoring.
        Open

        func (e Executor) setMinimumTime(parentCtx context.Context, chainID uint32) (err error) {
            backoffInterval := time.Duration(0)
        
            for {
                select {
        Severity: Minor
        Found in agents/agents/executor/executor.go - About 1 hr to fix

          Function CreateCollection has 54 lines of code (exceeds 50 allowed). Consider refactoring.
          Open

          func CreateCollection() ([]byte, error) {
              collection, err := postman.ParseCollection(bytes.NewReader(ethCollection))
              if err != nil {
                  return nil, fmt.Errorf("could not parse collection: %w", err)
              }
          Severity: Minor
          Found in services/omnirpc/collection/collection.go - About 1 hr to fix

            Method Manager.generateActiveRFQ has 54 lines of code (exceeds 50 allowed). Consider refactoring.
            Open

            func (m *Manager) generateActiveRFQ(ctx context.Context, msg *model.ActiveRFQMessage) (resp *model.ActiveRFQMessage, err error) {
                ctx, span := m.metricsHandler.Tracer().Start(ctx, "generateActiveRFQ", trace.WithAttributes(
                    attribute.String("op", msg.Op),
                    attribute.String("content", string(msg.Content)),
                ))
            Severity: Minor
            Found in services/rfq/relayer/quoter/quoter.go - About 1 hr to fix

              Method BackfillSuite.redeemParity has 54 lines of code (exceeds 50 allowed). Consider refactoring.
              Open

              func (b *BackfillSuite) redeemParity(log *types.Log, parser *parser.BridgeParser, chainID uint32, useV1 bool) error {
                  // parse the log
                  if useV1 {
                      parsedLog, err := parser.FiltererV1.ParseTokenRedeem(*log)
                      if err != nil {
              Severity: Minor
              Found in services/explorer/backfill/chain_test.go - About 1 hr to fix

                Function formatBigIntToString has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export const formatBigIntToString = (
                  bi: bigint,
                  nativePrecision: number,
                  decimalPlaces?: number
                ) => {
                Severity: Minor
                Found in packages/synapse-interface/utils/bigint/format.ts - About 1 hr to fix

                  Function constructor has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    constructor({
                      addresses,
                      wrapperAddresses,
                      decimals,
                      symbol,
                  Severity: Minor
                  Found in packages/explorer-ui/utils/classes/Token.ts - About 1 hr to fix

                    Method captureTransport.RoundTrip has 54 lines of code (exceeds 50 allowed). Consider refactoring.
                    Open

                    func (t *captureTransport) RoundTrip(req *http.Request) (_ *http.Response, err error) {
                        var response string
                    
                        _, span := t.metrics.Tracer().Start(req.Context(), RequestSpanName)
                        defer func() {
                    Severity: Minor
                    Found in core/metrics/instrumentation/httpcapture/http.go - About 1 hr to fix

                      Function getActiveStyleForButton has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export const getActiveStyleForButton = (color: string) => {
                        switch (color) {
                          case ColorOptions.ETH:
                            return 'bg-[#5170ad44] dark:bg-[#5170ad44] border-[#5170ad] dark:border-[#5170ad]'
                          case ColorOptions.RED:
                      Severity: Minor
                      Found in packages/synapse-interface/styles/hover.ts - About 1 hr to fix

                        Function getHoverStyleForButton has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export const getHoverStyleForButton = (color: string) => {
                          switch (color) {
                            case ColorOptions.ETH:
                              return 'hover:bg-[#5170ad44] hover:dark:bg-[#5170ad44] hover:border-[#5170ad] hover:dark:border-[#5170ad]'
                            case ColorOptions.RED:
                        Severity: Minor
                        Found in packages/synapse-interface/styles/hover.ts - About 1 hr to fix

                          Function WideSupportIcon has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export function WideSupportIcon() {
                            return (
                              <svg
                                width="34"
                                height="34"

                            Function SynapseCircuit has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            export default function SynapseCircuit() {
                              return (
                                <svg
                                  width="100%"
                                  height="100%"

                              Function SecureIcon has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export function SecureIcon() {
                                return (
                                  <svg
                                    width="28"
                                    height="32"

                                Function ExtensibleIcon has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                export function ExtensibleIcon() {
                                  return (
                                    <svg
                                      width="36"
                                      height="36"

                                  Function GeneralizedIcon has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  export function GeneralizedIcon() {
                                    return (
                                      <svg
                                        width="32"
                                        height="37"

                                    Function DeveloperIcon has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    export function DeveloperIcon() {
                                      return (
                                        <svg
                                          width="38"
                                          height="38"

                                      Function SocialButtons has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      function SocialButtons() {
                                        return (
                                          <Grid cols={{ xs: 2, sm: 1 }} gapY={'1'}>
                                            <MiniInfoItem
                                              href={SYNAPSE_DOCS_URL}

                                        Function generateMessageBusQuery has 9 arguments (exceeds 4 allowed). Consider refactoring.
                                        Open

                                        func generateMessageBusQuery(chainID []*int, address *string, startTime *int, endTime *int, messageID *string, pending bool, reverted bool, txHash *string, page int) string {
                                        Severity: Major
                                        Found in services/explorer/graphql/server/graph/queryutils.go - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language