Skip to content

Commit

Permalink
add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
0xclaudeshannon committed Jan 8, 2022
1 parent b34920b commit 04d88dd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions contracts/token/ERC20/IERC20.sol
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ interface IERC20 {
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Note If `amount` is the maximum `uint`, the allowance is not updated on
* `transferFrom`. This is semantically equivalent to an infinite approval.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
Expand All @@ -55,6 +58,9 @@ interface IERC20 {
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Note Does not update the allowance if the current allowance
* is the maximum `uint`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
Expand Down

0 comments on commit 04d88dd

Please sign in to comment.