Skip to content

Commit

Permalink
chore: close cApe collateral flag and add upgrade script
Browse files Browse the repository at this point in the history
  • Loading branch information
zhoujia6139 committed Sep 3, 2023
1 parent b8a5bd8 commit b6a1544
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 674 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,10 @@ upgrade-pool-marketplace:
upgrade-pool-ape-staking:
make TASK_NAME=upgrade:pool-ape-staking run-task

.PHONY: upgrade-borrow_ape_and_stake
upgrade-borrow_ape_and_stake:
make TASK_NAME=upgrade:borrow-ape-and-stake run-task

.PHONY: upgrade-pool-parameters
upgrade-pool-parameters:
make TASK_NAME=upgrade:pool-parameters run-task
Expand Down
91 changes: 0 additions & 91 deletions contracts/interfaces/IPoolApeStaking.sol
Original file line number Diff line number Diff line change
Expand Up @@ -33,95 +33,4 @@ interface IPoolApeStaking {
ApeCoinStaking.SingleNft[] calldata _nfts,
ApeCoinStaking.PairNftDepositWithAmount[] calldata _nftPairs
) external;

/**
* @notice Withdraw staked ApeCoin from the BAYC/MAYC pool
* @param nftAsset Contract address of BAYC/MAYC
* @param _nfts Array of BAYC/MAYC NFT's with staked amounts
* @dev Need check User health factor > 1.
*/
function withdrawApeCoin(
address nftAsset,
ApeCoinStaking.SingleNft[] calldata _nfts
) external;

/**
* @notice Claim rewards for array of tokenIds from the BAYC/MAYC pool
* @param nftAsset Contract address of BAYC/MAYC
* @param _nfts Array of NFTs owned and committed by the msg.sender
* @dev Need check User health factor > 1.
*/
function claimApeCoin(address nftAsset, uint256[] calldata _nfts) external;

/**
* @notice Withdraw staked ApeCoin from the BAKC pool
* @param nftAsset Contract address of BAYC/MAYC
* @param _nftPairs Array of Paired BAYC/MAYC NFT's with staked amounts
* @dev Need check User health factor > 1.
*/
function withdrawBAKC(
address nftAsset,
ApeCoinStaking.PairNftWithdrawWithAmount[] memory _nftPairs
) external;

/**
* @notice Claim rewards for array of tokenIds from the BAYC/MAYC pool
* @param nftAsset Contract address of BAYC/MAYC
* @param _nftPairs Array of Paired BAYC/MAYC NFT's
* @dev Need check User health factor > 1.
*/
function claimBAKC(
address nftAsset,
ApeCoinStaking.PairNft[] calldata _nftPairs
) external;

/**
* @notice Unstake user Ape coin staking position and repay user debt
* @param nftAsset Contract address of BAYC/MAYC
* @param tokenId Token id of the ape staking position on
* @dev Need check User health factor > 1.
*/
function unstakeApePositionAndRepay(address nftAsset, uint256 tokenId)
external;

/**
* @notice repay asset and supply asset for user
* @param underlyingAsset Contract address of BAYC/MAYC
* @param onBehalfOf The beneficiary of the repay and supply
* @dev Convenient callback function for unstakeApePositionAndRepay. Only NToken of BAYC/MAYC can call this.
*/
function repayAndSupply(
address underlyingAsset,
address onBehalfOf,
uint256 totalAmount
) external;

/**
* @notice Claim user Ape coin reward and deposit to ape compound to get cApe, then deposit cApe to Lending pool for user
* @param nftAsset Contract address of BAYC/MAYC
* @param users array of user address
* @param tokenIds array of user tokenId array
*/
function claimApeAndCompound(
address nftAsset,
address[] calldata users,
uint256[][] calldata tokenIds
) external;

/**
* @notice Claim user BAKC paired Ape coin reward and deposit to ape compound to get cApe, then deposit cApe to Lending pool for user
* @param nftAsset Contract address of BAYC/MAYC
* @param users array of user address
* @param _nftPairs Array of Paired BAYC/MAYC NFT's
*/
function claimPairedApeAndCompound(
address nftAsset,
address[] calldata users,
ApeCoinStaking.PairNft[][] calldata _nftPairs
) external;

/**
* @notice get current incentive fee rate for claiming ape position reward to compound
*/
function getApeCompoundFeeRate() external returns (uint256);
}
Loading

0 comments on commit b6a1544

Please sign in to comment.