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 is_reentrant for internal vyper functions #2211

Merged
merged 1 commit into from
Dec 4, 2023

Conversation

0xalpharush
Copy link
Member

is_reentrant was returning True for internal functions even if all entry points had the nonreentrant decorator, causing FPs on examples like:

balances: HashMap[address, uint256]

@external
@nonreentrant("lock")
def withdraw_locked():
    self.withdraw()

@internal
def withdraw():
    raw_call(msg.sender, b"", value= self.balances[msg.sender])
    self.balances[msg.sender] = 0


@0xalpharush 0xalpharush marked this pull request as ready for review November 6, 2023 02:36
@0xalpharush 0xalpharush merged commit deebe36 into dev Dec 4, 2023
83 checks passed
@0xalpharush 0xalpharush deleted the fix-vyper-is-reentrant branch December 4, 2023 23:56
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.

None yet

1 participant