-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathICompoundERC20DelegatorLike.sol
More file actions
21 lines (19 loc) · 993 Bytes
/
ICompoundERC20DelegatorLike.sol
File metadata and controls
21 lines (19 loc) · 993 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.8.0;
// https://github.com/compound-finance/compound-protocol/blob/master/contracts/CErc20Delegator.sol
interface ICompoundERC20DelegatorLike {
/**
* @notice Sender supplies assets into the market and receives cTokens in exchange
* @dev Accrues interest whether or not the operation succeeds, unless reverted
* @param mintAmount The amount of the underlying asset to supply
* @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
*/
function mint(uint256 mintAmount) external returns (uint256);
/**
* @notice Sender redeems cTokens in exchange for the underlying asset
* @dev Accrues interest whether or not the operation succeeds, unless reverted
* @param redeemTokens The number of cTokens to redeem into underlying
* @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
*/
function redeem(uint256 redeemTokens) external returns (uint256);
}