Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help parsing Self-CPI Log #40

Open
Allen-JThomas opened this issue Jun 25, 2024 · 0 comments
Open

Help parsing Self-CPI Log #40

Allen-JThomas opened this issue Jun 25, 2024 · 0 comments

Comments

@Allen-JThomas
Copy link

Allen-JThomas commented Jun 25, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant