Merge remote-tracking branch 'upstream' into refactor/erc721-update-fnPointer

This commit is contained in:
Hadrien Croubois
2023-07-03 09:35:35 +02:00
3 changed files with 31 additions and 3 deletions

View File

@ -70,8 +70,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.encodeCall(token.approve, (spender, value));