mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
updated test on liquidation threshold, reserve factor
This commit is contained in:
parent
d77e5ce5be
commit
b88bdc8c2c
|
@ -300,7 +300,8 @@ makeSuite('LendingPoolConfigurator', (testEnv: TestEnv) => {
|
||||||
expect(liquidationThreshold).to.be.equal(8000);
|
expect(liquidationThreshold).to.be.equal(8000);
|
||||||
expect(liquidationBonus).to.be.equal(10500);
|
expect(liquidationBonus).to.be.equal(10500);
|
||||||
expect(stableBorrowRateEnabled).to.be.equal(true);
|
expect(stableBorrowRateEnabled).to.be.equal(true);
|
||||||
expect(reserveFactor).to.be.equal(0); });
|
expect(reserveFactor).to.be.equal(0);
|
||||||
|
});
|
||||||
|
|
||||||
it('Check the onlyAaveAdmin on disableReserveStableRate', async () => {
|
it('Check the onlyAaveAdmin on disableReserveStableRate', async () => {
|
||||||
const {configurator, users, weth} = testEnv;
|
const {configurator, users, weth} = testEnv;
|
||||||
|
@ -355,8 +356,27 @@ makeSuite('LendingPoolConfigurator', (testEnv: TestEnv) => {
|
||||||
it('Changes the reserve factor of the reserve', async () => {
|
it('Changes the reserve factor of the reserve', async () => {
|
||||||
const {configurator, pool, weth} = testEnv;
|
const {configurator, pool, weth} = testEnv;
|
||||||
await configurator.setReserveFactor(weth.address, '1000');
|
await configurator.setReserveFactor(weth.address, '1000');
|
||||||
const {reserveFactor} = await pool.getReserveConfigurationData(weth.address);
|
const {
|
||||||
expect(reserveFactor.toString()).to.be.bignumber.equal('1000', 'Invalid reserve factor');
|
decimals,
|
||||||
|
ltv,
|
||||||
|
liquidationBonus,
|
||||||
|
liquidationThreshold,
|
||||||
|
reserveFactor,
|
||||||
|
stableBorrowRateEnabled,
|
||||||
|
borrowingEnabled,
|
||||||
|
isActive,
|
||||||
|
isFreezed,
|
||||||
|
} = await pool.getReserveConfigurationData(weth.address);
|
||||||
|
|
||||||
|
expect(borrowingEnabled).to.be.equal(true);
|
||||||
|
expect(isActive).to.be.equal(true);
|
||||||
|
expect(isFreezed).to.be.equal(false);
|
||||||
|
expect(decimals).to.be.equal(18);
|
||||||
|
expect(ltv).to.be.equal(6000);
|
||||||
|
expect(liquidationThreshold).to.be.equal(8000);
|
||||||
|
expect(liquidationBonus).to.be.equal(10500);
|
||||||
|
expect(stableBorrowRateEnabled).to.be.equal(true);
|
||||||
|
expect(reserveFactor).to.be.equal(1000);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Check the onlyLendingPoolManager on setReserveFactor', async () => {
|
it('Check the onlyLendingPoolManager on setReserveFactor', async () => {
|
||||||
|
@ -369,12 +389,28 @@ makeSuite('LendingPoolConfigurator', (testEnv: TestEnv) => {
|
||||||
|
|
||||||
it('Changes liquidation threshold of the reserve', async () => {
|
it('Changes liquidation threshold of the reserve', async () => {
|
||||||
const {configurator, pool, weth} = testEnv;
|
const {configurator, pool, weth} = testEnv;
|
||||||
await configurator.setLiquidationThreshold(weth.address, '75');
|
await configurator.setLiquidationThreshold(weth.address, '7500');
|
||||||
const {liquidationThreshold} = await pool.getReserveConfigurationData(weth.address);
|
const {
|
||||||
expect(liquidationThreshold.toString()).to.be.bignumber.equal(
|
decimals,
|
||||||
'75',
|
ltv,
|
||||||
'Invalid Liquidation threshold'
|
liquidationBonus,
|
||||||
);
|
liquidationThreshold,
|
||||||
|
reserveFactor,
|
||||||
|
stableBorrowRateEnabled,
|
||||||
|
borrowingEnabled,
|
||||||
|
isActive,
|
||||||
|
isFreezed,
|
||||||
|
} = await pool.getReserveConfigurationData(weth.address);
|
||||||
|
|
||||||
|
expect(borrowingEnabled).to.be.equal(true);
|
||||||
|
expect(isActive).to.be.equal(true);
|
||||||
|
expect(isFreezed).to.be.equal(false);
|
||||||
|
expect(decimals).to.be.equal(18);
|
||||||
|
expect(ltv).to.be.equal(6000);
|
||||||
|
expect(liquidationThreshold).to.be.equal(7500);
|
||||||
|
expect(liquidationBonus).to.be.equal(10500);
|
||||||
|
expect(stableBorrowRateEnabled).to.be.equal(true);
|
||||||
|
expect(reserveFactor).to.be.equal(1000);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Check the onlyAaveAdmin on setLiquidationThreshold', async () => {
|
it('Check the onlyAaveAdmin on setLiquidationThreshold', async () => {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user