trufflesuite/truffle

View on GitHub

Showing 1,401 of 1,401 total issues

Function findResourcesHistories has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

async function* findResourcesHistories<
  N extends NamedCollectionName,
  ResourceHistoryStep extends {
    [K in "skip" | N]: "skip" extends K
      ? (...indexes: number[]) => void
Severity: Minor
Found in packages/db/src/resources/projects/resolveContractInstances.ts - About 1 hr to fix

    Function process has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export function* process<Height extends number | "latest">(options: {
      block: {
        hash?: string;
        height: Height;
      };
    Severity: Minor
    Found in packages/db/src/network/fetch/block.ts - About 1 hr to fix

      Function wrapWithCases has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export function* wrapWithCases<
        TypeType extends Format.Types.Type,
        ValueType,
        RequestType
      >(
      Severity: Minor
      Found in packages/codec/lib/wrap/dispatch.ts - About 1 hr to fix

        Function App has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function App(): JSX.Element {
          return (
            <div id="app">
              <ColorSchemeWrapper>
                <MantineWrapper>
        Severity: Minor
        Found in packages/dashboard/src/App.tsx - About 1 hr to fix

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

                asrtNoReason: () =>
                  `${prefix}"${data.contract.contractName}" hit an invalid opcode while deploying. Try:\n` +
                  `   * Verifying that your constructor params satisfy all assert conditions.\n` +
                  `   * Verifying your constructor code doesn't access an array out of bounds.\n` +
                  `   * Adding reason strings to your assert statements.\n`,
          Severity: Major
          Found in packages/events/defaultSubscribers/migrate/Messages.js and 1 other location - About 1 hr to fix
          packages/events/defaultSubscribers/migrate/Messages.js on lines 94..98

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

          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

                rvtNoReason: () =>
                  `${prefix}"${data.contract.contractName}" hit a require or revert statement ` +
                  `somewhere in its constructor. Try:\n` +
                  `   * Verifying that your constructor params satisfy all require conditions.\n` +
                  `   * Adding reason strings to your require statements.\n`,
          Severity: Major
          Found in packages/events/defaultSubscribers/migrate/Messages.js and 1 other location - About 1 hr to fix
          packages/events/defaultSubscribers/migrate/Messages.js on lines 100..104

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

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

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

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

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

          Refactorings

          Further Reading

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

          export const isErrorResult = (
            data: Format.Values.Result
          ): data is Format.Errors.ErrorResult => data.kind === "error";
          packages/codec-components/src/utils/type-guards/other/contract-value-info-known.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/contract-value-info-unknown.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/function-external-value-info-invalid.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-external-value-info-known.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-external-value-info-unknown.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-index.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-pc-pair.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-value-info-exception.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-value-info-known.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-value-info-unknown.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/string-value-info-malformed.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/string-value-info-valid.ts on lines 3..5

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

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

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

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

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

          Refactorings

          Further Reading

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

          export const isContractValueInfoUnknown = (
            data: Format.Values.ContractValueInfo
          ): data is Format.Values.ContractValueInfoUnknown => data.kind === "unknown";
          packages/codec-components/src/utils/type-guards/other/contract-value-info-known.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/error-result.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/function-external-value-info-invalid.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-external-value-info-known.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-external-value-info-unknown.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-index.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-pc-pair.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-value-info-exception.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-value-info-known.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-value-info-unknown.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/string-value-info-malformed.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/string-value-info-valid.ts on lines 3..5

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

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

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

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

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

          Refactorings

          Further Reading

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

          export const isFunctionInternalRawInfoIndex = (
            data: Format.Values.FunctionInternalRawInfo
          ): data is Format.Values.FunctionInternalRawInfoIndex => data.kind === "index";
          packages/codec-components/src/utils/type-guards/other/contract-value-info-known.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/contract-value-info-unknown.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/error-result.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/function-external-value-info-invalid.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-external-value-info-known.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-external-value-info-unknown.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-pc-pair.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-value-info-exception.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-value-info-known.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-value-info-unknown.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/string-value-info-malformed.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/string-value-info-valid.ts on lines 3..5

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

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

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

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

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

          Refactorings

          Further Reading

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

          export const isStringValueInfoMalformed = (
            data: Format.Values.StringValueInfo
          ): data is Format.Values.StringValueInfoMalformed => data.kind === "malformed";
          packages/codec-components/src/utils/type-guards/other/contract-value-info-known.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/contract-value-info-unknown.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/error-result.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/function-external-value-info-invalid.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-external-value-info-known.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-external-value-info-unknown.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-index.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-pc-pair.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-value-info-exception.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-value-info-known.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-value-info-unknown.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/string-value-info-valid.ts on lines 3..5

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

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

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

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

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

          Refactorings

          Further Reading

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

          export const isFunctionExternalValueInfoUnknown = (
            data: Format.Values.FunctionExternalValueInfo
          ): data is Format.Values.FunctionExternalValueInfoUnknown =>
            data.kind === "unknown";
          packages/codec-components/src/utils/type-guards/other/contract-value-info-known.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/contract-value-info-unknown.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/error-result.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/function-external-value-info-invalid.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-external-value-info-known.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-index.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-pc-pair.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-value-info-exception.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-value-info-known.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-value-info-unknown.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/string-value-info-malformed.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/string-value-info-valid.ts on lines 3..5

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

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

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

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

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

          Refactorings

          Further Reading

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

          export const isFunctionExternalValueInfoKnown = (
            data: Format.Values.FunctionExternalValueInfo
          ): data is Format.Values.FunctionExternalValueInfoKnown =>
            data.kind === "known";
          packages/codec-components/src/utils/type-guards/other/contract-value-info-known.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/contract-value-info-unknown.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/error-result.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/function-external-value-info-invalid.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-external-value-info-unknown.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-index.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-pc-pair.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-value-info-exception.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-value-info-known.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-value-info-unknown.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/string-value-info-malformed.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/string-value-info-valid.ts on lines 3..5

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

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

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

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

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

          Refactorings

          Further Reading

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

          export const isFunctionInternalValueInfoUnknown = (
            data: Format.Values.FunctionInternalValueInfo
          ): data is Format.Values.FunctionInternalValueInfoUnknown =>
            data.kind === "unknown";
          packages/codec-components/src/utils/type-guards/other/contract-value-info-known.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/contract-value-info-unknown.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/error-result.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/function-external-value-info-invalid.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-external-value-info-known.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-external-value-info-unknown.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-index.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-pc-pair.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-value-info-exception.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-value-info-known.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/string-value-info-malformed.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/string-value-info-valid.ts on lines 3..5

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

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

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

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

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

          Refactorings

          Further Reading

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

          export const isFunctionInternalValueInfoKnown = (
            data: Format.Values.FunctionInternalValueInfo
          ): data is Format.Values.FunctionInternalValueInfoKnown =>
            data.kind === "function";
          packages/codec-components/src/utils/type-guards/other/contract-value-info-known.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/contract-value-info-unknown.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/error-result.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/function-external-value-info-invalid.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-external-value-info-known.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-external-value-info-unknown.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-index.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-pc-pair.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-value-info-exception.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-value-info-unknown.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/string-value-info-malformed.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/string-value-info-valid.ts on lines 3..5

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

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

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

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

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

          Refactorings

          Further Reading

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

          export const isContractValueInfoKnown = (
            data: Format.Values.ContractValueInfo
          ): data is Format.Values.ContractValueInfoKnown => data.kind === "known";
          packages/codec-components/src/utils/type-guards/other/contract-value-info-unknown.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/error-result.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/function-external-value-info-invalid.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-external-value-info-known.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-external-value-info-unknown.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-index.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-pc-pair.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-value-info-exception.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-value-info-known.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-value-info-unknown.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/string-value-info-malformed.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/string-value-info-valid.ts on lines 3..5

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

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

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

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

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

          Refactorings

          Further Reading

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

          export const isFunctionInternalRawInfoPcPair = (
            data: Format.Values.FunctionInternalRawInfo
          ): data is Format.Values.FunctionInternalRawInfoPcPair =>
            data.kind === "pcpair";
          packages/codec-components/src/utils/type-guards/other/contract-value-info-known.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/contract-value-info-unknown.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/error-result.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/function-external-value-info-invalid.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-external-value-info-known.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-external-value-info-unknown.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-index.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/function-internal-value-info-exception.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-value-info-known.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-value-info-unknown.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/string-value-info-malformed.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/string-value-info-valid.ts on lines 3..5

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

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

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

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

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

          Refactorings

          Further Reading

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

          export const isStringValueInfoValid = (
            data: Format.Values.StringValueInfo
          ): data is Format.Values.StringValueInfoValid => data.kind === "valid";
          packages/codec-components/src/utils/type-guards/other/contract-value-info-known.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/contract-value-info-unknown.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/error-result.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/function-external-value-info-invalid.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-external-value-info-known.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-external-value-info-unknown.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-index.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-pc-pair.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-value-info-exception.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-value-info-known.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-value-info-unknown.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/string-value-info-malformed.ts on lines 3..5

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

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

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

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

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

          Refactorings

          Further Reading

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

          export const isFunctionExternalValueInfoInvalid = (
            data: Format.Values.FunctionExternalValueInfo
          ): data is Format.Values.FunctionExternalValueInfoInvalid =>
            data.kind === "invalid";
          packages/codec-components/src/utils/type-guards/other/contract-value-info-known.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/contract-value-info-unknown.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/error-result.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/function-external-value-info-known.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-external-value-info-unknown.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-index.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-pc-pair.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-value-info-exception.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-value-info-known.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-value-info-unknown.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/string-value-info-malformed.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/string-value-info-valid.ts on lines 3..5

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

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

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

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

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

          Refactorings

          Further Reading

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

          export const isFunctionInternalValueInfoException = (
            data: Format.Values.FunctionInternalValueInfo
          ): data is Format.Values.FunctionInternalValueInfoException =>
            data.kind === "exception";
          packages/codec-components/src/utils/type-guards/other/contract-value-info-known.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/contract-value-info-unknown.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/error-result.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/function-external-value-info-invalid.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-external-value-info-known.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-external-value-info-unknown.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-index.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/function-internal-raw-info-pc-pair.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-value-info-known.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/function-internal-value-info-unknown.ts on lines 3..6
          packages/codec-components/src/utils/type-guards/other/string-value-info-malformed.ts on lines 3..5
          packages/codec-components/src/utils/type-guards/other/string-value-info-valid.ts on lines 3..5

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

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

              maxFeePerGas: {
                get() {
                  try {
                    return configObject.network_config.maxFeePerGas;
                  } catch (e) {
          Severity: Major
          Found in packages/config/src/configDefaults.ts and 6 other locations - About 1 hr to fix
          packages/config/src/configDefaults.ts on lines 145..158
          packages/config/src/configDefaults.ts on lines 197..210
          packages/config/src/configDefaults.ts on lines 211..224
          packages/config/src/configDefaults.ts on lines 225..238
          packages/config/src/configDefaults.ts on lines 253..266
          packages/config/src/configDefaults.ts on lines 267..280

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

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

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

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

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

          Refactorings

          Further Reading

          Severity
          Category
          Status
          Source
          Language