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
The Cairo compiler should be able to calculate the compile-time value of constants, to make it easier to write such constants, e.g.:
const some_value = (256 * 1080) & 0xfaff + 1234; // should become 14336
const some_power_of_2: felt252 = 2**128 - 1; // should become 340282366920938463463374607431768211455
The only operator not currently in Cairo is **, but I feel an 'integer power' operator is super convenient when doing blockchain development, so it seems like it should be implemented as well.
Describe Preferred Solution
The compiler should just compile that arithmetic expression into its proper value.
If the feature request is approved, would you be willing to submit a PR? (Help can be provided if you need assistance submitting a PR)
Yes
No
The text was updated successfully, but these errors were encountered:
Feature Request
Describe the Feature Request
The Cairo compiler should be able to calculate the compile-time value of constants, to make it easier to write such constants, e.g.:
The only operator not currently in Cairo is
**
, but I feel an 'integer power' operator is super convenient when doing blockchain development, so it seems like it should be implemented as well.Describe Preferred Solution
The compiler should just compile that arithmetic expression into its proper value.
If the feature request is approved, would you be willing to submit a PR?
(Help can be provided if you need assistance submitting a PR)
The text was updated successfully, but these errors were encountered: