mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
Fixed test
This commit is contained in:
parent
19b3d987f8
commit
73254a66aa
|
@ -163,25 +163,26 @@
|
|||
},
|
||||
"ReserveLogic": {
|
||||
"buidlerevm": {
|
||||
"address": "0xFAe0fd738dAbc8a0426F47437322b6d026A9FD95",
|
||||
"address": "0x78Ee8Fb9fE5abD5e347Fc94c2fb85596d1f60e3c",
|
||||
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
|
||||
}
|
||||
},
|
||||
"GenericLogic": {
|
||||
"buidlerevm": {
|
||||
"address": "0x6082731fdAba4761277Fb31299ebC782AD3bCf24",
|
||||
"address": "0x920d847fE49E54C19047ba8bc236C45A8068Bca7",
|
||||
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
|
||||
}
|
||||
},
|
||||
"ValidationLogic": {
|
||||
"buidlerevm": {
|
||||
"address": "0x8456161947DFc1fC159A0B26c025cD2b4bba0c3e",
|
||||
"address": "0xA4765Ff72A9F3CfE73089bb2c3a41B838DF71574",
|
||||
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
|
||||
}
|
||||
},
|
||||
"LendingPool": {
|
||||
"buidlerevm": {
|
||||
"address": "0xD9273d497eDBC967F39d419461CfcF382a0A822e"
|
||||
"address": "0x35c1419Da7cf0Ff885B8Ef8EA9242FEF6800c99b",
|
||||
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
|
||||
}
|
||||
},
|
||||
"LendingPoolConfigurator": {
|
||||
|
@ -197,7 +198,7 @@
|
|||
},
|
||||
"ATokensAndRatesHelper": {
|
||||
"buidlerevm": {
|
||||
"address": "0x06bA8d8af0dF898D0712DffFb0f862cC51AF45c2",
|
||||
"address": "0x920d847fE49E54C19047ba8bc236C45A8068Bca7",
|
||||
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
|
||||
}
|
||||
},
|
||||
|
|
|
@ -11,7 +11,7 @@ const {expect} = require('chai');
|
|||
|
||||
makeSuite('LendingPoolConfigurator', (testEnv: TestEnv) => {
|
||||
const {
|
||||
LPC_CALLER_NOT_AAVE_ADMIN,
|
||||
CALLER_NOT_AAVE_ADMIN,
|
||||
LPC_RESERVE_LIQUIDITY_NOT_0,
|
||||
RC_INVALID_LTV,
|
||||
RC_INVALID_LIQ_THRESHOLD,
|
||||
|
@ -87,16 +87,16 @@ makeSuite('LendingPoolConfigurator', (testEnv: TestEnv) => {
|
|||
const {configurator, users, weth} = testEnv;
|
||||
await expect(
|
||||
configurator.connect(users[2].signer).deactivateReserve(weth.address),
|
||||
LPC_CALLER_NOT_AAVE_ADMIN
|
||||
).to.be.revertedWith(LPC_CALLER_NOT_AAVE_ADMIN);
|
||||
CALLER_NOT_AAVE_ADMIN
|
||||
).to.be.revertedWith(CALLER_NOT_AAVE_ADMIN);
|
||||
});
|
||||
|
||||
it('Check the onlyAaveAdmin on activateReserve ', async () => {
|
||||
const {configurator, users, weth} = testEnv;
|
||||
await expect(
|
||||
configurator.connect(users[2].signer).activateReserve(weth.address),
|
||||
LPC_CALLER_NOT_AAVE_ADMIN
|
||||
).to.be.revertedWith(LPC_CALLER_NOT_AAVE_ADMIN);
|
||||
CALLER_NOT_AAVE_ADMIN
|
||||
).to.be.revertedWith(CALLER_NOT_AAVE_ADMIN);
|
||||
});
|
||||
|
||||
it('Freezes the ETH reserve', async () => {
|
||||
|
@ -156,16 +156,16 @@ makeSuite('LendingPoolConfigurator', (testEnv: TestEnv) => {
|
|||
const {configurator, users, weth} = testEnv;
|
||||
await expect(
|
||||
configurator.connect(users[2].signer).freezeReserve(weth.address),
|
||||
LPC_CALLER_NOT_AAVE_ADMIN
|
||||
).to.be.revertedWith(LPC_CALLER_NOT_AAVE_ADMIN);
|
||||
CALLER_NOT_AAVE_ADMIN
|
||||
).to.be.revertedWith(CALLER_NOT_AAVE_ADMIN);
|
||||
});
|
||||
|
||||
it('Check the onlyAaveAdmin on unfreezeReserve ', async () => {
|
||||
const {configurator, users, weth} = testEnv;
|
||||
await expect(
|
||||
configurator.connect(users[2].signer).unfreezeReserve(weth.address),
|
||||
LPC_CALLER_NOT_AAVE_ADMIN
|
||||
).to.be.revertedWith(LPC_CALLER_NOT_AAVE_ADMIN);
|
||||
CALLER_NOT_AAVE_ADMIN
|
||||
).to.be.revertedWith(CALLER_NOT_AAVE_ADMIN);
|
||||
});
|
||||
|
||||
it('Deactivates the ETH reserve for borrowing', async () => {
|
||||
|
@ -228,16 +228,16 @@ makeSuite('LendingPoolConfigurator', (testEnv: TestEnv) => {
|
|||
const {configurator, users, weth} = testEnv;
|
||||
await expect(
|
||||
configurator.connect(users[2].signer).disableBorrowingOnReserve(weth.address),
|
||||
LPC_CALLER_NOT_AAVE_ADMIN
|
||||
).to.be.revertedWith(LPC_CALLER_NOT_AAVE_ADMIN);
|
||||
CALLER_NOT_AAVE_ADMIN
|
||||
).to.be.revertedWith(CALLER_NOT_AAVE_ADMIN);
|
||||
});
|
||||
|
||||
it('Check the onlyAaveAdmin on enableBorrowingOnReserve ', async () => {
|
||||
const {configurator, users, weth} = testEnv;
|
||||
await expect(
|
||||
configurator.connect(users[2].signer).enableBorrowingOnReserve(weth.address, true),
|
||||
LPC_CALLER_NOT_AAVE_ADMIN
|
||||
).to.be.revertedWith(LPC_CALLER_NOT_AAVE_ADMIN);
|
||||
CALLER_NOT_AAVE_ADMIN
|
||||
).to.be.revertedWith(CALLER_NOT_AAVE_ADMIN);
|
||||
});
|
||||
|
||||
it('Deactivates the ETH reserve as collateral', async () => {
|
||||
|
@ -300,8 +300,8 @@ makeSuite('LendingPoolConfigurator', (testEnv: TestEnv) => {
|
|||
configurator
|
||||
.connect(users[2].signer)
|
||||
.configureReserveAsCollateral(weth.address, '7500', '8000', '10500'),
|
||||
LPC_CALLER_NOT_AAVE_ADMIN
|
||||
).to.be.revertedWith(LPC_CALLER_NOT_AAVE_ADMIN);
|
||||
CALLER_NOT_AAVE_ADMIN
|
||||
).to.be.revertedWith(CALLER_NOT_AAVE_ADMIN);
|
||||
});
|
||||
|
||||
it('Disable stable borrow rate on the ETH reserve', async () => {
|
||||
|
@ -360,16 +360,16 @@ makeSuite('LendingPoolConfigurator', (testEnv: TestEnv) => {
|
|||
const {configurator, users, weth} = testEnv;
|
||||
await expect(
|
||||
configurator.connect(users[2].signer).disableReserveStableRate(weth.address),
|
||||
LPC_CALLER_NOT_AAVE_ADMIN
|
||||
).to.be.revertedWith(LPC_CALLER_NOT_AAVE_ADMIN);
|
||||
CALLER_NOT_AAVE_ADMIN
|
||||
).to.be.revertedWith(CALLER_NOT_AAVE_ADMIN);
|
||||
});
|
||||
|
||||
it('Check the onlyAaveAdmin on enableReserveStableRate', async () => {
|
||||
const {configurator, users, weth} = testEnv;
|
||||
await expect(
|
||||
configurator.connect(users[2].signer).enableReserveStableRate(weth.address),
|
||||
LPC_CALLER_NOT_AAVE_ADMIN
|
||||
).to.be.revertedWith(LPC_CALLER_NOT_AAVE_ADMIN);
|
||||
CALLER_NOT_AAVE_ADMIN
|
||||
).to.be.revertedWith(CALLER_NOT_AAVE_ADMIN);
|
||||
});
|
||||
|
||||
it('Changes LTV of the reserve', async () => {
|
||||
|
@ -402,8 +402,8 @@ makeSuite('LendingPoolConfigurator', (testEnv: TestEnv) => {
|
|||
const {configurator, users, weth} = testEnv;
|
||||
await expect(
|
||||
configurator.connect(users[2].signer).setLtv(weth.address, '75'),
|
||||
LPC_CALLER_NOT_AAVE_ADMIN
|
||||
).to.be.revertedWith(LPC_CALLER_NOT_AAVE_ADMIN);
|
||||
CALLER_NOT_AAVE_ADMIN
|
||||
).to.be.revertedWith(CALLER_NOT_AAVE_ADMIN);
|
||||
});
|
||||
|
||||
it('Changes the reserve factor of the reserve', async () => {
|
||||
|
@ -436,8 +436,8 @@ makeSuite('LendingPoolConfigurator', (testEnv: TestEnv) => {
|
|||
const {configurator, users, weth} = testEnv;
|
||||
await expect(
|
||||
configurator.connect(users[2].signer).setReserveFactor(weth.address, '2000'),
|
||||
LPC_CALLER_NOT_AAVE_ADMIN
|
||||
).to.be.revertedWith(LPC_CALLER_NOT_AAVE_ADMIN);
|
||||
CALLER_NOT_AAVE_ADMIN
|
||||
).to.be.revertedWith(CALLER_NOT_AAVE_ADMIN);
|
||||
});
|
||||
|
||||
it('Changes liquidation threshold of the reserve', async () => {
|
||||
|
@ -470,8 +470,8 @@ makeSuite('LendingPoolConfigurator', (testEnv: TestEnv) => {
|
|||
const {configurator, users, weth} = testEnv;
|
||||
await expect(
|
||||
configurator.connect(users[2].signer).setLiquidationThreshold(weth.address, '80'),
|
||||
LPC_CALLER_NOT_AAVE_ADMIN
|
||||
).to.be.revertedWith(LPC_CALLER_NOT_AAVE_ADMIN);
|
||||
CALLER_NOT_AAVE_ADMIN
|
||||
).to.be.revertedWith(CALLER_NOT_AAVE_ADMIN);
|
||||
});
|
||||
|
||||
it('Changes liquidation bonus of the reserve', async () => {
|
||||
|
@ -504,24 +504,24 @@ makeSuite('LendingPoolConfigurator', (testEnv: TestEnv) => {
|
|||
const {configurator, users, weth} = testEnv;
|
||||
await expect(
|
||||
configurator.connect(users[2].signer).setLiquidationBonus(weth.address, '80'),
|
||||
LPC_CALLER_NOT_AAVE_ADMIN
|
||||
).to.be.revertedWith(LPC_CALLER_NOT_AAVE_ADMIN);
|
||||
CALLER_NOT_AAVE_ADMIN
|
||||
).to.be.revertedWith(CALLER_NOT_AAVE_ADMIN);
|
||||
});
|
||||
|
||||
it('Check the onlyAaveAdmin on setReserveDecimals', async () => {
|
||||
const {configurator, users, weth} = testEnv;
|
||||
await expect(
|
||||
configurator.connect(users[2].signer).setReserveDecimals(weth.address, '80'),
|
||||
LPC_CALLER_NOT_AAVE_ADMIN
|
||||
).to.be.revertedWith(LPC_CALLER_NOT_AAVE_ADMIN);
|
||||
CALLER_NOT_AAVE_ADMIN
|
||||
).to.be.revertedWith(CALLER_NOT_AAVE_ADMIN);
|
||||
});
|
||||
|
||||
it('Check the onlyAaveAdmin on setLiquidationBonus', async () => {
|
||||
const {configurator, users, weth} = testEnv;
|
||||
await expect(
|
||||
configurator.connect(users[2].signer).setLiquidationBonus(weth.address, '80'),
|
||||
LPC_CALLER_NOT_AAVE_ADMIN
|
||||
).to.be.revertedWith(LPC_CALLER_NOT_AAVE_ADMIN);
|
||||
CALLER_NOT_AAVE_ADMIN
|
||||
).to.be.revertedWith(CALLER_NOT_AAVE_ADMIN);
|
||||
});
|
||||
|
||||
it('Reverts when trying to disable the DAI reserve with liquidity on it', async () => {
|
||||
|
|
|
@ -19,7 +19,7 @@ import {
|
|||
} from '../helpers/contracts-deployments';
|
||||
|
||||
makeSuite('Upgradeability', (testEnv: TestEnv) => {
|
||||
const {LPC_CALLER_NOT_AAVE_ADMIN} = ProtocolErrors;
|
||||
const {CALLER_NOT_AAVE_ADMIN} = ProtocolErrors;
|
||||
let newATokenAddress: string;
|
||||
let newStableTokenAddress: string;
|
||||
let newVariableTokenAddress: string;
|
||||
|
@ -61,7 +61,7 @@ makeSuite('Upgradeability', (testEnv: TestEnv) => {
|
|||
|
||||
await expect(
|
||||
configurator.connect(users[1].signer).updateAToken(dai.address, newATokenAddress)
|
||||
).to.be.revertedWith(LPC_CALLER_NOT_AAVE_ADMIN);
|
||||
).to.be.revertedWith(CALLER_NOT_AAVE_ADMIN);
|
||||
});
|
||||
|
||||
it('Upgrades the DAI Atoken implementation ', async () => {
|
||||
|
@ -83,7 +83,7 @@ makeSuite('Upgradeability', (testEnv: TestEnv) => {
|
|||
configurator
|
||||
.connect(users[1].signer)
|
||||
.updateStableDebtToken(dai.address, newStableTokenAddress)
|
||||
).to.be.revertedWith(LPC_CALLER_NOT_AAVE_ADMIN);
|
||||
).to.be.revertedWith(CALLER_NOT_AAVE_ADMIN);
|
||||
});
|
||||
|
||||
it('Upgrades the DAI stable debt token implementation ', async () => {
|
||||
|
@ -109,7 +109,7 @@ makeSuite('Upgradeability', (testEnv: TestEnv) => {
|
|||
configurator
|
||||
.connect(users[1].signer)
|
||||
.updateVariableDebtToken(dai.address, newVariableTokenAddress)
|
||||
).to.be.revertedWith(LPC_CALLER_NOT_AAVE_ADMIN);
|
||||
).to.be.revertedWith(CALLER_NOT_AAVE_ADMIN);
|
||||
});
|
||||
|
||||
it('Upgrades the DAI variable debt token implementation ', async () => {
|
||||
|
|
Loading…
Reference in New Issue
Block a user