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

fix: forbid read and write to self in contract init function #1482

Merged
merged 11 commits into from
Jan 27, 2025

Conversation

i582
Copy link
Contributor

@i582 i582 commented Jan 22, 2025

Issue

Closes #816.

Checklist

  • I have updated CHANGELOG.md
  • I have added tests to demonstrate the contribution is correctly implemented: this usually includes both positive and negative tests, showing the happy path(s) and featuring intentionally broken cases
  • I have run all the tests locally and no test failure was reported
  • I have run the linter, formatter and spellchecker
  • I did not do unrelated and/or undiscussed refactorings

@i582 i582 added this to the v1.6.0 milestone Jan 22, 2025
@i582 i582 requested a review from a team as a code owner January 22, 2025 07:10
@i582 i582 requested a review from anton-trunov January 22, 2025 17:00
@anton-trunov anton-trunov self-assigned this Jan 24, 2025
Copy link
Contributor

@jeshecdom jeshecdom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main unresolved issue here is if we should change the signature of the traverse function. I say, we keep traverse as it was before, but add a new traverseAndCheck that receives a callback that returns boolean. Comments below.

Let us do this and merge this PR.

@i582 i582 requested a review from jeshecdom January 27, 2025 08:33
@jeshecdom jeshecdom merged commit db3974e into main Jan 27, 2025
23 checks passed
@jeshecdom jeshecdom deleted the pmakhnev/forbid-whole-self-read-and-write branch January 27, 2025 09:22
sansx pushed a commit to TownSquareXYZ/tact that referenced this pull request Feb 10, 2025
…t-lang#1482)

* fix: forbid read and write to `self` in contract `init` function

Fixes tact-lang#816

* added one more test

* added CHANGELOG.md entry

* fixed review issues

* fixed review issue

* fix

* removed old code
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

Successfully merging this pull request may close these issues.

self should not be assignable in init method
4 participants