ethernaut icon indicating copy to clipboard operation
ethernaut copied to clipboard

Level 10 Re-entrancy attack not working

Open wesbz opened this issue 3 years ago • 1 comments

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.

wesbz avatar Feb 24 '22 11:02 wesbz

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);

biganashvili avatar Dec 02 '22 02:12 biganashvili