mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
- Refactoring on some Errors
This commit is contained in:
parent
693576f853
commit
f32ac702ec
|
@ -8,7 +8,10 @@ pragma solidity ^0.6.8;
|
||||||
* @dev Error messages prefix glossary:
|
* @dev Error messages prefix glossary:
|
||||||
* - VL = ValidationLogic
|
* - VL = ValidationLogic
|
||||||
* - MATH = Math libraries
|
* - MATH = Math libraries
|
||||||
* - AT = aToken or DebtTokens
|
* - CT = Common errors between tokens (AToken, VariableDebtToken and StableDebtToken)
|
||||||
|
* - AT = AToken
|
||||||
|
* - SDT = StableDebtToken
|
||||||
|
* - VDT = VariableDebtToken
|
||||||
* - LP = LendingPool
|
* - LP = LendingPool
|
||||||
* - LPAPR = LendingPoolAddressesProviderRegistry
|
* - LPAPR = LendingPoolAddressesProviderRegistry
|
||||||
* - LPC = LendingPoolConfiguration
|
* - LPC = LendingPoolConfiguration
|
||||||
|
@ -50,9 +53,9 @@ library Errors {
|
||||||
string public constant LP_INCONSISTENT_PROTOCOL_ACTUAL_BALANCE = '26'; // 'The actual balance of the protocol is inconsistent'
|
string public constant LP_INCONSISTENT_PROTOCOL_ACTUAL_BALANCE = '26'; // 'The actual balance of the protocol is inconsistent'
|
||||||
string public constant LP_CALLER_NOT_LENDING_POOL_CONFIGURATOR = '27'; // 'The caller of the function is not the lending pool configurator'
|
string public constant LP_CALLER_NOT_LENDING_POOL_CONFIGURATOR = '27'; // 'The caller of the function is not the lending pool configurator'
|
||||||
string public constant LP_INCONSISTENT_FLASHLOAN_PARAMS = '28';
|
string public constant LP_INCONSISTENT_FLASHLOAN_PARAMS = '28';
|
||||||
string public constant AT_CALLER_MUST_BE_LENDING_POOL = '29'; // 'The caller of this function must be a lending pool'
|
string public constant CT_CALLER_MUST_BE_LENDING_POOL = '29'; // 'The caller of this function must be a lending pool'
|
||||||
string public constant AT_CANNOT_GIVE_ALLVWANCE_TO_HIMSELF = '30'; // 'User cannot give allowance to himself'
|
string public constant CT_CANNOT_GIVE_ALLOWANCE_TO_HIMSELF = '30'; // 'User cannot give allowance to himself'
|
||||||
string public constant AT_TRANSFER_AMOUNT_NOT_GT_0 = '31'; // 'Transferred amount needs to be greater than zero'
|
string public constant CT_TRANSFER_AMOUNT_NOT_GT_0 = '31'; // 'Transferred amount needs to be greater than zero'
|
||||||
string public constant RL_RESERVE_ALREADY_INITIALIZED = '32'; // 'Reserve has already been initialized'
|
string public constant RL_RESERVE_ALREADY_INITIALIZED = '32'; // 'Reserve has already been initialized'
|
||||||
string public constant LPC_RESERVE_LIQUIDITY_NOT_0 = '34'; // 'The liquidity of the reserve needs to be 0'
|
string public constant LPC_RESERVE_LIQUIDITY_NOT_0 = '34'; // 'The liquidity of the reserve needs to be 0'
|
||||||
string public constant LPC_INVALID_ATOKEN_POOL_ADDRESS = '35'; // 'The liquidity of the reserve needs to be 0'
|
string public constant LPC_INVALID_ATOKEN_POOL_ADDRESS = '35'; // 'The liquidity of the reserve needs to be 0'
|
||||||
|
@ -78,9 +81,9 @@ library Errors {
|
||||||
string public constant RL_LIQUIDITY_RATE_OVERFLOW = '53'; // Liquidity rate overflows uint128
|
string public constant RL_LIQUIDITY_RATE_OVERFLOW = '53'; // Liquidity rate overflows uint128
|
||||||
string public constant RL_VARIABLE_BORROW_RATE_OVERFLOW = '54'; // Variable borrow rate overflows uint128
|
string public constant RL_VARIABLE_BORROW_RATE_OVERFLOW = '54'; // Variable borrow rate overflows uint128
|
||||||
string public constant RL_STABLE_BORROW_RATE_OVERFLOW = '55'; // Stable borrow rate overflows uint128
|
string public constant RL_STABLE_BORROW_RATE_OVERFLOW = '55'; // Stable borrow rate overflows uint128
|
||||||
string public constant AT_INVALID_MINT_AMOUNT = '56'; //invalid amount to mint
|
string public constant CT_INVALID_MINT_AMOUNT = '56'; //invalid amount to mint
|
||||||
string public constant LP_FAILED_REPAY_WITH_COLLATERAL = '57';
|
string public constant LP_FAILED_REPAY_WITH_COLLATERAL = '57';
|
||||||
string public constant AT_INVALID_BURN_AMOUNT = '58'; //invalid amount to burn
|
string public constant CT_INVALID_BURN_AMOUNT = '58'; //invalid amount to burn
|
||||||
string public constant LP_FAILED_COLLATERAL_SWAP = '60';
|
string public constant LP_FAILED_COLLATERAL_SWAP = '60';
|
||||||
string public constant LP_INVALID_EQUAL_ASSETS_TO_SWAP = '61';
|
string public constant LP_INVALID_EQUAL_ASSETS_TO_SWAP = '61';
|
||||||
string public constant LP_REENTRANCY_NOT_ALLOWED = '62';
|
string public constant LP_REENTRANCY_NOT_ALLOWED = '62';
|
||||||
|
@ -98,8 +101,8 @@ library Errors {
|
||||||
string public constant LP_INCONSISTENT_PARAMS_LENGTH = '74';
|
string public constant LP_INCONSISTENT_PARAMS_LENGTH = '74';
|
||||||
string public constant UL_INVALID_INDEX = '77';
|
string public constant UL_INVALID_INDEX = '77';
|
||||||
string public constant LP_NOT_CONTRACT = '78';
|
string public constant LP_NOT_CONTRACT = '78';
|
||||||
string public constant AT_STABLE_DEBT_OVERFLOW = '79';
|
string public constant SDT_STABLE_DEBT_OVERFLOW = '79';
|
||||||
string public constant AT_BURN_EXCEEDS_BALANCE = '80';
|
string public constant SDT_BURN_EXCEEDS_BALANCE = '80';
|
||||||
|
|
||||||
enum CollateralManagerErrors {
|
enum CollateralManagerErrors {
|
||||||
NO_ERROR,
|
NO_ERROR,
|
||||||
|
|
|
@ -40,7 +40,7 @@ contract AToken is VersionedInitializable, IncentivizedERC20, IAToken {
|
||||||
bytes32 public DOMAIN_SEPARATOR;
|
bytes32 public DOMAIN_SEPARATOR;
|
||||||
|
|
||||||
modifier onlyLendingPool {
|
modifier onlyLendingPool {
|
||||||
require(_msgSender() == address(POOL), Errors.AT_CALLER_MUST_BE_LENDING_POOL);
|
require(_msgSender() == address(POOL), Errors.CT_CALLER_MUST_BE_LENDING_POOL);
|
||||||
_;
|
_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ contract AToken is VersionedInitializable, IncentivizedERC20, IAToken {
|
||||||
uint256 index
|
uint256 index
|
||||||
) external override onlyLendingPool {
|
) external override onlyLendingPool {
|
||||||
uint256 amountScaled = amount.rayDiv(index);
|
uint256 amountScaled = amount.rayDiv(index);
|
||||||
require(amountScaled != 0, Errors.AT_INVALID_BURN_AMOUNT);
|
require(amountScaled != 0, Errors.CT_INVALID_BURN_AMOUNT);
|
||||||
_burn(user, amountScaled);
|
_burn(user, amountScaled);
|
||||||
|
|
||||||
//transfers the underlying to the target
|
//transfers the underlying to the target
|
||||||
|
@ -127,7 +127,7 @@ contract AToken is VersionedInitializable, IncentivizedERC20, IAToken {
|
||||||
uint256 previousBalance = super.balanceOf(user);
|
uint256 previousBalance = super.balanceOf(user);
|
||||||
|
|
||||||
uint256 amountScaled = amount.rayDiv(index);
|
uint256 amountScaled = amount.rayDiv(index);
|
||||||
require(amountScaled != 0, Errors.AT_INVALID_MINT_AMOUNT);
|
require(amountScaled != 0, Errors.CT_INVALID_MINT_AMOUNT);
|
||||||
_mint(user, amountScaled);
|
_mint(user, amountScaled);
|
||||||
|
|
||||||
//transfer event to track balances
|
//transfer event to track balances
|
||||||
|
|
|
@ -123,7 +123,7 @@ contract StableDebtToken is IStableDebtToken, DebtTokenBase {
|
||||||
.add(vars.amountInRay.rayMul(rate))
|
.add(vars.amountInRay.rayMul(rate))
|
||||||
.rayDiv(currentBalance.add(amount).wadToRay());
|
.rayDiv(currentBalance.add(amount).wadToRay());
|
||||||
|
|
||||||
require(vars.newStableRate < type(uint128).max, Errors.AT_STABLE_DEBT_OVERFLOW);
|
require(vars.newStableRate < type(uint128).max, Errors.SDT_STABLE_DEBT_OVERFLOW);
|
||||||
_usersStableRate[onBehalfOf] = vars.newStableRate;
|
_usersStableRate[onBehalfOf] = vars.newStableRate;
|
||||||
|
|
||||||
//updating the user and supply timestamp
|
//updating the user and supply timestamp
|
||||||
|
@ -343,7 +343,7 @@ contract StableDebtToken is IStableDebtToken, DebtTokenBase {
|
||||||
uint256 oldTotalSupply
|
uint256 oldTotalSupply
|
||||||
) internal {
|
) internal {
|
||||||
uint256 oldAccountBalance = _balances[account];
|
uint256 oldAccountBalance = _balances[account];
|
||||||
_balances[account] = oldAccountBalance.sub(amount, Errors.AT_BURN_EXCEEDS_BALANCE);
|
_balances[account] = oldAccountBalance.sub(amount, Errors.SDT_BURN_EXCEEDS_BALANCE);
|
||||||
|
|
||||||
if (address(_incentivesController) != address(0)) {
|
if (address(_incentivesController) != address(0)) {
|
||||||
_incentivesController.handleAction(account, oldTotalSupply, oldAccountBalance);
|
_incentivesController.handleAction(account, oldTotalSupply, oldAccountBalance);
|
||||||
|
|
|
@ -65,7 +65,7 @@ contract VariableDebtToken is DebtTokenBase, IVariableDebtToken {
|
||||||
|
|
||||||
uint256 previousBalance = super.balanceOf(onBehalfOf);
|
uint256 previousBalance = super.balanceOf(onBehalfOf);
|
||||||
uint256 amountScaled = amount.rayDiv(index);
|
uint256 amountScaled = amount.rayDiv(index);
|
||||||
require(amountScaled != 0, Errors.AT_INVALID_MINT_AMOUNT);
|
require(amountScaled != 0, Errors.CT_INVALID_MINT_AMOUNT);
|
||||||
|
|
||||||
_mint(onBehalfOf, amountScaled);
|
_mint(onBehalfOf, amountScaled);
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@ contract VariableDebtToken is DebtTokenBase, IVariableDebtToken {
|
||||||
uint256 index
|
uint256 index
|
||||||
) external override onlyLendingPool {
|
) external override onlyLendingPool {
|
||||||
uint256 amountScaled = amount.rayDiv(index);
|
uint256 amountScaled = amount.rayDiv(index);
|
||||||
require(amountScaled != 0, Errors.AT_INVALID_BURN_AMOUNT);
|
require(amountScaled != 0, Errors.CT_INVALID_BURN_AMOUNT);
|
||||||
|
|
||||||
_burn(user, amountScaled);
|
_burn(user, amountScaled);
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ abstract contract DebtTokenBase is IncentivizedERC20, VersionedInitializable {
|
||||||
* @dev Only lending pool can call functions marked by this modifier
|
* @dev Only lending pool can call functions marked by this modifier
|
||||||
**/
|
**/
|
||||||
modifier onlyLendingPool {
|
modifier onlyLendingPool {
|
||||||
require(_msgSender() == address(POOL), Errors.AT_CALLER_MUST_BE_LENDING_POOL);
|
require(_msgSender() == address(POOL), Errors.CT_CALLER_MUST_BE_LENDING_POOL);
|
||||||
_;
|
_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -114,9 +114,9 @@ export enum ProtocolErrors {
|
||||||
LP_INCONSISTENT_PROTOCOL_ACTUAL_BALANCE = '26', // 'The actual balance of the protocol is inconsistent'
|
LP_INCONSISTENT_PROTOCOL_ACTUAL_BALANCE = '26', // 'The actual balance of the protocol is inconsistent'
|
||||||
LP_CALLER_NOT_LENDING_POOL_CONFIGURATOR = '27', // 'The caller is not the lending pool configurator'
|
LP_CALLER_NOT_LENDING_POOL_CONFIGURATOR = '27', // 'The caller is not the lending pool configurator'
|
||||||
LP_INCONSISTENT_FLASHLOAN_PARAMS = '28',
|
LP_INCONSISTENT_FLASHLOAN_PARAMS = '28',
|
||||||
AT_CALLER_MUST_BE_LENDING_POOL = '29', // 'The caller of this function must be a lending pool'
|
CT_CALLER_MUST_BE_LENDING_POOL = '29', // 'The caller of this function must be a lending pool'
|
||||||
AT_CANNOT_GIVE_ALLVWANCE_TO_HIMSELF = '30', // 'User cannot give allowance to himself'
|
CT_CANNOT_GIVE_ALLOWANCE_TO_HIMSELF = '30', // 'User cannot give allowance to himself'
|
||||||
AT_TRANSFER_AMOUNT_NOT_GT_0 = '31', // 'Transferred amount needs to be greater than zero'
|
CT_TRANSFER_AMOUNT_NOT_GT_0 = '31', // 'Transferred amount needs to be greater than zero'
|
||||||
RL_RESERVE_ALREADY_INITIALIZED = '32', // 'Reserve has already been initialized'
|
RL_RESERVE_ALREADY_INITIALIZED = '32', // 'Reserve has already been initialized'
|
||||||
LPC_RESERVE_LIQUIDITY_NOT_0 = '34', // 'The liquidity of the reserve needs to be 0'
|
LPC_RESERVE_LIQUIDITY_NOT_0 = '34', // 'The liquidity of the reserve needs to be 0'
|
||||||
LPC_INVALID_ATOKEN_POOL_ADDRESS = '35', // 'The liquidity of the reserve needs to be 0'
|
LPC_INVALID_ATOKEN_POOL_ADDRESS = '35', // 'The liquidity of the reserve needs to be 0'
|
||||||
|
@ -141,9 +141,9 @@ export enum ProtocolErrors {
|
||||||
RL_LIQUIDITY_RATE_OVERFLOW = '53', // Liquidity rate overflows uint128
|
RL_LIQUIDITY_RATE_OVERFLOW = '53', // Liquidity rate overflows uint128
|
||||||
RL_VARIABLE_BORROW_RATE_OVERFLOW = '54', // Variable borrow rate overflows uint128
|
RL_VARIABLE_BORROW_RATE_OVERFLOW = '54', // Variable borrow rate overflows uint128
|
||||||
RL_STABLE_BORROW_RATE_OVERFLOW = '55', // Stable borrow rate overflows uint128
|
RL_STABLE_BORROW_RATE_OVERFLOW = '55', // Stable borrow rate overflows uint128
|
||||||
AT_INVALID_MINT_AMOUNT = '56', //invalid amount to mint
|
CT_INVALID_MINT_AMOUNT = '56', //invalid amount to mint
|
||||||
LP_FAILED_REPAY_WITH_COLLATERAL = '57',
|
LP_FAILED_REPAY_WITH_COLLATERAL = '57',
|
||||||
AT_INVALID_BURN_AMOUNT = '58', //invalid amount to burn
|
CT_INVALID_BURN_AMOUNT = '58', //invalid amount to burn
|
||||||
LP_BORROW_ALLOWANCE_NOT_ENOUGH = '59', // User borrows on behalf, but allowance are too small
|
LP_BORROW_ALLOWANCE_NOT_ENOUGH = '59', // User borrows on behalf, but allowance are too small
|
||||||
LP_FAILED_COLLATERAL_SWAP = '60',
|
LP_FAILED_COLLATERAL_SWAP = '60',
|
||||||
LP_INVALID_EQUAL_ASSETS_TO_SWAP = '61',
|
LP_INVALID_EQUAL_ASSETS_TO_SWAP = '61',
|
||||||
|
|
|
@ -3,19 +3,19 @@ import {makeSuite, TestEnv} from './helpers/make-suite';
|
||||||
import {ProtocolErrors} from '../helpers/types';
|
import {ProtocolErrors} from '../helpers/types';
|
||||||
|
|
||||||
makeSuite('AToken: Modifiers', (testEnv: TestEnv) => {
|
makeSuite('AToken: Modifiers', (testEnv: TestEnv) => {
|
||||||
const {AT_CALLER_MUST_BE_LENDING_POOL} = ProtocolErrors;
|
const {CT_CALLER_MUST_BE_LENDING_POOL} = ProtocolErrors;
|
||||||
|
|
||||||
it('Tries to invoke mint not being the LendingPool', async () => {
|
it('Tries to invoke mint not being the LendingPool', async () => {
|
||||||
const {deployer, aDai} = testEnv;
|
const {deployer, aDai} = testEnv;
|
||||||
await expect(aDai.mint(deployer.address, '1', '1')).to.be.revertedWith(
|
await expect(aDai.mint(deployer.address, '1', '1')).to.be.revertedWith(
|
||||||
AT_CALLER_MUST_BE_LENDING_POOL
|
CT_CALLER_MUST_BE_LENDING_POOL
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Tries to invoke burn not being the LendingPool', async () => {
|
it('Tries to invoke burn not being the LendingPool', async () => {
|
||||||
const {deployer, aDai} = testEnv;
|
const {deployer, aDai} = testEnv;
|
||||||
await expect(aDai.burn(deployer.address, deployer.address, '1', '1')).to.be.revertedWith(
|
await expect(aDai.burn(deployer.address, deployer.address, '1', '1')).to.be.revertedWith(
|
||||||
AT_CALLER_MUST_BE_LENDING_POOL
|
CT_CALLER_MUST_BE_LENDING_POOL
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -23,13 +23,13 @@ makeSuite('AToken: Modifiers', (testEnv: TestEnv) => {
|
||||||
const {deployer, users, aDai} = testEnv;
|
const {deployer, users, aDai} = testEnv;
|
||||||
await expect(
|
await expect(
|
||||||
aDai.transferOnLiquidation(deployer.address, users[0].address, '1')
|
aDai.transferOnLiquidation(deployer.address, users[0].address, '1')
|
||||||
).to.be.revertedWith(AT_CALLER_MUST_BE_LENDING_POOL);
|
).to.be.revertedWith(CT_CALLER_MUST_BE_LENDING_POOL);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Tries to invoke transferUnderlyingTo not being the LendingPool', async () => {
|
it('Tries to invoke transferUnderlyingTo not being the LendingPool', async () => {
|
||||||
const {deployer, users, aDai} = testEnv;
|
const {deployer, aDai} = testEnv;
|
||||||
await expect(aDai.transferUnderlyingTo(deployer.address, '1')).to.be.revertedWith(
|
await expect(aDai.transferUnderlyingTo(deployer.address, '1')).to.be.revertedWith(
|
||||||
AT_CALLER_MUST_BE_LENDING_POOL
|
CT_CALLER_MUST_BE_LENDING_POOL
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
import {expect} from 'chai';
|
import {expect} from 'chai';
|
||||||
import {makeSuite, TestEnv} from './helpers/make-suite';
|
import {makeSuite, TestEnv} from './helpers/make-suite';
|
||||||
import {ProtocolErrors, eContractid} from '../helpers/types';
|
import {ProtocolErrors} from '../helpers/types';
|
||||||
import {getContract} from '../helpers/contracts-helpers';
|
|
||||||
import {StableDebtToken} from '../types/StableDebtToken';
|
|
||||||
import {getStableDebtToken} from '../helpers/contracts-getters';
|
import {getStableDebtToken} from '../helpers/contracts-getters';
|
||||||
|
|
||||||
makeSuite('Stable debt token tests', (testEnv: TestEnv) => {
|
makeSuite('Stable debt token tests', (testEnv: TestEnv) => {
|
||||||
const {AT_CALLER_MUST_BE_LENDING_POOL} = ProtocolErrors;
|
const {CT_CALLER_MUST_BE_LENDING_POOL} = ProtocolErrors;
|
||||||
|
|
||||||
it('Tries to invoke mint not being the LendingPool', async () => {
|
it('Tries to invoke mint not being the LendingPool', async () => {
|
||||||
const {deployer, pool, dai, helpersContract} = testEnv;
|
const {deployer, pool, dai, helpersContract} = testEnv;
|
||||||
|
@ -18,7 +16,7 @@ makeSuite('Stable debt token tests', (testEnv: TestEnv) => {
|
||||||
|
|
||||||
await expect(
|
await expect(
|
||||||
stableDebtContract.mint(deployer.address, deployer.address, '1', '1')
|
stableDebtContract.mint(deployer.address, deployer.address, '1', '1')
|
||||||
).to.be.revertedWith(AT_CALLER_MUST_BE_LENDING_POOL);
|
).to.be.revertedWith(CT_CALLER_MUST_BE_LENDING_POOL);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Tries to invoke burn not being the LendingPool', async () => {
|
it('Tries to invoke burn not being the LendingPool', async () => {
|
||||||
|
@ -33,7 +31,7 @@ makeSuite('Stable debt token tests', (testEnv: TestEnv) => {
|
||||||
|
|
||||||
expect(name).to.be.equal('Aave stable debt bearing DAI');
|
expect(name).to.be.equal('Aave stable debt bearing DAI');
|
||||||
await expect(stableDebtContract.burn(deployer.address, '1')).to.be.revertedWith(
|
await expect(stableDebtContract.burn(deployer.address, '1')).to.be.revertedWith(
|
||||||
AT_CALLER_MUST_BE_LENDING_POOL
|
CT_CALLER_MUST_BE_LENDING_POOL
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -4,7 +4,7 @@ import {ProtocolErrors, TokenContractId, eContractid} from '../helpers/types';
|
||||||
import {getVariableDebtToken} from '../helpers/contracts-getters';
|
import {getVariableDebtToken} from '../helpers/contracts-getters';
|
||||||
|
|
||||||
makeSuite('Variable debt token tests', (testEnv: TestEnv) => {
|
makeSuite('Variable debt token tests', (testEnv: TestEnv) => {
|
||||||
const {AT_CALLER_MUST_BE_LENDING_POOL} = ProtocolErrors;
|
const {CT_CALLER_MUST_BE_LENDING_POOL} = ProtocolErrors;
|
||||||
|
|
||||||
it('Tries to invoke mint not being the LendingPool', async () => {
|
it('Tries to invoke mint not being the LendingPool', async () => {
|
||||||
const {deployer, pool, dai, helpersContract} = testEnv;
|
const {deployer, pool, dai, helpersContract} = testEnv;
|
||||||
|
@ -17,7 +17,7 @@ makeSuite('Variable debt token tests', (testEnv: TestEnv) => {
|
||||||
|
|
||||||
await expect(
|
await expect(
|
||||||
variableDebtContract.mint(deployer.address, deployer.address, '1', '1')
|
variableDebtContract.mint(deployer.address, deployer.address, '1', '1')
|
||||||
).to.be.revertedWith(AT_CALLER_MUST_BE_LENDING_POOL);
|
).to.be.revertedWith(CT_CALLER_MUST_BE_LENDING_POOL);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Tries to invoke burn not being the LendingPool', async () => {
|
it('Tries to invoke burn not being the LendingPool', async () => {
|
||||||
|
@ -30,7 +30,7 @@ makeSuite('Variable debt token tests', (testEnv: TestEnv) => {
|
||||||
const variableDebtContract = await getVariableDebtToken(daiVariableDebtTokenAddress);
|
const variableDebtContract = await getVariableDebtToken(daiVariableDebtTokenAddress);
|
||||||
|
|
||||||
await expect(variableDebtContract.burn(deployer.address, '1', '1')).to.be.revertedWith(
|
await expect(variableDebtContract.burn(deployer.address, '1', '1')).to.be.revertedWith(
|
||||||
AT_CALLER_MUST_BE_LENDING_POOL
|
CT_CALLER_MUST_BE_LENDING_POOL
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user