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

Add mint::freeze_authority attribute when init-ing a mint. #835

Merged

Conversation

cqfd
Copy link
Contributor

@cqfd cqfd commented Oct 5, 2021

This came up in discord and I thought it would be a good excuse to learn some more macro stuff (no worries if this isn't actually a feature that needs to be included in anchor!).

owner: Expr,
freeze_authority: Option<Expr>,
decimals: Expr,
},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure why my rust fmt formats this different :/

Copy link
Contributor

Choose a reason for hiding this comment

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

you mean the order of the fields? or just the indentation

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah just indentation stuff—it added newlines to Token and AssociatedToken that I wasn't expecting (my change only touches Mint).

@armaniferrante
Copy link
Member

This came up in discord and I thought it would be a good excuse to learn some more macro stuff (no worries if this isn't actually a feature that needs to be included in anchor!).

This is very useful!

Copy link
Contributor

@jpbogle jpbogle left a comment

Choose a reason for hiding this comment

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

cool thanks @cqfd this is exactly what i was thinking. Was going to make a PR but i wasnt sure all the places i would need to look. This is a good example for me to see

@armaniferrante armaniferrante merged commit dbb5f48 into coral-xyz:master Oct 5, 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.

None yet

3 participants