-
Notifications
You must be signed in to change notification settings - Fork 39
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
Curve Swap Implementation #225
base: interest-model-redesign
Are you sure you want to change the base?
Conversation
); | ||
|
||
if ( | ||
returnToSenderAddress != _thisAddress && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not use address(this);
function setSwapApprovals(address[] memory tokens) public { | ||
address curveRoute = curveAddressProvider.get_address(2); | ||
for (uint256 i = 0; i < tokens.length; i++) { | ||
IERC20(tokens[i]).safeApprove(curveRoute, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
safeApprove handles zero case
onlyOwner | ||
{ | ||
for(uint i=0;i<tokens.length;++i){ | ||
IERC20(tokens[i]).safeApprove(spender,0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
safeApprove handles zero case
rebase this to itoken-collateral, we might wanna merge it before we deploy itoken-collateral. since ProtocolSettings is changed |
function exchange(address pool, address from, address to, uint256 amount, uint256 minRecv, address receiver) external returns(uint256); | ||
} | ||
|
||
interface ICurveProvider { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generally I prefer interface per file
this needs to be rebased to itoken-collateral. what do we need to do to include this in arbitrum deployment? |
No description provided.