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

[Macro] Add init decorator so that init methods require that the subcontract state is None #92

Open
willemneal opened this issue Jul 11, 2024 · 0 comments

Comments

@willemneal
Copy link
Collaborator

          I think I understand  - `&mut self` here opens us up to the possibility that the internal state of the singleton can be overwritten. 

Are you saying that you want to redesign this so that users aren't able to get themselves into that situation by initializing a contract with a state of None. And then other methods require that the state is Some? Otherwise it will indicate that the contract hasn't been initialized.

That all makes sense to me!

Originally posted by @elizabethengelman in #91 (comment)

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

No branches or pull requests

1 participant