synapsecns/sanguine

View on GitHub

Showing 1,971 of 13,422 total issues

Function getBlock has 10 return statements (exceeds 4 allowed).
Open

func getBlock(ctx context.Context, c AuroraClient, method string, args ...interface{}) (*types.Block, error) {
    var raw json.RawMessage
    err := c.CallContext(ctx, &raw, method, args...)
    if err != nil {
        //nolint:wrapcheck
Severity: Major
Found in ethergo/chain/client/near/block.go - About 1 hr to fix

    Method Notary.registerNotaryOnDestination has 10 return statements (exceeds 4 allowed).
    Open

    func (n *Notary) registerNotaryOnDestination(parentCtx context.Context) bool {
        ctx, span := n.handler.Tracer().Start(parentCtx, "registerNotaryOnDestination")
        defer span.End()
    
        var agentProof [][32]byte
    Severity: Major
    Found in agents/agents/notary/notary.go - About 1 hr to fix

      Method IGasOracle.SetGasData has 8 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      func (_m *IGasOracle) SetGasData(opts *bind.TransactOpts, domain uint32, gasPrice *big.Int, dataPrice *big.Int, execBuffer *big.Int, amortAttCost *big.Int, etherPrice *big.Int, markup *big.Int) (*types.Transaction, error) {
      Severity: Major
      Found in agents/contracts/gasoracle/mocks/i_gas_oracle.go - About 1 hr to fix

        Method Executor.Run has 10 return statements (exceeds 4 allowed).
        Open

        func (e Executor) Run(parentCtx context.Context) error {
            g, ctx := errgroup.WithContext(parentCtx)
        
            g.Go(func() error {
                err := e.txSubmitter.Start(ctx)
        Severity: Major
        Found in agents/agents/executor/executor.go - About 1 hr to fix

          Method testClientContract.SendMessage has 8 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          func (a testClientContract) SendMessage(ctx context.Context, signer signer.Signer, destination uint32, recipient common.Address, optimisticSeconds uint32, gasLimit uint64, version uint32, message []byte) error {
          Severity: Major
          Found in agents/domains/evm/testclient.go - About 1 hr to fix

            Function NewReceipt has 8 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            func NewReceipt(origin uint32, destination uint32, messageHash [32]byte, snapshotRoot [32]byte, stateIndex uint8, attestationNotary common.Address, firstExecutor common.Address, finalExecutor common.Address) Receipt {
            Severity: Major
            Found in agents/types/receipt.go - About 1 hr to fix

              Method executionContext.field_Query_messageBusTransactions_args has 10 return statements (exceeds 4 allowed).
              Open

              func (ec *executionContext) field_Query_messageBusTransactions_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
                  var err error
                  args := map[string]interface{}{}
                  var arg0 []*int
                  if tmp, ok := rawArgs["chainID"]; ok {
              Severity: Major
              Found in services/explorer/graphql/server/graph/resolver/server.go - About 1 hr to fix

                Method inventoryManagerImpl.approve has 10 return statements (exceeds 4 allowed).
                Open

                func (i *inventoryManagerImpl) approve(parentCtx context.Context, tokenAddr, contractAddr common.Address, backendClient client.EVM) (err error) {
                    ctx, span := i.handler.Tracer().Start(parentCtx, "approve", trace.WithAttributes(
                        attribute.String("token_address", tokenAddr.Hex()),
                        attribute.String("contract_address", contractAddr.Hex()),
                    ))
                Severity: Major
                Found in services/rfq/relayer/inventory/manager.go - About 1 hr to fix

                  Function NewChainBackfiller has 8 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  func NewChainBackfiller(consumerDB db.ConsumerDB, bridgeParser *parser.BridgeParser, swapParsers map[common.Address]*parser.SwapParser, messageBusParser *parser.MessageBusParser, cctpParser *parser.CCTPParser, rfqParser *parser.RFQParser, fetcher fetcher.ScribeFetcher, chainConfig indexerconfig.ChainConfig) *ChainBackfiller {
                  Severity: Major
                  Found in services/explorer/backfill/chain.go - About 1 hr to fix

                    Method Client.GetDestinationBridgeTx has 8 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    func (c *Client) GetDestinationBridgeTx(ctx context.Context, chainID int, kappa string, address string, timestamp int, bridgeType model.BridgeType, historical *bool, httpRequestOptions ...client.HTTPRequestOption) (*GetDestinationBridgeTx, error) {
                    Severity: Major
                    Found in services/explorer/graphql/client/client.go - About 1 hr to fix

                      Method executionContext.field_Query_logs_args has 10 return statements (exceeds 4 allowed).
                      Open

                      func (ec *executionContext) field_Query_logs_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
                          var err error
                          args := map[string]interface{}{}
                          var arg0 *string
                          if tmp, ok := rawArgs["contract_address"]; ok {
                      Severity: Major
                      Found in services/explorer/consumer/client/resolver-client/server.go - About 1 hr to fix

                        Method executionContext.field_Query_transactionsAtHeadRange_args has 10 return statements (exceeds 4 allowed).
                        Open

                        func (ec *executionContext) field_Query_transactionsAtHeadRange_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
                            var err error
                            args := map[string]interface{}{}
                            var arg0 *string
                            if tmp, ok := rawArgs["tx_hash"]; ok {
                        Severity: Major
                        Found in services/explorer/consumer/client/resolver-client/server.go - About 1 hr to fix

                          Function NewCCTPRelayer has 10 return statements (exceeds 4 allowed).
                          Open

                          func NewCCTPRelayer(ctx context.Context, cfg config.Config, store db2.CCTPRelayerDB, omniRPCClient omniClient.RPCClient, handler metrics.Handler, attestationAPI attestation.CCTPAPI, rawOpts ...OptionsArgsOption) (*CCTPRelayer, error) {
                              opts := makeOptions(rawOpts)
                          
                              omniClient := omniClient.NewOmnirpcClient(cfg.BaseOmnirpcURL, handler, omniClient.WithCaptureReqRes())
                          
                          
                          Severity: Major
                          Found in services/cctp-relayer/relayer/relayer.go - About 1 hr to fix

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

                            func Start(ctx context.Context, cfg serverConfig.Config, handler metrics.Handler) error {
                                router := ginhelper.New(logger)
                                router.GET(ginhelper.MetricsEndpoint, gin.WrapH(handler.Handler()))
                            
                                // initialize the database
                            Severity: Major
                            Found in services/explorer/api/server.go - About 1 hr to fix

                              Method synapseCCTPHandler.SubmitReceiveMessage has 10 return statements (exceeds 4 allowed).
                              Open

                              func (s *synapseCCTPHandler) SubmitReceiveMessage(parentCtx context.Context, msg *relayTypes.Message) (err error) {
                                  ctx, span := s.handler.Tracer().Start(parentCtx, "SubmitReceiveMessage", trace.WithAttributes(
                                      attribute.String(MessageHash, msg.MessageHash),
                                      attribute.Int(metrics.Origin, int(msg.OriginChainID)),
                                      attribute.Int(metrics.Destination, int(msg.DestChainID)),
                              Severity: Major
                              Found in services/cctp-relayer/relayer/synapse.go - About 1 hr to fix

                                Method CCTPRelayer.Run has 10 return statements (exceeds 4 allowed).
                                Open

                                func (c *CCTPRelayer) Run(parentCtx context.Context) error {
                                    g, ctx := errgroup.WithContext(parentCtx)
                                
                                    // listen for contract events
                                    for cid, listeners := range c.chainListeners {
                                Severity: Major
                                Found in services/cctp-relayer/relayer/relayer.go - About 1 hr to fix

                                  Method executionContext.field_Query_logs_args has 10 return statements (exceeds 4 allowed).
                                  Open

                                  func (ec *executionContext) field_Query_logs_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
                                      var err error
                                      args := map[string]interface{}{}
                                      var arg0 *string
                                      if tmp, ok := rawArgs["contract_address"]; ok {
                                  Severity: Major
                                  Found in services/scribe/graphql/server/graph/resolver/server.go - About 1 hr to fix

                                    Method executionContext.field_Query_transactionsAtHeadRange_args has 10 return statements (exceeds 4 allowed).
                                    Open

                                    func (ec *executionContext) field_Query_transactionsAtHeadRange_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
                                        var err error
                                        args := map[string]interface{}{}
                                        var arg0 *string
                                        if tmp, ok := rawArgs["tx_hash"]; ok {
                                    Severity: Major
                                    Found in services/scribe/graphql/server/graph/resolver/server.go - About 1 hr to fix

                                      Function runLinter has 9 return statements (exceeds 4 allowed).
                                      Open

                                      func runLinter(ctx context.Context, binaryPath, workDir string, args []string) error {
                                          // Validate binary permissions before execution
                                          info, err := os.Stat(binaryPath)
                                          if err != nil {
                                              return fmt.Errorf("checking binary before execution: %w", err)
                                      Severity: Major
                                      Found in contrib/golang-ci-lint/main.go - About 55 mins to fix

                                        Method Guard.handleInvalidAttestation has 9 return statements (exceeds 4 allowed).
                                        Open

                                        func (g Guard) handleInvalidAttestation(ctx context.Context, attestationData *types.AttestationWithMetadata) error {
                                            // Initiate slashing for invalid attestation.
                                            _, err := g.txSubmitter.SubmitTransaction(ctx, big.NewInt(int64(g.summitDomainID)), func(transactor *bind.TransactOpts) (tx *ethTypes.Transaction, err error) {
                                                tx, err = g.domains[g.summitDomainID].Inbox().VerifyAttestation(
                                                    transactor,
                                        Severity: Major
                                        Found in agents/agents/guard/fraud.go - About 55 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language