Skip to content

发币的这三种能力BurnCapability,FreezeCapability,MintCapability 结构体都是空,为啥还可以当做这3个操作的参数 #263

Answered by hotboice
hi-chenerge asked this question in Q&A
Discussion options

You must be logged in to vote

fun mint设计的入参需要传入mint_cap。由于struct只能在定义它的module中创建,init后mint_cap等这三种能力保存在account下,也就代表只有拥有mint_cap的account,才可以调用mint。可以简单理解为一个权限标记

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by hi-chenerge
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants