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

Assert Reason can have storage pop inside #4073

Open
ritzdorf opened this issue May 28, 2024 · 0 comments
Open

Assert Reason can have storage pop inside #4073

ritzdorf opened this issue May 28, 2024 · 0 comments

Comments

@ritzdorf
Copy link
Contributor

Version Information

  • vyper Version (output of vyper --version OR linkable commit hash vyperlang/vyper@commitish): 0.4.0rc5+commit.98370f50

Issue description

The assert reason is supposed to be a "constant" function. Function calls and external calls are blocked. However, pops are allowed.

POC

This compiles successfully:

x: DynArray[uint256, 2] 

@deploy
def __init__():
    self.x = [1, 1]

@external
def bar():
    b: bool = False
    assert b, uint2str(self.x.pop())
@cyberthirst cyberthirst transferred this issue from another repository May 31, 2024
@charles-cooper charles-cooper transferred this issue from another repository May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant