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

Custom python style decorators #574

Open
merl111 opened this issue Jul 20, 2021 · 1 comment
Open

Custom python style decorators #574

merl111 opened this issue Jul 20, 2021 · 1 comment
Assignees
Labels
feature an issue representing an entire feature/story low An issue below normal priority

Comments

@merl111
Copy link
Contributor

merl111 commented Jul 20, 2021

Is it planned to implement custom python style decorators?

A very simple use case I can think of would be to implement something like that:

from boa3.builtin import CreateNewEvent, public
                                               
def onlyOwner(): 
    # do owner check and abort if false                              
    pass                                       
                                               
@onlyOwner                                     
@public                                        
def withdraw() -> bool:                        
    pass                                       

I know it's just sugar coating and functional everything can be done without decorators, I am just curious, and I think it might help with the readability of contracts.

I don't have a solution ready, but I could probably help if someone would be able to guide me a little.

@meevee98 meevee98 added the backlog Planned for a future release label Aug 19, 2021
@lock9 lock9 added feature an issue representing an entire feature/story and removed backlog Planned for a future release discussion labels Sep 10, 2021
@meevee98 meevee98 added the Epic label Sep 15, 2021
@melanke
Copy link
Contributor

melanke commented May 18, 2023

This might be implemented in the future but it has a low priority

@melanke melanke added low An issue below normal priority feature an issue representing an entire feature/story and removed feature an issue representing an entire feature/story Epic labels May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature an issue representing an entire feature/story low An issue below normal priority
Projects
None yet
Development

No branches or pull requests

5 participants