trufflesuite/truffle

View on GitHub
packages/decoder/lib/decoders.ts

Summary

Maintainability
F
3 wks
Test Coverage

File decoders.ts has 1877 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import debugModule from "debug";
const debug = debugModule("decoder:decoders");

import * as Abi from "@truffle/abi-utils";
import * as Codec from "@truffle/codec";
Severity: Major
Found in packages/decoder/lib/decoders.ts - About 5 days to fix

    Function init has 126 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      public async init(): Promise<void> {
        this.contractCode = Conversion.toHexString(
          await this.getCode(
            this.contractAddress,
            await this.providerAdapter.getBlockNumber() //not "latest" because regularized
    Severity: Major
    Found in packages/decoder/lib/decoders.ts - About 5 hrs to fix

      ProjectDecoder has 35 functions (exceeds 20 allowed). Consider refactoring.
      Open

      export class ProjectDecoder {
        private providerAdapter: ProviderAdapter;
      
        private compilations: Compilations.Compilation[];
        private contexts: Contexts.Contexts = {}; //all contexts
      Severity: Minor
      Found in packages/decoder/lib/decoders.ts - About 4 hrs to fix

        Function constructSlot has 97 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          private async constructSlot(
            variable: number | string,
            ...indices: unknown[]
          ): Promise<{ slot?: Storage.Slot; type?: Format.Types.Type }> {
            //base case: we need to locate the variable and its definition
        Severity: Major
        Found in packages/decoder/lib/decoders.ts - About 3 hrs to fix

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

            public async decodeTransactionWithAdditionalContexts(
              transaction: DecoderTypes.Transaction,
              additionalContexts: Contexts.Contexts = {},
              additionalAllocations?: {
                [
          Severity: Major
          Found in packages/decoder/lib/decoders.ts - About 3 hrs to fix

            Function interpretAggregate has 85 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              private async interpretAggregate(
                decoding: Codec.CalldataDecoding,
                transaction: DecoderTypes.Transaction,
                additionalContexts: Contexts.Contexts = {},
                additionalAllocations?: {
            Severity: Major
            Found in packages/decoder/lib/decoders.ts - About 3 hrs to fix

              Function addCompilations has 74 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                public async addCompilations(
                  compilations: Compilations.Compilation[]
                ): Promise<void> {
                  //first: make sure we're not adding a compilation with an existing ID
                  const existingIds = new Set(
              Severity: Major
              Found in packages/decoder/lib/decoders.ts - About 2 hrs to fix

                Function interpretCallInAggregate has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                Open

                  private async interpretCallInAggregate(
                    callResult: Format.Values.StructResult | Format.Values.TupleResult,
                    transaction: DecoderTypes.Transaction,
                    additionalContexts: Contexts.Contexts = {},
                    additionalAllocations?: {
                Severity: Minor
                Found in packages/decoder/lib/decoders.ts - About 2 hrs to fix

                Cognitive Complexity

                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                A method's cognitive complexity is based on a few simple rules:

                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                • Code is considered more complex for each "break in the linear flow of the code"
                • Code is considered more complex when "flow breaking structures are nested"

                Further reading

                Function constructor has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  constructor(
                    compilations: Compilations.Compilation[],
                    provider: Provider,
                    ensSettings?: DecoderTypes.EnsSettings,
                    selectorDirectory?: DecoderTypes.SelectorDirectorySettings
                Severity: Major
                Found in packages/decoder/lib/decoders.ts - About 2 hrs to fix

                  Function decodeTransactionBySelector has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    private async decodeTransactionBySelector(
                      transaction: DecoderTypes.Transaction,
                      data: Uint8Array, //this is redundant but included for convenience
                      additionalContexts: Contexts.Contexts,
                      context: Contexts.Context | null
                  Severity: Major
                  Found in packages/decoder/lib/decoders.ts - About 2 hrs to fix

                    ContractInstanceDecoder has 23 functions (exceeds 20 allowed). Consider refactoring.
                    Open

                    export class ContractInstanceDecoder {
                      private providerAdapter: ProviderAdapter;
                    
                      private compilation: Compilations.Compilation;
                      private contract: Compilations.Contract;
                    Severity: Minor
                    Found in packages/decoder/lib/decoders.ts - About 2 hrs to fix

                      Function constructor has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        constructor(
                          contract: Compilations.Contract,
                          compilation: Compilations.Compilation,
                          projectDecoder: ProjectDecoder,
                          artifact?: Artifact
                      Severity: Major
                      Found in packages/decoder/lib/decoders.ts - About 2 hrs to fix

                        Consider simplifying this complex logical expression.
                        Open

                            if (
                              decoding.kind === "function" &&
                              (decoding.abi.name === "tryAggregate" ||
                                decoding.abi.name === "tryBlockAndAggregate") &&
                              decoding.abi.inputs.length === 2 &&
                        Severity: Critical
                        Found in packages/decoder/lib/decoders.ts - About 2 hrs to fix

                          Function constructSlot has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                          Open

                            private async constructSlot(
                              variable: number | string,
                              ...indices: unknown[]
                            ): Promise<{ slot?: Storage.Slot; type?: Format.Types.Type }> {
                              //base case: we need to locate the variable and its definition
                          Severity: Minor
                          Found in packages/decoder/lib/decoders.ts - About 2 hrs to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Function init has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                          Open

                            public async init(): Promise<void> {
                              this.contractCode = Conversion.toHexString(
                                await this.getCode(
                                  this.contractAddress,
                                  await this.providerAdapter.getBlockNumber() //not "latest" because regularized
                          Severity: Minor
                          Found in packages/decoder/lib/decoders.ts - About 2 hrs to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Function interpretCallInAggregate has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            private async interpretCallInAggregate(
                              callResult: Format.Values.StructResult | Format.Values.TupleResult,
                              transaction: DecoderTypes.Transaction,
                              additionalContexts: Contexts.Contexts = {},
                              additionalAllocations?: {
                          Severity: Major
                          Found in packages/decoder/lib/decoders.ts - About 2 hrs to fix

                            Function decodeVariable has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              private async decodeVariable(
                                variable: Storage.Allocate.StateVariableAllocation,
                                block: RegularizedBlockSpecifier
                              ): Promise<DecoderTypes.StateVariable> {
                                const info: Codec.Evm.EvmInfo = {
                            Severity: Major
                            Found in packages/decoder/lib/decoders.ts - About 2 hrs to fix

                              Consider simplifying this complex logical expression.
                              Open

                                  } else if (
                                    decoding.kind === "function" &&
                                    decoding.abi.name === "aggregate3Value" &&
                                    decoding.abi.inputs.length === 1 &&
                                    decoding.abi.inputs[0].type === "tuple[]" &&
                              Severity: Critical
                              Found in packages/decoder/lib/decoders.ts - About 2 hrs to fix

                                Function withMulticallInterpretations has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  private async withMulticallInterpretations(
                                    decoding: FunctionDecoding,
                                    transaction: DecoderTypes.Transaction,
                                    additionalContexts: Contexts.Contexts = {},
                                    additionalAllocations?: {
                                Severity: Minor
                                Found in packages/decoder/lib/decoders.ts - About 1 hr to fix

                                  Function decodeReturnValueWithAdditionalContexts has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    public async decodeReturnValueWithAdditionalContexts(
                                      abi: Abi.FunctionEntry,
                                      data: string,
                                      options: DecoderTypes.ReturnOptions = {},
                                      additionalContexts: Contexts.Contexts = {}
                                  Severity: Minor
                                  Found in packages/decoder/lib/decoders.ts - About 1 hr to fix

                                    Consider simplifying this complex logical expression.
                                    Open

                                        if (
                                          decoding.kind === "function" &&
                                          (decoding.abi.name === "aggregate" ||
                                            decoding.abi.name === "blockAndAggregate") &&
                                          decoding.abi.inputs.length === 1 &&
                                    Severity: Critical
                                    Found in packages/decoder/lib/decoders.ts - About 1 hr to fix

                                      Consider simplifying this complex logical expression.
                                      Open

                                          } else if (
                                            decoding.kind === "function" &&
                                            decoding.abi.name === "aggregate3" &&
                                            decoding.abi.inputs.length === 1 &&
                                            decoding.abi.inputs[0].type === "tuple[]" &&
                                      Severity: Critical
                                      Found in packages/decoder/lib/decoders.ts - About 1 hr to fix

                                        Function decodeTransactionWithAdditionalContexts has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                                        Open

                                          public async decodeTransactionWithAdditionalContexts(
                                            transaction: DecoderTypes.Transaction,
                                            additionalContexts: Contexts.Contexts = {},
                                            additionalAllocations?: {
                                              [
                                        Severity: Minor
                                        Found in packages/decoder/lib/decoders.ts - About 1 hr to fix

                                        Cognitive Complexity

                                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                        A method's cognitive complexity is based on a few simple rules:

                                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                        • Code is considered more complex for each "break in the linear flow of the code"
                                        • Code is considered more complex when "flow breaking structures are nested"

                                        Further reading

                                        Function decodeTransactionBySelector has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                                        Open

                                          private async decodeTransactionBySelector(
                                            transaction: DecoderTypes.Transaction,
                                            data: Uint8Array, //this is redundant but included for convenience
                                            additionalContexts: Contexts.Contexts,
                                            context: Contexts.Context | null
                                        Severity: Minor
                                        Found in packages/decoder/lib/decoders.ts - About 1 hr to fix

                                        Cognitive Complexity

                                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                        A method's cognitive complexity is based on a few simple rules:

                                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                        • Code is considered more complex for each "break in the linear flow of the code"
                                        • Code is considered more complex when "flow breaking structures are nested"

                                        Further reading

                                        Function interpretTryAggregate has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                          private async interpretTryAggregate(
                                            decoding: Codec.CalldataDecoding,
                                            transaction: DecoderTypes.Transaction,
                                            additionalContexts: Contexts.Contexts = {},
                                            additionalAllocations?: {
                                        Severity: Minor
                                        Found in packages/decoder/lib/decoders.ts - About 1 hr to fix

                                          Function interpretDeadlinedMulticall has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                            private async interpretDeadlinedMulticall(
                                              decoding: Codec.CalldataDecoding,
                                              transaction: DecoderTypes.Transaction,
                                              additionalContexts: Contexts.Contexts = {},
                                              additionalAllocations?: {
                                          Severity: Minor
                                          Found in packages/decoder/lib/decoders.ts - About 1 hr to fix

                                            Function decodeLogWithAdditionalOptions has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                            Open

                                              public async decodeLogWithAdditionalOptions(
                                                log: DecoderTypes.Log,
                                                options: DecoderTypes.EventOptions = {},
                                                additionalContexts: Contexts.Contexts = {}
                                              ): Promise<LogDecoding[]> {
                                            Severity: Minor
                                            Found in packages/decoder/lib/decoders.ts - About 1 hr to fix

                                              Function reverseEnsResolve has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                              Open

                                                public async reverseEnsResolve(address: string): Promise<Uint8Array | null> {
                                                  debug("reverse resolving %s", address);
                                                  if (this.ens === null) {
                                                    debug("no ens set up!");
                                                    return null;
                                              Severity: Minor
                                              Found in packages/decoder/lib/decoders.ts - About 1 hr to fix

                                                Function interpretBlockhashedMulticall has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                                Open

                                                  private async interpretBlockhashedMulticall(
                                                    decoding: Codec.CalldataDecoding,
                                                    transaction: DecoderTypes.Transaction,
                                                    additionalContexts: Contexts.Contexts = {},
                                                    additionalAllocations?: {
                                                Severity: Minor
                                                Found in packages/decoder/lib/decoders.ts - About 1 hr to fix

                                                  Function eventsWithAdditionalContexts has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                                  Open

                                                    public async eventsWithAdditionalContexts(
                                                      options: DecoderTypes.EventOptions = {},
                                                      additionalContexts: Contexts.Contexts = {}
                                                    ): Promise<DecoderTypes.DecodedLog[]> {
                                                      let { address, name, fromBlock, toBlock } = options;
                                                  Severity: Minor
                                                  Found in packages/decoder/lib/decoders.ts - About 1 hr to fix

                                                    Function forAddress has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                    Open

                                                      public async forAddress(
                                                        address: string,
                                                        block: BlockSpecifier = "latest"
                                                      ): Promise<ContractInstanceDecoder> {
                                                        if (!Web3Utils.isAddress(address)) {
                                                    Severity: Minor
                                                    Found in packages/decoder/lib/decoders.ts - About 1 hr to fix

                                                      Function constructor has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                      Open

                                                        constructor(contractDecoder: ContractDecoder, address?: string) {
                                                          this.contractDecoder = contractDecoder;
                                                          this.projectDecoder = this.contractDecoder.getProjectDecoder();
                                                          this.providerAdapter = this.projectDecoder.getProviderAdapter();
                                                          if (address !== undefined) {
                                                      Severity: Minor
                                                      Found in packages/decoder/lib/decoders.ts - About 1 hr to fix

                                                        Function init has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                        Open

                                                          public async init(): Promise<void> {
                                                            debug("initting!");
                                                            const { provider, registryAddress } = this.ensSettings;
                                                            if (provider) {
                                                              debug("provider given!");
                                                        Severity: Minor
                                                        Found in packages/decoder/lib/decoders.ts - About 1 hr to fix

                                                          Consider simplifying this complex logical expression.
                                                          Open

                                                              if (
                                                                decoding.kind === "function" &&
                                                                decoding.abi.name === "multicall" &&
                                                                decoding.abi.inputs.length === 2 &&
                                                                decoding.abi.inputs[0].type === "bytes32" &&
                                                          Severity: Major
                                                          Found in packages/decoder/lib/decoders.ts - About 1 hr to fix

                                                            Consider simplifying this complex logical expression.
                                                            Open

                                                                if (
                                                                  decoding.kind === "function" &&
                                                                  decoding.abi.name === "multicall" &&
                                                                  decoding.abi.inputs.length === 2 &&
                                                                  decoding.abi.inputs[0].type === "uint256" &&
                                                            Severity: Major
                                                            Found in packages/decoder/lib/decoders.ts - About 1 hr to fix

                                                              Function reverseEnsResolve has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                                              Open

                                                                public async reverseEnsResolve(address: string): Promise<Uint8Array | null> {
                                                                  debug("reverse resolving %s", address);
                                                                  if (this.ens === null) {
                                                                    debug("no ens set up!");
                                                                    return null;
                                                              Severity: Minor
                                                              Found in packages/decoder/lib/decoders.ts - About 55 mins to fix

                                                              Cognitive Complexity

                                                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                              A method's cognitive complexity is based on a few simple rules:

                                                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                              • Code is considered more complex for each "break in the linear flow of the code"
                                                              • Code is considered more complex when "flow breaking structures are nested"

                                                              Further reading

                                                              Function init has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                                              Open

                                                                public async init(): Promise<void> {
                                                                  debug("initting!");
                                                                  const { provider, registryAddress } = this.ensSettings;
                                                                  if (provider) {
                                                                    debug("provider given!");
                                                              Severity: Minor
                                                              Found in packages/decoder/lib/decoders.ts - About 55 mins to fix

                                                              Cognitive Complexity

                                                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                              A method's cognitive complexity is based on a few simple rules:

                                                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                              • Code is considered more complex for each "break in the linear flow of the code"
                                                              • Code is considered more complex when "flow breaking structures are nested"

                                                              Further reading

                                                              Consider simplifying this complex logical expression.
                                                              Open

                                                                  if (
                                                                    !this.compilation.unreliableSourceOrder &&
                                                                    !viaIR &&
                                                                    this.contract.deployedSourceMap &&
                                                                    compiler.name === "solc" &&
                                                              Severity: Major
                                                              Found in packages/decoder/lib/decoders.ts - About 40 mins to fix

                                                                Function constructor has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                Open

                                                                  constructor(
                                                                    contract: Compilations.Contract,
                                                                    compilation: Compilations.Compilation,
                                                                    projectDecoder: ProjectDecoder,
                                                                    artifact?: Artifact
                                                                Severity: Minor
                                                                Found in packages/decoder/lib/decoders.ts - About 35 mins to fix

                                                                Cognitive Complexity

                                                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                A method's cognitive complexity is based on a few simple rules:

                                                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                • Code is considered more complex for each "break in the linear flow of the code"
                                                                • Code is considered more complex when "flow breaking structures are nested"

                                                                Further reading

                                                                Avoid too many return statements within this function.
                                                                Open

                                                                    return { slot, type: dataType };
                                                                Severity: Major
                                                                Found in packages/decoder/lib/decoders.ts - About 30 mins to fix

                                                                  Function decodeReturnValueWithAdditionalContexts has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                  Open

                                                                    public async decodeReturnValueWithAdditionalContexts(
                                                                      abi: Abi.FunctionEntry,
                                                                      data: string,
                                                                      options: DecoderTypes.ReturnOptions = {},
                                                                      additionalContexts: Contexts.Contexts = {}
                                                                  Severity: Minor
                                                                  Found in packages/decoder/lib/decoders.ts - About 25 mins to fix

                                                                  Cognitive Complexity

                                                                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                  A method's cognitive complexity is based on a few simple rules:

                                                                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                  • Code is considered more complex for each "break in the linear flow of the code"
                                                                  • Code is considered more complex when "flow breaking structures are nested"

                                                                  Further reading

                                                                  Function interpretAggregate has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                  Open

                                                                    private async interpretAggregate(
                                                                      decoding: Codec.CalldataDecoding,
                                                                      transaction: DecoderTypes.Transaction,
                                                                      additionalContexts: Contexts.Contexts = {},
                                                                      additionalAllocations?: {
                                                                  Severity: Minor
                                                                  Found in packages/decoder/lib/decoders.ts - About 25 mins to fix

                                                                  Cognitive Complexity

                                                                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                  A method's cognitive complexity is based on a few simple rules:

                                                                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                  • Code is considered more complex for each "break in the linear flow of the code"
                                                                  • Code is considered more complex when "flow breaking structures are nested"

                                                                  Further reading

                                                                  Function unwatchMappingKey has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                  Open

                                                                    public async unwatchMappingKey(
                                                                      variable: number | string,
                                                                      ...indices: unknown[]
                                                                    ): Promise<void> {
                                                                      this.checkAllocationSuccess();
                                                                  Severity: Minor
                                                                  Found in packages/decoder/lib/decoders.ts - About 25 mins to fix

                                                                  Cognitive Complexity

                                                                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                  A method's cognitive complexity is based on a few simple rules:

                                                                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                  • Code is considered more complex for each "break in the linear flow of the code"
                                                                  • Code is considered more complex when "flow breaking structures are nested"

                                                                  Further reading

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

                                                                        decoding.kind === "function" &&
                                                                        decoding.abi.name === "aggregate3Value" &&
                                                                        decoding.abi.inputs.length === 1 &&
                                                                        decoding.abi.inputs[0].type === "tuple[]" &&
                                                                        decoding.abi.inputs[0].components.length === 4 &&
                                                                  Severity: Major
                                                                  Found in packages/decoder/lib/decoders.ts and 1 other location - About 7 hrs to fix
                                                                  packages/decoder/lib/decoders.ts on lines 1100..1108

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

                                                                  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

                                                                        decoding.kind === "function" &&
                                                                        decoding.abi.name === "aggregate3" &&
                                                                        decoding.abi.inputs.length === 1 &&
                                                                        decoding.abi.inputs[0].type === "tuple[]" &&
                                                                        decoding.abi.inputs[0].components.length === 3 &&
                                                                  Severity: Major
                                                                  Found in packages/decoder/lib/decoders.ts and 1 other location - About 7 hrs to fix
                                                                  packages/decoder/lib/decoders.ts on lines 1128..1136

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

                                                                  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

                                                                      if (
                                                                        decoding.kind === "function" &&
                                                                        decoding.abi.name === "multicall" &&
                                                                        decoding.abi.inputs.length === 2 &&
                                                                        decoding.abi.inputs[0].type === "bytes32" &&
                                                                  Severity: Major
                                                                  Found in packages/decoder/lib/decoders.ts and 1 other location - About 5 hrs to fix
                                                                  packages/decoder/lib/decoders.ts on lines 1293..1323

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

                                                                  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

                                                                      if (
                                                                        decoding.kind === "function" &&
                                                                        decoding.abi.name === "multicall" &&
                                                                        decoding.abi.inputs.length === 2 &&
                                                                        decoding.abi.inputs[0].type === "uint256" &&
                                                                  Severity: Major
                                                                  Found in packages/decoder/lib/decoders.ts and 1 other location - About 5 hrs to fix
                                                                  packages/decoder/lib/decoders.ts on lines 1337..1367

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

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                      while (result.done === false) {
                                                                        let request = result.value;
                                                                        let response: Uint8Array;
                                                                        switch (request.type) {
                                                                          case "code":
                                                                  Severity: Major
                                                                  Found in packages/decoder/lib/decoders.ts and 2 other locations - About 4 hrs to fix
                                                                  packages/decoder/lib/decoders.ts on lines 636..649
                                                                  packages/decoder/lib/decoders.ts on lines 1673..1686

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 117.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                      while (result.done === false) {
                                                                        let request = result.value;
                                                                        let response: Uint8Array;
                                                                        switch (request.type) {
                                                                          case "code":
                                                                  Severity: Major
                                                                  Found in packages/decoder/lib/decoders.ts and 2 other locations - About 4 hrs to fix
                                                                  packages/decoder/lib/decoders.ts on lines 521..534
                                                                  packages/decoder/lib/decoders.ts on lines 1673..1686

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 117.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                      while (result.done === false) {
                                                                        let request = result.value;
                                                                        let response: Uint8Array;
                                                                        switch (request.type) {
                                                                          case "code":
                                                                  Severity: Major
                                                                  Found in packages/decoder/lib/decoders.ts and 2 other locations - About 4 hrs to fix
                                                                  packages/decoder/lib/decoders.ts on lines 521..534
                                                                  packages/decoder/lib/decoders.ts on lines 636..649

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 117.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                      } else if (
                                                                        decoding.kind === "function" &&
                                                                        decoding.abi.name === "aggregate3" &&
                                                                        decoding.abi.inputs.length === 1 &&
                                                                        decoding.abi.inputs[0].type === "tuple[]" &&
                                                                  Severity: Major
                                                                  Found in packages/decoder/lib/decoders.ts and 2 other locations - About 3 hrs to fix
                                                                  packages/decoder/lib/decoders.ts on lines 1071..1158
                                                                  packages/decoder/lib/decoders.ts on lines 1127..1158

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

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                      } else if (
                                                                        decoding.kind === "function" &&
                                                                        decoding.abi.name === "aggregate3Value" &&
                                                                        decoding.abi.inputs.length === 1 &&
                                                                        decoding.abi.inputs[0].type === "tuple[]" &&
                                                                  Severity: Major
                                                                  Found in packages/decoder/lib/decoders.ts and 2 other locations - About 3 hrs to fix
                                                                  packages/decoder/lib/decoders.ts on lines 1071..1158
                                                                  packages/decoder/lib/decoders.ts on lines 1099..1158

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

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                      if (
                                                                        decoding.kind === "function" &&
                                                                        (decoding.abi.name === "aggregate" ||
                                                                          decoding.abi.name === "blockAndAggregate") &&
                                                                        decoding.abi.inputs.length === 1 &&
                                                                  Severity: Major
                                                                  Found in packages/decoder/lib/decoders.ts and 2 other locations - About 3 hrs to fix
                                                                  packages/decoder/lib/decoders.ts on lines 1099..1158
                                                                  packages/decoder/lib/decoders.ts on lines 1127..1158

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

                                                                  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

                                                                        decoding.kind === "function" &&
                                                                        (decoding.abi.name === "aggregate" ||
                                                                          decoding.abi.name === "blockAndAggregate") &&
                                                                        decoding.abi.inputs.length === 1 &&
                                                                        decoding.abi.inputs[0].type === "tuple[]" &&
                                                                  Severity: Major
                                                                  Found in packages/decoder/lib/decoders.ts and 1 other location - About 2 hrs to fix
                                                                  packages/decoder/lib/decoders.ts on lines 1242..1247

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

                                                                  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

                                                                        decoding.kind === "function" &&
                                                                        (decoding.abi.name === "tryAggregate" ||
                                                                          decoding.abi.name === "tryBlockAndAggregate") &&
                                                                        decoding.abi.inputs.length === 2 &&
                                                                        decoding.abi.inputs[0].type === "bool" &&
                                                                  Severity: Major
                                                                  Found in packages/decoder/lib/decoders.ts and 1 other location - About 2 hrs to fix
                                                                  packages/decoder/lib/decoders.ts on lines 1072..1077

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

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                    private async interpretMulticall(
                                                                      decoding: Codec.CalldataDecoding,
                                                                      transaction: DecoderTypes.Transaction,
                                                                      additionalContexts: Contexts.Contexts = {},
                                                                      additionalAllocations?: {
                                                                  Severity: Major
                                                                  Found in packages/decoder/lib/decoders.ts and 4 other locations - About 2 hrs to fix
                                                                  packages/decoder/lib/decoders.ts on lines 1060..1159
                                                                  packages/decoder/lib/decoders.ts on lines 1230..1280
                                                                  packages/decoder/lib/decoders.ts on lines 1282..1324
                                                                  packages/decoder/lib/decoders.ts on lines 1326..1368

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

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                    private async interpretDeadlinedMulticall(
                                                                      decoding: Codec.CalldataDecoding,
                                                                      transaction: DecoderTypes.Transaction,
                                                                      additionalContexts: Contexts.Contexts = {},
                                                                      additionalAllocations?: {
                                                                  Severity: Major
                                                                  Found in packages/decoder/lib/decoders.ts and 4 other locations - About 2 hrs to fix
                                                                  packages/decoder/lib/decoders.ts on lines 998..1034
                                                                  packages/decoder/lib/decoders.ts on lines 1060..1159
                                                                  packages/decoder/lib/decoders.ts on lines 1230..1280
                                                                  packages/decoder/lib/decoders.ts on lines 1326..1368

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

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                    private async interpretAggregate(
                                                                      decoding: Codec.CalldataDecoding,
                                                                      transaction: DecoderTypes.Transaction,
                                                                      additionalContexts: Contexts.Contexts = {},
                                                                      additionalAllocations?: {
                                                                  Severity: Major
                                                                  Found in packages/decoder/lib/decoders.ts and 4 other locations - About 2 hrs to fix
                                                                  packages/decoder/lib/decoders.ts on lines 998..1034
                                                                  packages/decoder/lib/decoders.ts on lines 1230..1280
                                                                  packages/decoder/lib/decoders.ts on lines 1282..1324
                                                                  packages/decoder/lib/decoders.ts on lines 1326..1368

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

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                    private async interpretBlockhashedMulticall(
                                                                      decoding: Codec.CalldataDecoding,
                                                                      transaction: DecoderTypes.Transaction,
                                                                      additionalContexts: Contexts.Contexts = {},
                                                                      additionalAllocations?: {
                                                                  Severity: Major
                                                                  Found in packages/decoder/lib/decoders.ts and 4 other locations - About 2 hrs to fix
                                                                  packages/decoder/lib/decoders.ts on lines 998..1034
                                                                  packages/decoder/lib/decoders.ts on lines 1060..1159
                                                                  packages/decoder/lib/decoders.ts on lines 1230..1280
                                                                  packages/decoder/lib/decoders.ts on lines 1282..1324

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

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                    private async interpretTryAggregate(
                                                                      decoding: Codec.CalldataDecoding,
                                                                      transaction: DecoderTypes.Transaction,
                                                                      additionalContexts: Contexts.Contexts = {},
                                                                      additionalAllocations?: {
                                                                  Severity: Major
                                                                  Found in packages/decoder/lib/decoders.ts and 4 other locations - About 2 hrs to fix
                                                                  packages/decoder/lib/decoders.ts on lines 998..1034
                                                                  packages/decoder/lib/decoders.ts on lines 1060..1159
                                                                  packages/decoder/lib/decoders.ts on lines 1282..1324
                                                                  packages/decoder/lib/decoders.ts on lines 1326..1368

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

                                                                  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

                                                                    public async forInstance(
                                                                      artifact: Artifact,
                                                                      address?: string
                                                                    ): Promise<ContractInstanceDecoder> {
                                                                      let contractDecoder = await this.forArtifact(artifact);
                                                                  Severity: Major
                                                                  Found in packages/decoder/lib/decoders.ts and 1 other location - About 1 hr to fix
                                                                  packages/encoder/lib/encoders.ts on lines 577..583

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

                                                                  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

                                                                    public getContractInfo(): DecoderTypes.ContractInfo {
                                                                      return {
                                                                        compilation: this.compilation,
                                                                        contract: this.contract,
                                                                        artifact: this.artifact,
                                                                  Severity: Major
                                                                  Found in packages/decoder/lib/decoders.ts and 1 other location - About 1 hr to fix
                                                                  packages/migrate/src/Migration.ts on lines 262..271

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

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                        const calls = await Promise.all(
                                                                          decodedArray.value.map(
                                                                            async callResult =>
                                                                              await this.interpretCallInMulti(
                                                                                callResult as Format.Values.BytesResult,
                                                                  Severity: Major
                                                                  Found in packages/decoder/lib/decoders.ts and 1 other location - About 1 hr to fix
                                                                  packages/decoder/lib/decoders.ts on lines 1352..1363

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

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                        const calls = await Promise.all(
                                                                          decodedArray.value.map(
                                                                            async callResult =>
                                                                              await this.interpretCallInMulti(
                                                                                callResult as Format.Values.BytesResult,
                                                                  Severity: Major
                                                                  Found in packages/decoder/lib/decoders.ts and 1 other location - About 1 hr to fix
                                                                  packages/decoder/lib/decoders.ts on lines 1308..1319

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

                                                                  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

                                                                          case "address":
                                                                            if (subResult.kind === "error") {
                                                                              address = null;
                                                                            } else {
                                                                              address = (subResult as Format.Values.AddressValue).value.asAddress;
                                                                  Severity: Major
                                                                  Found in packages/decoder/lib/decoders.ts and 1 other location - About 1 hr to fix
                                                                  packages/decoder/lib/decoders.ts on lines 1193..1200

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

                                                                  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

                                                                          case "bool":
                                                                            if (subResult.kind === "error") {
                                                                              allowFailure = null;
                                                                            } else {
                                                                              allowFailure = (subResult as Format.Values.BoolValue).value
                                                                  Severity: Major
                                                                  Found in packages/decoder/lib/decoders.ts and 1 other location - About 1 hr to fix
                                                                  packages/decoder/lib/decoders.ts on lines 1186..1192

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

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                    private async getCode(
                                                                      address: string,
                                                                      block: RegularizedBlockSpecifier
                                                                    ): Promise<Uint8Array> {
                                                                      return await this.projectDecoder.getCode(address, block);
                                                                  Severity: Minor
                                                                  Found in packages/decoder/lib/decoders.ts and 1 other location - About 45 mins to fix
                                                                  packages/decoder/lib/decoders.ts on lines 2355..2360

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

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                    private async getCode(
                                                                      address: string,
                                                                      block: RegularizedBlockSpecifier
                                                                    ): Promise<Uint8Array> {
                                                                      return await this.projectDecoder.getCode(address, block);
                                                                  Severity: Minor
                                                                  Found in packages/decoder/lib/decoders.ts and 1 other location - About 45 mins to fix
                                                                  packages/decoder/lib/decoders.ts on lines 1704..1709

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

                                                                  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

                                                                    public async decodeTransaction(
                                                                      transaction: DecoderTypes.Transaction
                                                                    ): Promise<CalldataDecoding> {
                                                                      return await this.decodeTransactionWithAdditionalContexts(transaction);
                                                                    }
                                                                  Severity: Minor
                                                                  Found in packages/decoder/lib/decoders.ts and 1 other location - About 40 mins to fix
                                                                  packages/encoder/lib/encoders.ts on lines 554..558

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

                                                                  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

                                                                    private async regularizeBlock(
                                                                      block: BlockSpecifier
                                                                    ): Promise<RegularizedBlockSpecifier> {
                                                                      return await this.projectDecoder.regularizeBlock(block);
                                                                    }
                                                                  Severity: Minor
                                                                  Found in packages/decoder/lib/decoders.ts and 1 other location - About 35 mins to fix
                                                                  packages/decoder/lib/decoders.ts on lines 2366..2370

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

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                      this.allocations.state = Storage.Allocate.getStateAllocations(
                                                                        allocationInfo,
                                                                        this.referenceDeclarations,
                                                                        this.userDefinedTypes,
                                                                        this.allocations.storage
                                                                  Severity: Minor
                                                                  Found in packages/decoder/lib/decoders.ts and 2 other locations - About 35 mins to fix
                                                                  packages/decoder/lib/decoders.ts on lines 140..145
                                                                  packages/decoder/lib/decoders.ts on lines 146..151

                                                                  Duplicated Code

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

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

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

                                                                  Tuning

                                                                  This issue has a mass of 46.

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                      this.allocations.event = AbiData.Allocate.getEventAllocations(
                                                                        allocationInfo,
                                                                        this.referenceDeclarations,
                                                                        this.userDefinedTypes,
                                                                        this.allocations.abi
                                                                  Severity: Minor
                                                                  Found in packages/decoder/lib/decoders.ts and 2 other locations - About 35 mins to fix
                                                                  packages/decoder/lib/decoders.ts on lines 140..145
                                                                  packages/decoder/lib/decoders.ts on lines 152..157

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

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                      this.allocations.returndata = AbiData.Allocate.getReturndataAllocations(
                                                                        allocationInfo,
                                                                        this.referenceDeclarations,
                                                                        this.userDefinedTypes,
                                                                        this.allocations.abi
                                                                  Severity: Minor
                                                                  Found in packages/decoder/lib/decoders.ts and 2 other locations - About 35 mins to fix
                                                                  packages/decoder/lib/decoders.ts on lines 146..151
                                                                  packages/decoder/lib/decoders.ts on lines 152..157

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

                                                                  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

                                                                    private async regularizeBlock(
                                                                      block: BlockSpecifier
                                                                    ): Promise<RegularizedBlockSpecifier> {
                                                                      return await this.projectDecoder.regularizeBlock(block);
                                                                    }
                                                                  Severity: Minor
                                                                  Found in packages/decoder/lib/decoders.ts and 1 other location - About 35 mins to fix
                                                                  packages/decoder/lib/decoders.ts on lines 1715..1719

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

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                    private async reverseEnsResolve(address: string): Promise<Uint8Array | null> {
                                                                      return await this.projectDecoder.reverseEnsResolve(address);
                                                                    }
                                                                  Severity: Minor
                                                                  Found in packages/decoder/lib/decoders.ts and 1 other location - About 30 mins to fix
                                                                  packages/decoder/lib/decoders.ts on lines 1711..1713

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

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

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

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

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

                                                                  Refactorings

                                                                  Further Reading

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

                                                                    private async reverseEnsResolve(address: string): Promise<Uint8Array | null> {
                                                                      return await this.projectDecoder.reverseEnsResolve(address);
                                                                    }
                                                                  Severity: Minor
                                                                  Found in packages/decoder/lib/decoders.ts and 1 other location - About 30 mins to fix
                                                                  packages/decoder/lib/decoders.ts on lines 2362..2364

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

                                                                  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