synapsecns/sanguine

View on GitHub

Showing 1,971 of 13,422 total issues

Method Client.GetMessageBusTransactions has 11 arguments (exceeds 4 allowed). Consider refactoring.
Open

func (c *Client) GetMessageBusTransactions(ctx context.Context, chainID []*int, contractAddress *string, startTime *int, endTime *int, txHash *string, messageID *string, pending *bool, reverted *bool, page *int, httpRequestOptions ...client.HTTPRequestOption) (*GetMessageBusTransactions, error) {
Severity: Major
Found in services/explorer/graphql/client/client.go - About 1 hr to fix

    Method queryResolver.ReceiptsRange has 11 arguments (exceeds 4 allowed). Consider refactoring.
    Open

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

      Method queryResolver.ReceiptsAtHeadRange has 11 arguments (exceeds 4 allowed). Consider refactoring.
      Open

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

        Method screenerImpl.blacklistAddress has 59 lines of code (exceeds 50 allowed). Consider refactoring.
        Open

        func (s *screenerImpl) blacklistAddress(c *gin.Context) {
            var err error
            ctx, span := s.metrics.Tracer().Start(c.Request.Context(), "blacklistAddress")
            defer metrics.EndSpanWithErr(span, err)
        
        
        Severity: Minor
        Found in contrib/screener-api/screener/screener.go - About 1 hr to fix

          Function WaitForConfirmation has 59 lines of code (exceeds 50 allowed). Consider refactoring.
          Open

          func WaitForConfirmation(ctx context.Context, client ConfirmationClient, transaction *types.Transaction, timeout time.Duration) {
              // if tx is nil , we should panic here so we can see the call context
              _ = transaction.Hash()
          
              const debugTimeout = time.Second * 5
          Severity: Minor
          Found in ethergo/backends/base/base.go - About 1 hr to fix

            Function main has 59 lines of code (exceeds 50 allowed). Consider refactoring.
            Open

            func main() {
                fmt.Println("Enter Sending Chain URL (eg https://polygon-rpc.com, https://api.avax.network/ext/bc/C/rpc, https://optimism-mainnet.public.blastapi.io): ")
                var sendingChainURL string
                fmt.Scanln(&sendingChainURL)
            
            
            Severity: Minor
            Found in agents/testcli/main.go - About 1 hr to fix

              Method Manager.ShouldProcess has 59 lines of code (exceeds 50 allowed). Consider refactoring.
              Open

              func (m *Manager) ShouldProcess(parentCtx context.Context, quote reldb.QuoteRequest) (res bool, err error) {
                  ctx, span := m.metricsHandler.Tracer().Start(parentCtx, "shouldProcess", trace.WithAttributes(
                      attribute.String("transaction_id", hexutil.Encode(quote.TransactionID[:])),
                  ))
              
              
              Severity: Minor
              Found in services/rfq/relayer/quoter/quoter.go - About 1 hr to fix

                Function NewGuard has 59 lines of code (exceeds 50 allowed). Consider refactoring.
                Open

                func NewGuard(ctx context.Context, metricHandler metrics.Handler, cfg guardconfig.Config, txSubmitter submitter.TransactionSubmitter) (*Guard, error) {
                    omniClient := omniClient.NewOmnirpcClient(cfg.OmniRPCURL, metricHandler, omniClient.WithCaptureReqRes())
                    chainListeners := make(map[int]listener.ContractListener)
                
                    dbType, err := dbcommon.DBTypeFromString(cfg.Database.Type)
                Severity: Minor
                Found in services/rfq/guard/service/guard.go - About 1 hr to fix

                  Method executionContext.fieldContext_Query_transactionsRange has 59 lines of code (exceeds 50 allowed). Consider refactoring.
                  Open

                  func (ec *executionContext) fieldContext_Query_transactionsRange(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_transactions has 59 lines of code (exceeds 50 allowed). Consider refactoring.
                    Open

                    func (ec *executionContext) fieldContext_Query_transactions(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_transactionsAtHeadRange has 59 lines of code (exceeds 50 allowed). Consider refactoring.
                      Open

                      func (ec *executionContext) fieldContext_Query_transactionsAtHeadRange(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_transactionsAtHeadRange has 59 lines of code (exceeds 50 allowed). Consider refactoring.
                        Open

                        func (ec *executionContext) fieldContext_Query_transactionsAtHeadRange(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_transactionsRange has 59 lines of code (exceeds 50 allowed). Consider refactoring.
                          Open

                          func (ec *executionContext) fieldContext_Query_transactionsRange(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_transactions has 59 lines of code (exceeds 50 allowed). Consider refactoring.
                            Open

                            func (ec *executionContext) fieldContext_Query_transactions(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 IndexerSuite.TestGetChunkArr has 59 lines of code (exceeds 50 allowed). Consider refactoring.
                              Open

                              func (x *IndexerSuite) TestGetChunkArr() {
                                  chainID := big.NewInt(int64(1))
                                  simulatedChain := geth.NewEmbeddedBackendForChainID(x.GetTestContext(), x.T(), chainID)
                                  simulatedClient, err := backend.DialBackend(x.GetTestContext(), simulatedChain.RPCAddress(), x.metrics)
                                  Nil(x.T(), err)
                              Severity: Minor
                              Found in services/scribe/service/indexer/fetcher_test.go - About 1 hr to fix

                                Method IndexerSuite.TestFetchLogs has 59 lines of code (exceeds 50 allowed). Consider refactoring.
                                Open

                                func (x *IndexerSuite) TestFetchLogs() {
                                    testBackend := geth.NewEmbeddedBackend(x.GetTestContext(), x.T())
                                    // start an omnirpc proxy and run 10 test transactions so we can batch call blocks 1-10
                                    var wg sync.WaitGroup
                                    var testChainHandler *testutil.TestChainHandler
                                Severity: Minor
                                Found in services/scribe/service/indexer/fetcher_test.go - About 1 hr to fix

                                  Function getNetworkCurrencyColor has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  export const getNetworkCurrencyColor = (chainId) => {
                                    switch (parseInt(chainId)) {
                                      case ChainId.BSC:
                                        return 'text-[#ecae0b] dark:text-[#ecae0b]'
                                      case ChainId.ETH:
                                  Severity: Minor
                                  Found in packages/explorer-ui/utils/styles/networks.ts - About 1 hr to fix

                                    Function constructJSON has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    const constructJSON = (
                                      swappableMap,
                                      exclusionList
                                    ): StringifiedBridgeRoutes => {
                                      const result = {}
                                    Severity: Minor
                                    Found in packages/rest-api/src/utils/bridgeRouteMapping.ts - About 1 hr to fix

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

                                        extraReducers: (builder) => {
                                          builder
                                            .addCase(fetchAndStoreTokenBalances.pending, (state) => {
                                              state.balances = []
                                              state.balancesFetchStatus = FetchState.LOADING
                                      Severity: Minor
                                      Found in packages/widget/src/state/slices/wallet/reducer.ts - About 1 hr to fix

                                        Function useEthereumWallet has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        export const useEthereumWallet = () => {
                                          const [connectedAddress, setConnectedAddress] = useState<string>('')
                                          const [web3Provider, setWeb3Provider] = useState<any>(null)
                                          const [connectedNetwork, setConnectedNetwork] = useState<Network | null>()
                                        
                                        
                                        Severity: Minor
                                        Found in packages/widget/examples/with-react/src/hooks/useEthereumWallet.tsx - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language