Skip to content

Commit

Permalink
Merge branch 'registry-deployer' of github.com:reserve-protocol/proto…
Browse files Browse the repository at this point in the history
…col into registry-deployer
  • Loading branch information
akshatmittal committed Oct 24, 2024
2 parents 73975f3 + 458ced6 commit 19b0717
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions test/scenario/BasketNormalization.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ describeP1(`Basket Normalization Test (Spell)`, () => {
expect(currentBasket.targetAmts[0]).to.equal(fp('1'))
expect(currentBasket.targetAmts[1]).to.equal(fp('1'))

const initialPrice = await bh['price(bool)'](false)

await main.connect(owner).grantRole(await main.OWNER_ROLE(), basketNormalizerSpell.address)
await basketNormalizerSpell.setNormalizedBasket(
rToken.address,
Expand All @@ -199,8 +201,14 @@ describeP1(`Basket Normalization Test (Spell)`, () => {
expect(await main.hasRole(await main.OWNER_ROLE(), basketNormalizerSpell.address)).to.be.false

const nextBasket = await bh.getPrimeBasket()
expect(nextBasket.targetAmts[0]).to.greaterThanOrEqual(fp('24.9'))
expect(nextBasket.targetAmts[1]).to.greaterThanOrEqual(fp('49.9'))
expect(nextBasket.targetAmts[0]).to.be.greaterThanOrEqual(fp('24.9'))
expect(nextBasket.targetAmts[1]).to.be.greaterThanOrEqual(fp('49.9'))
expect(nextBasket.targetAmts[0]).to.be.lessThanOrEqual(fp('25'))
expect(nextBasket.targetAmts[1]).to.be.lessThanOrEqual(fp('50'))

const price = await bh['price(bool)'](false)
expect(price.low).to.be.closeTo(initialPrice.low, 1)
expect(price.high).to.be.closeTo(initialPrice.high, 1)
})
})
})

0 comments on commit 19b0717

Please sign in to comment.