Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QA Report #276

Open
code423n4 opened this issue Jun 19, 2022 · 2 comments
Open

QA Report #276

code423n4 opened this issue Jun 19, 2022 · 2 comments
Labels
bug Something isn't working QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax

Comments

@code423n4
Copy link
Contributor

Don't use deprecated library functions

Information :
L005 - Do not use Deprecated Library Functions
SafeERC20.sol - safeApprove

Instances include :

core/connext/libraries/AssetLogic.sol:347:        SafeERC20.safeApprove(IERC20(_assetIn), address(pool), _amountIn);

Recommendation

Usage of deprecated library functions, for instance safeApprove from OpenZeppelin's SafeERC20 library is discouraged, it is recommended to use safeIncreaseAllowance and safeDecreaseAllowance instead, for example :

core/connext/libraries/AssetLogic.sol:347:        SafeERC20.safeIncreaseAllowance(IERC20(_assetIn), address(pool), _amountIn);

@code423n4 code423n4 added bug Something isn't working QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax labels Jun 19, 2022
code423n4 added a commit that referenced this issue Jun 19, 2022
@liu-zhipeng
Copy link
Collaborator

fixed

@itsmetechjay itsmetechjay reopened this Jul 1, 2022
@jakekidd
Copy link
Collaborator

jakekidd commented Jul 2, 2022

approval needs to be reset to 0 and then increased, so we are stuck using safeApprove method in order to do so

I suppose this issue is still valid, however

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
Projects
None yet
Development

No branches or pull requests

4 participants