synapsecns/sanguine

View on GitHub

Showing 13,422 of 13,422 total issues

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

export const getCoinTextColorDark = (coin) => {
  switch (COIN_COLORS[coin.symbol]) {
    case 'yellow':
      return 'dark:text-yellow-500 dark:group-hover:text-yellow-400'
    case 'green':
Severity: Major
Found in packages/explorer-ui/utils/styles/coins.ts and 1 other location - About 3 hrs to fix
packages/explorer-ui/utils/styles/coins.ts on lines 314..341

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 110.

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 6 locations. Consider refactoring.
Open

func (_m *ILightInbox) Multicall(opts *bind.TransactOpts, calls []lightinbox.MultiCallableCall) (*types.Transaction, error) {
    ret := _m.Called(opts, calls)

    var r0 *types.Transaction
    if rf, ok := ret.Get(0).(func(*bind.TransactOpts, []lightinbox.MultiCallableCall) *types.Transaction); ok {
Severity: Major
Found in agents/contracts/lightinbox/mocks/i_light_inbox.go and 5 other locations - About 3 hrs to fix
agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 805..825
agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 388..408
agents/contracts/inbox/mocks/i_inbox.go on lines 533..553
agents/contracts/lightmanager/mocks/i_light_manager.go on lines 598..618
agents/contracts/origin/mocks/i_origin.go on lines 435..455

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 294.

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 6 locations. Consider refactoring.
Open

func (_m *IGasOracle) Multicall(opts *bind.TransactOpts, calls []gasoracle.MultiCallableCall) (*types.Transaction, error) {
    ret := _m.Called(opts, calls)

    var r0 *types.Transaction
    if rf, ok := ret.Get(0).(func(*bind.TransactOpts, []gasoracle.MultiCallableCall) *types.Transaction); ok {
Severity: Major
Found in agents/contracts/gasoracle/mocks/i_gas_oracle.go and 5 other locations - About 3 hrs to fix
agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 805..825
agents/contracts/inbox/mocks/i_inbox.go on lines 533..553
agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 441..461
agents/contracts/lightmanager/mocks/i_light_manager.go on lines 598..618
agents/contracts/origin/mocks/i_origin.go on lines 435..455

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 294.

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 3 locations. Consider refactoring.
Open

    g.Go(func() error {
        dailyFeeAllTimeMessageBus, err := client.GetDailyStatisticsByChain(ctx, nil, &feeType, &sixMonthType, &messagingType, &useMv)
        if err != nil {
            return fmt.Errorf("error rehydrating cache: %w", err)
        }
Severity: Major
Found in services/explorer/api/server.go and 2 other locations - About 3 hrs to fix
services/explorer/api/server.go on lines 802..828
services/explorer/api/server.go on lines 829..855

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 294.

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 3 locations. Consider refactoring.
Open

    g.Go(func() error {
        dailyFeeYearMessageBus, err := client.GetDailyStatisticsByChain(ctx, nil, &feeType, &threeMonthType, &messagingType, &useMv)
        if err != nil {
            return fmt.Errorf("error rehydrating cache: %w", err)
        }
Severity: Major
Found in services/explorer/api/server.go and 2 other locations - About 3 hrs to fix
services/explorer/api/server.go on lines 802..828
services/explorer/api/server.go on lines 856..882

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 294.

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 6 locations. Consider refactoring.
Open

func (_m *IInbox) Multicall(opts *bind.TransactOpts, calls []inbox.MultiCallableCall) (*types.Transaction, error) {
    ret := _m.Called(opts, calls)

    var r0 *types.Transaction
    if rf, ok := ret.Get(0).(func(*bind.TransactOpts, []inbox.MultiCallableCall) *types.Transaction); ok {
Severity: Major
Found in agents/contracts/inbox/mocks/i_inbox.go and 5 other locations - About 3 hrs to fix
agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 805..825
agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 388..408
agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 441..461
agents/contracts/lightmanager/mocks/i_light_manager.go on lines 598..618
agents/contracts/origin/mocks/i_origin.go on lines 435..455

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 294.

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 6 locations. Consider refactoring.
Open

func (_m *IOrigin) Multicall(opts *bind.TransactOpts, calls []origin.MultiCallableCall) (*types.Transaction, error) {
    ret := _m.Called(opts, calls)

    var r0 *types.Transaction
    if rf, ok := ret.Get(0).(func(*bind.TransactOpts, []origin.MultiCallableCall) *types.Transaction); ok {
Severity: Major
Found in agents/contracts/origin/mocks/i_origin.go and 5 other locations - About 3 hrs to fix
agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 805..825
agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 388..408
agents/contracts/inbox/mocks/i_inbox.go on lines 533..553
agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 441..461
agents/contracts/lightmanager/mocks/i_light_manager.go on lines 598..618

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 294.

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 6 locations. Consider refactoring.
Open

func (_m *IBondingManager) Multicall(opts *bind.TransactOpts, calls []bondingmanager.MultiCallableCall) (*types.Transaction, error) {
    ret := _m.Called(opts, calls)

    var r0 *types.Transaction
    if rf, ok := ret.Get(0).(func(*bind.TransactOpts, []bondingmanager.MultiCallableCall) *types.Transaction); ok {
Severity: Major
Found in agents/contracts/bondingmanager/mocks/i_bonding_manager.go and 5 other locations - About 3 hrs to fix
agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 388..408
agents/contracts/inbox/mocks/i_inbox.go on lines 533..553
agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 441..461
agents/contracts/lightmanager/mocks/i_light_manager.go on lines 598..618
agents/contracts/origin/mocks/i_origin.go on lines 435..455

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 294.

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 6 locations. Consider refactoring.
Open

func (_m *ILightManager) Multicall(opts *bind.TransactOpts, calls []lightmanager.MultiCallableCall) (*types.Transaction, error) {
    ret := _m.Called(opts, calls)

    var r0 *types.Transaction
    if rf, ok := ret.Get(0).(func(*bind.TransactOpts, []lightmanager.MultiCallableCall) *types.Transaction); ok {
Severity: Major
Found in agents/contracts/lightmanager/mocks/i_light_manager.go and 5 other locations - About 3 hrs to fix
agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 805..825
agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 388..408
agents/contracts/inbox/mocks/i_inbox.go on lines 533..553
agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 441..461
agents/contracts/origin/mocks/i_origin.go on lines 435..455

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 294.

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 3 locations. Consider refactoring.
Open

    g.Go(func() error {
        dailyFeeMonthMessageBus, err := client.GetDailyStatisticsByChain(ctx, nil, &feeType, &monthType, &messagingType, &useMv)
        if err != nil {
            return fmt.Errorf("error rehydrating cache: %w", err)
        }
Severity: Major
Found in services/explorer/api/server.go and 2 other locations - About 3 hrs to fix
services/explorer/api/server.go on lines 829..855
services/explorer/api/server.go on lines 856..882

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 294.

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

Method BridgeParser.ParseLog has 118 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (p *BridgeParser) ParseLog(log ethTypes.Log, chainID uint32) (*model.BridgeEvent, bridgeTypes.EventLog, error) {
    logTopic := log.Topics[0]

    iFace, err := func(log ethTypes.Log) (bridgeTypes.EventLog, error) {
        switch logTopic {
Severity: Major
Found in services/explorer/consumer/parser/bridgeparser.go - About 3 hrs to fix

    Function useBridgeSelectionData has 93 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const useBridgeSelectionData = (): BridgeSelections => {
      const [originChain, setOriginChain] = useState('')
      const [originToken, setOriginToken] = useState('')
      const [destinationChain, setDestinationChain] = useState('')
      const [destinationToken, setDestinationToken] = useState('')
    Severity: Major
    Found in packages/widget/src/hooks/useBridgeSelectionData.ts - About 3 hrs to fix

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

      func (_m *IBondingManager) WatchProposedAgentRootResolved(opts *bind.WatchOpts, sink chan<- *bondingmanager.BondingManagerProposedAgentRootResolved) (event.Subscription, error) {
          ret := _m.Called(opts, sink)
      
          var r0 event.Subscription
          if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *bondingmanager.BondingManagerProposedAgentRootResolved) event.Subscription); ok {
      Severity: Major
      Found in agents/contracts/bondingmanager/mocks/i_bonding_manager.go and 36 other locations - About 3 hrs to fix
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1330..1350
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1353..1373
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1376..1396
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1399..1419
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1468..1488
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1514..1534
      agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 752..772
      agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 775..795
      agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 844..864
      agents/contracts/inbox/mocks/i_inbox.go on lines 1380..1400
      agents/contracts/inbox/mocks/i_inbox.go on lines 1403..1423
      agents/contracts/inbox/mocks/i_inbox.go on lines 1426..1446
      agents/contracts/inbox/mocks/i_inbox.go on lines 1449..1469
      agents/contracts/inbox/mocks/i_inbox.go on lines 1472..1492
      agents/contracts/inbox/mocks/i_inbox.go on lines 1495..1515
      agents/contracts/inbox/mocks/i_inbox.go on lines 1518..1538
      agents/contracts/inbox/mocks/i_inbox.go on lines 1541..1561
      agents/contracts/inbox/mocks/i_inbox.go on lines 1564..1584
      agents/contracts/inbox/mocks/i_inbox.go on lines 1633..1653
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1081..1101
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1104..1124
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1127..1147
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1150..1170
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1173..1193
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1196..1216
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1219..1239
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1202..1222
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1225..1245
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1248..1268
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1271..1291
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1340..1360
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1363..1383
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1386..1406
      agents/contracts/origin/mocks/i_origin.go on lines 907..927
      agents/contracts/origin/mocks/i_origin.go on lines 999..1019
      agents/contracts/origin/mocks/i_origin.go on lines 1022..1042

      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 292.

      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 37 locations. Consider refactoring.
      Open

      func (_m *IInbox) WatchInvalidAttestation(opts *bind.WatchOpts, sink chan<- *inbox.InboxInvalidAttestation) (event.Subscription, error) {
          ret := _m.Called(opts, sink)
      
          var r0 event.Subscription
          if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *inbox.InboxInvalidAttestation) event.Subscription); ok {
      Severity: Major
      Found in agents/contracts/inbox/mocks/i_inbox.go and 36 other locations - About 3 hrs to fix
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1330..1350
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1353..1373
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1376..1396
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1399..1419
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1468..1488
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1491..1511
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1514..1534
      agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 752..772
      agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 775..795
      agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 844..864
      agents/contracts/inbox/mocks/i_inbox.go on lines 1380..1400
      agents/contracts/inbox/mocks/i_inbox.go on lines 1403..1423
      agents/contracts/inbox/mocks/i_inbox.go on lines 1449..1469
      agents/contracts/inbox/mocks/i_inbox.go on lines 1472..1492
      agents/contracts/inbox/mocks/i_inbox.go on lines 1495..1515
      agents/contracts/inbox/mocks/i_inbox.go on lines 1518..1538
      agents/contracts/inbox/mocks/i_inbox.go on lines 1541..1561
      agents/contracts/inbox/mocks/i_inbox.go on lines 1564..1584
      agents/contracts/inbox/mocks/i_inbox.go on lines 1633..1653
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1081..1101
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1104..1124
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1127..1147
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1150..1170
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1173..1193
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1196..1216
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1219..1239
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1202..1222
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1225..1245
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1248..1268
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1271..1291
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1340..1360
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1363..1383
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1386..1406
      agents/contracts/origin/mocks/i_origin.go on lines 907..927
      agents/contracts/origin/mocks/i_origin.go on lines 999..1019
      agents/contracts/origin/mocks/i_origin.go on lines 1022..1042

      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 292.

      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 37 locations. Consider refactoring.
      Open

      func (_m *IInbox) WatchInvalidStateWithAttestation(opts *bind.WatchOpts, sink chan<- *inbox.InboxInvalidStateWithAttestation) (event.Subscription, error) {
          ret := _m.Called(opts, sink)
      
          var r0 event.Subscription
          if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *inbox.InboxInvalidStateWithAttestation) event.Subscription); ok {
      Severity: Major
      Found in agents/contracts/inbox/mocks/i_inbox.go and 36 other locations - About 3 hrs to fix
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1330..1350
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1353..1373
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1376..1396
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1399..1419
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1468..1488
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1491..1511
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1514..1534
      agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 752..772
      agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 775..795
      agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 844..864
      agents/contracts/inbox/mocks/i_inbox.go on lines 1380..1400
      agents/contracts/inbox/mocks/i_inbox.go on lines 1403..1423
      agents/contracts/inbox/mocks/i_inbox.go on lines 1426..1446
      agents/contracts/inbox/mocks/i_inbox.go on lines 1449..1469
      agents/contracts/inbox/mocks/i_inbox.go on lines 1472..1492
      agents/contracts/inbox/mocks/i_inbox.go on lines 1495..1515
      agents/contracts/inbox/mocks/i_inbox.go on lines 1518..1538
      agents/contracts/inbox/mocks/i_inbox.go on lines 1564..1584
      agents/contracts/inbox/mocks/i_inbox.go on lines 1633..1653
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1081..1101
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1104..1124
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1127..1147
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1150..1170
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1173..1193
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1196..1216
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1219..1239
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1202..1222
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1225..1245
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1248..1268
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1271..1291
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1340..1360
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1363..1383
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1386..1406
      agents/contracts/origin/mocks/i_origin.go on lines 907..927
      agents/contracts/origin/mocks/i_origin.go on lines 999..1019
      agents/contracts/origin/mocks/i_origin.go on lines 1022..1042

      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 292.

      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 37 locations. Consider refactoring.
      Open

      func (_m *IGasOracle) WatchGasDataUpdated(opts *bind.WatchOpts, sink chan<- *gasoracle.GasOracleGasDataUpdated) (event.Subscription, error) {
          ret := _m.Called(opts, sink)
      
          var r0 event.Subscription
          if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *gasoracle.GasOracleGasDataUpdated) event.Subscription); ok {
      Severity: Major
      Found in agents/contracts/gasoracle/mocks/i_gas_oracle.go and 36 other locations - About 3 hrs to fix
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1330..1350
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1353..1373
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1376..1396
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1399..1419
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1468..1488
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1491..1511
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1514..1534
      agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 775..795
      agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 844..864
      agents/contracts/inbox/mocks/i_inbox.go on lines 1380..1400
      agents/contracts/inbox/mocks/i_inbox.go on lines 1403..1423
      agents/contracts/inbox/mocks/i_inbox.go on lines 1426..1446
      agents/contracts/inbox/mocks/i_inbox.go on lines 1449..1469
      agents/contracts/inbox/mocks/i_inbox.go on lines 1472..1492
      agents/contracts/inbox/mocks/i_inbox.go on lines 1495..1515
      agents/contracts/inbox/mocks/i_inbox.go on lines 1518..1538
      agents/contracts/inbox/mocks/i_inbox.go on lines 1541..1561
      agents/contracts/inbox/mocks/i_inbox.go on lines 1564..1584
      agents/contracts/inbox/mocks/i_inbox.go on lines 1633..1653
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1081..1101
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1104..1124
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1127..1147
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1150..1170
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1173..1193
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1196..1216
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1219..1239
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1202..1222
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1225..1245
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1248..1268
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1271..1291
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1340..1360
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1363..1383
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1386..1406
      agents/contracts/origin/mocks/i_origin.go on lines 907..927
      agents/contracts/origin/mocks/i_origin.go on lines 999..1019
      agents/contracts/origin/mocks/i_origin.go on lines 1022..1042

      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 292.

      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 37 locations. Consider refactoring.
      Open

      func (_m *IBondingManager) WatchDisputeOpened(opts *bind.WatchOpts, sink chan<- *bondingmanager.BondingManagerDisputeOpened) (event.Subscription, error) {
          ret := _m.Called(opts, sink)
      
          var r0 event.Subscription
          if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *bondingmanager.BondingManagerDisputeOpened) event.Subscription); ok {
      Severity: Major
      Found in agents/contracts/bondingmanager/mocks/i_bonding_manager.go and 36 other locations - About 3 hrs to fix
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1330..1350
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1376..1396
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1399..1419
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1468..1488
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1491..1511
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1514..1534
      agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 752..772
      agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 775..795
      agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 844..864
      agents/contracts/inbox/mocks/i_inbox.go on lines 1380..1400
      agents/contracts/inbox/mocks/i_inbox.go on lines 1403..1423
      agents/contracts/inbox/mocks/i_inbox.go on lines 1426..1446
      agents/contracts/inbox/mocks/i_inbox.go on lines 1449..1469
      agents/contracts/inbox/mocks/i_inbox.go on lines 1472..1492
      agents/contracts/inbox/mocks/i_inbox.go on lines 1495..1515
      agents/contracts/inbox/mocks/i_inbox.go on lines 1518..1538
      agents/contracts/inbox/mocks/i_inbox.go on lines 1541..1561
      agents/contracts/inbox/mocks/i_inbox.go on lines 1564..1584
      agents/contracts/inbox/mocks/i_inbox.go on lines 1633..1653
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1081..1101
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1104..1124
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1127..1147
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1150..1170
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1173..1193
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1196..1216
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1219..1239
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1202..1222
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1225..1245
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1248..1268
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1271..1291
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1340..1360
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1363..1383
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1386..1406
      agents/contracts/origin/mocks/i_origin.go on lines 907..927
      agents/contracts/origin/mocks/i_origin.go on lines 999..1019
      agents/contracts/origin/mocks/i_origin.go on lines 1022..1042

      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 292.

      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 37 locations. Consider refactoring.
      Open

      func (_m *ILightManager) WatchProposedAgentRootResolved(opts *bind.WatchOpts, sink chan<- *lightmanager.LightManagerProposedAgentRootResolved) (event.Subscription, error) {
          ret := _m.Called(opts, sink)
      
          var r0 event.Subscription
          if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *lightmanager.LightManagerProposedAgentRootResolved) event.Subscription); ok {
      Severity: Major
      Found in agents/contracts/lightmanager/mocks/i_light_manager.go and 36 other locations - About 3 hrs to fix
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1330..1350
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1353..1373
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1376..1396
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1399..1419
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1468..1488
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1491..1511
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1514..1534
      agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 752..772
      agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 775..795
      agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 844..864
      agents/contracts/inbox/mocks/i_inbox.go on lines 1380..1400
      agents/contracts/inbox/mocks/i_inbox.go on lines 1403..1423
      agents/contracts/inbox/mocks/i_inbox.go on lines 1426..1446
      agents/contracts/inbox/mocks/i_inbox.go on lines 1449..1469
      agents/contracts/inbox/mocks/i_inbox.go on lines 1472..1492
      agents/contracts/inbox/mocks/i_inbox.go on lines 1495..1515
      agents/contracts/inbox/mocks/i_inbox.go on lines 1518..1538
      agents/contracts/inbox/mocks/i_inbox.go on lines 1541..1561
      agents/contracts/inbox/mocks/i_inbox.go on lines 1564..1584
      agents/contracts/inbox/mocks/i_inbox.go on lines 1633..1653
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1081..1101
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1104..1124
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1127..1147
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1150..1170
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1173..1193
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1196..1216
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1219..1239
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1202..1222
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1225..1245
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1248..1268
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1271..1291
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1340..1360
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1386..1406
      agents/contracts/origin/mocks/i_origin.go on lines 907..927
      agents/contracts/origin/mocks/i_origin.go on lines 999..1019
      agents/contracts/origin/mocks/i_origin.go on lines 1022..1042

      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 292.

      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 37 locations. Consider refactoring.
      Open

      func (_m *IInbox) WatchReceiptAccepted(opts *bind.WatchOpts, sink chan<- *inbox.InboxReceiptAccepted) (event.Subscription, error) {
          ret := _m.Called(opts, sink)
      
          var r0 event.Subscription
          if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *inbox.InboxReceiptAccepted) event.Subscription); ok {
      Severity: Major
      Found in agents/contracts/inbox/mocks/i_inbox.go and 36 other locations - About 3 hrs to fix
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1330..1350
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1353..1373
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1376..1396
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1399..1419
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1468..1488
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1491..1511
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1514..1534
      agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 752..772
      agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 775..795
      agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 844..864
      agents/contracts/inbox/mocks/i_inbox.go on lines 1380..1400
      agents/contracts/inbox/mocks/i_inbox.go on lines 1403..1423
      agents/contracts/inbox/mocks/i_inbox.go on lines 1426..1446
      agents/contracts/inbox/mocks/i_inbox.go on lines 1449..1469
      agents/contracts/inbox/mocks/i_inbox.go on lines 1472..1492
      agents/contracts/inbox/mocks/i_inbox.go on lines 1495..1515
      agents/contracts/inbox/mocks/i_inbox.go on lines 1518..1538
      agents/contracts/inbox/mocks/i_inbox.go on lines 1541..1561
      agents/contracts/inbox/mocks/i_inbox.go on lines 1564..1584
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1081..1101
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1104..1124
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1127..1147
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1150..1170
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1173..1193
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1196..1216
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1219..1239
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1202..1222
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1225..1245
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1248..1268
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1271..1291
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1340..1360
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1363..1383
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1386..1406
      agents/contracts/origin/mocks/i_origin.go on lines 907..927
      agents/contracts/origin/mocks/i_origin.go on lines 999..1019
      agents/contracts/origin/mocks/i_origin.go on lines 1022..1042

      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 292.

      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 37 locations. Consider refactoring.
      Open

      func (_m *IOrigin) WatchStateSaved(opts *bind.WatchOpts, sink chan<- *origin.OriginStateSaved) (event.Subscription, error) {
          ret := _m.Called(opts, sink)
      
          var r0 event.Subscription
          if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *origin.OriginStateSaved) event.Subscription); ok {
      Severity: Major
      Found in agents/contracts/origin/mocks/i_origin.go and 36 other locations - About 3 hrs to fix
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1330..1350
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1353..1373
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1376..1396
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1399..1419
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1468..1488
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1491..1511
      agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1514..1534
      agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 752..772
      agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 775..795
      agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 844..864
      agents/contracts/inbox/mocks/i_inbox.go on lines 1380..1400
      agents/contracts/inbox/mocks/i_inbox.go on lines 1403..1423
      agents/contracts/inbox/mocks/i_inbox.go on lines 1426..1446
      agents/contracts/inbox/mocks/i_inbox.go on lines 1449..1469
      agents/contracts/inbox/mocks/i_inbox.go on lines 1472..1492
      agents/contracts/inbox/mocks/i_inbox.go on lines 1495..1515
      agents/contracts/inbox/mocks/i_inbox.go on lines 1518..1538
      agents/contracts/inbox/mocks/i_inbox.go on lines 1541..1561
      agents/contracts/inbox/mocks/i_inbox.go on lines 1564..1584
      agents/contracts/inbox/mocks/i_inbox.go on lines 1633..1653
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1081..1101
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1104..1124
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1127..1147
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1150..1170
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1173..1193
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1196..1216
      agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1219..1239
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1202..1222
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1225..1245
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1248..1268
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1271..1291
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1340..1360
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1363..1383
      agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1386..1406
      agents/contracts/origin/mocks/i_origin.go on lines 907..927
      agents/contracts/origin/mocks/i_origin.go on lines 1022..1042

      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 292.

      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