-
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: Remove SPL coders from Anchor package #2155
ts: Remove SPL coders from Anchor package #2155
Conversation
@acheroncrypto is attempting to deploy a commit to the coral-xyz Team on Vercel. A member of the Team first needs to authorize it. |
if (accountInfo === null) { | ||
throw new Error(`invalid account info for ${address}`); | ||
} | ||
const data = coder().accounts.decode("token", accountInfo.data); |
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.
Could just decode token accounts without any coder, not sure if it's needed though.
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.
if this is going to be removed, would be worth also investigating where and why TokenAccounts
are being added to the account store cache and managing that too.
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.
maybe @armaniferrante has insight there
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.
Completely removing this caused a problem that I don't remember so I added a coder for only what we need and nothing more in 57f0f7e
Not if sure @tomlinton or @callensm is best to check this out |
it's my understanding that the spl coders here are mildly broken anyway, so i wouldn't care if they were removed in favor of the official spl packages that have their own encoding/decoding, but would almost certain be a breaking change for many. |
Cool, thanks for that. A breaking change doesn't sound great for sure. Might be a close then unfortunately. |
i'd still consider merging once we get more input of the usability of these coders. if the impact is minimal might be worth getting rid of the bloat /shrug |
We had a talk about this with @armaniferrante and his input was to completely remove them and allow people to import as needed. |
ok, just verified. we're good to merge this once conflicts are resolved. I was misunderstanding what was actually being proposed for removal. |
Great, @acheroncrypto if you wouldn't mind to fix the merge conflicts when you get a chance and will try merge ASAP! |
Fixed the conflicts, only |
@acheroncrypto are you happy with merging or any last bits you want to add? Ha, you posted literal seconds before I did. Will merge so |
* ts: Remove SPL coders from Anchor package * Replace old SPL custom coder tests * Build and link new SPL packages before tests and decode token account for AccountStore * Fix Github actions ts setup * Fix u64 buffer length * Update submodules * Update CHANGELOG * Checkout correct submodule commits * Add filler program to generate idls in order for anchor test to pass
Follow up on #2143, coders in Anchor package is no longer necessary. This is a breaking change, codebases that rely on SPL from Anchor package would need to migrate to the new packages and only import as needed.