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

token-2022: Support extensions in InitializeAccount variations #2743

Merged
merged 12 commits into from Jan 15, 2022

Conversation

CriesofCarrots
Copy link
Contributor

@CriesofCarrots CriesofCarrots commented Jan 14, 2022

InitializeAccount variations should initialize extensions required by the mint.
This PR adds that support.

Base and native mint cases are covered by existing test suite. The extended-mint cases still need testing, but I wanted to PR this now because: (a) that testing will be a lot easier when InitializeMint implementations for extensions are done; and (b) I wanted to see what you think of StateWithExtensionsMut::init_extension_from_type() and the error-type change in StateWithExtensionsMut::unpack_uninitialized() now. Thoughts?

Copy link
Contributor

@joncinque joncinque left a comment

Choose a reason for hiding this comment

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

Looking good! Just a few comments and questions, but for the most part this is great

token/program-2022/src/extension/mod.rs Show resolved Hide resolved
token/program-2022/src/extension/mod.rs Outdated Show resolved Hide resolved
token/program-2022/src/extension/mod.rs Show resolved Hide resolved
token/program-2022/src/processor.rs Outdated Show resolved Hide resolved
token/program-2022/src/processor.rs Show resolved Hide resolved
@CriesofCarrots
Copy link
Contributor Author

@joncinque , I think this is ready for another look.
To come separately:

Copy link
Contributor

@joncinque joncinque left a comment

Choose a reason for hiding this comment

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

Really really close, just two last little questions

token/program-2022/src/extension/mod.rs Outdated Show resolved Hide resolved
token/program-2022/src/processor.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@joncinque joncinque left a comment

Choose a reason for hiding this comment

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

Thanks for the changes, looks good!

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

3 participants