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

Update attributes #99

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

Conversation

daoplays
Copy link

@daoplays daoplays commented May 2, 2024

Currently users have to deserialise their asset, get the attributes plugin, add an entry and then send that off in the update plugin instruction.

Adds an extend attributes function that just requires the new/existing pair to update which reduces the code users have to write and extends the number of attributes that can be included as you not longer hit the instruction size limit when performing CPI.

Copy link

vercel bot commented May 2, 2024

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

Name Status Preview Comments Updated (UTC)
mpl-core-js-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 4, 2024 6:23pm

Copy link
Contributor

@blockiosaurus blockiosaurus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, this is great work! Looks like you have the process down and the instructions look solid.

One design pattern I don't think we've documented well enough is that we're trying to avoid overly-specific instructions at the moment. I think a more generic approach might be a V2 of UpdatePlugin that takes in an additional, optional buffer account and copies the data from there instead of from the arguments.

@daoplays
Copy link
Author

daoplays commented May 4, 2024

Hey, this is great work! Looks like you have the process down and the instructions look solid.

One design pattern I don't think we've documented well enough is that we're trying to avoid overly-specific instructions at the moment. I think a more generic approach might be a V2 of UpdatePlugin that takes in an additional, optional buffer account and copies the data from there instead of from the arguments.

Branch updated, tested by passing both plugin args in the usual way, and also the buffer account.

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.

None yet

2 participants