Fantom-foundation/go-lachesis

View on GitHub

Showing 829 of 829 total issues

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

func bindContract(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
    parsed, err := abi.JSON(strings.NewReader(ContractABI))
    if err != nil {
        return nil, err
    }
Severity: Major
Found in gossip/sfc110/contract.go and 4 other locations - About 50 mins to fix
gossip/ballot/contract.go on lines 145..151
gossip/sfc202/contract.go on lines 145..151
gossip/sfc204/contract.go on lines 128..134
gossip/sfcproxy/contract.go on lines 145..151

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

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

func bindContract(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
    parsed, err := abi.JSON(strings.NewReader(ContractABI))
    if err != nil {
        return nil, err
    }
Severity: Major
Found in gossip/ballot/contract.go and 4 other locations - About 50 mins to fix
gossip/sfc110/contract.go on lines 145..151
gossip/sfc202/contract.go on lines 145..151
gossip/sfc204/contract.go on lines 128..134
gossip/sfcproxy/contract.go on lines 145..151

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

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

func (_Contract *ContractSession) CalcValidatorRewards(stakerID *big.Int, _fromEpoch *big.Int, maxEpochs *big.Int) (*big.Int, *big.Int, *big.Int, error) {
    return _Contract.Contract.CalcValidatorRewards(&_Contract.CallOpts, stakerID, _fromEpoch, maxEpochs)
}
Severity: Major
Found in gossip/sfc110/contract.go and 9 other locations - About 45 mins to fix
gossip/sfc110/contract.go on lines 485..487
gossip/sfc202/contract.go on lines 302..304
gossip/sfc202/contract.go on lines 309..311
gossip/sfc202/contract.go on lines 334..336
gossip/sfc202/contract.go on lines 341..343
gossip/sfc204/contract.go on lines 285..287
gossip/sfc204/contract.go on lines 292..294
gossip/sfc204/contract.go on lines 343..345
gossip/sfc204/contract.go on lines 350..352

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

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

func (_Contract *ContractCallerSession) CalcValidatorRewards(stakerID *big.Int, _fromEpoch *big.Int, maxEpochs *big.Int) (*big.Int, *big.Int, *big.Int, error) {
    return _Contract.Contract.CalcValidatorRewards(&_Contract.CallOpts, stakerID, _fromEpoch, maxEpochs)
}
Severity: Major
Found in gossip/sfc202/contract.go and 9 other locations - About 45 mins to fix
gossip/sfc110/contract.go on lines 478..480
gossip/sfc110/contract.go on lines 485..487
gossip/sfc202/contract.go on lines 302..304
gossip/sfc202/contract.go on lines 309..311
gossip/sfc202/contract.go on lines 334..336
gossip/sfc204/contract.go on lines 285..287
gossip/sfc204/contract.go on lines 292..294
gossip/sfc204/contract.go on lines 343..345
gossip/sfc204/contract.go on lines 350..352

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

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

func (_Contract *ContractSession) CalcValidatorRewards(stakerID *big.Int, _fromEpoch *big.Int, maxEpochs *big.Int) (*big.Int, *big.Int, *big.Int, error) {
    return _Contract.Contract.CalcValidatorRewards(&_Contract.CallOpts, stakerID, _fromEpoch, maxEpochs)
}
Severity: Major
Found in gossip/sfc204/contract.go and 9 other locations - About 45 mins to fix
gossip/sfc110/contract.go on lines 478..480
gossip/sfc110/contract.go on lines 485..487
gossip/sfc202/contract.go on lines 302..304
gossip/sfc202/contract.go on lines 309..311
gossip/sfc202/contract.go on lines 334..336
gossip/sfc202/contract.go on lines 341..343
gossip/sfc204/contract.go on lines 285..287
gossip/sfc204/contract.go on lines 292..294
gossip/sfc204/contract.go on lines 350..352

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

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

func (_Contract *ContractCallerSession) CalcValidatorRewards(stakerID *big.Int, _fromEpoch *big.Int, maxEpochs *big.Int) (*big.Int, *big.Int, *big.Int, error) {
    return _Contract.Contract.CalcValidatorRewards(&_Contract.CallOpts, stakerID, _fromEpoch, maxEpochs)
}
Severity: Major
Found in gossip/sfc204/contract.go and 9 other locations - About 45 mins to fix
gossip/sfc110/contract.go on lines 478..480
gossip/sfc110/contract.go on lines 485..487
gossip/sfc202/contract.go on lines 302..304
gossip/sfc202/contract.go on lines 309..311
gossip/sfc202/contract.go on lines 334..336
gossip/sfc202/contract.go on lines 341..343
gossip/sfc204/contract.go on lines 285..287
gossip/sfc204/contract.go on lines 292..294
gossip/sfc204/contract.go on lines 343..345

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

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

func (_Contract *ContractSession) CalcValidatorRewards(stakerID *big.Int, _fromEpoch *big.Int, maxEpochs *big.Int) (*big.Int, *big.Int, *big.Int, error) {
    return _Contract.Contract.CalcValidatorRewards(&_Contract.CallOpts, stakerID, _fromEpoch, maxEpochs)
}
Severity: Major
Found in gossip/sfc202/contract.go and 9 other locations - About 45 mins to fix
gossip/sfc110/contract.go on lines 478..480
gossip/sfc110/contract.go on lines 485..487
gossip/sfc202/contract.go on lines 302..304
gossip/sfc202/contract.go on lines 309..311
gossip/sfc202/contract.go on lines 341..343
gossip/sfc204/contract.go on lines 285..287
gossip/sfc204/contract.go on lines 292..294
gossip/sfc204/contract.go on lines 343..345
gossip/sfc204/contract.go on lines 350..352

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

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

func (_Contract *ContractSession) CalcValidatorCompoundRewards(stakerID *big.Int, _fromEpoch *big.Int, maxEpochs *big.Int) (*big.Int, *big.Int, *big.Int, error) {
    return _Contract.Contract.CalcValidatorCompoundRewards(&_Contract.CallOpts, stakerID, _fromEpoch, maxEpochs)
}
Severity: Major
Found in gossip/sfc202/contract.go and 9 other locations - About 45 mins to fix
gossip/sfc110/contract.go on lines 478..480
gossip/sfc110/contract.go on lines 485..487
gossip/sfc202/contract.go on lines 309..311
gossip/sfc202/contract.go on lines 334..336
gossip/sfc202/contract.go on lines 341..343
gossip/sfc204/contract.go on lines 285..287
gossip/sfc204/contract.go on lines 292..294
gossip/sfc204/contract.go on lines 343..345
gossip/sfc204/contract.go on lines 350..352

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

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

func (_Contract *ContractSession) CalcValidatorCompoundRewards(stakerID *big.Int, _fromEpoch *big.Int, maxEpochs *big.Int) (*big.Int, *big.Int, *big.Int, error) {
    return _Contract.Contract.CalcValidatorCompoundRewards(&_Contract.CallOpts, stakerID, _fromEpoch, maxEpochs)
}
Severity: Major
Found in gossip/sfc204/contract.go and 9 other locations - About 45 mins to fix
gossip/sfc110/contract.go on lines 478..480
gossip/sfc110/contract.go on lines 485..487
gossip/sfc202/contract.go on lines 302..304
gossip/sfc202/contract.go on lines 309..311
gossip/sfc202/contract.go on lines 334..336
gossip/sfc202/contract.go on lines 341..343
gossip/sfc204/contract.go on lines 292..294
gossip/sfc204/contract.go on lines 343..345
gossip/sfc204/contract.go on lines 350..352

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

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

func (_Contract *ContractCallerSession) CalcValidatorCompoundRewards(stakerID *big.Int, _fromEpoch *big.Int, maxEpochs *big.Int) (*big.Int, *big.Int, *big.Int, error) {
    return _Contract.Contract.CalcValidatorCompoundRewards(&_Contract.CallOpts, stakerID, _fromEpoch, maxEpochs)
}
Severity: Major
Found in gossip/sfc202/contract.go and 9 other locations - About 45 mins to fix
gossip/sfc110/contract.go on lines 478..480
gossip/sfc110/contract.go on lines 485..487
gossip/sfc202/contract.go on lines 302..304
gossip/sfc202/contract.go on lines 334..336
gossip/sfc202/contract.go on lines 341..343
gossip/sfc204/contract.go on lines 285..287
gossip/sfc204/contract.go on lines 292..294
gossip/sfc204/contract.go on lines 343..345
gossip/sfc204/contract.go on lines 350..352

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

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

func (_Contract *ContractCallerSession) CalcValidatorRewards(stakerID *big.Int, _fromEpoch *big.Int, maxEpochs *big.Int) (*big.Int, *big.Int, *big.Int, error) {
    return _Contract.Contract.CalcValidatorRewards(&_Contract.CallOpts, stakerID, _fromEpoch, maxEpochs)
}
Severity: Major
Found in gossip/sfc110/contract.go and 9 other locations - About 45 mins to fix
gossip/sfc110/contract.go on lines 478..480
gossip/sfc202/contract.go on lines 302..304
gossip/sfc202/contract.go on lines 309..311
gossip/sfc202/contract.go on lines 334..336
gossip/sfc202/contract.go on lines 341..343
gossip/sfc204/contract.go on lines 285..287
gossip/sfc204/contract.go on lines 292..294
gossip/sfc204/contract.go on lines 343..345
gossip/sfc204/contract.go on lines 350..352

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

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

func (_Contract *ContractCallerSession) CalcValidatorCompoundRewards(stakerID *big.Int, _fromEpoch *big.Int, maxEpochs *big.Int) (*big.Int, *big.Int, *big.Int, error) {
    return _Contract.Contract.CalcValidatorCompoundRewards(&_Contract.CallOpts, stakerID, _fromEpoch, maxEpochs)
}
Severity: Major
Found in gossip/sfc204/contract.go and 9 other locations - About 45 mins to fix
gossip/sfc110/contract.go on lines 478..480
gossip/sfc110/contract.go on lines 485..487
gossip/sfc202/contract.go on lines 302..304
gossip/sfc202/contract.go on lines 309..311
gossip/sfc202/contract.go on lines 334..336
gossip/sfc202/contract.go on lines 341..343
gossip/sfc204/contract.go on lines 285..287
gossip/sfc204/contract.go on lines 343..345
gossip/sfc204/contract.go on lines 350..352

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

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

func (_Contract *ContractFilterer) FilterUpdatedGasPowerAllocationRate(opts *bind.FilterOpts) (*ContractUpdatedGasPowerAllocationRateIterator, error) {

    logs, sub, err := _Contract.contract.FilterLogs(opts, "UpdatedGasPowerAllocationRate")
    if err != nil {
        return nil, err
Severity: Major
Found in gossip/sfc110/contract.go and 12 other locations - About 45 mins to fix
gossip/sfc110/contract.go on lines 4438..4445
gossip/sfc202/contract.go on lines 4166..4173
gossip/sfc202/contract.go on lines 5063..5070
gossip/sfc202/contract.go on lines 5359..5366
gossip/sfc202/contract.go on lines 5492..5499
gossip/sfc202/contract.go on lines 5626..5633
gossip/sfc204/contract.go on lines 4009..4016
gossip/sfc204/contract.go on lines 4906..4913
gossip/sfc204/contract.go on lines 5202..5209
gossip/sfc204/contract.go on lines 5335..5342
gossip/sfc204/contract.go on lines 5469..5476
gossip/sfcproxy/contract.go on lines 404..411

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

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

func (_Contract *ContractFilterer) FilterNetworkUpgradeActivated(opts *bind.FilterOpts) (*ContractNetworkUpgradeActivatedIterator, error) {

    logs, sub, err := _Contract.contract.FilterLogs(opts, "NetworkUpgradeActivated")
    if err != nil {
        return nil, err
Severity: Major
Found in gossip/sfc202/contract.go and 12 other locations - About 45 mins to fix
gossip/sfc110/contract.go on lines 4438..4445
gossip/sfc110/contract.go on lines 4734..4741
gossip/sfc202/contract.go on lines 5063..5070
gossip/sfc202/contract.go on lines 5359..5366
gossip/sfc202/contract.go on lines 5492..5499
gossip/sfc202/contract.go on lines 5626..5633
gossip/sfc204/contract.go on lines 4009..4016
gossip/sfc204/contract.go on lines 4906..4913
gossip/sfc204/contract.go on lines 5202..5209
gossip/sfc204/contract.go on lines 5335..5342
gossip/sfc204/contract.go on lines 5469..5476
gossip/sfcproxy/contract.go on lines 404..411

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

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

func (_Contract *ContractFilterer) FilterUpdatedMinGasPrice(opts *bind.FilterOpts) (*ContractUpdatedMinGasPriceIterator, error) {

    logs, sub, err := _Contract.contract.FilterLogs(opts, "UpdatedMinGasPrice")
    if err != nil {
        return nil, err
Severity: Major
Found in gossip/sfc204/contract.go and 12 other locations - About 45 mins to fix
gossip/sfc110/contract.go on lines 4438..4445
gossip/sfc110/contract.go on lines 4734..4741
gossip/sfc202/contract.go on lines 4166..4173
gossip/sfc202/contract.go on lines 5063..5070
gossip/sfc202/contract.go on lines 5359..5366
gossip/sfc202/contract.go on lines 5492..5499
gossip/sfc202/contract.go on lines 5626..5633
gossip/sfc204/contract.go on lines 4009..4016
gossip/sfc204/contract.go on lines 4906..4913
gossip/sfc204/contract.go on lines 5202..5209
gossip/sfc204/contract.go on lines 5469..5476
gossip/sfcproxy/contract.go on lines 404..411

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

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

func (_Contract *ContractFilterer) FilterUpdatedMinGasPrice(opts *bind.FilterOpts) (*ContractUpdatedMinGasPriceIterator, error) {

    logs, sub, err := _Contract.contract.FilterLogs(opts, "UpdatedMinGasPrice")
    if err != nil {
        return nil, err
Severity: Major
Found in gossip/sfc202/contract.go and 12 other locations - About 45 mins to fix
gossip/sfc110/contract.go on lines 4438..4445
gossip/sfc110/contract.go on lines 4734..4741
gossip/sfc202/contract.go on lines 4166..4173
gossip/sfc202/contract.go on lines 5063..5070
gossip/sfc202/contract.go on lines 5359..5366
gossip/sfc202/contract.go on lines 5626..5633
gossip/sfc204/contract.go on lines 4009..4016
gossip/sfc204/contract.go on lines 4906..4913
gossip/sfc204/contract.go on lines 5202..5209
gossip/sfc204/contract.go on lines 5335..5342
gossip/sfc204/contract.go on lines 5469..5476
gossip/sfcproxy/contract.go on lines 404..411

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

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

func (_Contract *ContractFilterer) FilterUpdatedBaseRewardPerSec(opts *bind.FilterOpts) (*ContractUpdatedBaseRewardPerSecIterator, error) {

    logs, sub, err := _Contract.contract.FilterLogs(opts, "UpdatedBaseRewardPerSec")
    if err != nil {
        return nil, err
Severity: Major
Found in gossip/sfc110/contract.go and 12 other locations - About 45 mins to fix
gossip/sfc110/contract.go on lines 4734..4741
gossip/sfc202/contract.go on lines 4166..4173
gossip/sfc202/contract.go on lines 5063..5070
gossip/sfc202/contract.go on lines 5359..5366
gossip/sfc202/contract.go on lines 5492..5499
gossip/sfc202/contract.go on lines 5626..5633
gossip/sfc204/contract.go on lines 4009..4016
gossip/sfc204/contract.go on lines 4906..4913
gossip/sfc204/contract.go on lines 5202..5209
gossip/sfc204/contract.go on lines 5335..5342
gossip/sfc204/contract.go on lines 5469..5476
gossip/sfcproxy/contract.go on lines 404..411

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

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

func (_Contract *ContractFilterer) FilterAdminChanged(opts *bind.FilterOpts) (*ContractAdminChangedIterator, error) {

    logs, sub, err := _Contract.contract.FilterLogs(opts, "AdminChanged")
    if err != nil {
        return nil, err
Severity: Major
Found in gossip/sfcproxy/contract.go and 12 other locations - About 45 mins to fix
gossip/sfc110/contract.go on lines 4438..4445
gossip/sfc110/contract.go on lines 4734..4741
gossip/sfc202/contract.go on lines 4166..4173
gossip/sfc202/contract.go on lines 5063..5070
gossip/sfc202/contract.go on lines 5359..5366
gossip/sfc202/contract.go on lines 5492..5499
gossip/sfc202/contract.go on lines 5626..5633
gossip/sfc204/contract.go on lines 4009..4016
gossip/sfc204/contract.go on lines 4906..4913
gossip/sfc204/contract.go on lines 5202..5209
gossip/sfc204/contract.go on lines 5335..5342
gossip/sfc204/contract.go on lines 5469..5476

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

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

func (_Contract *ContractFilterer) FilterUpdatedGasPowerAllocationRate(opts *bind.FilterOpts) (*ContractUpdatedGasPowerAllocationRateIterator, error) {

    logs, sub, err := _Contract.contract.FilterLogs(opts, "UpdatedGasPowerAllocationRate")
    if err != nil {
        return nil, err
Severity: Major
Found in gossip/sfc204/contract.go and 12 other locations - About 45 mins to fix
gossip/sfc110/contract.go on lines 4438..4445
gossip/sfc110/contract.go on lines 4734..4741
gossip/sfc202/contract.go on lines 4166..4173
gossip/sfc202/contract.go on lines 5063..5070
gossip/sfc202/contract.go on lines 5359..5366
gossip/sfc202/contract.go on lines 5492..5499
gossip/sfc202/contract.go on lines 5626..5633
gossip/sfc204/contract.go on lines 4009..4016
gossip/sfc204/contract.go on lines 4906..4913
gossip/sfc204/contract.go on lines 5335..5342
gossip/sfc204/contract.go on lines 5469..5476
gossip/sfcproxy/contract.go on lines 404..411

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

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

func (_Contract *ContractFilterer) FilterUpdatedBaseRewardPerSec(opts *bind.FilterOpts) (*ContractUpdatedBaseRewardPerSecIterator, error) {

    logs, sub, err := _Contract.contract.FilterLogs(opts, "UpdatedBaseRewardPerSec")
    if err != nil {
        return nil, err
Severity: Major
Found in gossip/sfc204/contract.go and 12 other locations - About 45 mins to fix
gossip/sfc110/contract.go on lines 4438..4445
gossip/sfc110/contract.go on lines 4734..4741
gossip/sfc202/contract.go on lines 4166..4173
gossip/sfc202/contract.go on lines 5063..5070
gossip/sfc202/contract.go on lines 5359..5366
gossip/sfc202/contract.go on lines 5492..5499
gossip/sfc202/contract.go on lines 5626..5633
gossip/sfc204/contract.go on lines 4009..4016
gossip/sfc204/contract.go on lines 5202..5209
gossip/sfc204/contract.go on lines 5335..5342
gossip/sfc204/contract.go on lines 5469..5476
gossip/sfcproxy/contract.go on lines 404..411

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

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

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

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

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

Refactorings

Further Reading

Severity
Category
Status
Source
Language