ton-community / ton-docs

User-friendly documentation for newcomers to TON blockchain.
https://docs.ton.org
GNU General Public License v3.0
243 stars 248 forks source link

How many global variables can be used in a FunC contract? #757

Open anton-trunov opened 3 weeks ago

anton-trunov commented 3 weeks ago

Is your feature request related to a problem? Please describe.

This is a common source of confusion. People try to use too many global variables and run into issues.

Describe the solution you'd like

Clearly document the limit of the number of global variables in FunC.

Additional context

No response

anton-trunov commented 3 weeks ago

The rumor has it the limit is 31 because the FunC compiler uses GETGLOB k/SETGLOB k instructions to manipulate global vars and those only allow k to be up to 31.

tengkusyahid commented 2 weeks ago

one like this blum crypto