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