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

Creating a 1.13.3 patch for backwards compatibility. #136

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

blockiosaurus
Copy link
Contributor

In the TM SDK 1.13 we supported dynamic accounts by returning 0 from the size() trait function for TokenMetadataAccount. This indicated to the deserializer that the account was dynamically sized and size should not be used as a discriminator. This patch makes the TM accounts being resized qualify as "dynamically sized" to support people still using the old SDKs. This will allow older Anchor and SDK users to still function so long as they rebuild their programs while pulling in the latest 1.x version.

I do, however, keep the MAX_XXX_LEN fields the same to minimize breaking changes. Additionally, because size() now returns zero but it used elsewhere, I swapped its usage in the fee and burn calculations with MAX_METADATA_LEN to get the tests to pass. However this should have no effect on the actual program as we will never be deploying from this branch.

Copy link

vercel bot commented Sep 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mpl-token-metadata-js-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 6, 2024 0:46am

danenbm
danenbm previously approved these changes Sep 5, 2024
* Update to Solana 1.17, Borsh 10.3.0, remove rooster

* Update program lockfile
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

Successfully merging this pull request may close these issues.

2 participants