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

Level 10 Re-entrancy attack not working #324

Open
wesbz opened this issue Feb 24, 2022 · 1 comment
Open

Level 10 Re-entrancy attack not working #324

wesbz opened this issue Feb 24, 2022 · 1 comment

Comments

@wesbz
Copy link

wesbz commented Feb 24, 2022

I have been working on the Level 10 Re-entrancy level and cannot have the attack to work. I deployed the exact same Reentrance contract in Remix and managed to execute the attack without issue. Am I the only one encountering this? Has it been seen before? I tried several posted solutions but similarly couldn't have the attack to work and withdraw the contract balance while all of them worked when I deployed the contract in Remix.

@biganashvili
Copy link

I couldn't call the withdraw function.
the reason was the signature of withdraw function.
try setting the input argument type of uint256 instead of unit as described on page.

bytes memory payload = abi.encodeWithSignature("withdraw(uint256)",targetAmount);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 To Do
Development

No branches or pull requests

2 participants