We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
SafeERC20.forceApprove
1 parent 37270eb commit 06861dcCopy full SHA for 06861dc
contracts/token/ERC20/utils/SafeERC20.sol
@@ -70,8 +70,8 @@ library SafeERC20 {
70
71
/**
72
* @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
73
- * non-reverting calls are assumed to be successful. Compatible with tokens that require the approval to be set to
74
- * 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.
75
*/
76
function forceApprove(IERC20 token, address spender, uint256 value) internal {
77
bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));
0 commit comments