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
#[constant]/// This is a useful constantpubconstUSEFUL_CONSTANT:usize = 2_usize.pow(8);
then the idl will store "2_usize.pow(8)" literally instead of "256".
If there is an easy way to evaluate const expressions before storing it in the IDL, I personally think that is a better outcome. This would allow for easy use of parseInt or similar fn's in typescript.
The text was updated successfully, but these errors were encountered:
if one defines some
then the idl will store "2_usize.pow(8)" literally instead of "256".
If there is an easy way to evaluate const expressions before storing it in the IDL, I personally think that is a better outcome. This would allow for easy use of
parseInt
or similar fn's in typescript.The text was updated successfully, but these errors were encountered: