Add SafeERC20.forceApprove()#3851
Conversation
…zero amount is required beforehand
|
Please provide more detail. If we offer this function, what should we recommend to developers? Should they always use this function when they need to call approve? Are there circumstances where they shouldn't use it? Are there risks they should consider? |
|
@frangio if your contract is performing token approve and expecting to spend it later in the same transaction This |
|
My question is different: should we be recommending that everyone use |
|
@frangio I think it depends on the situation. If developer is going to spend this approve in the same transaction, then yes, I would recommend to use it. If this approve should be spent by someone else in different transaction then I would suggest to use safe increase/decrease. |
|
Great! That recommendation makes a lot of sense to me. We should include this in the docs. |
|
This targets next-5.0. Since we want it in 4.9 we need to target master. Replacing this PR with #4067 |
Fixes LIB-705
PR Checklist
TBD