Skip to content

Commit

Permalink
Refactor CurveSwap interfaces naming
Browse files Browse the repository at this point in the history
  • Loading branch information
zZoMROT committed Oct 1, 2023
1 parent 34d4b05 commit 4de588a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions contracts/interfaces/ICurveSwap.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ pragma solidity 0.8.19;

// solhint-disable func-name-mixedcase

interface ICurveSwap {
interface ICurveSwapInt128 {
function get_dy(int128 _from, int128 _to, uint256 _amount) external view returns (uint256);
function get_dy_underlying(int128 _from, int128 _to, uint256 _amount) external view returns (uint256);
}

interface ICurveSwapNew {
interface ICurveSwapUint256 {
function get_dy(uint256 _from, uint256 _to, uint256 _amount) external view returns (uint256);
function get_dy_underlying(uint256 _from, uint256 _to, uint256 _amount) external view returns (uint256);
}
8 changes: 4 additions & 4 deletions contracts/oracles/CurveOracle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@ contract CurveOracle is IOracle {
if (!isUnderlying) {
info = FunctionInfo({
balanceFuncSelector: ICurveRegistry.get_balances.selector,
dyFuncInt128Selector: ICurveSwap.get_dy.selector,
dyFuncUint256: ICurveSwapNew(pool).get_dy
dyFuncInt128Selector: ICurveSwapInt128.get_dy.selector,
dyFuncUint256: ICurveSwapUint256(pool).get_dy
});
} else {
info = FunctionInfo({
balanceFuncSelector: ICurveRegistry.get_underlying_balances.selector,
dyFuncInt128Selector: ICurveSwap.get_dy_underlying.selector,
dyFuncUint256: ICurveSwapNew(pool).get_dy_underlying
dyFuncInt128Selector: ICurveSwapInt128.get_dy_underlying.selector,
dyFuncUint256: ICurveSwapUint256(pool).get_dy_underlying
});
}

Expand Down

0 comments on commit 4de588a

Please sign in to comment.