synapsecns/sanguine

View on GitHub
agents/contracts/gasoracle/mocks/i_gas_oracle.go

Summary

Maintainability
F
1 wk
Test Coverage

File i_gas_oracle.go has 685 lines of code (exceeds 500 allowed). Consider refactoring.
Open

// Code generated by mockery v2.14.0. DO NOT EDIT.

package mocks

import (
Severity: Minor
Found in agents/contracts/gasoracle/mocks/i_gas_oracle.go - About 6 hrs to fix

    IGasOracle has 36 methods (exceeds 20 allowed). Consider refactoring.
    Open

    type IGasOracle struct {
        mock.Mock
    }
    Severity: Minor
    Found in agents/contracts/gasoracle/mocks/i_gas_oracle.go - About 4 hrs to fix

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

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

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

        func (_m *IGasOracle) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *gasoracle.GasOracleOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) {
            ret := _m.Called(opts, sink, previousOwner, newOwner)
        
            var r0 event.Subscription
            if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *gasoracle.GasOracleOwnershipTransferred, []common.Address, []common.Address) event.Subscription); ok {
        Severity: Major
        Found in agents/contracts/gasoracle/mocks/i_gas_oracle.go and 11 other locations - About 4 hrs to fix
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1422..1442
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1445..1465
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 798..818
        agents/contracts/inbox/mocks/i_inbox.go on lines 1587..1607
        agents/contracts/inbox/mocks/i_inbox.go on lines 1610..1630
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1242..1262
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1265..1285
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1294..1314
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1317..1337
        agents/contracts/origin/mocks/i_origin.go on lines 930..950
        agents/contracts/origin/mocks/i_origin.go on lines 953..973

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

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

        func (_m *IGasOracle) WatchOwnershipTransferStarted(opts *bind.WatchOpts, sink chan<- *gasoracle.GasOracleOwnershipTransferStarted, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) {
            ret := _m.Called(opts, sink, previousOwner, newOwner)
        
            var r0 event.Subscription
            if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *gasoracle.GasOracleOwnershipTransferStarted, []common.Address, []common.Address) event.Subscription); ok {
        Severity: Major
        Found in agents/contracts/gasoracle/mocks/i_gas_oracle.go and 11 other locations - About 4 hrs to fix
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1422..1442
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1445..1465
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 821..841
        agents/contracts/inbox/mocks/i_inbox.go on lines 1587..1607
        agents/contracts/inbox/mocks/i_inbox.go on lines 1610..1630
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1242..1262
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1265..1285
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1294..1314
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1317..1337
        agents/contracts/origin/mocks/i_origin.go on lines 930..950
        agents/contracts/origin/mocks/i_origin.go on lines 953..973

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

        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

        func (_m *IGasOracle) GetMinimumTips(opts *bind.CallOpts, destination_ uint32, paddedRequest *big.Int, contentLength *big.Int) (*big.Int, error) {
            ret := _m.Called(opts, destination_, paddedRequest, contentLength)
        
            var r0 *big.Int
            if rf, ok := ret.Get(0).(func(*bind.CallOpts, uint32, *big.Int, *big.Int) *big.Int); ok {
        Severity: Major
        Found in agents/contracts/gasoracle/mocks/i_gas_oracle.go and 1 other location - About 4 hrs to fix
        agents/contracts/origin/mocks/i_origin.go on lines 303..323

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

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

        func (_m *IGasOracle) FilterOwnershipTransferStarted(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*gasoracle.GasOracleOwnershipTransferStartedIterator, error) {
            ret := _m.Called(opts, previousOwner, newOwner)
        
            var r0 *gasoracle.GasOracleOwnershipTransferStartedIterator
            if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []common.Address, []common.Address) *gasoracle.GasOracleOwnershipTransferStartedIterator); ok {
        Severity: Major
        Found in agents/contracts/gasoracle/mocks/i_gas_oracle.go and 11 other locations - About 4 hrs to fix
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 380..400
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 403..423
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 157..177
        agents/contracts/inbox/mocks/i_inbox.go on lines 318..338
        agents/contracts/inbox/mocks/i_inbox.go on lines 341..361
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 272..292
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 295..315
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 288..308
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 311..331
        agents/contracts/origin/mocks/i_origin.go on lines 132..152
        agents/contracts/origin/mocks/i_origin.go on lines 155..175

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

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

        func (_m *IGasOracle) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*gasoracle.GasOracleOwnershipTransferredIterator, error) {
            ret := _m.Called(opts, previousOwner, newOwner)
        
            var r0 *gasoracle.GasOracleOwnershipTransferredIterator
            if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []common.Address, []common.Address) *gasoracle.GasOracleOwnershipTransferredIterator); ok {
        Severity: Major
        Found in agents/contracts/gasoracle/mocks/i_gas_oracle.go and 11 other locations - About 4 hrs to fix
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 380..400
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 403..423
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 134..154
        agents/contracts/inbox/mocks/i_inbox.go on lines 318..338
        agents/contracts/inbox/mocks/i_inbox.go on lines 341..361
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 272..292
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 295..315
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 288..308
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 311..331
        agents/contracts/origin/mocks/i_origin.go on lines 132..152
        agents/contracts/origin/mocks/i_origin.go on lines 155..175

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

        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 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 *IGasOracle) WatchSummitTipUpdated(opts *bind.WatchOpts, sink chan<- *gasoracle.GasOracleSummitTipUpdated) (event.Subscription, error) {
            ret := _m.Called(opts, sink)
        
            var r0 event.Subscription
            if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *gasoracle.GasOracleSummitTipUpdated) 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 752..772
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 775..795
        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 *IGasOracle) WatchInitialized(opts *bind.WatchOpts, sink chan<- *gasoracle.GasOracleInitialized) (event.Subscription, error) {
            ret := _m.Called(opts, sink)
        
            var r0 event.Subscription
            if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *gasoracle.GasOracleInitialized) 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 752..772
        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 6 locations. Consider refactoring.
        Open

        func (_m *IGasOracle) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) {
            ret := _m.Called(opts, newOwner)
        
            var r0 *types.Transaction
            if rf, ok := ret.Get(0).(func(*bind.TransactOpts, common.Address) *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 1286..1306
        agents/contracts/inbox/mocks/i_inbox.go on lines 1152..1172
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 899..919
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1135..1155
        agents/contracts/origin/mocks/i_origin.go on lines 863..883

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

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

        func (_m *IGasOracle) FilterGasDataUpdated(opts *bind.FilterOpts) (*gasoracle.GasOracleGasDataUpdatedIterator, error) {
            ret := _m.Called(opts)
        
            var r0 *gasoracle.GasOracleGasDataUpdatedIterator
            if rf, ok := ret.Get(0).(func(*bind.FilterOpts) *gasoracle.GasOracleGasDataUpdatedIterator); ok {
        Severity: Major
        Found in agents/contracts/gasoracle/mocks/i_gas_oracle.go and 64 other locations - About 3 hrs to fix
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 26..46
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 288..308
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 311..331
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 334..354
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 357..377
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 426..446
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 449..469
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 472..492
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 623..643
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 761..781
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1173..1193
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 26..46
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 111..131
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 180..200
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 203..223
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 226..246
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 298..318
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 344..364
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 572..592
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 641..661
        agents/contracts/inbox/mocks/i_inbox.go on lines 26..46
        agents/contracts/inbox/mocks/i_inbox.go on lines 111..131
        agents/contracts/inbox/mocks/i_inbox.go on lines 134..154
        agents/contracts/inbox/mocks/i_inbox.go on lines 157..177
        agents/contracts/inbox/mocks/i_inbox.go on lines 180..200
        agents/contracts/inbox/mocks/i_inbox.go on lines 203..223
        agents/contracts/inbox/mocks/i_inbox.go on lines 226..246
        agents/contracts/inbox/mocks/i_inbox.go on lines 249..269
        agents/contracts/inbox/mocks/i_inbox.go on lines 272..292
        agents/contracts/inbox/mocks/i_inbox.go on lines 295..315
        agents/contracts/inbox/mocks/i_inbox.go on lines 364..384
        agents/contracts/inbox/mocks/i_inbox.go on lines 443..463
        agents/contracts/inbox/mocks/i_inbox.go on lines 947..967
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 26..46
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 111..131
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 134..154
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 157..177
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 180..200
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 203..223
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 226..246
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 249..269
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 351..371
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 740..760
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 26..46
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 109..129
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 196..216
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 219..239
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 242..262
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 265..285
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 334..354
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 357..377
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 380..400
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 508..528
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1022..1042
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1045..1065
        agents/contracts/origin/mocks/i_origin.go on lines 26..46
        agents/contracts/origin/mocks/i_origin.go on lines 109..129
        agents/contracts/origin/mocks/i_origin.go on lines 201..221
        agents/contracts/origin/mocks/i_origin.go on lines 224..244
        agents/contracts/origin/mocks/i_origin.go on lines 349..369
        agents/contracts/origin/mocks/i_origin.go on lines 681..701
        agents/contracts/origin/mocks/i_origin.go on lines 773..793
        ethergo/backends/mocks/simulated_test_backend.go on lines 683..703
        ethergo/backends/mocks/simulated_test_backend.go on lines 706..726

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

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

        func (_m *IGasOracle) GetGasData(opts *bind.CallOpts) (*big.Int, error) {
            ret := _m.Called(opts)
        
            var r0 *big.Int
            if rf, ok := ret.Get(0).(func(*bind.CallOpts) *big.Int); ok {
        Severity: Major
        Found in agents/contracts/gasoracle/mocks/i_gas_oracle.go and 64 other locations - About 3 hrs to fix
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 26..46
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 288..308
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 311..331
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 334..354
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 357..377
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 426..446
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 449..469
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 472..492
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 623..643
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 761..781
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1173..1193
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 26..46
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 88..108
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 111..131
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 180..200
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 203..223
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 226..246
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 344..364
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 572..592
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 641..661
        agents/contracts/inbox/mocks/i_inbox.go on lines 26..46
        agents/contracts/inbox/mocks/i_inbox.go on lines 111..131
        agents/contracts/inbox/mocks/i_inbox.go on lines 134..154
        agents/contracts/inbox/mocks/i_inbox.go on lines 157..177
        agents/contracts/inbox/mocks/i_inbox.go on lines 180..200
        agents/contracts/inbox/mocks/i_inbox.go on lines 203..223
        agents/contracts/inbox/mocks/i_inbox.go on lines 226..246
        agents/contracts/inbox/mocks/i_inbox.go on lines 249..269
        agents/contracts/inbox/mocks/i_inbox.go on lines 272..292
        agents/contracts/inbox/mocks/i_inbox.go on lines 295..315
        agents/contracts/inbox/mocks/i_inbox.go on lines 364..384
        agents/contracts/inbox/mocks/i_inbox.go on lines 443..463
        agents/contracts/inbox/mocks/i_inbox.go on lines 947..967
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 26..46
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 111..131
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 134..154
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 157..177
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 180..200
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 203..223
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 226..246
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 249..269
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 351..371
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 740..760
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 26..46
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 109..129
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 196..216
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 219..239
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 242..262
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 265..285
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 334..354
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 357..377
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 380..400
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 508..528
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1022..1042
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1045..1065
        agents/contracts/origin/mocks/i_origin.go on lines 26..46
        agents/contracts/origin/mocks/i_origin.go on lines 109..129
        agents/contracts/origin/mocks/i_origin.go on lines 201..221
        agents/contracts/origin/mocks/i_origin.go on lines 224..244
        agents/contracts/origin/mocks/i_origin.go on lines 349..369
        agents/contracts/origin/mocks/i_origin.go on lines 681..701
        agents/contracts/origin/mocks/i_origin.go on lines 773..793
        ethergo/backends/mocks/simulated_test_backend.go on lines 683..703
        ethergo/backends/mocks/simulated_test_backend.go on lines 706..726

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

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

        func (_m *IGasOracle) FilterSummitTipUpdated(opts *bind.FilterOpts) (*gasoracle.GasOracleSummitTipUpdatedIterator, error) {
            ret := _m.Called(opts)
        
            var r0 *gasoracle.GasOracleSummitTipUpdatedIterator
            if rf, ok := ret.Get(0).(func(*bind.FilterOpts) *gasoracle.GasOracleSummitTipUpdatedIterator); ok {
        Severity: Major
        Found in agents/contracts/gasoracle/mocks/i_gas_oracle.go and 64 other locations - About 3 hrs to fix
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 26..46
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 288..308
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 311..331
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 334..354
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 357..377
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 426..446
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 449..469
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 472..492
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 623..643
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 761..781
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1173..1193
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 26..46
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 88..108
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 111..131
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 203..223
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 226..246
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 298..318
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 344..364
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 572..592
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 641..661
        agents/contracts/inbox/mocks/i_inbox.go on lines 26..46
        agents/contracts/inbox/mocks/i_inbox.go on lines 111..131
        agents/contracts/inbox/mocks/i_inbox.go on lines 134..154
        agents/contracts/inbox/mocks/i_inbox.go on lines 157..177
        agents/contracts/inbox/mocks/i_inbox.go on lines 180..200
        agents/contracts/inbox/mocks/i_inbox.go on lines 203..223
        agents/contracts/inbox/mocks/i_inbox.go on lines 226..246
        agents/contracts/inbox/mocks/i_inbox.go on lines 249..269
        agents/contracts/inbox/mocks/i_inbox.go on lines 272..292
        agents/contracts/inbox/mocks/i_inbox.go on lines 295..315
        agents/contracts/inbox/mocks/i_inbox.go on lines 364..384
        agents/contracts/inbox/mocks/i_inbox.go on lines 443..463
        agents/contracts/inbox/mocks/i_inbox.go on lines 947..967
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 26..46
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 111..131
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 134..154
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 157..177
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 180..200
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 203..223
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 226..246
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 249..269
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 351..371
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 740..760
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 26..46
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 109..129
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 196..216
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 219..239
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 242..262
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 265..285
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 334..354
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 357..377
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 380..400
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 508..528
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1022..1042
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1045..1065
        agents/contracts/origin/mocks/i_origin.go on lines 26..46
        agents/contracts/origin/mocks/i_origin.go on lines 109..129
        agents/contracts/origin/mocks/i_origin.go on lines 201..221
        agents/contracts/origin/mocks/i_origin.go on lines 224..244
        agents/contracts/origin/mocks/i_origin.go on lines 349..369
        agents/contracts/origin/mocks/i_origin.go on lines 681..701
        agents/contracts/origin/mocks/i_origin.go on lines 773..793
        ethergo/backends/mocks/simulated_test_backend.go on lines 683..703
        ethergo/backends/mocks/simulated_test_backend.go on lines 706..726

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

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

        func (_m *IGasOracle) GASDATAINCREASEDOPTIMISTICPERIOD(opts *bind.CallOpts) (*big.Int, error) {
            ret := _m.Called(opts)
        
            var r0 *big.Int
            if rf, ok := ret.Get(0).(func(*bind.CallOpts) *big.Int); ok {
        Severity: Major
        Found in agents/contracts/gasoracle/mocks/i_gas_oracle.go and 64 other locations - About 3 hrs to fix
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 26..46
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 288..308
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 311..331
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 334..354
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 357..377
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 426..446
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 449..469
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 472..492
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 623..643
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 761..781
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1173..1193
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 26..46
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 88..108
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 111..131
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 180..200
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 203..223
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 298..318
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 344..364
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 572..592
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 641..661
        agents/contracts/inbox/mocks/i_inbox.go on lines 26..46
        agents/contracts/inbox/mocks/i_inbox.go on lines 111..131
        agents/contracts/inbox/mocks/i_inbox.go on lines 134..154
        agents/contracts/inbox/mocks/i_inbox.go on lines 157..177
        agents/contracts/inbox/mocks/i_inbox.go on lines 180..200
        agents/contracts/inbox/mocks/i_inbox.go on lines 203..223
        agents/contracts/inbox/mocks/i_inbox.go on lines 226..246
        agents/contracts/inbox/mocks/i_inbox.go on lines 249..269
        agents/contracts/inbox/mocks/i_inbox.go on lines 272..292
        agents/contracts/inbox/mocks/i_inbox.go on lines 295..315
        agents/contracts/inbox/mocks/i_inbox.go on lines 364..384
        agents/contracts/inbox/mocks/i_inbox.go on lines 443..463
        agents/contracts/inbox/mocks/i_inbox.go on lines 947..967
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 26..46
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 111..131
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 134..154
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 157..177
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 180..200
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 203..223
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 226..246
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 249..269
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 351..371
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 740..760
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 26..46
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 109..129
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 196..216
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 219..239
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 242..262
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 265..285
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 334..354
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 357..377
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 380..400
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 508..528
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1022..1042
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1045..1065
        agents/contracts/origin/mocks/i_origin.go on lines 26..46
        agents/contracts/origin/mocks/i_origin.go on lines 109..129
        agents/contracts/origin/mocks/i_origin.go on lines 201..221
        agents/contracts/origin/mocks/i_origin.go on lines 224..244
        agents/contracts/origin/mocks/i_origin.go on lines 349..369
        agents/contracts/origin/mocks/i_origin.go on lines 681..701
        agents/contracts/origin/mocks/i_origin.go on lines 773..793
        ethergo/backends/mocks/simulated_test_backend.go on lines 683..703
        ethergo/backends/mocks/simulated_test_backend.go on lines 706..726

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

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

        func (_m *IGasOracle) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) {
            ret := _m.Called(opts)
        
            var r0 *types.Transaction
            if rf, ok := ret.Get(0).(func(*bind.TransactOpts) *types.Transaction); ok {
        Severity: Major
        Found in agents/contracts/gasoracle/mocks/i_gas_oracle.go and 64 other locations - About 3 hrs to fix
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 26..46
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 288..308
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 311..331
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 334..354
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 357..377
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 426..446
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 449..469
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 472..492
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 623..643
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 761..781
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1173..1193
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 26..46
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 88..108
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 111..131
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 180..200
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 203..223
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 226..246
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 298..318
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 344..364
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 641..661
        agents/contracts/inbox/mocks/i_inbox.go on lines 26..46
        agents/contracts/inbox/mocks/i_inbox.go on lines 111..131
        agents/contracts/inbox/mocks/i_inbox.go on lines 134..154
        agents/contracts/inbox/mocks/i_inbox.go on lines 157..177
        agents/contracts/inbox/mocks/i_inbox.go on lines 180..200
        agents/contracts/inbox/mocks/i_inbox.go on lines 203..223
        agents/contracts/inbox/mocks/i_inbox.go on lines 226..246
        agents/contracts/inbox/mocks/i_inbox.go on lines 249..269
        agents/contracts/inbox/mocks/i_inbox.go on lines 272..292
        agents/contracts/inbox/mocks/i_inbox.go on lines 295..315
        agents/contracts/inbox/mocks/i_inbox.go on lines 364..384
        agents/contracts/inbox/mocks/i_inbox.go on lines 443..463
        agents/contracts/inbox/mocks/i_inbox.go on lines 947..967
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 26..46
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 111..131
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 134..154
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 157..177
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 180..200
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 203..223
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 226..246
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 249..269
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 351..371
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 740..760
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 26..46
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 109..129
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 196..216
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 219..239
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 242..262
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 265..285
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 334..354
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 357..377
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 380..400
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 508..528
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1022..1042
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1045..1065
        agents/contracts/origin/mocks/i_origin.go on lines 26..46
        agents/contracts/origin/mocks/i_origin.go on lines 109..129
        agents/contracts/origin/mocks/i_origin.go on lines 201..221
        agents/contracts/origin/mocks/i_origin.go on lines 224..244
        agents/contracts/origin/mocks/i_origin.go on lines 349..369
        agents/contracts/origin/mocks/i_origin.go on lines 681..701
        agents/contracts/origin/mocks/i_origin.go on lines 773..793
        ethergo/backends/mocks/simulated_test_backend.go on lines 683..703
        ethergo/backends/mocks/simulated_test_backend.go on lines 706..726

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

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

        func (_m *IGasOracle) GASDATADECREASEDOPTIMISTICPERIOD(opts *bind.CallOpts) (*big.Int, error) {
            ret := _m.Called(opts)
        
            var r0 *big.Int
            if rf, ok := ret.Get(0).(func(*bind.CallOpts) *big.Int); ok {
        Severity: Major
        Found in agents/contracts/gasoracle/mocks/i_gas_oracle.go and 64 other locations - About 3 hrs to fix
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 26..46
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 288..308
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 311..331
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 334..354
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 357..377
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 426..446
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 449..469
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 472..492
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 623..643
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 761..781
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1173..1193
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 26..46
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 88..108
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 111..131
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 180..200
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 226..246
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 298..318
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 344..364
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 572..592
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 641..661
        agents/contracts/inbox/mocks/i_inbox.go on lines 26..46
        agents/contracts/inbox/mocks/i_inbox.go on lines 111..131
        agents/contracts/inbox/mocks/i_inbox.go on lines 134..154
        agents/contracts/inbox/mocks/i_inbox.go on lines 157..177
        agents/contracts/inbox/mocks/i_inbox.go on lines 180..200
        agents/contracts/inbox/mocks/i_inbox.go on lines 203..223
        agents/contracts/inbox/mocks/i_inbox.go on lines 226..246
        agents/contracts/inbox/mocks/i_inbox.go on lines 249..269
        agents/contracts/inbox/mocks/i_inbox.go on lines 272..292
        agents/contracts/inbox/mocks/i_inbox.go on lines 295..315
        agents/contracts/inbox/mocks/i_inbox.go on lines 364..384
        agents/contracts/inbox/mocks/i_inbox.go on lines 443..463
        agents/contracts/inbox/mocks/i_inbox.go on lines 947..967
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 26..46
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 111..131
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 134..154
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 157..177
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 180..200
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 203..223
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 226..246
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 249..269
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 351..371
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 740..760
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 26..46
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 109..129
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 196..216
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 219..239
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 242..262
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 265..285
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 334..354
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 357..377
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 380..400
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 508..528
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1022..1042
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1045..1065
        agents/contracts/origin/mocks/i_origin.go on lines 26..46
        agents/contracts/origin/mocks/i_origin.go on lines 109..129
        agents/contracts/origin/mocks/i_origin.go on lines 201..221
        agents/contracts/origin/mocks/i_origin.go on lines 224..244
        agents/contracts/origin/mocks/i_origin.go on lines 349..369
        agents/contracts/origin/mocks/i_origin.go on lines 681..701
        agents/contracts/origin/mocks/i_origin.go on lines 773..793
        ethergo/backends/mocks/simulated_test_backend.go on lines 683..703
        ethergo/backends/mocks/simulated_test_backend.go on lines 706..726

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

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

        func (_m *IGasOracle) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) {
            ret := _m.Called(opts)
        
            var r0 *types.Transaction
            if rf, ok := ret.Get(0).(func(*bind.TransactOpts) *types.Transaction); ok {
        Severity: Major
        Found in agents/contracts/gasoracle/mocks/i_gas_oracle.go and 64 other locations - About 3 hrs to fix
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 26..46
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 288..308
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 311..331
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 334..354
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 357..377
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 426..446
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 449..469
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 472..492
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 623..643
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 761..781
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1173..1193
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 88..108
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 111..131
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 180..200
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 203..223
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 226..246
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 298..318
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 344..364
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 572..592
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 641..661
        agents/contracts/inbox/mocks/i_inbox.go on lines 26..46
        agents/contracts/inbox/mocks/i_inbox.go on lines 111..131
        agents/contracts/inbox/mocks/i_inbox.go on lines 134..154
        agents/contracts/inbox/mocks/i_inbox.go on lines 157..177
        agents/contracts/inbox/mocks/i_inbox.go on lines 180..200
        agents/contracts/inbox/mocks/i_inbox.go on lines 203..223
        agents/contracts/inbox/mocks/i_inbox.go on lines 226..246
        agents/contracts/inbox/mocks/i_inbox.go on lines 249..269
        agents/contracts/inbox/mocks/i_inbox.go on lines 272..292
        agents/contracts/inbox/mocks/i_inbox.go on lines 295..315
        agents/contracts/inbox/mocks/i_inbox.go on lines 364..384
        agents/contracts/inbox/mocks/i_inbox.go on lines 443..463
        agents/contracts/inbox/mocks/i_inbox.go on lines 947..967
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 26..46
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 111..131
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 134..154
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 157..177
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 180..200
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 203..223
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 226..246
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 249..269
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 351..371
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 740..760
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 26..46
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 109..129
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 196..216
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 219..239
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 242..262
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 265..285
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 334..354
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 357..377
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 380..400
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 508..528
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1022..1042
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1045..1065
        agents/contracts/origin/mocks/i_origin.go on lines 26..46
        agents/contracts/origin/mocks/i_origin.go on lines 109..129
        agents/contracts/origin/mocks/i_origin.go on lines 201..221
        agents/contracts/origin/mocks/i_origin.go on lines 224..244
        agents/contracts/origin/mocks/i_origin.go on lines 349..369
        agents/contracts/origin/mocks/i_origin.go on lines 681..701
        agents/contracts/origin/mocks/i_origin.go on lines 773..793
        ethergo/backends/mocks/simulated_test_backend.go on lines 683..703
        ethergo/backends/mocks/simulated_test_backend.go on lines 706..726

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

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

        func (_m *IGasOracle) Initialize(opts *bind.TransactOpts) (*types.Transaction, error) {
            ret := _m.Called(opts)
        
            var r0 *types.Transaction
            if rf, ok := ret.Get(0).(func(*bind.TransactOpts) *types.Transaction); ok {
        Severity: Major
        Found in agents/contracts/gasoracle/mocks/i_gas_oracle.go and 64 other locations - About 3 hrs to fix
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 26..46
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 288..308
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 311..331
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 334..354
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 357..377
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 426..446
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 449..469
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 472..492
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 623..643
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 761..781
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1173..1193
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 26..46
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 88..108
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 111..131
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 180..200
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 203..223
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 226..246
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 298..318
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 572..592
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 641..661
        agents/contracts/inbox/mocks/i_inbox.go on lines 26..46
        agents/contracts/inbox/mocks/i_inbox.go on lines 111..131
        agents/contracts/inbox/mocks/i_inbox.go on lines 134..154
        agents/contracts/inbox/mocks/i_inbox.go on lines 157..177
        agents/contracts/inbox/mocks/i_inbox.go on lines 180..200
        agents/contracts/inbox/mocks/i_inbox.go on lines 203..223
        agents/contracts/inbox/mocks/i_inbox.go on lines 226..246
        agents/contracts/inbox/mocks/i_inbox.go on lines 249..269
        agents/contracts/inbox/mocks/i_inbox.go on lines 272..292
        agents/contracts/inbox/mocks/i_inbox.go on lines 295..315
        agents/contracts/inbox/mocks/i_inbox.go on lines 364..384
        agents/contracts/inbox/mocks/i_inbox.go on lines 443..463
        agents/contracts/inbox/mocks/i_inbox.go on lines 947..967
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 26..46
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 111..131
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 134..154
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 157..177
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 180..200
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 203..223
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 226..246
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 249..269
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 351..371
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 740..760
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 26..46
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 109..129
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 196..216
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 219..239
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 242..262
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 265..285
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 334..354
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 357..377
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 380..400
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 508..528
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1022..1042
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1045..1065
        agents/contracts/origin/mocks/i_origin.go on lines 26..46
        agents/contracts/origin/mocks/i_origin.go on lines 109..129
        agents/contracts/origin/mocks/i_origin.go on lines 201..221
        agents/contracts/origin/mocks/i_origin.go on lines 224..244
        agents/contracts/origin/mocks/i_origin.go on lines 349..369
        agents/contracts/origin/mocks/i_origin.go on lines 681..701
        agents/contracts/origin/mocks/i_origin.go on lines 773..793
        ethergo/backends/mocks/simulated_test_backend.go on lines 683..703
        ethergo/backends/mocks/simulated_test_backend.go on lines 706..726

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

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

        func (_m *IGasOracle) FilterInitialized(opts *bind.FilterOpts) (*gasoracle.GasOracleInitializedIterator, error) {
            ret := _m.Called(opts)
        
            var r0 *gasoracle.GasOracleInitializedIterator
            if rf, ok := ret.Get(0).(func(*bind.FilterOpts) *gasoracle.GasOracleInitializedIterator); ok {
        Severity: Major
        Found in agents/contracts/gasoracle/mocks/i_gas_oracle.go and 64 other locations - About 3 hrs to fix
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 26..46
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 288..308
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 311..331
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 334..354
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 357..377
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 426..446
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 449..469
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 472..492
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 623..643
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 761..781
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1173..1193
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 26..46
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 88..108
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 180..200
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 203..223
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 226..246
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 298..318
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 344..364
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 572..592
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 641..661
        agents/contracts/inbox/mocks/i_inbox.go on lines 26..46
        agents/contracts/inbox/mocks/i_inbox.go on lines 111..131
        agents/contracts/inbox/mocks/i_inbox.go on lines 134..154
        agents/contracts/inbox/mocks/i_inbox.go on lines 157..177
        agents/contracts/inbox/mocks/i_inbox.go on lines 180..200
        agents/contracts/inbox/mocks/i_inbox.go on lines 203..223
        agents/contracts/inbox/mocks/i_inbox.go on lines 226..246
        agents/contracts/inbox/mocks/i_inbox.go on lines 249..269
        agents/contracts/inbox/mocks/i_inbox.go on lines 272..292
        agents/contracts/inbox/mocks/i_inbox.go on lines 295..315
        agents/contracts/inbox/mocks/i_inbox.go on lines 364..384
        agents/contracts/inbox/mocks/i_inbox.go on lines 443..463
        agents/contracts/inbox/mocks/i_inbox.go on lines 947..967
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 26..46
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 111..131
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 134..154
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 157..177
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 180..200
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 203..223
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 226..246
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 249..269
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 351..371
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 740..760
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 26..46
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 109..129
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 196..216
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 219..239
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 242..262
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 265..285
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 334..354
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 357..377
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 380..400
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 508..528
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1022..1042
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1045..1065
        agents/contracts/origin/mocks/i_origin.go on lines 26..46
        agents/contracts/origin/mocks/i_origin.go on lines 109..129
        agents/contracts/origin/mocks/i_origin.go on lines 201..221
        agents/contracts/origin/mocks/i_origin.go on lines 224..244
        agents/contracts/origin/mocks/i_origin.go on lines 349..369
        agents/contracts/origin/mocks/i_origin.go on lines 681..701
        agents/contracts/origin/mocks/i_origin.go on lines 773..793
        ethergo/backends/mocks/simulated_test_backend.go on lines 683..703
        ethergo/backends/mocks/simulated_test_backend.go on lines 706..726

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

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

        func (_m *IGasOracle) SummitTipWei(opts *bind.CallOpts) (*big.Int, error) {
            ret := _m.Called(opts)
        
            var r0 *big.Int
            if rf, ok := ret.Get(0).(func(*bind.CallOpts) *big.Int); ok {
        Severity: Major
        Found in agents/contracts/gasoracle/mocks/i_gas_oracle.go and 64 other locations - About 3 hrs to fix
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 26..46
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 288..308
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 311..331
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 334..354
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 357..377
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 426..446
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 449..469
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 472..492
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 623..643
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 761..781
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1173..1193
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 26..46
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 88..108
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 111..131
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 180..200
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 203..223
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 226..246
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 298..318
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 344..364
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 572..592
        agents/contracts/inbox/mocks/i_inbox.go on lines 26..46
        agents/contracts/inbox/mocks/i_inbox.go on lines 111..131
        agents/contracts/inbox/mocks/i_inbox.go on lines 134..154
        agents/contracts/inbox/mocks/i_inbox.go on lines 157..177
        agents/contracts/inbox/mocks/i_inbox.go on lines 180..200
        agents/contracts/inbox/mocks/i_inbox.go on lines 203..223
        agents/contracts/inbox/mocks/i_inbox.go on lines 226..246
        agents/contracts/inbox/mocks/i_inbox.go on lines 249..269
        agents/contracts/inbox/mocks/i_inbox.go on lines 272..292
        agents/contracts/inbox/mocks/i_inbox.go on lines 295..315
        agents/contracts/inbox/mocks/i_inbox.go on lines 364..384
        agents/contracts/inbox/mocks/i_inbox.go on lines 443..463
        agents/contracts/inbox/mocks/i_inbox.go on lines 947..967
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 26..46
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 111..131
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 134..154
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 157..177
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 180..200
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 203..223
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 226..246
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 249..269
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 351..371
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 740..760
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 26..46
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 109..129
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 196..216
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 219..239
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 242..262
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 265..285
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 334..354
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 357..377
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 380..400
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 508..528
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1022..1042
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1045..1065
        agents/contracts/origin/mocks/i_origin.go on lines 26..46
        agents/contracts/origin/mocks/i_origin.go on lines 109..129
        agents/contracts/origin/mocks/i_origin.go on lines 201..221
        agents/contracts/origin/mocks/i_origin.go on lines 224..244
        agents/contracts/origin/mocks/i_origin.go on lines 349..369
        agents/contracts/origin/mocks/i_origin.go on lines 681..701
        agents/contracts/origin/mocks/i_origin.go on lines 773..793
        ethergo/backends/mocks/simulated_test_backend.go on lines 683..703
        ethergo/backends/mocks/simulated_test_backend.go on lines 706..726

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

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

        func (_m *IGasOracle) Owner(opts *bind.CallOpts) (common.Address, error) {
            ret := _m.Called(opts)
        
            var r0 common.Address
            if rf, ok := ret.Get(0).(func(*bind.CallOpts) common.Address); ok {
        Severity: Major
        Found in agents/contracts/gasoracle/mocks/i_gas_oracle.go and 29 other locations - About 3 hrs to fix
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 224..244
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 692..712
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 851..871
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 874..894
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1127..1147
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1242..1262
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 65..85
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 549..569
        agents/contracts/inbox/mocks/i_inbox.go on lines 65..85
        agents/contracts/inbox/mocks/i_inbox.go on lines 88..108
        agents/contracts/inbox/mocks/i_inbox.go on lines 556..576
        agents/contracts/inbox/mocks/i_inbox.go on lines 579..599
        agents/contracts/inbox/mocks/i_inbox.go on lines 924..944
        agents/contracts/inbox/mocks/i_inbox.go on lines 1108..1128
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 65..85
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 88..108
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 464..484
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 487..507
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 717..737
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 132..152
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 531..551
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 644..664
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 667..687
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 920..940
        agents/contracts/origin/mocks/i_origin.go on lines 65..85
        agents/contracts/origin/mocks/i_origin.go on lines 247..267
        agents/contracts/origin/mocks/i_origin.go on lines 326..346
        agents/contracts/origin/mocks/i_origin.go on lines 481..501
        agents/contracts/origin/mocks/i_origin.go on lines 658..678

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

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

        func (_m *IGasOracle) PendingOwner(opts *bind.CallOpts) (common.Address, error) {
            ret := _m.Called(opts)
        
            var r0 common.Address
            if rf, ok := ret.Get(0).(func(*bind.CallOpts) common.Address); ok {
        Severity: Major
        Found in agents/contracts/gasoracle/mocks/i_gas_oracle.go and 29 other locations - About 3 hrs to fix
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 224..244
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 692..712
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 851..871
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 874..894
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1127..1147
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1242..1262
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 65..85
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 411..431
        agents/contracts/inbox/mocks/i_inbox.go on lines 65..85
        agents/contracts/inbox/mocks/i_inbox.go on lines 88..108
        agents/contracts/inbox/mocks/i_inbox.go on lines 556..576
        agents/contracts/inbox/mocks/i_inbox.go on lines 579..599
        agents/contracts/inbox/mocks/i_inbox.go on lines 924..944
        agents/contracts/inbox/mocks/i_inbox.go on lines 1108..1128
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 65..85
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 88..108
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 464..484
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 487..507
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 717..737
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 132..152
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 531..551
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 644..664
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 667..687
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 920..940
        agents/contracts/origin/mocks/i_origin.go on lines 65..85
        agents/contracts/origin/mocks/i_origin.go on lines 247..267
        agents/contracts/origin/mocks/i_origin.go on lines 326..346
        agents/contracts/origin/mocks/i_origin.go on lines 481..501
        agents/contracts/origin/mocks/i_origin.go on lines 658..678

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

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

        func (_m *IGasOracle) Destination(opts *bind.CallOpts) (common.Address, error) {
            ret := _m.Called(opts)
        
            var r0 common.Address
            if rf, ok := ret.Get(0).(func(*bind.CallOpts) common.Address); ok {
        Severity: Major
        Found in agents/contracts/gasoracle/mocks/i_gas_oracle.go and 29 other locations - About 3 hrs to fix
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 224..244
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 692..712
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 851..871
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 874..894
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1127..1147
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1242..1262
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 411..431
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 549..569
        agents/contracts/inbox/mocks/i_inbox.go on lines 65..85
        agents/contracts/inbox/mocks/i_inbox.go on lines 88..108
        agents/contracts/inbox/mocks/i_inbox.go on lines 556..576
        agents/contracts/inbox/mocks/i_inbox.go on lines 579..599
        agents/contracts/inbox/mocks/i_inbox.go on lines 924..944
        agents/contracts/inbox/mocks/i_inbox.go on lines 1108..1128
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 65..85
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 88..108
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 464..484
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 487..507
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 717..737
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 132..152
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 531..551
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 644..664
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 667..687
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 920..940
        agents/contracts/origin/mocks/i_origin.go on lines 65..85
        agents/contracts/origin/mocks/i_origin.go on lines 247..267
        agents/contracts/origin/mocks/i_origin.go on lines 326..346
        agents/contracts/origin/mocks/i_origin.go on lines 481..501
        agents/contracts/origin/mocks/i_origin.go on lines 658..678

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

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

        func (_m *IGasOracle) SynapseDomain(opts *bind.CallOpts) (uint32, error) {
            ret := _m.Called(opts)
        
            var r0 uint32
            if rf, ok := ret.Get(0).(func(*bind.CallOpts) uint32); ok {
        Severity: Major
        Found in agents/contracts/gasoracle/mocks/i_gas_oracle.go and 17 other locations - About 2 hrs to fix
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 784..802
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1265..1283
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1309..1327
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 367..385
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 731..749
        agents/contracts/inbox/mocks/i_inbox.go on lines 512..530
        agents/contracts/inbox/mocks/i_inbox.go on lines 1131..1149
        agents/contracts/inbox/mocks/i_inbox.go on lines 1359..1377
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 420..438
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 878..896
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1060..1078
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 577..595
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1114..1132
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1181..1199
        agents/contracts/origin/mocks/i_origin.go on lines 414..432
        agents/contracts/origin/mocks/i_origin.go on lines 842..860
        agents/contracts/origin/mocks/i_origin.go on lines 886..904

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

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

        func (_m *IGasOracle) Version(opts *bind.CallOpts) (string, error) {
            ret := _m.Called(opts)
        
            var r0 string
            if rf, ok := ret.Get(0).(func(*bind.CallOpts) string); ok {
        Severity: Major
        Found in agents/contracts/gasoracle/mocks/i_gas_oracle.go and 17 other locations - About 2 hrs to fix
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 784..802
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1265..1283
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1309..1327
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 367..385
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 664..682
        agents/contracts/inbox/mocks/i_inbox.go on lines 512..530
        agents/contracts/inbox/mocks/i_inbox.go on lines 1131..1149
        agents/contracts/inbox/mocks/i_inbox.go on lines 1359..1377
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 420..438
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 878..896
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1060..1078
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 577..595
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1114..1132
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1181..1199
        agents/contracts/origin/mocks/i_origin.go on lines 414..432
        agents/contracts/origin/mocks/i_origin.go on lines 842..860
        agents/contracts/origin/mocks/i_origin.go on lines 886..904

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

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

        func (_m *IGasOracle) LocalDomain(opts *bind.CallOpts) (uint32, error) {
            ret := _m.Called(opts)
        
            var r0 uint32
            if rf, ok := ret.Get(0).(func(*bind.CallOpts) uint32); ok {
        Severity: Major
        Found in agents/contracts/gasoracle/mocks/i_gas_oracle.go and 17 other locations - About 2 hrs to fix
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 784..802
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1265..1283
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 1309..1327
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 664..682
        agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 731..749
        agents/contracts/inbox/mocks/i_inbox.go on lines 512..530
        agents/contracts/inbox/mocks/i_inbox.go on lines 1131..1149
        agents/contracts/inbox/mocks/i_inbox.go on lines 1359..1377
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 420..438
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 878..896
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 1060..1078
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 577..595
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1114..1132
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 1181..1199
        agents/contracts/origin/mocks/i_origin.go on lines 414..432
        agents/contracts/origin/mocks/i_origin.go on lines 842..860
        agents/contracts/origin/mocks/i_origin.go on lines 886..904

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

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

        func (_m *IGasOracle) Address() common.Address {
            ret := _m.Called()
        
            var r0 common.Address
            if rf, ok := ret.Get(0).(func() common.Address); ok {
        Severity: Major
        Found in agents/contracts/gasoracle/mocks/i_gas_oracle.go and 18 other locations - About 1 hr to fix
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 72..85
        agents/contracts/inbox/mocks/i_inbox.go on lines 49..62
        agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 49..62
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 49..62
        agents/contracts/origin/mocks/i_origin.go on lines 49..62
        agents/contracts/origin/mocks/i_origin.go on lines 642..655
        ethergo/backends/mocks/simulated_test_backend.go on lines 395..408
        ethergo/backends/mocks/simulated_test_backend.go on lines 462..475
        ethergo/backends/mocks/simulated_test_backend.go on lines 524..537
        ethergo/backends/mocks/simulated_test_backend.go on lines 966..979
        ethergo/chain/mocks/chain.go on lines 341..354
        ethergo/chain/mocks/chain.go on lines 403..416
        ethergo/chain/mocks/chain.go on lines 449..462
        ethergo/contracts/mocks/deployed_contract.go on lines 21..34
        ethergo/contracts/mocks/deployed_contract.go on lines 85..98
        ethergo/listener/mocks/contract_listener.go on lines 21..34
        ethergo/signer/signer/mocks/signer.go on lines 26..39
        ethergo/signer/signer/mocks/signer.go on lines 65..78

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

        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 (_m *IGasOracle) SetGasData(opts *bind.TransactOpts, domain uint32, gasPrice *big.Int, dataPrice *big.Int, execBuffer *big.Int, amortAttCost *big.Int, etherPrice *big.Int, markup *big.Int) (*types.Transaction, error) {
            ret := _m.Called(opts, domain, gasPrice, dataPrice, execBuffer, amortAttCost, etherPrice, markup)
        
            var r0 *types.Transaction
            if rf, ok := ret.Get(0).(func(*bind.TransactOpts, uint32, *big.Int, *big.Int, *big.Int, *big.Int, *big.Int, *big.Int) *types.Transaction); ok {
        Severity: Minor
        Found in agents/contracts/gasoracle/mocks/i_gas_oracle.go and 1 other location - About 30 mins to fix
        agents/contracts/gasoracle/itransactor_generated.go on lines 34..34

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

        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

        There are no issues that match your filters.

        Category
        Status