Skip to content
This repository was archived by the owner on Dec 12, 2024. It is now read-only.

Example on how to check sender privileges in receivers #126

Closed
anton-trunov opened this issue Mar 20, 2024 · 1 comment · Fixed by #140
Closed

Example on how to check sender privileges in receivers #126

anton-trunov opened this issue Mar 20, 2024 · 1 comment · Fixed by #140
Assignees
Labels
docs: Book /book section of the docs: Guides, Cheatsheets, and a streamlined sequence of educational materials

Comments

@anton-trunov
Copy link
Member

For instance, we can show an example like this here: https://docs.tact-lang.org/book/receive and cross link to https://docs.tact-lang.org/language/ref/common#require

It can be something really simple, e.g.

receive(msg: FooBarMsg) {
    require(self.contractOwner == sender(), "Only the owner can increase foobars");
    self.foobars += 1;
}
@anton-trunov anton-trunov added this to the tact-contest-2 milestone Mar 20, 2024
@novusnota novusnota self-assigned this Mar 20, 2024
@novusnota novusnota added the docs: Book /book section of the docs: Guides, Cheatsheets, and a streamlined sequence of educational materials label Mar 20, 2024
@novusnota
Copy link
Member

I think that specific examples like this should exist in a Cookbook: #140.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
docs: Book /book section of the docs: Guides, Cheatsheets, and a streamlined sequence of educational materials
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants