Skip to content

Help parsing Self-CPI Log #40

@Allen-JThomas

Description

@Allen-JThomas

I am currently trying to parse an inner instruction from a transaction. When I try to parse most instructions, it is parsed as expected. However, sometimes I get something like:
{ name: 'Anchor Self-CPI Log', data: { logAuthority: { data: [PublicKey [PublicKey(whatever)]], type: 'publicKey' } }, type: 'instruction' }

My code looks like this:

const parser = new SolanaFMParser(SFMIdlItem, instruction.programId.toBase58())
const instructionParser = parser.createParser(ParserType.INSTRUCTION)
const decodedInstruction = instructionParser.parseInstructions(instruction.data, instruction.accounts);

Does anybody know how I can properly parse these instructions? When I check solexplorer, the instruction gets decoded properly, but no matter what I try, I can't get it to work.

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