synapsecns/sanguine

View on GitHub

Showing 1,971 of 13,422 total issues

Method InventoryTestSuite.TestHasSufficientGas has 63 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (i *InventoryTestSuite) TestHasSufficientGas() {
    var wg sync.WaitGroup
    wg.Add(len(i.backends))
    for _, backend := range i.backends {
        go func(backend backends.SimulatedTestBackend) {
Severity: Minor
Found in services/rfq/relayer/inventory/manager_test.go - About 1 hr to fix

    Function getFastBridgeOriginMap has 38 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const getFastBridgeOriginMap = async (chainId, rfqResponse) => {
      // Return empty map if FastBridge is not supported on the chain
      if (!FastBridgeRouters[chainId]) {
        return {}
      }
    Severity: Minor
    Found in packages/synapse-interface/scripts/generateMaps.js - About 1 hr to fix

      Function RouterCache has 38 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export const RouterCache = (maxAge: number) => {
        /* @ts-ignore */
        return (
          target: Object, // target
          propertyKey: string,
      Severity: Minor
      Found in packages/sdk-router/src/utils/RouterCache.ts - About 1 hr to fix

        Function Pagination has 38 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export const Pagination = ({}) => {
          const router = useRouter()
          let { p } = router.query
          // @ts-ignore
          p = p ?? 1
        Severity: Minor
        Found in packages/explorer-ui/components/Pagination/index.tsx - About 1 hr to fix

          Function PackageInstall has 38 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export const PackageInstall = () => {
            const [activeTab, setActiveTab] = useState('npm')
          
            const tabContainerStyle = {
              display: 'flex',

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

              constructor({
                addresses,
                wrapperAddresses,
                decimals,
                symbol,
            Severity: Minor
            Found in packages/synapse-interface/utils/types/index.tsx - About 1 hr to fix

              Function useMaintenanceData has 38 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              const useMaintenanceData = () => {
                const { pausedChainsData, pausedModulesData } = useMaintenanceState()
              
                const pausedChainsList: ChainPause[] = pausedChainsData
                  ? pausedChainsData?.map((pause: ChainPause) => {
              Severity: Minor
              Found in packages/synapse-interface/components/Maintenance/Maintenance.tsx - About 1 hr to fix

                Method AgentsIntegrationSuite.TestAgentsE2E has 16 return statements (exceeds 4 allowed).
                Open

                func (u *AgentsIntegrationSuite) TestAgentsE2E() {
                    testDone := false
                    defer func() {
                        testDone = true
                    }()
                Severity: Major
                Found in agents/agents/agentsintegration/agentsintegration_test.go - About 1 hr to fix

                  Function createParsers has 16 return statements (exceeds 4 allowed).
                  Open

                  func createParsers(ctx context.Context, db db.ConsumerDB, fetcher fetcherpkg.ScribeFetcher, clients map[uint32]etherClient.EVM, config serverConfig.Config) (*types.ServerParsers, *types.ServerRefs, map[string]*swap.SwapFlashLoanFilterer, error) {
                      ethClient, err := ethclient.DialContext(ctx, config.RPCURL+fmt.Sprintf("%d", 1))
                      if err != nil {
                          return nil, nil, nil, fmt.Errorf("could not create client: %w", err)
                      }
                  Severity: Major
                  Found in services/explorer/api/server.go - About 1 hr to fix

                    Method queryResolver.LogsAtHeadRange has 12 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

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

                      Function CopyTX has 62 lines of code (exceeds 50 allowed). Consider refactoring.
                      Open

                      func CopyTX(unsignedTx *types.Transaction, options ...CopyOption) (*types.Transaction, error) {
                          // tx is immutable except within the confines of type. Here we manually copy over the inner values
                      
                          // these need to be overwritten, but copied over anyway for parity
                          // the v paramater will be modified by the signer if converting from a dynamic tx to a legacy tx
                      Severity: Minor
                      Found in ethergo/util/copy.go - About 1 hr to fix

                        Function NewEmbeddedBackendWithConfig has 62 lines of code (exceeds 50 allowed). Consider refactoring.
                        Open

                        func NewEmbeddedBackendWithConfig(ctx context.Context, t *testing.T, config *params.ChainConfig) *Backend {
                            t.Helper()
                            setupEthLogger()
                        
                            embedded := Backend{}
                        Severity: Minor
                        Found in ethergo/backends/geth/geth.go - About 1 hr to fix

                          Method Executor.executeExecutable has 62 lines of code (exceeds 50 allowed). Consider refactoring.
                          Open

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

                            Method queryResolver.getDateResultByChainMv has 62 lines of code (exceeds 50 allowed). Consider refactoring.
                            Open

                            func (r *queryResolver) getDateResultByChainMv(ctx context.Context, chainID *int, typeArg *model.DailyStatisticType, platform *model.Platform, duration *model.Duration) ([]*model.DateResultByChain, error) {
                                var err error
                                firstFilter := true
                                timestampSpecifierMv := GetDurationFilter(duration, &firstFilter, "f")
                                chainIDSpecifierMv := generateSingleSpecifierI32SQL(chainID, sql.ChainIDFieldName, &firstFilter, "f")
                            Severity: Minor
                            Found in services/explorer/graphql/server/graph/queryutils.go - About 1 hr to fix

                              Function pendingTransactionsMissingRelayExceedDeadlineController has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export const pendingTransactionsMissingRelayExceedDeadlineController = async (
                                req: Request,
                                res: Response
                              ) => {
                                try {

                                Function useSyncQueryParamsWithSwapState has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                const useSyncQueryParamsWithSwapState = () => {
                                  const dispatch = useDispatch()
                                  const router = useRouter()
                                  const { swapChainId, swapFromToken, swapToToken } = useSwapState()
                                
                                

                                  Function extractDeploymentReceipts has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  const extractDeploymentReceipts = (broadcastFN) => {
                                    // Silent exit if the broadcast file does not exist
                                    if (!fs.existsSync(broadcastFN)) {
                                      return []
                                    }
                                  Severity: Minor
                                  Found in packages/solidity-devops/js/utils/deployments.js - About 1 hr to fix

                                    Function pendingTransactionsMissingRelayController has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    export const pendingTransactionsMissingRelayController = async (
                                      req: Request,
                                      res: Response
                                    ) => {
                                      try {

                                      Function swapTxInfoController has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      export const swapTxInfoController = async (req, res) => {
                                        const errors = validationResult(req)
                                        if (!errors.isEmpty()) {
                                          return res.status(400).json({ errors: errors.array() })
                                        }
                                      Severity: Minor
                                      Found in packages/rest-api/src/controllers/swapTxInfoController.ts - About 1 hr to fix

                                        Function ReturnToMonkePage has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        const ReturnToMonkePage = () => {
                                          const { address: currentAddress, chain } = useAccount()
                                          const [connectedChainId, setConnectedChainId] = useState(0)
                                          const [address, setAddress] = useState(undefined)
                                        
                                        
                                        Severity: Minor
                                        Found in packages/synapse-interface/pages/returntomonke/index.tsx - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language