Skip to content

IDL is outdated: parser throws "Cannot read properties of null" #53

@serejke

Description

@serejke

Can't parse
https://solscan.io/tx/4V4dUfStHa17HREkifsoSradJw9Cjg4NGwGpWSeDSSMuj5u2cs3bDN1Bd12yR29bEmZDXE36Abv13WJd9YQ5Ra23

/jupiter-instruction-parser/node_modules/buffer-layout/lib/Layout.js:1692
      dest[clo.property] = this.defaultLayout.decode(b, offset + contentOffset);
               ^
TypeError: Cannot read properties of null (reading 'property')
    at Union.decode (/jupiter-instruction-parser/node_modules/buffer-layout/lib/Layout.js:1692:16)
    at Structure.decode (/jupiter-instruction-parser/node_modules/buffer-layout/lib/Layout.js:1234:32)
    at Sequence.decode (/jupiter-instruction-parser/node_modules/buffer-layout/lib/Layout.js:1090:34)
    at Structure.decode (/jupiter-instruction-parser/node_modules/buffer-layout/lib/Layout.js:1234:32)
    at WrappedLayout.decode (/jupiter-instruction-parser/node_modules/@coral-xyz/anchor/node_modules/@coral-xyz/borsh/src/index.ts:111:37)
    at Structure.decode (/jupiter-instruction-parser/node_modules/buffer-layout/lib/Layout.js:1234:32)
    at BorshInstructionCoder.decode (/jupiter-instruction-parser/node_modules/@coral-xyz/anchor/src/coder/borsh/instruction.ts:107:28)
    at InstructionParser.getInitialAndFinalSwapPositions (/jupiter-instruction-parser/src/lib/instruction-parser.ts:81:41)
    at /jupiter-instruction-parser/src/index.ts:109:12
    at Generator.next (<anonymous>)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions