Level 10 Re-entrancy attack not working
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.
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);