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

Unclear lazy_deployment_completed getter behaviour #1024

Open
imartemy1524 opened this issue Nov 11, 2024 · 1 comment
Open

Unclear lazy_deployment_completed getter behaviour #1024

imartemy1524 opened this issue Nov 11, 2024 · 1 comment

Comments

@imartemy1524
Copy link

imartemy1524 commented Nov 11, 2024

When one compile any tact smart-contract, it generates lazy_deployment_completed method for him .

But, the purpose of this method seems unclear for me:

  • documentation says that:

    get method that returns true if the contract is deployed and false otherwise.

    But in practice, this method returns not bool but (slice,bool).
    image

    Is this a bug or a feature? (probably a bug due to the poor implementation in FUNC, but if a feature, one should document it more clearly):

    _ lazy_deployment_completed() method_id {
        return get_data().begin_parse().load_int(1);
    }
    

    Because one uses .load_int here but not ~load_int, this method returns not bool but slice (self) with remaining contract data and only then the bool flag.

  • In practice this method is useless for now (nobody calls it) and as I understood, there is no ability (flag) to disable it in compilation, so it just takes space in compiled code cell. Is this a feature or not?

    Can we add such flag?

@anton-trunov
Copy link
Member

In practice this method is useless for now (nobody calls it) and as I understood, there is no ability (flag) to disable it in compilation, so it just takes space in compiled code cell. Is this a feature or not? Can we add such flag?

sounds like a great idea to me

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

2 participants