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

Method ID documentation in FunC and TVM #784

Open
anton-trunov opened this issue Oct 5, 2024 · 1 comment
Open

Method ID documentation in FunC and TVM #784

anton-trunov opened this issue Oct 5, 2024 · 1 comment

Comments

@anton-trunov
Copy link

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

There is an explanation how method IDs are calculated if not set explicitly https://docs.ton.org/develop/func/functions#method_id, but what are the restrictions on method ID values if the programmer sets it by hand?

For instance, FunC allows method IDs to be larger than 257-bit integers:

int %foo() method_id(0x6ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) {
    return 42;
}

But on the other hand there is a limit, so the following

int %foo() method_id(0x7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) {
    return 42;
}

throws an error like so:

method-id.fc:1:22: error: invalid integer constant `0x7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff`

Describe the solution you'd like

  1. Document the exact range for manually specified method IDs in Func
  2. Explain the allowed range for method IDs (DECLMETHOD indices) in TVM

Additional context

No response

@anton-trunov anton-trunov changed the title Method ID documentaton Method ID documentation in FunC and TVM Oct 5, 2024
@anton-trunov
Copy link
Author

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