Skip to content

Commit

Permalink
spot appraiser interface update
Browse files Browse the repository at this point in the history
  • Loading branch information
aalavandhan committed Jun 14, 2024
1 parent 91d7e49 commit 914d8db
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions spot-vaults/contracts/_strategies/SpotAppraiser.sol
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,9 @@ contract SpotAppraiser is Ownable, IBillBrokerPricingStrategy {
// we consider it unhealthy.
// NOTE: Any CDR below 100%, means that the tranche is impaired
// and is roughly equivalent to holding AMPL.
uint8 reserveCount = uint8(SPOT.getReserveCount());
uint8 reserveCount = uint8(SPOT.reserveCount());
for (uint8 i = 1; i < reserveCount; i++) {
ITranche tranche = ITranche(address(SPOT.getReserveAt(i)));
ITranche tranche = ITranche(address(SPOT.reserveAt(i)));
IBondController bond = IBondController(tranche.bond());
if (bond.isMature()) {
return false;
Expand Down
6 changes: 3 additions & 3 deletions spot-vaults/test/SpotAppraiser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ describe("SpotAppraiser", function () {
await spot.mockMethod("getTVL()", [perpFP("1000000")]);
await spot.mockMethod("totalSupply()", [perpFP("1000000")]);
await spot.mockMethod("deviationRatio()", [oracleAnsFP("1.5")]);
await spot.mockMethod("getReserveCount()", [2]);
await spot.mockCall("getReserveAt(uint256)", [0], [ampl.target]);
await spot.mockCall("getReserveAt(uint256)", [1], [tranche.target]);
await spot.mockMethod("reserveCount()", [2]);
await spot.mockCall("reserveAt(uint256)", [0], [ampl.target]);
await spot.mockCall("reserveAt(uint256)", [1], [tranche.target]);
await ampl.mockCall("balanceOf(address)", [spot.target], [perpFP("1000")]);

const PriceOracle = await ethers.getContractFactory("MockCLOracle");
Expand Down

0 comments on commit 914d8db

Please sign in to comment.