Skip to content

Commit

Permalink
Update docs for SafeERC20.forceApprove (#4231)
Browse files Browse the repository at this point in the history
(cherry picked from commit 06861dc)
  • Loading branch information
PaulRBerg authored and frangio committed Jul 1, 2023
1 parent e50c24f commit a54f639
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contracts/token/ERC20/utils/SafeERC20.sol
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ library SafeERC20 {

/**
* @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful. Compatible with tokens that require the approval to be set to
* 0 before setting it to a non-zero value.
* non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
* to be set to zero before setting it to a non-zero value, such as USDT.
*/
function forceApprove(IERC20 token, address spender, uint256 value) internal {
bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);
Expand Down

0 comments on commit a54f639

Please sign in to comment.