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

Support explicitly specified function kinds #937

Open
itegulov opened this issue Oct 12, 2022 · 0 comments
Open

Support explicitly specified function kinds #937

itegulov opened this issue Oct 12, 2022 · 0 comments

Comments

@itegulov
Copy link
Contributor

We have been distinguishing function kind purely by its usage of self which has been working out fine historically, but now that we have a (public) ABI that can be generated from a contract, we need a deterministic way of marking functions’ kinds (#[view], #[call] etc).

Whether the self-checks should still be in place is an open question, but I feel like SDK shouldn't care that I want to declare my foo(&self, a: u32) as a call function since there could be legitimate patterns where it makes sense (e.g. using a transaction-only env functions without touching the state).

CC @miraclx @austinabell as I have discussed this with you two independently

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