Skip to content

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

Merged
armaniferrante merged 6 commits into
otter-sec:masterfrom
cqfd:init-mint-with-freeze-authority
Oct 5, 2021
Merged

Add mint::freeze_authority attribute when init-ing a mint.#835
armaniferrante merged 6 commits into
otter-sec:masterfrom
cqfd:init-mint-with-freeze-authority

Conversation

@cqfd

@cqfd cqfd commented Oct 5, 2021

Copy link
Copy Markdown
Contributor

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!).

Comment thread lang/syn/src/lib.rs
owner: Expr,
freeze_authority: Option<Expr>,
decimals: Expr,
},

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

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!

@jpbogle jpbogle left a comment

Copy link
Copy Markdown
Contributor

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 otter-sec:master Oct 5, 2021
Otter-0x4ka5h pushed a commit to Otter-0x4ka5h/anchor that referenced this pull request Mar 25, 2026
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.

3 participants