Skip to content

Commit

Permalink
fix: MultiOracle interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
alcueca committed May 18, 2021
1 parent d7c0c32 commit 548e74e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions contracts/Wand.sol
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ interface ILadleGov {
function addPool(bytes6, address) external;
}

interface IMultiOracleGov {
interface IRateMultiOracleGov {
function setSource(bytes6, bytes32, address) external;
}

interface ISpotMultiOracleGov {
function setSource(bytes6, bytes6, address) external;
}

Expand Down Expand Up @@ -79,7 +83,7 @@ contract Wand is AccessControl {

/// @dev Make a base asset out of a generic asset, by adding rate and chi oracles.
/// This assumes CompoundMultiOracles, which deliver both rate and chi.
function makeBase(bytes6 assetId, IMultiOracleGov oracle, address rateSource, address chiSource) public auth {
function makeBase(bytes6 assetId, IRateMultiOracleGov oracle, address rateSource, address chiSource) public auth {
require (address(oracle) != address(0), "Oracle required");
require (rateSource != address(0), "Rate source required");
require (chiSource != address(0), "Chi source required");
Expand All @@ -90,7 +94,7 @@ contract Wand is AccessControl {
}

/// @dev Make an ilk asset out of a generic asset, by adding a spot oracle against a base asset, collateralization ratio, and debt ceiling.
function makeIlk(bytes6 baseId, bytes6 ilkId, IMultiOracleGov oracle, address spotSource, uint32 ratio, uint128 maxDebt) public auth {
function makeIlk(bytes6 baseId, bytes6 ilkId, ISpotMultiOracleGov oracle, address spotSource, uint32 ratio, uint128 maxDebt) public auth {
oracle.setSource(baseId, ilkId, spotSource);
cauldron.setSpotOracle(baseId, ilkId, IOracle(address(oracle)), ratio);
cauldron.setMaxDebt(baseId, ilkId, maxDebt);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@yield-protocol/vault-v2",
"version": "0.5.0-rc4",
"version": "0.5.0-rc5",
"description": "Yield Collateralized Debt Engine v2",
"author": "Yield Inc.",
"files": [
Expand Down

0 comments on commit 548e74e

Please sign in to comment.