-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
ts: CPI events parsing #2886
base: master
Are you sure you want to change the base?
ts: CPI events parsing #2886
Conversation
@ochaloup is attempting to deploy a commit to the coral-xyz Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, something like this would be helpful, but I think we need to improve this further before merging.
44b3bd6
to
e500835
Compare
@acheroncrypto thanks for your comments. I'm moving from Draft to a Pull Request state. With adding the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With adding the
parseCpiEvents
into interface I needed to change the default implemenation of the System(like) programs to get the build pass. I created an abstract class. It seemed to me cleaner but we can remove it back as it was.
The issue is that those packages are autogenerated, but I think it's fine because I'm planning to change how they work with the new IDL.
} | ||
|
||
public parseCpiEvents( | ||
transactionResponse: VersionedTransactionResponse |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be great if we could also support TransactionResponse
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I added the TransactionResponse
to types.
When autogenerated, how can I run it that I can remove the extended class and make it as generated? I run the ./setup-tests.sh
but I haven't found a guideline on development that can help me.
Based on the discussion at #2609 I understood there is no parsing utilities for CPI events for TS libraries.
I would like to kick-off the PR that would add this support under official Anchor TS library.
I'm not sure what would be the best on creating such functionality neither what is the best place to put it.
Maybe the approach is in a wrong direction so it's fine to just close the PR.
/cc @acheroncrypto