-
Originally asked on stack overflow. In coin.move:
My guess is it prevents account A from initializing coins on behalf of account B to avoid scam? But look forward to more clarification! |
Beta Was this translation helpful? Give feedback.
Answered by
0x-j
Mar 6, 2024
Replies: 1 comment
-
The intent is to ensure that a coin can ever be initialized once as that is how all the capabilities (burn, freeze, mint) are generated. Specifically,
prevents anyone other than the actual account that publishes CoinType from initializing it. The next bit of code ensures it can only be initialized once:
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
0x-j
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The intent is to ensure that a coin can ever be initialized once as that is how all the capabilities (burn, freeze, mint) are generated.
Specifically,
prevents anyone other than the actual account that publishes CoinType from initializing it.
The next bit of code ensures it can only be initialized once: