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

lang: Add SystemAccount<'info> Account Type #954

Merged
merged 5 commits into from
Oct 30, 2021
Merged

lang: Add SystemAccount<'info> Account Type #954

merged 5 commits into from
Oct 30, 2021

Conversation

callensm
Copy link
Member

@callensm callensm commented Oct 28, 2021

Implements a new SystemAccount<'info> account address type for generic addresses owned by the system program to avoid having to use UncheckedAccount.

Resolves #953

@callensm callensm changed the title lang: Add SystemAccount<'info> Account Type [WIP] lang: Add SystemAccount<'info> Account Type Oct 28, 2021
@callensm callensm changed the title [WIP] lang: Add SystemAccount<'info> Account Type lang: Add SystemAccount<'info> Account Type Oct 28, 2021
Copy link
Member

@armaniferrante armaniferrante left a comment

Choose a reason for hiding this comment

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

We should add a simple e2e test for this.

@callensm
Copy link
Member Author

@armaniferrante do you want a new one or just modify existing ones to use the new type

@armaniferrante
Copy link
Member

@armaniferrante do you want a new one or just modify existing ones to use the new type

A new one would be great.

@callensm
Copy link
Member Author

@armaniferrante do you want a new one or just modify existing ones to use the new type

A new one would be great.

e2e passing now for the new type

@armaniferrante
Copy link
Member

Note that the alternative to this would be to introduce a new SystemAccount type that can be used via Account<'info, SystemAccount>, but given that Account is usually used for deserialization, I like the new type here. Am interested in other thoughts though.

@armaniferrante armaniferrante merged commit 20726d0 into coral-xyz:master Oct 30, 2021
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.

lang: Add SystemAccount type
2 participants