synapsecns/sanguine

View on GitHub

Showing 13,422 of 13,422 total issues

File index.tsx has 330 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { Fragment } from 'react'
import { useRouter } from 'next/router'
import { Popover, Transition } from '@headlessui/react'
import { MenuIcon, XIcon } from '@heroicons/react/outline'
import { useTranslations } from 'next-intl'

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    export const FRAX = new Token({
      addresses: {
        [CHAINS.ETH.id]: '0x853d955acef822db058eb8505911ed77f175b99e',
        [CHAINS.ARBITRUM.id]: '0x17FC002b466eEc40DaE837Fc4bE5c67993ddBd6F',
        [CHAINS.DOGE.id]: '0x10D70831f9C3c11c5fe683b2f1Be334503880DB6',
    Severity: Major
    Found in packages/synapse-interface/constants/tokens/bridgeable.ts and 1 other location - About 3 hrs to fix
    packages/synapse-interface/constants/tokens/bridgeable.ts on lines 618..633

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 113.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    const support: FooterDataProps[] = [
      {
        text: 'Support',
        type: null,
        url: null,
    packages/synapse-interface/components/layouts/LandingPageWrapper/PageFooter.tsx on lines 91..117

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 113.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

      describe('narrowToCCTPRouterQuery', () => {
        it('narrows a Query with routerAdapter', () => {
          const query = cctpRouterQuery as Query
          const narrowed = narrowToCCTPRouterQuery(query)
          expect(narrowed).toEqual(cctpRouterQuery)
    Severity: Major
    Found in packages/sdk-router/src/module/query.test.ts and 1 other location - About 3 hrs to fix
    packages/sdk-router/src/module/query.test.ts on lines 49..62

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 113.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

      describe('narrowToRouterQuery', () => {
        it('narrows a Query with swapAdapter', () => {
          const query = routerQuery as Query
          const narrowed = narrowToRouterQuery(query)
          expect(narrowed).toEqual(routerQuery)
    Severity: Major
    Found in packages/sdk-router/src/module/query.test.ts and 1 other location - About 3 hrs to fix
    packages/sdk-router/src/module/query.test.ts on lines 64..77

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 113.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    const getFirebirdSwapUrl = ({
      fromCoin,
      toCoin,
      chainId,
    }: {
    Severity: Major
    Found in packages/synapse-interface/constants/urls/index.tsx and 1 other location - About 3 hrs to fix
    packages/synapse-interface/constants/urls/index.tsx on lines 121..133

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 113.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    const supportList: FooterDataProps[] = [
      {
        text: 'Support',
        type: null,
        url: null,
    packages/explorer-ui/components/layouts/MainLayout/PageFooter.tsx on lines 88..114

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 113.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    const getTraderJoeSwapUrl = ({
      fromCoin,
      toCoin,
      chainId,
    }: {
    Severity: Major
    Found in packages/synapse-interface/constants/urls/index.tsx and 1 other location - About 3 hrs to fix
    packages/synapse-interface/constants/urls/index.tsx on lines 137..149

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 113.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    export const SYNFRAX = new Token({
      addresses: {
        [CHAINS.FANTOM.id]: '0x1852F70512298d56e9c8FDd905e02581E04ddb2a',
        [CHAINS.MOONRIVER.id]: '0xE96AC70907ffF3Efee79f502C985A7A21Bce407d',
        [CHAINS.MOONBEAM.id]: '0xDd47A348AB60c61Ad6B60cA8C31ea5e00eBfAB4F',
    Severity: Major
    Found in packages/synapse-interface/constants/tokens/bridgeable.ts and 1 other location - About 3 hrs to fix
    packages/synapse-interface/constants/tokens/bridgeable.ts on lines 601..616

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 113.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 9 locations. Consider refactoring.
    Open

    func (_m *IInbox) VerifyAttestationReport(opts *bind.TransactOpts, attPayload []byte, arSignature []byte) (*types.Transaction, error) {
        ret := _m.Called(opts, attPayload, arSignature)
    
        var r0 *types.Transaction
        if rf, ok := ret.Get(0).(func(*bind.TransactOpts, []byte, []byte) *types.Transaction); ok {
    Severity: Major
    Found in agents/contracts/inbox/mocks/i_inbox.go and 8 other locations - About 3 hrs to fix
    agents/contracts/inbox/mocks/i_inbox.go on lines 1016..1036
    agents/contracts/inbox/mocks/i_inbox.go on lines 1175..1195
    agents/contracts/inbox/mocks/i_inbox.go on lines 1221..1241
    agents/contracts/inbox/mocks/i_inbox.go on lines 1244..1264
    agents/contracts/inbox/mocks/i_inbox.go on lines 1267..1287
    agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 922..942
    agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 945..965
    agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 968..988

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 302.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 9 locations. Consider refactoring.
    Open

    func (_m *ILightInbox) VerifyStateReport(opts *bind.TransactOpts, statePayload []byte, srSignature []byte) (*types.Transaction, error) {
        ret := _m.Called(opts, statePayload, srSignature)
    
        var r0 *types.Transaction
        if rf, ok := ret.Get(0).(func(*bind.TransactOpts, []byte, []byte) *types.Transaction); ok {
    Severity: Major
    Found in agents/contracts/lightinbox/mocks/i_light_inbox.go and 8 other locations - About 3 hrs to fix
    agents/contracts/inbox/mocks/i_inbox.go on lines 1016..1036
    agents/contracts/inbox/mocks/i_inbox.go on lines 1175..1195
    agents/contracts/inbox/mocks/i_inbox.go on lines 1198..1218
    agents/contracts/inbox/mocks/i_inbox.go on lines 1221..1241
    agents/contracts/inbox/mocks/i_inbox.go on lines 1244..1264
    agents/contracts/inbox/mocks/i_inbox.go on lines 1267..1287
    agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 922..942
    agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 945..965

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 302.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 9 locations. Consider refactoring.
    Open

    func (_m *IInbox) VerifyReceipt(opts *bind.TransactOpts, rcptPayload []byte, rcptSignature []byte) (*types.Transaction, error) {
        ret := _m.Called(opts, rcptPayload, rcptSignature)
    
        var r0 *types.Transaction
        if rf, ok := ret.Get(0).(func(*bind.TransactOpts, []byte, []byte) *types.Transaction); ok {
    Severity: Major
    Found in agents/contracts/inbox/mocks/i_inbox.go and 8 other locations - About 3 hrs to fix
    agents/contracts/inbox/mocks/i_inbox.go on lines 1016..1036
    agents/contracts/inbox/mocks/i_inbox.go on lines 1175..1195
    agents/contracts/inbox/mocks/i_inbox.go on lines 1198..1218
    agents/contracts/inbox/mocks/i_inbox.go on lines 1244..1264
    agents/contracts/inbox/mocks/i_inbox.go on lines 1267..1287
    agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 922..942
    agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 945..965
    agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 968..988

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 302.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 9 locations. Consider refactoring.
    Open

    func (_m *IInbox) SubmitSnapshot(opts *bind.TransactOpts, snapPayload []byte, snapSignature []byte) (*types.Transaction, error) {
        ret := _m.Called(opts, snapPayload, snapSignature)
    
        var r0 *types.Transaction
        if rf, ok := ret.Get(0).(func(*bind.TransactOpts, []byte, []byte) *types.Transaction); ok {
    Severity: Major
    Found in agents/contracts/inbox/mocks/i_inbox.go and 8 other locations - About 3 hrs to fix
    agents/contracts/inbox/mocks/i_inbox.go on lines 1175..1195
    agents/contracts/inbox/mocks/i_inbox.go on lines 1198..1218
    agents/contracts/inbox/mocks/i_inbox.go on lines 1221..1241
    agents/contracts/inbox/mocks/i_inbox.go on lines 1244..1264
    agents/contracts/inbox/mocks/i_inbox.go on lines 1267..1287
    agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 922..942
    agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 945..965
    agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 968..988

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 302.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

    func makeScribeClient(parentCtx context.Context, handler metrics.Handler, url string) (*grpc.ClientConn, pbscribe.ScribeServiceClient, error) {
        ctx, cancel := context.WithTimeout(parentCtx, scribeConnectTimeout)
        defer cancel()
    
        conn, err := grpc.DialContext(ctx, url,
    Severity: Major
    Found in agents/agents/guard/guard.go and 1 other location - About 3 hrs to fix
    agents/agents/executor/executor.go on lines 109..134

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 302.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 9 locations. Consider refactoring.
    Open

    func (_m *IInbox) VerifyReceiptReport(opts *bind.TransactOpts, rcptPayload []byte, rrSignature []byte) (*types.Transaction, error) {
        ret := _m.Called(opts, rcptPayload, rrSignature)
    
        var r0 *types.Transaction
        if rf, ok := ret.Get(0).(func(*bind.TransactOpts, []byte, []byte) *types.Transaction); ok {
    Severity: Major
    Found in agents/contracts/inbox/mocks/i_inbox.go and 8 other locations - About 3 hrs to fix
    agents/contracts/inbox/mocks/i_inbox.go on lines 1016..1036
    agents/contracts/inbox/mocks/i_inbox.go on lines 1175..1195
    agents/contracts/inbox/mocks/i_inbox.go on lines 1198..1218
    agents/contracts/inbox/mocks/i_inbox.go on lines 1221..1241
    agents/contracts/inbox/mocks/i_inbox.go on lines 1267..1287
    agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 922..942
    agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 945..965
    agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 968..988

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 302.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 9 locations. Consider refactoring.
    Open

    func (_m *ILightInbox) VerifyReceipt(opts *bind.TransactOpts, rcptPayload []byte, rcptSignature []byte) (*types.Transaction, error) {
        ret := _m.Called(opts, rcptPayload, rcptSignature)
    
        var r0 *types.Transaction
        if rf, ok := ret.Get(0).(func(*bind.TransactOpts, []byte, []byte) *types.Transaction); ok {
    Severity: Major
    Found in agents/contracts/lightinbox/mocks/i_light_inbox.go and 8 other locations - About 3 hrs to fix
    agents/contracts/inbox/mocks/i_inbox.go on lines 1016..1036
    agents/contracts/inbox/mocks/i_inbox.go on lines 1175..1195
    agents/contracts/inbox/mocks/i_inbox.go on lines 1198..1218
    agents/contracts/inbox/mocks/i_inbox.go on lines 1221..1241
    agents/contracts/inbox/mocks/i_inbox.go on lines 1244..1264
    agents/contracts/inbox/mocks/i_inbox.go on lines 1267..1287
    agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 945..965
    agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 968..988

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 302.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 9 locations. Consider refactoring.
    Open

    func (_m *ILightInbox) VerifyReceiptReport(opts *bind.TransactOpts, rcptPayload []byte, rrSignature []byte) (*types.Transaction, error) {
        ret := _m.Called(opts, rcptPayload, rrSignature)
    
        var r0 *types.Transaction
        if rf, ok := ret.Get(0).(func(*bind.TransactOpts, []byte, []byte) *types.Transaction); ok {
    Severity: Major
    Found in agents/contracts/lightinbox/mocks/i_light_inbox.go and 8 other locations - About 3 hrs to fix
    agents/contracts/inbox/mocks/i_inbox.go on lines 1016..1036
    agents/contracts/inbox/mocks/i_inbox.go on lines 1175..1195
    agents/contracts/inbox/mocks/i_inbox.go on lines 1198..1218
    agents/contracts/inbox/mocks/i_inbox.go on lines 1221..1241
    agents/contracts/inbox/mocks/i_inbox.go on lines 1244..1264
    agents/contracts/inbox/mocks/i_inbox.go on lines 1267..1287
    agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 922..942
    agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 968..988

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 302.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 9 locations. Consider refactoring.
    Open

    func (_m *IInbox) VerifyAttestation(opts *bind.TransactOpts, attPayload []byte, attSignature []byte) (*types.Transaction, error) {
        ret := _m.Called(opts, attPayload, attSignature)
    
        var r0 *types.Transaction
        if rf, ok := ret.Get(0).(func(*bind.TransactOpts, []byte, []byte) *types.Transaction); ok {
    Severity: Major
    Found in agents/contracts/inbox/mocks/i_inbox.go and 8 other locations - About 3 hrs to fix
    agents/contracts/inbox/mocks/i_inbox.go on lines 1016..1036
    agents/contracts/inbox/mocks/i_inbox.go on lines 1198..1218
    agents/contracts/inbox/mocks/i_inbox.go on lines 1221..1241
    agents/contracts/inbox/mocks/i_inbox.go on lines 1244..1264
    agents/contracts/inbox/mocks/i_inbox.go on lines 1267..1287
    agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 922..942
    agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 945..965
    agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 968..988

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 302.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 9 locations. Consider refactoring.
    Open

    func (_m *IInbox) VerifyStateReport(opts *bind.TransactOpts, statePayload []byte, srSignature []byte) (*types.Transaction, error) {
        ret := _m.Called(opts, statePayload, srSignature)
    
        var r0 *types.Transaction
        if rf, ok := ret.Get(0).(func(*bind.TransactOpts, []byte, []byte) *types.Transaction); ok {
    Severity: Major
    Found in agents/contracts/inbox/mocks/i_inbox.go and 8 other locations - About 3 hrs to fix
    agents/contracts/inbox/mocks/i_inbox.go on lines 1016..1036
    agents/contracts/inbox/mocks/i_inbox.go on lines 1175..1195
    agents/contracts/inbox/mocks/i_inbox.go on lines 1198..1218
    agents/contracts/inbox/mocks/i_inbox.go on lines 1221..1241
    agents/contracts/inbox/mocks/i_inbox.go on lines 1244..1264
    agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 922..942
    agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 945..965
    agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 968..988

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 302.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

    func makeScribeClient(parentCtx context.Context, handler metrics.Handler, url string) (*grpc.ClientConn, pbscribe.ScribeServiceClient, error) {
        ctx, cancel := context.WithTimeout(parentCtx, scribeConnectTimeout)
        defer cancel()
    
        conn, err := grpc.DialContext(ctx, url,
    Severity: Major
    Found in agents/agents/executor/executor.go and 1 other location - About 3 hrs to fix
    agents/agents/guard/guard.go on lines 70..95

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 302.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Severity
    Category
    Status
    Source
    Language