This repository has been archived by the owner on Nov 22, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add ctoken and clean up interfaces
- Loading branch information
Sawit Trisirisatayawong
committed
Mar 10, 2021
1 parent
4dd2dfd
commit 078123f
Showing
6 changed files
with
35 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,7 @@ | ||
pragma solidity ^0.5.17; | ||
|
||
/************ | ||
@title IPriceOracle interface | ||
@notice Interface for the Aave price oracle.*/ | ||
interface IPriceOracle { | ||
/*********** | ||
@dev returns the asset price in ETH | ||
*/ | ||
function getAssetPrice(address _asset) external view returns (uint256); | ||
interface Oracle { | ||
function getAssetPrice(address reserve) external view returns (uint256); | ||
|
||
/*********** | ||
@dev sets the asset price, in wei | ||
*/ | ||
function setAssetPrice(address _asset, uint256 _price) external; | ||
function latestAnswer() external view returns (uint256); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// SPDX-License-Identifier: MIT | ||
|
||
pragma solidity ^0.5.17; | ||
|
||
interface CToken { | ||
function decimals() external view returns (uint8); | ||
|
||
function totalSupply() external view returns (uint256); | ||
|
||
function underlying() external view returns (address); | ||
|
||
function balanceOfUnderlying(address) external returns (uint256); | ||
|
||
function supplyRatePerBlock() external returns (uint256); | ||
|
||
function exchangeRateCurrent() external returns (uint256); | ||
|
||
function mint(uint256) external returns (uint256); | ||
|
||
function balanceOf(address) external view returns (uint256); | ||
|
||
function redeemUnderlying(uint256) external returns (uint256); | ||
|
||
function redeem(uint256) external returns (uint256); | ||
|
||
function approve(address, uint256) external returns (bool); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters