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.
Could just decode token accounts without any coder, not sure if it's needed though.
There was a problem hiding this comment.
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.
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
* 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.