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

SendParameters Sanity Checker #85

Closed
jubnzv opened this issue Aug 11, 2024 · 2 comments · Fixed by #193
Closed

SendParameters Sanity Checker #85

jubnzv opened this issue Aug 11, 2024 · 2 comments · Fixed by #193
Assignees
Milestone

Comments

@jubnzv
Copy link
Member

jubnzv commented Aug 11, 2024

Summary
Check dangerous patterns in the mode field of SendParameters.

Context
tact-lang/tact#180

Examples

SendParameters{
    ...
    mode: SendRemainingValue + SendRemainingValue, 
    ...
}

Should raise a warning:

  • flags in the mode field should be used at most one time;
  • the mode expression should only contain the + sign;
  • TODO: check if some combinations of flags are meaningless;
  • integer literals should not be used, only symbolic constants.
@jubnzv
Copy link
Member Author

jubnzv commented Aug 11, 2024

Additional idea: maybe we could leverage the Tact interpreter to reason about possible problems of mode values (depends on #70)

@Gusarich
Copy link

Gusarich commented Aug 18, 2024

  • the mode expression should only contain the + sign;

actually it's recommended to use the binary or | operator instead of +:
tact-lang/tact#180 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants