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

feat: adds uniswapv3 auto-comound #324

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
chore: refactor interface
  • Loading branch information
WalidOfNow committed Jan 21, 2023
commit 05a7833ce64437d287e1c5d30d3c491249ba4ce0
6 changes: 2 additions & 4 deletions contracts/interfaces/IPoolCore.sol
Original file line number Diff line number Diff line change
Expand Up @@ -318,11 +318,9 @@ interface IPoolCore {
bool receiveEthAsWeth
) external;

function collectSupplyUniswapV3Fees(
function collectCompoundAndSupplyUniswapV3Fees(
address asset,
uint256 tokenId,
uint256 amount0Min,
uint256 amount1Min
uint256 tokenId
) external;

/**
Expand Down
2 changes: 0 additions & 2 deletions contracts/protocol/libraries/types/DataTypes.sol
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,6 @@ library DataTypes {
address asset;
uint256 tokenId;
uint256 reservesCount;
uint256 amount0;
uint256 amount1;
address oracle;
}

Expand Down
8 changes: 2 additions & 6 deletions contracts/protocol/pool/PoolCore.sol
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,9 @@ contract PoolCore is
);
}

function collectSupplyUniswapV3Fees(
function collectCompoundAndSupplyUniswapV3Fees(
address asset,
uint256 tokenId,
uint256 amount0Min,
uint256 amount1Min
uint256 tokenId
) external virtual override {
DataTypes.PoolStorage storage ps = poolStorage();

Expand All @@ -251,8 +249,6 @@ contract PoolCore is
asset: asset,
tokenId: tokenId,
reservesCount: ps._reservesCount,
amount0: amount0Min,
amount1: amount1Min,
oracle: ADDRESSES_PROVIDER.getPriceOracle()
})
);
Expand Down