DeFiCh/jellyfish

View on GitHub
packages/jellyfish-transaction/src/script/mapping.ts

Summary

Maintainability
D
3 days
Test Coverage

File mapping.ts has 834 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { SmartBuffer } from 'smart-buffer'
import { readCompactSize, writeCompactSize } from '@defichain/jellyfish-buffer'
import { toBuffer, toOPCodes } from './_buffer'
import { OPCode, StaticCode } from './opcode'
import { OP_PUSHDATA } from './data'
Severity: Major
Found in packages/jellyfish-transaction/src/script/mapping.ts - About 2 days to fix

    OP_CODES has 60 functions (exceeds 20 allowed). Consider refactoring.
    Open

    export const OP_CODES = {
      /**
       * Read SmartBuffer and create OPCode[] stack.
       *
       * Using P2WPKH redeem script as an example.
    Severity: Major
    Found in packages/jellyfish-transaction/src/script/mapping.ts - About 1 day to fix

      There are no issues that match your filters.

      Category
      Status