synapsecns/sanguine

View on GitHub
agents/testutil/typecast.go

Summary

Maintainability
F
4 days
Test Coverage

DeployManager has 35 methods (exceeds 20 allowed). Consider refactoring.
Open

func (d *DeployManager) GetOrigin(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *origin.OriginRef) {
    d.T().Helper()

    return manager.GetContract[*origin.OriginRef](ctx, d.T(), d, backend, OriginType)
}
Severity: Minor
Found in agents/testutil/typecast.go - About 4 hrs to fix

    File typecast.go has 555 lines of code (exceeds 500 allowed). Consider refactoring.
    Open

    package testutil
    
    import (
        "context"
        "fmt"
    Severity: Minor
    Found in agents/testutil/typecast.go - About 3 hrs to fix

      Method DeployManager.AddAgentsToBondingManagerHarnessContract has 8 return statements (exceeds 4 allowed).
      Open

      func (d *DeployManager) AddAgentsToBondingManagerHarnessContract(
          ctx context.Context,
          synChainBackend backends.SimulatedTestBackend,
          agents []common.Address,
          domains []uint32) ([32]byte, [][][32]byte, []bondingmanagerharness.AgentStatus, error) {
      Severity: Major
      Found in agents/testutil/typecast.go - About 50 mins to fix

        Method DeployManager.AddAgentsToBondingManagerContract has 7 return statements (exceeds 4 allowed).
        Open

        func (d *DeployManager) AddAgentsToBondingManagerContract(
            ctx context.Context,
            synChainBackend backends.SimulatedTestBackend,
            agents []common.Address,
            domains []uint32) ([32]byte, [][][32]byte, []bondingmanager.AgentStatus, error) {
        Severity: Major
        Found in agents/testutil/typecast.go - About 45 mins to fix

          Method DeployManager.LoadHarnessContractsOnChains has 7 return statements (exceeds 4 allowed).
          Open

          func (d *DeployManager) LoadHarnessContractsOnChains(
              ctx context.Context,
              synChainBackend backends.SimulatedTestBackend,
              backends []backends.SimulatedTestBackend,
              agents []common.Address,
          Severity: Major
          Found in agents/testutil/typecast.go - About 45 mins to fix

            Method DeployManager.InitializeRemoteDeployedContracts has 6 return statements (exceeds 4 allowed).
            Open

            func (d *DeployManager) InitializeRemoteDeployedContracts(
                ctx context.Context,
                backend backends.SimulatedTestBackend,
                bondingManagerAgentRoot [32]byte) error {
                d.T().Helper()
            Severity: Major
            Found in agents/testutil/typecast.go - About 40 mins to fix

              Method DeployManager.AddAgentsToLightManagerHarnessContract has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  ctx context.Context,
                  backend backends.SimulatedTestBackend,
                  agents []common.Address,
                  agentProofs [][][32]byte,
                  agentStatuses []bondingmanagerharness.AgentStatus) error {
              Severity: Minor
              Found in agents/testutil/typecast.go - About 35 mins to fix

                Method DeployManager.AddAgentsToLightManagerContract has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    ctx context.Context,
                    backend backends.SimulatedTestBackend,
                    agents []common.Address,
                    agentProofs [][][32]byte,
                    agentStatuses []bondingmanager.AgentStatus) error {
                Severity: Minor
                Found in agents/testutil/typecast.go - About 35 mins to fix

                  Method DeployManager.LoadContractsOnChains has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      ctx context.Context,
                      synChainBackend backends.SimulatedTestBackend,
                      backends []backends.SimulatedTestBackend,
                      agents []common.Address,
                      agentDomains []uint32) error {
                  Severity: Minor
                  Found in agents/testutil/typecast.go - About 35 mins to fix

                    Method DeployManager.LoadHarnessContractsOnChains has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        ctx context.Context,
                        synChainBackend backends.SimulatedTestBackend,
                        backends []backends.SimulatedTestBackend,
                        agents []common.Address,
                        agentDomains []uint32) error {
                    Severity: Minor
                    Found in agents/testutil/typecast.go - About 35 mins to fix

                      Method DeployManager.InitializeRemoteDeployedHarnessContracts has 5 return statements (exceeds 4 allowed).
                      Open

                      func (d *DeployManager) InitializeRemoteDeployedHarnessContracts(
                          ctx context.Context,
                          backend backends.SimulatedTestBackend,
                          bondingManagerHarnessAgentRoot [32]byte) error {
                          d.T().Helper()
                      Severity: Major
                      Found in agents/testutil/typecast.go - About 35 mins to fix

                        Method DeployManager.LoadContractsOnChains has 5 return statements (exceeds 4 allowed).
                        Open

                        func (d *DeployManager) LoadContractsOnChains(
                            ctx context.Context,
                            synChainBackend backends.SimulatedTestBackend,
                            backends []backends.SimulatedTestBackend,
                            agents []common.Address,
                        Severity: Major
                        Found in agents/testutil/typecast.go - About 35 mins to fix

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

                              for i := range agents {
                                  agent := agents[i]
                                  agentStatus, err := bondingManagerHarnessContract.AgentStatus(&bind.CallOpts{Context: ctx}, agent)
                                  if err != nil {
                                      return [32]byte{}, [][][32]byte{}, []bondingmanagerharness.AgentStatus{}, fmt.Errorf("could not get agent status from bonding manager harness: %w", err)
                          Severity: Major
                          Found in agents/testutil/typecast.go and 1 other location - About 2 hrs to fix
                          agents/testutil/typecast.go on lines 434..447

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

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

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

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

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

                          Refactorings

                          Further Reading

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

                              for i := range agents {
                                  agent := agents[i]
                                  agentStatus, err := bondingManagerContract.AgentStatus(&bind.CallOpts{Context: ctx}, agent)
                                  if err != nil {
                                      return [32]byte{}, [][][32]byte{}, []bondingmanager.AgentStatus{}, fmt.Errorf("could not get agent status from bonding manager: %w", err)
                          Severity: Major
                          Found in agents/testutil/typecast.go and 1 other location - About 2 hrs to fix
                          agents/testutil/typecast.go on lines 333..346

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

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

                          func (d *DeployManager) GetMessageHarness(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *messageharness.MessageHarnessRef) {
                              d.T().Helper()
                          
                              return manager.GetContract[*messageharness.MessageHarnessRef](ctx, d.T(), d, backend, MessageHarnessType)
                          }
                          Severity: Major
                          Found in agents/testutil/typecast.go and 23 other locations - About 45 mins to fix
                          agents/testutil/typecast.go on lines 48..52
                          agents/testutil/typecast.go on lines 64..68
                          agents/testutil/typecast.go on lines 72..76
                          agents/testutil/typecast.go on lines 80..84
                          agents/testutil/typecast.go on lines 88..92
                          agents/testutil/typecast.go on lines 96..100
                          agents/testutil/typecast.go on lines 104..108
                          agents/testutil/typecast.go on lines 112..116
                          agents/testutil/typecast.go on lines 120..124
                          agents/testutil/typecast.go on lines 128..132
                          agents/testutil/typecast.go on lines 136..140
                          agents/testutil/typecast.go on lines 144..148
                          agents/testutil/typecast.go on lines 152..156
                          agents/testutil/typecast.go on lines 160..164
                          agents/testutil/typecast.go on lines 168..172
                          agents/testutil/typecast.go on lines 176..180
                          agents/testutil/typecast.go on lines 184..188
                          agents/testutil/typecast.go on lines 192..196
                          agents/testutil/typecast.go on lines 207..211
                          agents/testutil/typecast.go on lines 215..219
                          agents/testutil/typecast.go on lines 223..227
                          agents/testutil/typecast.go on lines 231..235
                          agents/testutil/typecast.go on lines 239..243

                          Duplicated Code

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

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

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

                          Tuning

                          This issue has a mass of 113.

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

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

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

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

                          Refactorings

                          Further Reading

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

                          func (d *DeployManager) GetLightInbox(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *lightinbox.LightInboxRef) {
                              d.T().Helper()
                          
                              return manager.GetContract[*lightinbox.LightInboxRef](ctx, d.T(), d, backend, LightInboxType)
                          }
                          Severity: Major
                          Found in agents/testutil/typecast.go and 23 other locations - About 45 mins to fix
                          agents/testutil/typecast.go on lines 48..52
                          agents/testutil/typecast.go on lines 56..60
                          agents/testutil/typecast.go on lines 64..68
                          agents/testutil/typecast.go on lines 72..76
                          agents/testutil/typecast.go on lines 88..92
                          agents/testutil/typecast.go on lines 96..100
                          agents/testutil/typecast.go on lines 104..108
                          agents/testutil/typecast.go on lines 112..116
                          agents/testutil/typecast.go on lines 120..124
                          agents/testutil/typecast.go on lines 128..132
                          agents/testutil/typecast.go on lines 136..140
                          agents/testutil/typecast.go on lines 144..148
                          agents/testutil/typecast.go on lines 152..156
                          agents/testutil/typecast.go on lines 160..164
                          agents/testutil/typecast.go on lines 168..172
                          agents/testutil/typecast.go on lines 176..180
                          agents/testutil/typecast.go on lines 184..188
                          agents/testutil/typecast.go on lines 192..196
                          agents/testutil/typecast.go on lines 207..211
                          agents/testutil/typecast.go on lines 215..219
                          agents/testutil/typecast.go on lines 223..227
                          agents/testutil/typecast.go on lines 231..235
                          agents/testutil/typecast.go on lines 239..243

                          Duplicated Code

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

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

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

                          Tuning

                          This issue has a mass of 113.

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

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

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

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

                          Refactorings

                          Further Reading

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

                          func (d *DeployManager) GetBondingManager(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *bondingmanager.BondingManagerRef) {
                              d.T().Helper()
                          
                              return manager.GetContract[*bondingmanager.BondingManagerRef](ctx, d.T(), d, backend, BondingManagerType)
                          }
                          Severity: Major
                          Found in agents/testutil/typecast.go and 23 other locations - About 45 mins to fix
                          agents/testutil/typecast.go on lines 48..52
                          agents/testutil/typecast.go on lines 56..60
                          agents/testutil/typecast.go on lines 64..68
                          agents/testutil/typecast.go on lines 72..76
                          agents/testutil/typecast.go on lines 80..84
                          agents/testutil/typecast.go on lines 88..92
                          agents/testutil/typecast.go on lines 96..100
                          agents/testutil/typecast.go on lines 104..108
                          agents/testutil/typecast.go on lines 120..124
                          agents/testutil/typecast.go on lines 128..132
                          agents/testutil/typecast.go on lines 136..140
                          agents/testutil/typecast.go on lines 144..148
                          agents/testutil/typecast.go on lines 152..156
                          agents/testutil/typecast.go on lines 160..164
                          agents/testutil/typecast.go on lines 168..172
                          agents/testutil/typecast.go on lines 176..180
                          agents/testutil/typecast.go on lines 184..188
                          agents/testutil/typecast.go on lines 192..196
                          agents/testutil/typecast.go on lines 207..211
                          agents/testutil/typecast.go on lines 215..219
                          agents/testutil/typecast.go on lines 223..227
                          agents/testutil/typecast.go on lines 231..235
                          agents/testutil/typecast.go on lines 239..243

                          Duplicated Code

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

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

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

                          Tuning

                          This issue has a mass of 113.

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

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

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

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

                          Refactorings

                          Further Reading

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

                          func (d *DeployManager) GetSummitHarness(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *summitharness.SummitHarnessRef) {
                              d.T().Helper()
                          
                              return manager.GetContract[*summitharness.SummitHarnessRef](ctx, d.T(), d, backend, SummitHarnessType)
                          }
                          Severity: Major
                          Found in agents/testutil/typecast.go and 23 other locations - About 45 mins to fix
                          agents/testutil/typecast.go on lines 48..52
                          agents/testutil/typecast.go on lines 56..60
                          agents/testutil/typecast.go on lines 64..68
                          agents/testutil/typecast.go on lines 72..76
                          agents/testutil/typecast.go on lines 80..84
                          agents/testutil/typecast.go on lines 88..92
                          agents/testutil/typecast.go on lines 96..100
                          agents/testutil/typecast.go on lines 104..108
                          agents/testutil/typecast.go on lines 112..116
                          agents/testutil/typecast.go on lines 120..124
                          agents/testutil/typecast.go on lines 128..132
                          agents/testutil/typecast.go on lines 136..140
                          agents/testutil/typecast.go on lines 144..148
                          agents/testutil/typecast.go on lines 152..156
                          agents/testutil/typecast.go on lines 160..164
                          agents/testutil/typecast.go on lines 168..172
                          agents/testutil/typecast.go on lines 176..180
                          agents/testutil/typecast.go on lines 192..196
                          agents/testutil/typecast.go on lines 207..211
                          agents/testutil/typecast.go on lines 215..219
                          agents/testutil/typecast.go on lines 223..227
                          agents/testutil/typecast.go on lines 231..235
                          agents/testutil/typecast.go on lines 239..243

                          Duplicated Code

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

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

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

                          Tuning

                          This issue has a mass of 113.

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

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

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

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

                          Refactorings

                          Further Reading

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

                          func (d *DeployManager) GetTestClient(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *testclient.TestClientRef) {
                              d.T().Helper()
                          
                              return manager.GetContract[*testclient.TestClientRef](ctx, d.T(), d, backend, TestClientType)
                          }
                          Severity: Major
                          Found in agents/testutil/typecast.go and 23 other locations - About 45 mins to fix
                          agents/testutil/typecast.go on lines 48..52
                          agents/testutil/typecast.go on lines 56..60
                          agents/testutil/typecast.go on lines 64..68
                          agents/testutil/typecast.go on lines 72..76
                          agents/testutil/typecast.go on lines 80..84
                          agents/testutil/typecast.go on lines 88..92
                          agents/testutil/typecast.go on lines 96..100
                          agents/testutil/typecast.go on lines 104..108
                          agents/testutil/typecast.go on lines 112..116
                          agents/testutil/typecast.go on lines 120..124
                          agents/testutil/typecast.go on lines 128..132
                          agents/testutil/typecast.go on lines 136..140
                          agents/testutil/typecast.go on lines 144..148
                          agents/testutil/typecast.go on lines 152..156
                          agents/testutil/typecast.go on lines 160..164
                          agents/testutil/typecast.go on lines 168..172
                          agents/testutil/typecast.go on lines 176..180
                          agents/testutil/typecast.go on lines 184..188
                          agents/testutil/typecast.go on lines 192..196
                          agents/testutil/typecast.go on lines 207..211
                          agents/testutil/typecast.go on lines 215..219
                          agents/testutil/typecast.go on lines 223..227
                          agents/testutil/typecast.go on lines 239..243

                          Duplicated Code

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

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

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

                          Tuning

                          This issue has a mass of 113.

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

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

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

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

                          Refactorings

                          Further Reading

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

                          func (d *DeployManager) GetBaseMessageHarness(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *basemessageharness.BaseMessageHarnessRef) {
                              d.T().Helper()
                          
                              return manager.GetContract[*basemessageharness.BaseMessageHarnessRef](ctx, d.T(), d, backend, BaseMessageHarnessType)
                          }
                          Severity: Major
                          Found in agents/testutil/typecast.go and 23 other locations - About 45 mins to fix
                          agents/testutil/typecast.go on lines 48..52
                          agents/testutil/typecast.go on lines 56..60
                          agents/testutil/typecast.go on lines 72..76
                          agents/testutil/typecast.go on lines 80..84
                          agents/testutil/typecast.go on lines 88..92
                          agents/testutil/typecast.go on lines 96..100
                          agents/testutil/typecast.go on lines 104..108
                          agents/testutil/typecast.go on lines 112..116
                          agents/testutil/typecast.go on lines 120..124
                          agents/testutil/typecast.go on lines 128..132
                          agents/testutil/typecast.go on lines 136..140
                          agents/testutil/typecast.go on lines 144..148
                          agents/testutil/typecast.go on lines 152..156
                          agents/testutil/typecast.go on lines 160..164
                          agents/testutil/typecast.go on lines 168..172
                          agents/testutil/typecast.go on lines 176..180
                          agents/testutil/typecast.go on lines 184..188
                          agents/testutil/typecast.go on lines 192..196
                          agents/testutil/typecast.go on lines 207..211
                          agents/testutil/typecast.go on lines 215..219
                          agents/testutil/typecast.go on lines 223..227
                          agents/testutil/typecast.go on lines 231..235
                          agents/testutil/typecast.go on lines 239..243

                          Duplicated Code

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

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

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

                          Tuning

                          This issue has a mass of 113.

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

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

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

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

                          Refactorings

                          Further Reading

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

                          func (d *DeployManager) GetTipsHarness(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *tipsharness.TipsHarnessRef) {
                              d.T().Helper()
                          
                              return manager.GetContract[*tipsharness.TipsHarnessRef](ctx, d.T(), d, backend, TipsHarnessType)
                          }
                          Severity: Major
                          Found in agents/testutil/typecast.go and 23 other locations - About 45 mins to fix
                          agents/testutil/typecast.go on lines 48..52
                          agents/testutil/typecast.go on lines 56..60
                          agents/testutil/typecast.go on lines 64..68
                          agents/testutil/typecast.go on lines 72..76
                          agents/testutil/typecast.go on lines 80..84
                          agents/testutil/typecast.go on lines 88..92
                          agents/testutil/typecast.go on lines 96..100
                          agents/testutil/typecast.go on lines 104..108
                          agents/testutil/typecast.go on lines 112..116
                          agents/testutil/typecast.go on lines 120..124
                          agents/testutil/typecast.go on lines 128..132
                          agents/testutil/typecast.go on lines 136..140
                          agents/testutil/typecast.go on lines 144..148
                          agents/testutil/typecast.go on lines 152..156
                          agents/testutil/typecast.go on lines 160..164
                          agents/testutil/typecast.go on lines 168..172
                          agents/testutil/typecast.go on lines 176..180
                          agents/testutil/typecast.go on lines 184..188
                          agents/testutil/typecast.go on lines 192..196
                          agents/testutil/typecast.go on lines 215..219
                          agents/testutil/typecast.go on lines 223..227
                          agents/testutil/typecast.go on lines 231..235
                          agents/testutil/typecast.go on lines 239..243

                          Duplicated Code

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

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

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

                          Tuning

                          This issue has a mass of 113.

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

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

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

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

                          Refactorings

                          Further Reading

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

                          func (d *DeployManager) GetLightManagerHarness(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *lightmanagerharness.LightManagerHarnessRef) {
                              d.T().Helper()
                          
                              return manager.GetContract[*lightmanagerharness.LightManagerHarnessRef](ctx, d.T(), d, backend, LightManagerHarnessType)
                          }
                          Severity: Major
                          Found in agents/testutil/typecast.go and 23 other locations - About 45 mins to fix
                          agents/testutil/typecast.go on lines 48..52
                          agents/testutil/typecast.go on lines 56..60
                          agents/testutil/typecast.go on lines 64..68
                          agents/testutil/typecast.go on lines 72..76
                          agents/testutil/typecast.go on lines 80..84
                          agents/testutil/typecast.go on lines 88..92
                          agents/testutil/typecast.go on lines 104..108
                          agents/testutil/typecast.go on lines 112..116
                          agents/testutil/typecast.go on lines 120..124
                          agents/testutil/typecast.go on lines 128..132
                          agents/testutil/typecast.go on lines 136..140
                          agents/testutil/typecast.go on lines 144..148
                          agents/testutil/typecast.go on lines 152..156
                          agents/testutil/typecast.go on lines 160..164
                          agents/testutil/typecast.go on lines 168..172
                          agents/testutil/typecast.go on lines 176..180
                          agents/testutil/typecast.go on lines 184..188
                          agents/testutil/typecast.go on lines 192..196
                          agents/testutil/typecast.go on lines 207..211
                          agents/testutil/typecast.go on lines 215..219
                          agents/testutil/typecast.go on lines 223..227
                          agents/testutil/typecast.go on lines 231..235
                          agents/testutil/typecast.go on lines 239..243

                          Duplicated Code

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

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

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

                          Tuning

                          This issue has a mass of 113.

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

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

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

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

                          Refactorings

                          Further Reading

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

                          func (d *DeployManager) GetSummit(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *summit.SummitRef) {
                              d.T().Helper()
                          
                              return manager.GetContract[*summit.SummitRef](ctx, d.T(), d, backend, SummitType)
                          }
                          Severity: Major
                          Found in agents/testutil/typecast.go and 23 other locations - About 45 mins to fix
                          agents/testutil/typecast.go on lines 48..52
                          agents/testutil/typecast.go on lines 56..60
                          agents/testutil/typecast.go on lines 64..68
                          agents/testutil/typecast.go on lines 72..76
                          agents/testutil/typecast.go on lines 80..84
                          agents/testutil/typecast.go on lines 88..92
                          agents/testutil/typecast.go on lines 96..100
                          agents/testutil/typecast.go on lines 104..108
                          agents/testutil/typecast.go on lines 112..116
                          agents/testutil/typecast.go on lines 120..124
                          agents/testutil/typecast.go on lines 128..132
                          agents/testutil/typecast.go on lines 136..140
                          agents/testutil/typecast.go on lines 144..148
                          agents/testutil/typecast.go on lines 152..156
                          agents/testutil/typecast.go on lines 160..164
                          agents/testutil/typecast.go on lines 168..172
                          agents/testutil/typecast.go on lines 176..180
                          agents/testutil/typecast.go on lines 184..188
                          agents/testutil/typecast.go on lines 207..211
                          agents/testutil/typecast.go on lines 215..219
                          agents/testutil/typecast.go on lines 223..227
                          agents/testutil/typecast.go on lines 231..235
                          agents/testutil/typecast.go on lines 239..243

                          Duplicated Code

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

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

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

                          Tuning

                          This issue has a mass of 113.

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

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

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

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

                          Refactorings

                          Further Reading

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

                          func (d *DeployManager) GetRequestHarness(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *requestharness.RequestHarnessRef) {
                              d.T().Helper()
                          
                              return manager.GetContract[*requestharness.RequestHarnessRef](ctx, d.T(), d, backend, RequestHarnessType)
                          }
                          Severity: Major
                          Found in agents/testutil/typecast.go and 23 other locations - About 45 mins to fix
                          agents/testutil/typecast.go on lines 48..52
                          agents/testutil/typecast.go on lines 56..60
                          agents/testutil/typecast.go on lines 64..68
                          agents/testutil/typecast.go on lines 80..84
                          agents/testutil/typecast.go on lines 88..92
                          agents/testutil/typecast.go on lines 96..100
                          agents/testutil/typecast.go on lines 104..108
                          agents/testutil/typecast.go on lines 112..116
                          agents/testutil/typecast.go on lines 120..124
                          agents/testutil/typecast.go on lines 128..132
                          agents/testutil/typecast.go on lines 136..140
                          agents/testutil/typecast.go on lines 144..148
                          agents/testutil/typecast.go on lines 152..156
                          agents/testutil/typecast.go on lines 160..164
                          agents/testutil/typecast.go on lines 168..172
                          agents/testutil/typecast.go on lines 176..180
                          agents/testutil/typecast.go on lines 184..188
                          agents/testutil/typecast.go on lines 192..196
                          agents/testutil/typecast.go on lines 207..211
                          agents/testutil/typecast.go on lines 215..219
                          agents/testutil/typecast.go on lines 223..227
                          agents/testutil/typecast.go on lines 231..235
                          agents/testutil/typecast.go on lines 239..243

                          Duplicated Code

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

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

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

                          Tuning

                          This issue has a mass of 113.

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

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

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

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

                          Refactorings

                          Further Reading

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

                          func (d *DeployManager) GetLightManager(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *lightmanager.LightManagerRef) {
                              d.T().Helper()
                          
                              return manager.GetContract[*lightmanager.LightManagerRef](ctx, d.T(), d, backend, LightManagerType)
                          }
                          Severity: Major
                          Found in agents/testutil/typecast.go and 23 other locations - About 45 mins to fix
                          agents/testutil/typecast.go on lines 48..52
                          agents/testutil/typecast.go on lines 56..60
                          agents/testutil/typecast.go on lines 64..68
                          agents/testutil/typecast.go on lines 72..76
                          agents/testutil/typecast.go on lines 80..84
                          agents/testutil/typecast.go on lines 96..100
                          agents/testutil/typecast.go on lines 104..108
                          agents/testutil/typecast.go on lines 112..116
                          agents/testutil/typecast.go on lines 120..124
                          agents/testutil/typecast.go on lines 128..132
                          agents/testutil/typecast.go on lines 136..140
                          agents/testutil/typecast.go on lines 144..148
                          agents/testutil/typecast.go on lines 152..156
                          agents/testutil/typecast.go on lines 160..164
                          agents/testutil/typecast.go on lines 168..172
                          agents/testutil/typecast.go on lines 176..180
                          agents/testutil/typecast.go on lines 184..188
                          agents/testutil/typecast.go on lines 192..196
                          agents/testutil/typecast.go on lines 207..211
                          agents/testutil/typecast.go on lines 215..219
                          agents/testutil/typecast.go on lines 223..227
                          agents/testutil/typecast.go on lines 231..235
                          agents/testutil/typecast.go on lines 239..243

                          Duplicated Code

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

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

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

                          Tuning

                          This issue has a mass of 113.

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

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

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

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

                          Refactorings

                          Further Reading

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

                          func (d *DeployManager) GetStateHarness(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *stateharness.StateHarnessRef) {
                              d.T().Helper()
                          
                              return manager.GetContract[*stateharness.StateHarnessRef](ctx, d.T(), d, backend, StateHarnessType)
                          }
                          Severity: Major
                          Found in agents/testutil/typecast.go and 23 other locations - About 45 mins to fix
                          agents/testutil/typecast.go on lines 48..52
                          agents/testutil/typecast.go on lines 56..60
                          agents/testutil/typecast.go on lines 64..68
                          agents/testutil/typecast.go on lines 72..76
                          agents/testutil/typecast.go on lines 80..84
                          agents/testutil/typecast.go on lines 88..92
                          agents/testutil/typecast.go on lines 96..100
                          agents/testutil/typecast.go on lines 104..108
                          agents/testutil/typecast.go on lines 112..116
                          agents/testutil/typecast.go on lines 120..124
                          agents/testutil/typecast.go on lines 128..132
                          agents/testutil/typecast.go on lines 136..140
                          agents/testutil/typecast.go on lines 152..156
                          agents/testutil/typecast.go on lines 160..164
                          agents/testutil/typecast.go on lines 168..172
                          agents/testutil/typecast.go on lines 176..180
                          agents/testutil/typecast.go on lines 184..188
                          agents/testutil/typecast.go on lines 192..196
                          agents/testutil/typecast.go on lines 207..211
                          agents/testutil/typecast.go on lines 215..219
                          agents/testutil/typecast.go on lines 223..227
                          agents/testutil/typecast.go on lines 231..235
                          agents/testutil/typecast.go on lines 239..243

                          Duplicated Code

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

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

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

                          Tuning

                          This issue has a mass of 113.

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

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

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

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

                          Refactorings

                          Further Reading

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

                          func (d *DeployManager) GetDestinationHarness(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *destinationharness.DestinationHarnessRef) {
                              d.T().Helper()
                          
                              return manager.GetContract[*destinationharness.DestinationHarnessRef](ctx, d.T(), d, backend, DestinationHarnessType)
                          }
                          Severity: Major
                          Found in agents/testutil/typecast.go and 23 other locations - About 45 mins to fix
                          agents/testutil/typecast.go on lines 48..52
                          agents/testutil/typecast.go on lines 56..60
                          agents/testutil/typecast.go on lines 64..68
                          agents/testutil/typecast.go on lines 72..76
                          agents/testutil/typecast.go on lines 80..84
                          agents/testutil/typecast.go on lines 88..92
                          agents/testutil/typecast.go on lines 96..100
                          agents/testutil/typecast.go on lines 104..108
                          agents/testutil/typecast.go on lines 112..116
                          agents/testutil/typecast.go on lines 120..124
                          agents/testutil/typecast.go on lines 128..132
                          agents/testutil/typecast.go on lines 136..140
                          agents/testutil/typecast.go on lines 144..148
                          agents/testutil/typecast.go on lines 152..156
                          agents/testutil/typecast.go on lines 160..164
                          agents/testutil/typecast.go on lines 168..172
                          agents/testutil/typecast.go on lines 184..188
                          agents/testutil/typecast.go on lines 192..196
                          agents/testutil/typecast.go on lines 207..211
                          agents/testutil/typecast.go on lines 215..219
                          agents/testutil/typecast.go on lines 223..227
                          agents/testutil/typecast.go on lines 231..235
                          agents/testutil/typecast.go on lines 239..243

                          Duplicated Code

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

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

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

                          Tuning

                          This issue has a mass of 113.

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

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

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

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

                          Refactorings

                          Further Reading

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

                          func (d *DeployManager) GetPingPongClient(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *pingpongclient.PingPongClientRef) {
                              d.T().Helper()
                          
                              return manager.GetContract[*pingpongclient.PingPongClientRef](ctx, d.T(), d, backend, PingPongClientType)
                          }
                          Severity: Major
                          Found in agents/testutil/typecast.go and 23 other locations - About 45 mins to fix
                          agents/testutil/typecast.go on lines 48..52
                          agents/testutil/typecast.go on lines 56..60
                          agents/testutil/typecast.go on lines 64..68
                          agents/testutil/typecast.go on lines 72..76
                          agents/testutil/typecast.go on lines 80..84
                          agents/testutil/typecast.go on lines 88..92
                          agents/testutil/typecast.go on lines 96..100
                          agents/testutil/typecast.go on lines 104..108
                          agents/testutil/typecast.go on lines 112..116
                          agents/testutil/typecast.go on lines 120..124
                          agents/testutil/typecast.go on lines 128..132
                          agents/testutil/typecast.go on lines 136..140
                          agents/testutil/typecast.go on lines 144..148
                          agents/testutil/typecast.go on lines 152..156
                          agents/testutil/typecast.go on lines 160..164
                          agents/testutil/typecast.go on lines 168..172
                          agents/testutil/typecast.go on lines 176..180
                          agents/testutil/typecast.go on lines 184..188
                          agents/testutil/typecast.go on lines 192..196
                          agents/testutil/typecast.go on lines 207..211
                          agents/testutil/typecast.go on lines 215..219
                          agents/testutil/typecast.go on lines 223..227
                          agents/testutil/typecast.go on lines 231..235

                          Duplicated Code

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

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

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

                          Tuning

                          This issue has a mass of 113.

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

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

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

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

                          Refactorings

                          Further Reading

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

                          func (d *DeployManager) GetOriginHarness(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *originharness.OriginHarnessRef) {
                              d.T().Helper()
                          
                              return manager.GetContract[*originharness.OriginHarnessRef](ctx, d.T(), d, backend, OriginHarnessType)
                          }
                          Severity: Major
                          Found in agents/testutil/typecast.go and 23 other locations - About 45 mins to fix
                          agents/testutil/typecast.go on lines 48..52
                          agents/testutil/typecast.go on lines 56..60
                          agents/testutil/typecast.go on lines 64..68
                          agents/testutil/typecast.go on lines 72..76
                          agents/testutil/typecast.go on lines 80..84
                          agents/testutil/typecast.go on lines 88..92
                          agents/testutil/typecast.go on lines 96..100
                          agents/testutil/typecast.go on lines 104..108
                          agents/testutil/typecast.go on lines 112..116
                          agents/testutil/typecast.go on lines 120..124
                          agents/testutil/typecast.go on lines 136..140
                          agents/testutil/typecast.go on lines 144..148
                          agents/testutil/typecast.go on lines 152..156
                          agents/testutil/typecast.go on lines 160..164
                          agents/testutil/typecast.go on lines 168..172
                          agents/testutil/typecast.go on lines 176..180
                          agents/testutil/typecast.go on lines 184..188
                          agents/testutil/typecast.go on lines 192..196
                          agents/testutil/typecast.go on lines 207..211
                          agents/testutil/typecast.go on lines 215..219
                          agents/testutil/typecast.go on lines 223..227
                          agents/testutil/typecast.go on lines 231..235
                          agents/testutil/typecast.go on lines 239..243

                          Duplicated Code

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

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

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

                          Tuning

                          This issue has a mass of 113.

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

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

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

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

                          Refactorings

                          Further Reading

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

                          func (d *DeployManager) GetSnapshotHarness(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *snapshotharness.SnapshotHarnessRef) {
                              d.T().Helper()
                          
                              return manager.GetContract[*snapshotharness.SnapshotHarnessRef](ctx, d.T(), d, backend, SnapshotHarnessType)
                          }
                          Severity: Major
                          Found in agents/testutil/typecast.go and 23 other locations - About 45 mins to fix
                          agents/testutil/typecast.go on lines 48..52
                          agents/testutil/typecast.go on lines 56..60
                          agents/testutil/typecast.go on lines 64..68
                          agents/testutil/typecast.go on lines 72..76
                          agents/testutil/typecast.go on lines 80..84
                          agents/testutil/typecast.go on lines 88..92
                          agents/testutil/typecast.go on lines 96..100
                          agents/testutil/typecast.go on lines 104..108
                          agents/testutil/typecast.go on lines 112..116
                          agents/testutil/typecast.go on lines 120..124
                          agents/testutil/typecast.go on lines 128..132
                          agents/testutil/typecast.go on lines 136..140
                          agents/testutil/typecast.go on lines 144..148
                          agents/testutil/typecast.go on lines 160..164
                          agents/testutil/typecast.go on lines 168..172
                          agents/testutil/typecast.go on lines 176..180
                          agents/testutil/typecast.go on lines 184..188
                          agents/testutil/typecast.go on lines 192..196
                          agents/testutil/typecast.go on lines 207..211
                          agents/testutil/typecast.go on lines 215..219
                          agents/testutil/typecast.go on lines 223..227
                          agents/testutil/typecast.go on lines 231..235
                          agents/testutil/typecast.go on lines 239..243

                          Duplicated Code

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

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

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

                          Tuning

                          This issue has a mass of 113.

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

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

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

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

                          Refactorings

                          Further Reading

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

                          func (d *DeployManager) GetAttestationHarness(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *attestationharness.AttestationHarnessRef) {
                              d.T().Helper()
                          
                              return manager.GetContract[*attestationharness.AttestationHarnessRef](ctx, d.T(), d, backend, AttestationHarnessType)
                          }
                          Severity: Major
                          Found in agents/testutil/typecast.go and 23 other locations - About 45 mins to fix
                          agents/testutil/typecast.go on lines 48..52
                          agents/testutil/typecast.go on lines 56..60
                          agents/testutil/typecast.go on lines 64..68
                          agents/testutil/typecast.go on lines 72..76
                          agents/testutil/typecast.go on lines 80..84
                          agents/testutil/typecast.go on lines 88..92
                          agents/testutil/typecast.go on lines 96..100
                          agents/testutil/typecast.go on lines 104..108
                          agents/testutil/typecast.go on lines 112..116
                          agents/testutil/typecast.go on lines 120..124
                          agents/testutil/typecast.go on lines 128..132
                          agents/testutil/typecast.go on lines 136..140
                          agents/testutil/typecast.go on lines 144..148
                          agents/testutil/typecast.go on lines 152..156
                          agents/testutil/typecast.go on lines 160..164
                          agents/testutil/typecast.go on lines 176..180
                          agents/testutil/typecast.go on lines 184..188
                          agents/testutil/typecast.go on lines 192..196
                          agents/testutil/typecast.go on lines 207..211
                          agents/testutil/typecast.go on lines 215..219
                          agents/testutil/typecast.go on lines 223..227
                          agents/testutil/typecast.go on lines 231..235
                          agents/testutil/typecast.go on lines 239..243

                          Duplicated Code

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

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

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

                          Tuning

                          This issue has a mass of 113.

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

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

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

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

                          Refactorings

                          Further Reading

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

                          func (d *DeployManager) GetBondingManagerHarness(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *bondingmanagerharness.BondingManagerHarnessRef) {
                              d.T().Helper()
                          
                              return manager.GetContract[*bondingmanagerharness.BondingManagerHarnessRef](ctx, d.T(), d, backend, BondingManagerHarnessType)
                          }
                          Severity: Major
                          Found in agents/testutil/typecast.go and 23 other locations - About 45 mins to fix
                          agents/testutil/typecast.go on lines 48..52
                          agents/testutil/typecast.go on lines 56..60
                          agents/testutil/typecast.go on lines 64..68
                          agents/testutil/typecast.go on lines 72..76
                          agents/testutil/typecast.go on lines 80..84
                          agents/testutil/typecast.go on lines 88..92
                          agents/testutil/typecast.go on lines 96..100
                          agents/testutil/typecast.go on lines 104..108
                          agents/testutil/typecast.go on lines 112..116
                          agents/testutil/typecast.go on lines 128..132
                          agents/testutil/typecast.go on lines 136..140
                          agents/testutil/typecast.go on lines 144..148
                          agents/testutil/typecast.go on lines 152..156
                          agents/testutil/typecast.go on lines 160..164
                          agents/testutil/typecast.go on lines 168..172
                          agents/testutil/typecast.go on lines 176..180
                          agents/testutil/typecast.go on lines 184..188
                          agents/testutil/typecast.go on lines 192..196
                          agents/testutil/typecast.go on lines 207..211
                          agents/testutil/typecast.go on lines 215..219
                          agents/testutil/typecast.go on lines 223..227
                          agents/testutil/typecast.go on lines 231..235
                          agents/testutil/typecast.go on lines 239..243

                          Duplicated Code

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

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

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

                          Tuning

                          This issue has a mass of 113.

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

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

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

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

                          Refactorings

                          Further Reading

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

                          func (d *DeployManager) GetOrigin(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *origin.OriginRef) {
                              d.T().Helper()
                          
                              return manager.GetContract[*origin.OriginRef](ctx, d.T(), d, backend, OriginType)
                          }
                          Severity: Major
                          Found in agents/testutil/typecast.go and 23 other locations - About 45 mins to fix
                          agents/testutil/typecast.go on lines 56..60
                          agents/testutil/typecast.go on lines 64..68
                          agents/testutil/typecast.go on lines 72..76
                          agents/testutil/typecast.go on lines 80..84
                          agents/testutil/typecast.go on lines 88..92
                          agents/testutil/typecast.go on lines 96..100
                          agents/testutil/typecast.go on lines 104..108
                          agents/testutil/typecast.go on lines 112..116
                          agents/testutil/typecast.go on lines 120..124
                          agents/testutil/typecast.go on lines 128..132
                          agents/testutil/typecast.go on lines 136..140
                          agents/testutil/typecast.go on lines 144..148
                          agents/testutil/typecast.go on lines 152..156
                          agents/testutil/typecast.go on lines 160..164
                          agents/testutil/typecast.go on lines 168..172
                          agents/testutil/typecast.go on lines 176..180
                          agents/testutil/typecast.go on lines 184..188
                          agents/testutil/typecast.go on lines 192..196
                          agents/testutil/typecast.go on lines 207..211
                          agents/testutil/typecast.go on lines 215..219
                          agents/testutil/typecast.go on lines 223..227
                          agents/testutil/typecast.go on lines 231..235
                          agents/testutil/typecast.go on lines 239..243

                          Duplicated Code

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

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

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

                          Tuning

                          This issue has a mass of 113.

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

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

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

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

                          Refactorings

                          Further Reading

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

                          func (d *DeployManager) GetReceiptHarness(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *receiptharness.ReceiptHarnessRef) {
                              d.T().Helper()
                          
                              return manager.GetContract[*receiptharness.ReceiptHarnessRef](ctx, d.T(), d, backend, ReceiptHarnessType)
                          }
                          Severity: Major
                          Found in agents/testutil/typecast.go and 23 other locations - About 45 mins to fix
                          agents/testutil/typecast.go on lines 48..52
                          agents/testutil/typecast.go on lines 56..60
                          agents/testutil/typecast.go on lines 64..68
                          agents/testutil/typecast.go on lines 72..76
                          agents/testutil/typecast.go on lines 80..84
                          agents/testutil/typecast.go on lines 88..92
                          agents/testutil/typecast.go on lines 96..100
                          agents/testutil/typecast.go on lines 104..108
                          agents/testutil/typecast.go on lines 112..116
                          agents/testutil/typecast.go on lines 120..124
                          agents/testutil/typecast.go on lines 128..132
                          agents/testutil/typecast.go on lines 136..140
                          agents/testutil/typecast.go on lines 144..148
                          agents/testutil/typecast.go on lines 152..156
                          agents/testutil/typecast.go on lines 168..172
                          agents/testutil/typecast.go on lines 176..180
                          agents/testutil/typecast.go on lines 184..188
                          agents/testutil/typecast.go on lines 192..196
                          agents/testutil/typecast.go on lines 207..211
                          agents/testutil/typecast.go on lines 215..219
                          agents/testutil/typecast.go on lines 223..227
                          agents/testutil/typecast.go on lines 231..235
                          agents/testutil/typecast.go on lines 239..243

                          Duplicated Code

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

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

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

                          Tuning

                          This issue has a mass of 113.

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

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

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

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

                          Refactorings

                          Further Reading

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

                          func (d *DeployManager) GetInbox(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *inbox.InboxRef) {
                              d.T().Helper()
                          
                              return manager.GetContract[*inbox.InboxRef](ctx, d.T(), d, backend, InboxType)
                          }
                          Severity: Major
                          Found in agents/testutil/typecast.go and 23 other locations - About 45 mins to fix
                          agents/testutil/typecast.go on lines 48..52
                          agents/testutil/typecast.go on lines 56..60
                          agents/testutil/typecast.go on lines 64..68
                          agents/testutil/typecast.go on lines 72..76
                          agents/testutil/typecast.go on lines 80..84
                          agents/testutil/typecast.go on lines 88..92
                          agents/testutil/typecast.go on lines 96..100
                          agents/testutil/typecast.go on lines 112..116
                          agents/testutil/typecast.go on lines 120..124
                          agents/testutil/typecast.go on lines 128..132
                          agents/testutil/typecast.go on lines 136..140
                          agents/testutil/typecast.go on lines 144..148
                          agents/testutil/typecast.go on lines 152..156
                          agents/testutil/typecast.go on lines 160..164
                          agents/testutil/typecast.go on lines 168..172
                          agents/testutil/typecast.go on lines 176..180
                          agents/testutil/typecast.go on lines 184..188
                          agents/testutil/typecast.go on lines 192..196
                          agents/testutil/typecast.go on lines 207..211
                          agents/testutil/typecast.go on lines 215..219
                          agents/testutil/typecast.go on lines 223..227
                          agents/testutil/typecast.go on lines 231..235
                          agents/testutil/typecast.go on lines 239..243

                          Duplicated Code

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

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

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

                          Tuning

                          This issue has a mass of 113.

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

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

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

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

                          Refactorings

                          Further Reading

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

                          func (d *DeployManager) GetHeaderHarness(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *headerharness.HeaderHarnessRef) {
                              d.T().Helper()
                          
                              return manager.GetContract[*headerharness.HeaderHarnessRef](ctx, d.T(), d, backend, HeaderHarnessType)
                          }
                          Severity: Major
                          Found in agents/testutil/typecast.go and 23 other locations - About 45 mins to fix
                          agents/testutil/typecast.go on lines 48..52
                          agents/testutil/typecast.go on lines 56..60
                          agents/testutil/typecast.go on lines 64..68
                          agents/testutil/typecast.go on lines 72..76
                          agents/testutil/typecast.go on lines 80..84
                          agents/testutil/typecast.go on lines 88..92
                          agents/testutil/typecast.go on lines 96..100
                          agents/testutil/typecast.go on lines 104..108
                          agents/testutil/typecast.go on lines 112..116
                          agents/testutil/typecast.go on lines 120..124
                          agents/testutil/typecast.go on lines 128..132
                          agents/testutil/typecast.go on lines 136..140
                          agents/testutil/typecast.go on lines 144..148
                          agents/testutil/typecast.go on lines 152..156
                          agents/testutil/typecast.go on lines 160..164
                          agents/testutil/typecast.go on lines 168..172
                          agents/testutil/typecast.go on lines 176..180
                          agents/testutil/typecast.go on lines 184..188
                          agents/testutil/typecast.go on lines 192..196
                          agents/testutil/typecast.go on lines 207..211
                          agents/testutil/typecast.go on lines 223..227
                          agents/testutil/typecast.go on lines 231..235
                          agents/testutil/typecast.go on lines 239..243

                          Duplicated Code

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

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

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

                          Tuning

                          This issue has a mass of 113.

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

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

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

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

                          Refactorings

                          Further Reading

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

                          func (d *DeployManager) GetGasDataHarness(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *gasdataharness.GasDataHarnessRef) {
                              d.T().Helper()
                          
                              return manager.GetContract[*gasdataharness.GasDataHarnessRef](ctx, d.T(), d, backend, GasDataHarnessType)
                          }
                          Severity: Major
                          Found in agents/testutil/typecast.go and 23 other locations - About 45 mins to fix
                          agents/testutil/typecast.go on lines 48..52
                          agents/testutil/typecast.go on lines 56..60
                          agents/testutil/typecast.go on lines 64..68
                          agents/testutil/typecast.go on lines 72..76
                          agents/testutil/typecast.go on lines 80..84
                          agents/testutil/typecast.go on lines 88..92
                          agents/testutil/typecast.go on lines 96..100
                          agents/testutil/typecast.go on lines 104..108
                          agents/testutil/typecast.go on lines 112..116
                          agents/testutil/typecast.go on lines 120..124
                          agents/testutil/typecast.go on lines 128..132
                          agents/testutil/typecast.go on lines 144..148
                          agents/testutil/typecast.go on lines 152..156
                          agents/testutil/typecast.go on lines 160..164
                          agents/testutil/typecast.go on lines 168..172
                          agents/testutil/typecast.go on lines 176..180
                          agents/testutil/typecast.go on lines 184..188
                          agents/testutil/typecast.go on lines 192..196
                          agents/testutil/typecast.go on lines 207..211
                          agents/testutil/typecast.go on lines 215..219
                          agents/testutil/typecast.go on lines 223..227
                          agents/testutil/typecast.go on lines 231..235
                          agents/testutil/typecast.go on lines 239..243

                          Duplicated Code

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

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

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

                          Tuning

                          This issue has a mass of 113.

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

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

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

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

                          Refactorings

                          Further Reading

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

                          func (d *DeployManager) GetAgentsTestContract(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *agentstestcontract.AgentsTestContractRef) {
                              d.T().Helper()
                          
                              return manager.GetContract[*agentstestcontract.AgentsTestContractRef](ctx, d.T(), d, backend, AgentsTestContractType)
                          }
                          Severity: Major
                          Found in agents/testutil/typecast.go and 23 other locations - About 45 mins to fix
                          agents/testutil/typecast.go on lines 48..52
                          agents/testutil/typecast.go on lines 56..60
                          agents/testutil/typecast.go on lines 64..68
                          agents/testutil/typecast.go on lines 72..76
                          agents/testutil/typecast.go on lines 80..84
                          agents/testutil/typecast.go on lines 88..92
                          agents/testutil/typecast.go on lines 96..100
                          agents/testutil/typecast.go on lines 104..108
                          agents/testutil/typecast.go on lines 112..116
                          agents/testutil/typecast.go on lines 120..124
                          agents/testutil/typecast.go on lines 128..132
                          agents/testutil/typecast.go on lines 136..140
                          agents/testutil/typecast.go on lines 144..148
                          agents/testutil/typecast.go on lines 152..156
                          agents/testutil/typecast.go on lines 160..164
                          agents/testutil/typecast.go on lines 168..172
                          agents/testutil/typecast.go on lines 176..180
                          agents/testutil/typecast.go on lines 184..188
                          agents/testutil/typecast.go on lines 192..196
                          agents/testutil/typecast.go on lines 207..211
                          agents/testutil/typecast.go on lines 215..219
                          agents/testutil/typecast.go on lines 231..235
                          agents/testutil/typecast.go on lines 239..243

                          Duplicated Code

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

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

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

                          Tuning

                          This issue has a mass of 113.

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

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

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

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

                          Refactorings

                          Further Reading

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

                          func (d *DeployManager) GetDestination(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *destination.DestinationRef) {
                              d.T().Helper()
                          
                              return manager.GetContract[*destination.DestinationRef](ctx, d.T(), d, backend, DestinationType)
                          }
                          Severity: Major
                          Found in agents/testutil/typecast.go and 29 other locations - About 40 mins to fix
                          services/cctp-relayer/testutil/typecast.go on lines 17..21
                          services/cctp-relayer/testutil/typecast.go on lines 24..28
                          services/cctp-relayer/testutil/typecast.go on lines 31..35
                          services/cctp-relayer/testutil/typecast.go on lines 38..42
                          services/cctp-relayer/testutil/typecast.go on lines 45..49
                          services/explorer/testutil/testcontracts/typecast.go on lines 28..32
                          services/explorer/testutil/testcontracts/typecast.go on lines 35..39
                          services/explorer/testutil/testcontracts/typecast.go on lines 42..46
                          services/explorer/testutil/testcontracts/typecast.go on lines 49..53
                          services/explorer/testutil/testcontracts/typecast.go on lines 56..60
                          services/explorer/testutil/testcontracts/typecast.go on lines 63..67
                          services/explorer/testutil/testcontracts/typecast.go on lines 70..74
                          services/explorer/testutil/typecast.go on lines 20..24
                          services/explorer/testutil/typecast.go on lines 27..31
                          services/explorer/testutil/typecast.go on lines 34..38
                          services/explorer/testutil/typecast.go on lines 41..45
                          services/explorer/testutil/typecast.go on lines 48..52
                          services/explorer/testutil/typecast.go on lines 55..59
                          services/explorer/testutil/typecast.go on lines 62..66
                          services/explorer/testutil/typecast.go on lines 69..73
                          services/rfq/testutil/typecast.go on lines 19..23
                          services/rfq/testutil/typecast.go on lines 26..30
                          services/rfq/testutil/typecast.go on lines 33..37
                          services/rfq/testutil/typecast.go on lines 40..44
                          services/rfq/testutil/typecast.go on lines 47..51
                          services/rfq/testutil/typecast.go on lines 54..58
                          services/rfq/testutil/typecast.go on lines 61..65
                          ethergo/examples/contracttests/deploymanager.go on lines 26..30
                          services/scribe/testutil/typecast.go on lines 13..17

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

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

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

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

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

                          Refactorings

                          Further Reading

                          There are no issues that match your filters.

                          Category
                          Status