PasswordPusher icon indicating copy to clipboard operation
PasswordPusher copied to clipboard

Rate limiting example uses `transfer`.

Open DavidBDiligence opened this issue 3 years ago • 0 comments

// Disallow withdraws that exceed current rate limit
require(currentPeriodAmount + amount < limit, 'exceeds period limit');
currentPeriodAmount += amount;
msg.sender.transfer(amount);

Elsewhere the guide recommends against using transfer.

DavidBDiligence avatar Jun 26 '22 20:06 DavidBDiligence