You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
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 myfoo(&self, a: u32)
as a call function since there could be legitimate patterns where it makes sense (e.g. using a transaction-onlyenv
functions without touching the state).CC @miraclx @austinabell as I have discussed this with you two independently
The text was updated successfully, but these errors were encountered: