synapsecns/sanguine

View on GitHub

Showing 1,971 of 13,422 total issues

Method queryResolver.AmountStatistic has 9 arguments (exceeds 4 allowed). Consider refactoring.
Open

func (r *queryResolver) AmountStatistic(ctx context.Context, typeArg model.StatisticType, duration *model.Duration, platform *model.Platform, chainID *int, address *string, tokenAddress *string, useCache *bool, useMv *bool) (*model.ValueResult, error) {
Severity: Major
Found in services/explorer/graphql/server/graph/queries.resolvers.go - About 1 hr to fix

    Method Client.GetAmountStatistic has 9 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    func (c *Client) GetAmountStatistic(ctx context.Context, typeArg model.StatisticType, platform *model.Platform, duration *model.Duration, chainID *int, address *string, tokenAddress *string, useMv *bool, httpRequestOptions ...client.HTTPRequestOption) (*GetAmountStatistic, error) {
    Severity: Major
    Found in services/explorer/graphql/client/client.go - About 1 hr to fix

      Method queryResolver.Receipts has 9 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      func (r *queryResolver) Receipts(ctx context.Context, chainID int, txHash *string, contractAddress *string, blockHash *string, blockNumber *int, txIndex *int, confirmed *bool, page int) ([]*model.Receipt, error) {
      Severity: Major
      Found in services/scribe/graphql/server/graph/queries.resolvers.go - About 1 hr to fix

        Method queryResolver.TransactionsRange has 9 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        func (r *queryResolver) TransactionsRange(ctx context.Context, txHash *string, chainID int, blockNumber *int, blockHash *string, confirmed *bool, startBlock int, endBlock int, page int) ([]*model.Transaction, error) {
        Severity: Major
        Found in services/scribe/graphql/server/graph/queries.resolvers.go - About 1 hr to fix

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

            this: SynapseSDK,
            to: string,
            originRouterAddress: string,
            originChainId: number,
            destChainId: number,
          Severity: Major
          Found in packages/sdk-router/src/operations/bridge.ts - About 1 hr to fix

            Method UtilSuite.TestCopyTX has 53 lines of code (exceeds 50 allowed). Consider refactoring.
            Open

            func (u *UtilSuite) TestCopyTX() {
                mockDynamicTXS := mocks.GetMockTxes(u.GetTestContext(), u.T(), 100, types.DynamicFeeTxType)
                mockLegacyTXes := mocks.GetMockTxes(u.GetTestContext(), u.T(), 100, types.LegacyTxType)
            
                // delete me
            Severity: Minor
            Found in ethergo/util/copy_test.go - About 1 hr to fix

              Method WatcherSuite.TestContractWatcherRetry has 53 lines of code (exceeds 50 allowed). Consider refactoring.
              Open

              func (s *WatcherSuite) TestContractWatcherRetry() {
                  if os.Getenv("CI") != "" {
                      s.T().Skip("this flakes on ci. TODO fix this. This should never fail locally.")
                  }
                  const requiredConfs = 3
              Severity: Minor
              Found in ethergo/chain/watcher/contractwatcher_test.go - About 1 hr to fix

                Function BuildTemplates has 53 lines of code (exceeds 50 allowed). Consider refactoring.
                Open

                func BuildTemplates(version, file, pkg, filename string, optimizerRuns int, evmVersion *string) error {
                    // TODO ast
                    contracts, err := compileSolidity(version, file, optimizerRuns, evmVersion)
                    if err != nil {
                        return err
                Severity: Minor
                Found in tools/abigen/internal/generate.go - About 1 hr to fix

                  Method Guard.Start has 53 lines of code (exceeds 50 allowed). Consider refactoring.
                  Open

                  func (g Guard) Start(parentCtx context.Context) error {
                      // First initialize a map to track what was the last state signed by this guard
                      g.loadSummitLatestStates(parentCtx)
                  
                      group, ctx := errgroup.WithContext(parentCtx)
                  Severity: Minor
                  Found in agents/agents/guard/guard.go - About 1 hr to fix

                    Method Executor.streamLogs has 53 lines of code (exceeds 50 allowed). Consider refactoring.
                    Open

                    func (e Executor) streamLogs(ctx context.Context, grpcClient pbscribe.ScribeServiceClient, conn *grpc.ClientConn, chainID uint32, address string, contractType execTypes.ContractType) error {
                        lastStoredBlock, err := e.executorDB.GetLastBlockNumber(ctx, chainID, contractType)
                        if err != nil {
                            return fmt.Errorf("could not get last stored block: %w", err)
                        }
                    Severity: Minor
                    Found in agents/agents/executor/executor.go - About 1 hr to fix

                      Method inventoryManagerImpl.Start has 53 lines of code (exceeds 50 allowed). Consider refactoring.
                      Open

                      func (i *inventoryManagerImpl) Start(ctx context.Context) error {
                          g, ctx := errgroup.WithContext(ctx)
                          for _, rebalanceManager := range i.rebalanceManagers {
                              rebalanceManager := rebalanceManager
                              g.Go(func() error {
                      Severity: Minor
                      Found in services/rfq/relayer/inventory/manager.go - About 1 hr to fix

                        Method executionContext._PartialInfo has 53 lines of code (exceeds 50 allowed). Consider refactoring.
                        Open

                        func (ec *executionContext) _PartialInfo(ctx context.Context, sel ast.SelectionSet, obj *model.PartialInfo) graphql.Marshaler {
                            fields := graphql.CollectFields(ec.OperationContext, sel, partialInfoImplementors)
                        
                            out := graphql.NewFieldSet(fields)
                            deferred := make(map[string]*graphql.FieldSet)
                        Severity: Minor
                        Found in services/explorer/graphql/server/graph/resolver/server.go - About 1 hr to fix

                          Method ClientSuite.TestPutAndGetBulkQuotes has 53 lines of code (exceeds 50 allowed). Consider refactoring.
                          Open

                          func (c *ClientSuite) TestPutAndGetBulkQuotes() {
                              req := model.PutBulkQuotesRequest{
                                  Quotes: []model.PutRelayerQuoteRequest{
                                      {
                                          OriginChainID:   1,
                          Severity: Minor
                          Found in services/rfq/api/client/client_test.go - About 1 hr to fix

                            Method executionContext.fieldContext_Query_receiptsAtHeadRange has 53 lines of code (exceeds 50 allowed). Consider refactoring.
                            Open

                            func (ec *executionContext) fieldContext_Query_receiptsAtHeadRange(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
                                fc = &graphql.FieldContext{
                                    Object:     "Query",
                                    Field:      field,
                                    IsMethod:   true,
                            Severity: Minor
                            Found in services/explorer/consumer/client/resolver-client/server.go - About 1 hr to fix

                              Method executionContext.fieldContext_Query_receiptsRange has 53 lines of code (exceeds 50 allowed). Consider refactoring.
                              Open

                              func (ec *executionContext) fieldContext_Query_receiptsRange(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
                                  fc = &graphql.FieldContext{
                                      Object:     "Query",
                                      Field:      field,
                                      IsMethod:   true,
                              Severity: Minor
                              Found in services/explorer/consumer/client/resolver-client/server.go - About 1 hr to fix

                                Method executionContext.fieldContext_Query_receipts has 53 lines of code (exceeds 50 allowed). Consider refactoring.
                                Open

                                func (ec *executionContext) fieldContext_Query_receipts(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
                                    fc = &graphql.FieldContext{
                                        Object:     "Query",
                                        Field:      field,
                                        IsMethod:   true,
                                Severity: Minor
                                Found in services/explorer/consumer/client/resolver-client/server.go - About 1 hr to fix

                                  Method executionContext.fieldContext_Query_receipts has 53 lines of code (exceeds 50 allowed). Consider refactoring.
                                  Open

                                  func (ec *executionContext) fieldContext_Query_receipts(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
                                      fc = &graphql.FieldContext{
                                          Object:     "Query",
                                          Field:      field,
                                          IsMethod:   true,
                                  Severity: Minor
                                  Found in services/scribe/graphql/server/graph/resolver/server.go - About 1 hr to fix

                                    Method executionContext.fieldContext_Query_receiptsRange has 53 lines of code (exceeds 50 allowed). Consider refactoring.
                                    Open

                                    func (ec *executionContext) fieldContext_Query_receiptsRange(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
                                        fc = &graphql.FieldContext{
                                            Object:     "Query",
                                            Field:      field,
                                            IsMethod:   true,
                                    Severity: Minor
                                    Found in services/scribe/graphql/server/graph/resolver/server.go - About 1 hr to fix

                                      Method executionContext.fieldContext_Query_receiptsAtHeadRange has 53 lines of code (exceeds 50 allowed). Consider refactoring.
                                      Open

                                      func (ec *executionContext) fieldContext_Query_receiptsAtHeadRange(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
                                          fc = &graphql.FieldContext{
                                              Object:     "Query",
                                              Field:      field,
                                              IsMethod:   true,
                                      Severity: Minor
                                      Found in services/scribe/graphql/server/graph/resolver/server.go - About 1 hr to fix

                                        Function TestStartLogs has 53 lines of code (exceeds 50 allowed). Consider refactoring.
                                        Open

                                        func TestStartLogs(t *testing.T) {
                                            // Create a new temporary directory.
                                            tmpdir, err := os.MkdirTemp("", "example")
                                            if err != nil {
                                                t.Fatalf("unexpected error: %v", err)
                                        Severity: Minor
                                        Found in core/processlog/logs_test.go - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language