Showing 1,971 of 13,422 total issues
Function getBlock
has 10 return statements (exceeds 4 allowed). Open
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
Method Notary.registerNotaryOnDestination
has 10 return statements (exceeds 4 allowed). Open
Open
func (n *Notary) registerNotaryOnDestination(parentCtx context.Context) bool {
ctx, span := n.handler.Tracer().Start(parentCtx, "registerNotaryOnDestination")
defer span.End()
var agentProof [][32]byte
Method IGasOracle.SetGasData
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
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) {
Method Executor.Run
has 10 return statements (exceeds 4 allowed). Open
Open
func (e Executor) Run(parentCtx context.Context) error {
g, ctx := errgroup.WithContext(parentCtx)
g.Go(func() error {
err := e.txSubmitter.Start(ctx)
Method testClientContract.SendMessage
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
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 {
Function NewReceipt
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
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 {
Method executionContext.field_Query_messageBusTransactions_args
has 10 return statements (exceeds 4 allowed). Open
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 {
Method inventoryManagerImpl.approve
has 10 return statements (exceeds 4 allowed). Open
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()),
))
Function NewChainBackfiller
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
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 {
Method Client.GetDestinationBridgeTx
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
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) {
Method executionContext.field_Query_logs_args
has 10 return statements (exceeds 4 allowed). Open
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 {
Method executionContext.field_Query_transactionsAtHeadRange_args
has 10 return statements (exceeds 4 allowed). Open
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 {
Function NewCCTPRelayer
has 10 return statements (exceeds 4 allowed). Open
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())
Function Start
has 10 return statements (exceeds 4 allowed). Open
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
Method synapseCCTPHandler.SubmitReceiveMessage
has 10 return statements (exceeds 4 allowed). Open
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)),
Method CCTPRelayer.Run
has 10 return statements (exceeds 4 allowed). Open
Open
func (c *CCTPRelayer) Run(parentCtx context.Context) error {
g, ctx := errgroup.WithContext(parentCtx)
// listen for contract events
for cid, listeners := range c.chainListeners {
Method executionContext.field_Query_logs_args
has 10 return statements (exceeds 4 allowed). Open
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 {
Method executionContext.field_Query_transactionsAtHeadRange_args
has 10 return statements (exceeds 4 allowed). Open
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 {
Function runLinter
has 9 return statements (exceeds 4 allowed). Open
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)
Method Guard.handleInvalidAttestation
has 9 return statements (exceeds 4 allowed). Open
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,