Ethereum Asked on February 10, 2021
I am reading the following tutorial.
What is the problem with the following code:
function withdraw(uint amount) public {
require(balances[msg.sender] >= amount);
balances[msg.sender] -=amount;
payable(msg.sender).transfer(amount);
transactions++;
}
How is this code causing reentrancy attack?
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP