Fantom-foundation/go-lachesis

View on GitHub

Showing 829 of 829 total issues

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

func (_Contract *ContractFilterer) FilterCreatedDelegation(opts *bind.FilterOpts, delegator []common.Address, toStakerID []*big.Int) (*ContractCreatedDelegationIterator, error) {

    var delegatorRule []interface{}
    for _, delegatorItem := range delegator {
        delegatorRule = append(delegatorRule, delegatorItem)
Severity: Major
Found in gossip/sfc202/contract.go and 20 other locations - About 2 hrs to fix
gossip/sfc110/contract.go on lines 2158..2174
gossip/sfc110/contract.go on lines 2313..2329
gossip/sfc110/contract.go on lines 2612..2628
gossip/sfc110/contract.go on lines 3081..3097
gossip/sfc110/contract.go on lines 3378..3394
gossip/sfc110/contract.go on lines 3991..4007
gossip/sfc110/contract.go on lines 5318..5334
gossip/sfc202/contract.go on lines 2506..2522
gossip/sfc202/contract.go on lines 3274..3290
gossip/sfc202/contract.go on lines 3571..3587
gossip/sfc202/contract.go on lines 3870..3886
gossip/sfc202/contract.go on lines 4616..4632
gossip/sfc202/contract.go on lines 6210..6226
gossip/sfc204/contract.go on lines 2349..2365
gossip/sfc204/contract.go on lines 2648..2664
gossip/sfc204/contract.go on lines 3117..3133
gossip/sfc204/contract.go on lines 3414..3430
gossip/sfc204/contract.go on lines 3713..3729
gossip/sfc204/contract.go on lines 4459..4475
gossip/sfc204/contract.go on lines 5749..5765

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

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

func (_Contract *ContractFilterer) FilterClaimedDelegationReward(opts *bind.FilterOpts, from []common.Address, stakerID []*big.Int) (*ContractClaimedDelegationRewardIterator, error) {

    var fromRule []interface{}
    for _, fromItem := range from {
        fromRule = append(fromRule, fromItem)
Severity: Major
Found in gossip/sfc110/contract.go and 20 other locations - About 2 hrs to fix
gossip/sfc110/contract.go on lines 2158..2174
gossip/sfc110/contract.go on lines 2612..2628
gossip/sfc110/contract.go on lines 3081..3097
gossip/sfc110/contract.go on lines 3378..3394
gossip/sfc110/contract.go on lines 3991..4007
gossip/sfc110/contract.go on lines 5318..5334
gossip/sfc202/contract.go on lines 2506..2522
gossip/sfc202/contract.go on lines 2805..2821
gossip/sfc202/contract.go on lines 3274..3290
gossip/sfc202/contract.go on lines 3571..3587
gossip/sfc202/contract.go on lines 3870..3886
gossip/sfc202/contract.go on lines 4616..4632
gossip/sfc202/contract.go on lines 6210..6226
gossip/sfc204/contract.go on lines 2349..2365
gossip/sfc204/contract.go on lines 2648..2664
gossip/sfc204/contract.go on lines 3117..3133
gossip/sfc204/contract.go on lines 3414..3430
gossip/sfc204/contract.go on lines 3713..3729
gossip/sfc204/contract.go on lines 4459..4475
gossip/sfc204/contract.go on lines 5749..5765

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

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

func (_Contract *ContractFilterer) FilterIncreasedDelegation(opts *bind.FilterOpts, delegator []common.Address, stakerID []*big.Int) (*ContractIncreasedDelegationIterator, error) {

    var delegatorRule []interface{}
    for _, delegatorItem := range delegator {
        delegatorRule = append(delegatorRule, delegatorItem)
Severity: Major
Found in gossip/sfc204/contract.go and 20 other locations - About 2 hrs to fix
gossip/sfc110/contract.go on lines 2158..2174
gossip/sfc110/contract.go on lines 2313..2329
gossip/sfc110/contract.go on lines 2612..2628
gossip/sfc110/contract.go on lines 3081..3097
gossip/sfc110/contract.go on lines 3378..3394
gossip/sfc110/contract.go on lines 3991..4007
gossip/sfc110/contract.go on lines 5318..5334
gossip/sfc202/contract.go on lines 2506..2522
gossip/sfc202/contract.go on lines 2805..2821
gossip/sfc202/contract.go on lines 3274..3290
gossip/sfc202/contract.go on lines 3571..3587
gossip/sfc202/contract.go on lines 3870..3886
gossip/sfc202/contract.go on lines 4616..4632
gossip/sfc202/contract.go on lines 6210..6226
gossip/sfc204/contract.go on lines 2349..2365
gossip/sfc204/contract.go on lines 2648..2664
gossip/sfc204/contract.go on lines 3117..3133
gossip/sfc204/contract.go on lines 3713..3729
gossip/sfc204/contract.go on lines 4459..4475
gossip/sfc204/contract.go on lines 5749..5765

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

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

func (_Contract *ContractFilterer) FilterDeactivatedDelegation(opts *bind.FilterOpts, delegator []common.Address, stakerID []*big.Int) (*ContractDeactivatedDelegationIterator, error) {

    var delegatorRule []interface{}
    for _, delegatorItem := range delegator {
        delegatorRule = append(delegatorRule, delegatorItem)
Severity: Major
Found in gossip/sfc110/contract.go and 20 other locations - About 2 hrs to fix
gossip/sfc110/contract.go on lines 2158..2174
gossip/sfc110/contract.go on lines 2313..2329
gossip/sfc110/contract.go on lines 2612..2628
gossip/sfc110/contract.go on lines 3378..3394
gossip/sfc110/contract.go on lines 3991..4007
gossip/sfc110/contract.go on lines 5318..5334
gossip/sfc202/contract.go on lines 2506..2522
gossip/sfc202/contract.go on lines 2805..2821
gossip/sfc202/contract.go on lines 3274..3290
gossip/sfc202/contract.go on lines 3571..3587
gossip/sfc202/contract.go on lines 3870..3886
gossip/sfc202/contract.go on lines 4616..4632
gossip/sfc202/contract.go on lines 6210..6226
gossip/sfc204/contract.go on lines 2349..2365
gossip/sfc204/contract.go on lines 2648..2664
gossip/sfc204/contract.go on lines 3117..3133
gossip/sfc204/contract.go on lines 3414..3430
gossip/sfc204/contract.go on lines 3713..3729
gossip/sfc204/contract.go on lines 4459..4475
gossip/sfc204/contract.go on lines 5749..5765

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

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

func (_Contract *ContractFilterer) FilterCreatedStake(opts *bind.FilterOpts, stakerID []*big.Int, dagSfcAddress []common.Address) (*ContractCreatedStakeIterator, error) {

    var stakerIDRule []interface{}
    for _, stakerIDItem := range stakerID {
        stakerIDRule = append(stakerIDRule, stakerIDItem)
Severity: Major
Found in gossip/sfc202/contract.go and 2 other locations - About 2 hrs to fix
gossip/sfc110/contract.go on lines 2765..2781
gossip/sfc204/contract.go on lines 2801..2817

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

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

func (_Contract *ContractFilterer) FilterBurntRewardStash(opts *bind.FilterOpts, addr []common.Address, stakerID []*big.Int) (*ContractBurntRewardStashIterator, error) {

    var addrRule []interface{}
    for _, addrItem := range addr {
        addrRule = append(addrRule, addrItem)
Severity: Major
Found in gossip/sfc110/contract.go and 20 other locations - About 2 hrs to fix
gossip/sfc110/contract.go on lines 2313..2329
gossip/sfc110/contract.go on lines 2612..2628
gossip/sfc110/contract.go on lines 3081..3097
gossip/sfc110/contract.go on lines 3378..3394
gossip/sfc110/contract.go on lines 3991..4007
gossip/sfc110/contract.go on lines 5318..5334
gossip/sfc202/contract.go on lines 2506..2522
gossip/sfc202/contract.go on lines 2805..2821
gossip/sfc202/contract.go on lines 3274..3290
gossip/sfc202/contract.go on lines 3571..3587
gossip/sfc202/contract.go on lines 3870..3886
gossip/sfc202/contract.go on lines 4616..4632
gossip/sfc202/contract.go on lines 6210..6226
gossip/sfc204/contract.go on lines 2349..2365
gossip/sfc204/contract.go on lines 2648..2664
gossip/sfc204/contract.go on lines 3117..3133
gossip/sfc204/contract.go on lines 3414..3430
gossip/sfc204/contract.go on lines 3713..3729
gossip/sfc204/contract.go on lines 4459..4475
gossip/sfc204/contract.go on lines 5749..5765

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

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

func (_Contract *ContractFilterer) FilterWithdrawnDelegation(opts *bind.FilterOpts, delegator []common.Address, toStakerID []*big.Int) (*ContractWithdrawnDelegationIterator, error) {

    var delegatorRule []interface{}
    for _, delegatorItem := range delegator {
        delegatorRule = append(delegatorRule, delegatorItem)
Severity: Major
Found in gossip/sfc204/contract.go and 20 other locations - About 2 hrs to fix
gossip/sfc110/contract.go on lines 2158..2174
gossip/sfc110/contract.go on lines 2313..2329
gossip/sfc110/contract.go on lines 2612..2628
gossip/sfc110/contract.go on lines 3081..3097
gossip/sfc110/contract.go on lines 3378..3394
gossip/sfc110/contract.go on lines 3991..4007
gossip/sfc110/contract.go on lines 5318..5334
gossip/sfc202/contract.go on lines 2506..2522
gossip/sfc202/contract.go on lines 2805..2821
gossip/sfc202/contract.go on lines 3274..3290
gossip/sfc202/contract.go on lines 3571..3587
gossip/sfc202/contract.go on lines 3870..3886
gossip/sfc202/contract.go on lines 4616..4632
gossip/sfc202/contract.go on lines 6210..6226
gossip/sfc204/contract.go on lines 2349..2365
gossip/sfc204/contract.go on lines 2648..2664
gossip/sfc204/contract.go on lines 3117..3133
gossip/sfc204/contract.go on lines 3414..3430
gossip/sfc204/contract.go on lines 3713..3729
gossip/sfc204/contract.go on lines 4459..4475

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

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

func (_Contract *ContractFilterer) FilterCreatedStake(opts *bind.FilterOpts, stakerID []*big.Int, dagSfcAddress []common.Address) (*ContractCreatedStakeIterator, error) {

    var stakerIDRule []interface{}
    for _, stakerIDItem := range stakerID {
        stakerIDRule = append(stakerIDRule, stakerIDItem)
Severity: Major
Found in gossip/sfc110/contract.go and 2 other locations - About 2 hrs to fix
gossip/sfc202/contract.go on lines 2958..2974
gossip/sfc204/contract.go on lines 2801..2817

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

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

func (_Contract *ContractFilterer) FilterCreatedDelegation(opts *bind.FilterOpts, delegator []common.Address, toStakerID []*big.Int) (*ContractCreatedDelegationIterator, error) {

    var delegatorRule []interface{}
    for _, delegatorItem := range delegator {
        delegatorRule = append(delegatorRule, delegatorItem)
Severity: Major
Found in gossip/sfc110/contract.go and 20 other locations - About 2 hrs to fix
gossip/sfc110/contract.go on lines 2158..2174
gossip/sfc110/contract.go on lines 2313..2329
gossip/sfc110/contract.go on lines 3081..3097
gossip/sfc110/contract.go on lines 3378..3394
gossip/sfc110/contract.go on lines 3991..4007
gossip/sfc110/contract.go on lines 5318..5334
gossip/sfc202/contract.go on lines 2506..2522
gossip/sfc202/contract.go on lines 2805..2821
gossip/sfc202/contract.go on lines 3274..3290
gossip/sfc202/contract.go on lines 3571..3587
gossip/sfc202/contract.go on lines 3870..3886
gossip/sfc202/contract.go on lines 4616..4632
gossip/sfc202/contract.go on lines 6210..6226
gossip/sfc204/contract.go on lines 2349..2365
gossip/sfc204/contract.go on lines 2648..2664
gossip/sfc204/contract.go on lines 3117..3133
gossip/sfc204/contract.go on lines 3414..3430
gossip/sfc204/contract.go on lines 3713..3729
gossip/sfc204/contract.go on lines 4459..4475
gossip/sfc204/contract.go on lines 5749..5765

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

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

func (_Contract *ContractFilterer) FilterWithdrawnDelegation(opts *bind.FilterOpts, delegator []common.Address, toStakerID []*big.Int) (*ContractWithdrawnDelegationIterator, error) {

    var delegatorRule []interface{}
    for _, delegatorItem := range delegator {
        delegatorRule = append(delegatorRule, delegatorItem)
Severity: Major
Found in gossip/sfc202/contract.go and 20 other locations - About 2 hrs to fix
gossip/sfc110/contract.go on lines 2158..2174
gossip/sfc110/contract.go on lines 2313..2329
gossip/sfc110/contract.go on lines 2612..2628
gossip/sfc110/contract.go on lines 3081..3097
gossip/sfc110/contract.go on lines 3378..3394
gossip/sfc110/contract.go on lines 3991..4007
gossip/sfc110/contract.go on lines 5318..5334
gossip/sfc202/contract.go on lines 2506..2522
gossip/sfc202/contract.go on lines 2805..2821
gossip/sfc202/contract.go on lines 3274..3290
gossip/sfc202/contract.go on lines 3571..3587
gossip/sfc202/contract.go on lines 3870..3886
gossip/sfc202/contract.go on lines 4616..4632
gossip/sfc204/contract.go on lines 2349..2365
gossip/sfc204/contract.go on lines 2648..2664
gossip/sfc204/contract.go on lines 3117..3133
gossip/sfc204/contract.go on lines 3414..3430
gossip/sfc204/contract.go on lines 3713..3729
gossip/sfc204/contract.go on lines 4459..4475
gossip/sfc204/contract.go on lines 5749..5765

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

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

func (_Contract *ContractFilterer) FilterClaimedDelegationReward(opts *bind.FilterOpts, from []common.Address, stakerID []*big.Int) (*ContractClaimedDelegationRewardIterator, error) {

    var fromRule []interface{}
    for _, fromItem := range from {
        fromRule = append(fromRule, fromItem)
Severity: Major
Found in gossip/sfc204/contract.go and 20 other locations - About 2 hrs to fix
gossip/sfc110/contract.go on lines 2158..2174
gossip/sfc110/contract.go on lines 2313..2329
gossip/sfc110/contract.go on lines 2612..2628
gossip/sfc110/contract.go on lines 3081..3097
gossip/sfc110/contract.go on lines 3378..3394
gossip/sfc110/contract.go on lines 3991..4007
gossip/sfc110/contract.go on lines 5318..5334
gossip/sfc202/contract.go on lines 2506..2522
gossip/sfc202/contract.go on lines 2805..2821
gossip/sfc202/contract.go on lines 3274..3290
gossip/sfc202/contract.go on lines 3571..3587
gossip/sfc202/contract.go on lines 3870..3886
gossip/sfc202/contract.go on lines 4616..4632
gossip/sfc202/contract.go on lines 6210..6226
gossip/sfc204/contract.go on lines 2648..2664
gossip/sfc204/contract.go on lines 3117..3133
gossip/sfc204/contract.go on lines 3414..3430
gossip/sfc204/contract.go on lines 3713..3729
gossip/sfc204/contract.go on lines 4459..4475
gossip/sfc204/contract.go on lines 5749..5765

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

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

func (_Contract *ContractFilterer) FilterIncreasedDelegation(opts *bind.FilterOpts, delegator []common.Address, stakerID []*big.Int) (*ContractIncreasedDelegationIterator, error) {

    var delegatorRule []interface{}
    for _, delegatorItem := range delegator {
        delegatorRule = append(delegatorRule, delegatorItem)
Severity: Major
Found in gossip/sfc202/contract.go and 20 other locations - About 2 hrs to fix
gossip/sfc110/contract.go on lines 2158..2174
gossip/sfc110/contract.go on lines 2313..2329
gossip/sfc110/contract.go on lines 2612..2628
gossip/sfc110/contract.go on lines 3081..3097
gossip/sfc110/contract.go on lines 3378..3394
gossip/sfc110/contract.go on lines 3991..4007
gossip/sfc110/contract.go on lines 5318..5334
gossip/sfc202/contract.go on lines 2506..2522
gossip/sfc202/contract.go on lines 2805..2821
gossip/sfc202/contract.go on lines 3274..3290
gossip/sfc202/contract.go on lines 3870..3886
gossip/sfc202/contract.go on lines 4616..4632
gossip/sfc202/contract.go on lines 6210..6226
gossip/sfc204/contract.go on lines 2349..2365
gossip/sfc204/contract.go on lines 2648..2664
gossip/sfc204/contract.go on lines 3117..3133
gossip/sfc204/contract.go on lines 3414..3430
gossip/sfc204/contract.go on lines 3713..3729
gossip/sfc204/contract.go on lines 4459..4475
gossip/sfc204/contract.go on lines 5749..5765

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

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

func (_Contract *ContractFilterer) FilterIncreasedDelegation(opts *bind.FilterOpts, delegator []common.Address, stakerID []*big.Int) (*ContractIncreasedDelegationIterator, error) {

    var delegatorRule []interface{}
    for _, delegatorItem := range delegator {
        delegatorRule = append(delegatorRule, delegatorItem)
Severity: Major
Found in gossip/sfc110/contract.go and 20 other locations - About 2 hrs to fix
gossip/sfc110/contract.go on lines 2158..2174
gossip/sfc110/contract.go on lines 2313..2329
gossip/sfc110/contract.go on lines 2612..2628
gossip/sfc110/contract.go on lines 3081..3097
gossip/sfc110/contract.go on lines 3991..4007
gossip/sfc110/contract.go on lines 5318..5334
gossip/sfc202/contract.go on lines 2506..2522
gossip/sfc202/contract.go on lines 2805..2821
gossip/sfc202/contract.go on lines 3274..3290
gossip/sfc202/contract.go on lines 3571..3587
gossip/sfc202/contract.go on lines 3870..3886
gossip/sfc202/contract.go on lines 4616..4632
gossip/sfc202/contract.go on lines 6210..6226
gossip/sfc204/contract.go on lines 2349..2365
gossip/sfc204/contract.go on lines 2648..2664
gossip/sfc204/contract.go on lines 3117..3133
gossip/sfc204/contract.go on lines 3414..3430
gossip/sfc204/contract.go on lines 3713..3729
gossip/sfc204/contract.go on lines 4459..4475
gossip/sfc204/contract.go on lines 5749..5765

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

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

func (_Contract *ContractFilterer) FilterPreparedToWithdrawDelegation(opts *bind.FilterOpts, delegator []common.Address, stakerID []*big.Int) (*ContractPreparedToWithdrawDelegationIterator, error) {

    var delegatorRule []interface{}
    for _, delegatorItem := range delegator {
        delegatorRule = append(delegatorRule, delegatorItem)
Severity: Major
Found in gossip/sfc202/contract.go and 20 other locations - About 2 hrs to fix
gossip/sfc110/contract.go on lines 2158..2174
gossip/sfc110/contract.go on lines 2313..2329
gossip/sfc110/contract.go on lines 2612..2628
gossip/sfc110/contract.go on lines 3081..3097
gossip/sfc110/contract.go on lines 3378..3394
gossip/sfc110/contract.go on lines 3991..4007
gossip/sfc110/contract.go on lines 5318..5334
gossip/sfc202/contract.go on lines 2506..2522
gossip/sfc202/contract.go on lines 2805..2821
gossip/sfc202/contract.go on lines 3274..3290
gossip/sfc202/contract.go on lines 3571..3587
gossip/sfc202/contract.go on lines 3870..3886
gossip/sfc202/contract.go on lines 6210..6226
gossip/sfc204/contract.go on lines 2349..2365
gossip/sfc204/contract.go on lines 2648..2664
gossip/sfc204/contract.go on lines 3117..3133
gossip/sfc204/contract.go on lines 3414..3430
gossip/sfc204/contract.go on lines 3713..3729
gossip/sfc204/contract.go on lines 4459..4475
gossip/sfc204/contract.go on lines 5749..5765

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

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

func (_Contract *ContractFilterer) FilterPreparedToWithdrawDelegation(opts *bind.FilterOpts, delegator []common.Address, stakerID []*big.Int) (*ContractPreparedToWithdrawDelegationIterator, error) {

    var delegatorRule []interface{}
    for _, delegatorItem := range delegator {
        delegatorRule = append(delegatorRule, delegatorItem)
Severity: Major
Found in gossip/sfc204/contract.go and 20 other locations - About 2 hrs to fix
gossip/sfc110/contract.go on lines 2158..2174
gossip/sfc110/contract.go on lines 2313..2329
gossip/sfc110/contract.go on lines 2612..2628
gossip/sfc110/contract.go on lines 3081..3097
gossip/sfc110/contract.go on lines 3378..3394
gossip/sfc110/contract.go on lines 3991..4007
gossip/sfc110/contract.go on lines 5318..5334
gossip/sfc202/contract.go on lines 2506..2522
gossip/sfc202/contract.go on lines 2805..2821
gossip/sfc202/contract.go on lines 3274..3290
gossip/sfc202/contract.go on lines 3571..3587
gossip/sfc202/contract.go on lines 3870..3886
gossip/sfc202/contract.go on lines 4616..4632
gossip/sfc202/contract.go on lines 6210..6226
gossip/sfc204/contract.go on lines 2349..2365
gossip/sfc204/contract.go on lines 2648..2664
gossip/sfc204/contract.go on lines 3117..3133
gossip/sfc204/contract.go on lines 3414..3430
gossip/sfc204/contract.go on lines 3713..3729
gossip/sfc204/contract.go on lines 5749..5765

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

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

func (_Contract *ContractFilterer) FilterDeactivatedDelegation(opts *bind.FilterOpts, delegator []common.Address, stakerID []*big.Int) (*ContractDeactivatedDelegationIterator, error) {

    var delegatorRule []interface{}
    for _, delegatorItem := range delegator {
        delegatorRule = append(delegatorRule, delegatorItem)
Severity: Major
Found in gossip/sfc202/contract.go and 20 other locations - About 2 hrs to fix
gossip/sfc110/contract.go on lines 2158..2174
gossip/sfc110/contract.go on lines 2313..2329
gossip/sfc110/contract.go on lines 2612..2628
gossip/sfc110/contract.go on lines 3081..3097
gossip/sfc110/contract.go on lines 3378..3394
gossip/sfc110/contract.go on lines 3991..4007
gossip/sfc110/contract.go on lines 5318..5334
gossip/sfc202/contract.go on lines 2506..2522
gossip/sfc202/contract.go on lines 2805..2821
gossip/sfc202/contract.go on lines 3571..3587
gossip/sfc202/contract.go on lines 3870..3886
gossip/sfc202/contract.go on lines 4616..4632
gossip/sfc202/contract.go on lines 6210..6226
gossip/sfc204/contract.go on lines 2349..2365
gossip/sfc204/contract.go on lines 2648..2664
gossip/sfc204/contract.go on lines 3117..3133
gossip/sfc204/contract.go on lines 3414..3430
gossip/sfc204/contract.go on lines 3713..3729
gossip/sfc204/contract.go on lines 4459..4475
gossip/sfc204/contract.go on lines 5749..5765

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

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

func (_Contract *ContractFilterer) FilterDeactivatedDelegation(opts *bind.FilterOpts, delegator []common.Address, stakerID []*big.Int) (*ContractDeactivatedDelegationIterator, error) {

    var delegatorRule []interface{}
    for _, delegatorItem := range delegator {
        delegatorRule = append(delegatorRule, delegatorItem)
Severity: Major
Found in gossip/sfc204/contract.go and 20 other locations - About 2 hrs to fix
gossip/sfc110/contract.go on lines 2158..2174
gossip/sfc110/contract.go on lines 2313..2329
gossip/sfc110/contract.go on lines 2612..2628
gossip/sfc110/contract.go on lines 3081..3097
gossip/sfc110/contract.go on lines 3378..3394
gossip/sfc110/contract.go on lines 3991..4007
gossip/sfc110/contract.go on lines 5318..5334
gossip/sfc202/contract.go on lines 2506..2522
gossip/sfc202/contract.go on lines 2805..2821
gossip/sfc202/contract.go on lines 3274..3290
gossip/sfc202/contract.go on lines 3571..3587
gossip/sfc202/contract.go on lines 3870..3886
gossip/sfc202/contract.go on lines 4616..4632
gossip/sfc202/contract.go on lines 6210..6226
gossip/sfc204/contract.go on lines 2349..2365
gossip/sfc204/contract.go on lines 2648..2664
gossip/sfc204/contract.go on lines 3414..3430
gossip/sfc204/contract.go on lines 3713..3729
gossip/sfc204/contract.go on lines 4459..4475
gossip/sfc204/contract.go on lines 5749..5765

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

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

func (_Contract *ContractFilterer) FilterClaimedDelegationReward(opts *bind.FilterOpts, from []common.Address, stakerID []*big.Int) (*ContractClaimedDelegationRewardIterator, error) {

    var fromRule []interface{}
    for _, fromItem := range from {
        fromRule = append(fromRule, fromItem)
Severity: Major
Found in gossip/sfc202/contract.go and 20 other locations - About 2 hrs to fix
gossip/sfc110/contract.go on lines 2158..2174
gossip/sfc110/contract.go on lines 2313..2329
gossip/sfc110/contract.go on lines 2612..2628
gossip/sfc110/contract.go on lines 3081..3097
gossip/sfc110/contract.go on lines 3378..3394
gossip/sfc110/contract.go on lines 3991..4007
gossip/sfc110/contract.go on lines 5318..5334
gossip/sfc202/contract.go on lines 2805..2821
gossip/sfc202/contract.go on lines 3274..3290
gossip/sfc202/contract.go on lines 3571..3587
gossip/sfc202/contract.go on lines 3870..3886
gossip/sfc202/contract.go on lines 4616..4632
gossip/sfc202/contract.go on lines 6210..6226
gossip/sfc204/contract.go on lines 2349..2365
gossip/sfc204/contract.go on lines 2648..2664
gossip/sfc204/contract.go on lines 3117..3133
gossip/sfc204/contract.go on lines 3414..3430
gossip/sfc204/contract.go on lines 3713..3729
gossip/sfc204/contract.go on lines 4459..4475
gossip/sfc204/contract.go on lines 5749..5765

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

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

func (_Contract *ContractFilterer) FilterWithdrawnDelegation(opts *bind.FilterOpts, delegator []common.Address, stakerID []*big.Int) (*ContractWithdrawnDelegationIterator, error) {

    var delegatorRule []interface{}
    for _, delegatorItem := range delegator {
        delegatorRule = append(delegatorRule, delegatorItem)
Severity: Major
Found in gossip/sfc110/contract.go and 20 other locations - About 2 hrs to fix
gossip/sfc110/contract.go on lines 2158..2174
gossip/sfc110/contract.go on lines 2313..2329
gossip/sfc110/contract.go on lines 2612..2628
gossip/sfc110/contract.go on lines 3081..3097
gossip/sfc110/contract.go on lines 3378..3394
gossip/sfc110/contract.go on lines 3991..4007
gossip/sfc202/contract.go on lines 2506..2522
gossip/sfc202/contract.go on lines 2805..2821
gossip/sfc202/contract.go on lines 3274..3290
gossip/sfc202/contract.go on lines 3571..3587
gossip/sfc202/contract.go on lines 3870..3886
gossip/sfc202/contract.go on lines 4616..4632
gossip/sfc202/contract.go on lines 6210..6226
gossip/sfc204/contract.go on lines 2349..2365
gossip/sfc204/contract.go on lines 2648..2664
gossip/sfc204/contract.go on lines 3117..3133
gossip/sfc204/contract.go on lines 3414..3430
gossip/sfc204/contract.go on lines 3713..3729
gossip/sfc204/contract.go on lines 4459..4475
gossip/sfc204/contract.go on lines 5749..5765

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

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

func (_Contract *ContractFilterer) FilterCreatedDelegation(opts *bind.FilterOpts, delegator []common.Address, toStakerID []*big.Int) (*ContractCreatedDelegationIterator, error) {

    var delegatorRule []interface{}
    for _, delegatorItem := range delegator {
        delegatorRule = append(delegatorRule, delegatorItem)
Severity: Major
Found in gossip/sfc204/contract.go and 20 other locations - About 2 hrs to fix
gossip/sfc110/contract.go on lines 2158..2174
gossip/sfc110/contract.go on lines 2313..2329
gossip/sfc110/contract.go on lines 2612..2628
gossip/sfc110/contract.go on lines 3081..3097
gossip/sfc110/contract.go on lines 3378..3394
gossip/sfc110/contract.go on lines 3991..4007
gossip/sfc110/contract.go on lines 5318..5334
gossip/sfc202/contract.go on lines 2506..2522
gossip/sfc202/contract.go on lines 2805..2821
gossip/sfc202/contract.go on lines 3274..3290
gossip/sfc202/contract.go on lines 3571..3587
gossip/sfc202/contract.go on lines 3870..3886
gossip/sfc202/contract.go on lines 4616..4632
gossip/sfc202/contract.go on lines 6210..6226
gossip/sfc204/contract.go on lines 2349..2365
gossip/sfc204/contract.go on lines 3117..3133
gossip/sfc204/contract.go on lines 3414..3430
gossip/sfc204/contract.go on lines 3713..3729
gossip/sfc204/contract.go on lines 4459..4475
gossip/sfc204/contract.go on lines 5749..5765

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

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