Showing 1,971 of 13,422 total issues
Method queryResolver.DailyStatisticsByChain
has 11 return statements (exceeds 4 allowed). Open
func (r *queryResolver) DailyStatisticsByChain(ctx context.Context, chainID *int, typeArg *model.DailyStatisticType, platform *model.Platform, duration *model.Duration, useCache *bool, useMv *bool) ([]*model.DateResultByChain, error) {
cacheKey := fmt.Sprintf("dailyStatisticsByChain, %s, %s, %s, %s", keyGenHandleNilInt(chainID), typeArg.String(), duration.String(), platform.String())
if useCache != nil && *useCache {
locker := r.CacheMutex.Lock(cacheKey)
Method executionContext.field_Query_receiptsRange_args
has 11 return statements (exceeds 4 allowed). Open
func (ec *executionContext) field_Query_receiptsRange_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["chain_id"]; ok {
Method executionContext.field_Query_receiptsAtHeadRange_args
has 11 return statements (exceeds 4 allowed). Open
func (ec *executionContext) field_Query_receiptsAtHeadRange_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["chain_id"]; ok {
Method executionContext._Log
has 11 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Log(ctx context.Context, sel ast.SelectionSet, obj *model.Log) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, logImplementors)
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
Method executionContext._Transaction
has 11 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Transaction(ctx context.Context, sel ast.SelectionSet, obj *model.Transaction) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, transactionImplementors)
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
Method executionContext._Receipt
has 11 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Receipt(ctx context.Context, sel ast.SelectionSet, obj *model.Receipt) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, receiptImplementors)
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
Function getChainBackfiller
has 11 return statements (exceeds 4 allowed). Open
func getChainBackfiller(consumerDB db.ConsumerDB, chainConfig indexerConfig.ChainConfig, fetcher fetcherpkg.ScribeFetcher, client bind.ContractBackend, tokenDataService tokendata.Service, priceDataService tokenprice.Service) (*backfill.ChainBackfiller, error) {
var err error
var bridgeParser *parser.BridgeParser
var messageBusParser *parser.MessageBusParser
var cctpParser *parser.CCTPParser
Method BridgeParser.MatureLogs
has 11 return statements (exceeds 4 allowed). Open
func (p *BridgeParser) MatureLogs(ctx context.Context, bridgeEvent *model.BridgeEvent, iFace bridgeTypes.EventLog, chainID uint32) (interface{}, error) {
g, groupCtx := errgroup.WithContext(ctx)
var err error
var sender *string
var timeStamp *uint64
Method BridgeParser.MatureLogs
has a Cognitive Complexity of 25 (exceeds 20 allowed). Consider refactoring. Open
func (p *BridgeParser) MatureLogs(ctx context.Context, bridgeEvent *model.BridgeEvent, iFace bridgeTypes.EventLog, chainID uint32) (interface{}, error) {
g, groupCtx := errgroup.WithContext(ctx)
var err error
var sender *string
var timeStamp *uint64
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method executionContext.field_Query_receiptsRange_args
has 11 return statements (exceeds 4 allowed). Open
func (ec *executionContext) field_Query_receiptsRange_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["chain_id"]; ok {
Function RegisterScribeServiceHandlerClient
has 11 return statements (exceeds 4 allowed). Open
func RegisterScribeServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ScribeServiceClient) error {
mux.Handle("POST", pattern_ScribeService_Check_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
Method executionContext._Log
has 11 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Log(ctx context.Context, sel ast.SelectionSet, obj *model.Log) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, logImplementors)
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
Method executionContext.field_Query_receiptsAtHeadRange_args
has 11 return statements (exceeds 4 allowed). Open
func (ec *executionContext) field_Query_receiptsAtHeadRange_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["chain_id"]; ok {
Method executionContext._Transaction
has 11 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Transaction(ctx context.Context, sel ast.SelectionSet, obj *model.Transaction) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, transactionImplementors)
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
Method executionContext._Receipt
has 11 return statements (exceeds 4 allowed). Open
func (ec *executionContext) _Receipt(ctx context.Context, sel ast.SelectionSet, obj *model.Receipt) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, receiptImplementors)
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
Function getTransactionById
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export const getTransactionById = async (req: Request, res: Response) => {
const { transactionId } = req.params
try {
const query = db
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function useBridgeValidations
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export const useBridgeValidations = () => {
const { chainId } = useAccount()
const {
fromChainId,
toChainId,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function destinationTxController
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export const destinationTxController = async (req, res) => {
const errors = validationResult(req)
if (!errors.isEmpty()) {
return res.status(400).json({ errors: errors.array() })
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function normalizeNativeTokenAddress
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export const normalizeNativeTokenAddress = (addressFields: string[]) => {
return (req: Request, _res: Response, next: NextFunction) => {
for (const field of addressFields) {
const address = req.query[field]
if (typeof address === 'string' && isAddress(address)) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function HyperliquidTransactionButton
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export const HyperliquidTransactionButton = ({
isTyping,
hasDepositedOnHyperliquid,
setHasDepositedOnHyperliquid,
}) => {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"