Updated numbers

This commit is contained in:
David Racero 2020-10-15 09:38:46 +02:00
parent 57ffc9c613
commit 479aa3ef8e
2 changed files with 60 additions and 46 deletions

View File

@ -45,36 +45,36 @@ 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 actual balance of the protocol is inconsistent' string public constant LP_CALLER_NOT_LENDING_POOL_CONFIGURATOR = '27'; // 'The actual balance of the protocol is inconsistent'
string public constant AT_CALLER_MUST_BE_LENDING_POOL = '28'; // 'The caller of this function must be a lending pool' string public constant AT_CALLER_MUST_BE_LENDING_POOL = '28'; // 'The caller of this function must be a lending pool'
string public constant AT_CANNOT_GIVE_ALLOWANCE_TO_HIMSELF = '30'; // 'User cannot give allowance to himself' string public constant AT_CANNOT_GIVE_ALLOWANCE_TO_HIMSELF = '29'; // '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 AT_TRANSFER_AMOUNT_NOT_GT_0 = '30'; // 'Transferred amount needs to be greater than zero'
string public constant RL_RESERVE_ALREADY_INITIALIZED = '34'; // 'Reserve has already been initialized' string public constant RL_RESERVE_ALREADY_INITIALIZED = '31'; // 'Reserve has already been initialized'
string public constant LPC_CALLER_NOT_AAVE_ADMIN = '35'; // 'The caller must be the aave admin' string public constant LPC_CALLER_NOT_AAVE_ADMIN = '32'; // 'The caller must be the aave admin'
string public constant LPC_RESERVE_LIQUIDITY_NOT_0 = '36'; // 'The liquidity of the reserve needs to be 0' string public constant LPC_RESERVE_LIQUIDITY_NOT_0 = '33'; // 'The liquidity of the reserve needs to be 0'
string public constant LPAPR_PROVIDER_NOT_REGISTERED = '37'; // 'Provider is not registered' string public constant LPAPR_PROVIDER_NOT_REGISTERED = '34'; // 'Provider is not registered'
string public constant LPCM_HEALTH_FACTOR_NOT_BELOW_THRESHOLD = '38'; // 'Health factor is not below the threshold' string public constant LPCM_HEALTH_FACTOR_NOT_BELOW_THRESHOLD = '35'; // 'Health factor is not below the threshold'
string public constant LPCM_COLLATERAL_CANNOT_BE_LIQUIDATED = '39'; // 'The collateral chosen cannot be liquidated' string public constant LPCM_COLLATERAL_CANNOT_BE_LIQUIDATED = '36'; // 'The collateral chosen cannot be liquidated'
string public constant LPCM_SPECIFIED_CURRENCY_NOT_BORROWED_BY_USER = '40'; // 'User did not borrow the specified currency' string public constant LPCM_SPECIFIED_CURRENCY_NOT_BORROWED_BY_USER = '37'; // 'User did not borrow the specified currency'
string public constant LPCM_NOT_ENOUGH_LIQUIDITY_TO_LIQUIDATE = '41'; // "There isn't enough liquidity available to liquidate" string public constant LPCM_NOT_ENOUGH_LIQUIDITY_TO_LIQUIDATE = '38'; // "There isn't enough liquidity available to liquidate"
string public constant LPCM_NO_ERRORS = '42'; // 'No errors' string public constant LPCM_NO_ERRORS = '39'; // 'No errors'
string public constant LP_INVALID_FLASHLOAN_MODE = '43'; //Invalid flashloan mode selected string public constant LP_INVALID_FLASHLOAN_MODE = '40'; //Invalid flashloan mode selected
string public constant MATH_MULTIPLICATION_OVERFLOW = '44'; string public constant MATH_MULTIPLICATION_OVERFLOW = '41';
string public constant MATH_ADDITION_OVERFLOW = '45'; string public constant MATH_ADDITION_OVERFLOW = '42';
string public constant MATH_DIVISION_BY_ZERO = '46'; string public constant MATH_DIVISION_BY_ZERO = '43';
string public constant RL_LIQUIDITY_INDEX_OVERFLOW = '47'; // Liquidity index overflows uint128 string public constant RL_LIQUIDITY_INDEX_OVERFLOW = '44'; // Liquidity index overflows uint128
string public constant RL_VARIABLE_BORROW_INDEX_OVERFLOW = '48'; // Variable borrow index overflows uint128 string public constant RL_VARIABLE_BORROW_INDEX_OVERFLOW = '45'; // Variable borrow index overflows uint128
string public constant RL_LIQUIDITY_RATE_OVERFLOW = '49'; // Liquidity rate overflows uint128 string public constant RL_LIQUIDITY_RATE_OVERFLOW = '46'; // Liquidity rate overflows uint128
string public constant RL_VARIABLE_BORROW_RATE_OVERFLOW = '50'; // Variable borrow rate overflows uint128 string public constant RL_VARIABLE_BORROW_RATE_OVERFLOW = '47'; // Variable borrow rate overflows uint128
string public constant RL_STABLE_BORROW_RATE_OVERFLOW = '51'; // Stable borrow rate overflows uint128 string public constant RL_STABLE_BORROW_RATE_OVERFLOW = '48'; // Stable borrow rate overflows uint128
string public constant AT_INVALID_MINT_AMOUNT = '53'; //invalid amount to mint string public constant AT_INVALID_MINT_AMOUNT = '49'; //invalid amount to mint
string public constant LP_FAILED_REPAY_WITH_COLLATERAL = '53'; string public constant LP_FAILED_REPAY_WITH_COLLATERAL = '50';
string public constant AT_INVALID_BURN_AMOUNT = '54'; //invalid amount to burn string public constant AT_INVALID_BURN_AMOUNT = '51'; //invalid amount to burn
string public constant LP_BORROW_ALLOWANCE_ARE_NOT_ENOUGH = '54'; // User borrows on behalf, but allowance are too small string public constant LP_BORROW_ALLOWANCE_ARE_NOT_ENOUGH = '52'; // User borrows on behalf, but allowance are too small
string public constant LP_FAILED_COLLATERAL_SWAP = '55'; string public constant LP_FAILED_COLLATERAL_SWAP = '53';
string public constant LP_INVALID_EQUAL_ASSETS_TO_SWAP = '56'; string public constant LP_INVALID_EQUAL_ASSETS_TO_SWAP = '54';
string public constant LP_REENTRANCY_NOT_ALLOWED = '57'; string public constant LP_REENTRANCY_NOT_ALLOWED = '55';
string public constant P_IS_PAUSED = '58'; // 'Pool is paused' string public constant P_IS_PAUSED = '56'; // 'Pool is paused'
string public constant LP_NO_MORE_RESERVES_ALLOWED = '59'; string public constant LP_NO_MORE_RESERVES_ALLOWED = '57';
string public constant LP_INVALID_FLASH_LOAN_EXECUTOR_RETURN = '60'; string public constant LP_INVALID_FLASH_LOAN_EXECUTOR_RETURN = '58';
enum CollateralManagerErrors { enum CollateralManagerErrors {
NO_ERROR, NO_ERROR,
NO_COLLATERAL_AVAILABLE, NO_COLLATERAL_AVAILABLE,

View File

@ -99,22 +99,36 @@ 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 actual balance of the protocol is inconsistent' LP_CALLER_NOT_LENDING_POOL_CONFIGURATOR = '27', // 'The actual balance of the protocol is inconsistent'
AT_CALLER_MUST_BE_LENDING_POOL = '28', // 'The caller of this function must be a lending pool' AT_CALLER_MUST_BE_LENDING_POOL = '28', // 'The caller of this function must be a lending pool'
AT_CANNOT_GIVE_ALLOWANCE_TO_HIMSELF = '30', // 'User cannot give allowance to himself' AT_CANNOT_GIVE_ALLOWANCE_TO_HIMSELF = '29', // 'User cannot give allowance to himself'
AT_TRANSFER_AMOUNT_NOT_GT_0 = '31', // 'Transferred amount needs to be greater than zero' AT_TRANSFER_AMOUNT_NOT_GT_0 = '30', // 'Transferred amount needs to be greater than zero'
RL_RESERVE_ALREADY_INITIALIZED = '34', // 'Reserve has already been initialized' RL_RESERVE_ALREADY_INITIALIZED = '31', // 'Reserve has already been initialized'
LPC_CALLER_NOT_AAVE_ADMIN = '35', // 'The caller must be the aave admin' LPC_CALLER_NOT_AAVE_ADMIN = '32', // 'The caller must be the aave admin'
LPC_RESERVE_LIQUIDITY_NOT_0 = '36', // 'The liquidity of the reserve needs to be 0' LPC_RESERVE_LIQUIDITY_NOT_0 = '33', // 'The liquidity of the reserve needs to be 0'
LPAPR_PROVIDER_NOT_REGISTERED = '37', // 'Provider is not registered' LPAPR_PROVIDER_NOT_REGISTERED = '34', // 'Provider is not registered'
LPCM_HEALTH_FACTOR_NOT_BELOW_THRESHOLD = '38', // 'Health factor is not below the threshold' LPCM_HEALTH_FACTOR_NOT_BELOW_THRESHOLD = '35', // 'Health factor is not below the threshold'
LPCM_COLLATERAL_CANNOT_BE_LIQUIDATED = '39', // 'The collateral chosen cannot be liquidated' LPCM_COLLATERAL_CANNOT_BE_LIQUIDATED = '36', // 'The collateral chosen cannot be liquidated'
LPCM_SPECIFIED_CURRENCY_NOT_BORROWED_BY_USER = '40', // 'User did not borrow the specified currency' LPCM_SPECIFIED_CURRENCY_NOT_BORROWED_BY_USER = '37', // 'User did not borrow the specified currency'
LPCM_NOT_ENOUGH_LIQUIDITY_TO_LIQUIDATE = '41', // "There isn't enough liquidity available to liquidate" LPCM_NOT_ENOUGH_LIQUIDITY_TO_LIQUIDATE = '38', // "There isn't enough liquidity available to liquidate"
LPCM_NO_ERRORS = '42', // 'No errors' LPCM_NO_ERRORS = '39', // 'No errors'
LP_INVALID_FLASHLOAN_MODE = '43', //Invalid flashloan mode LP_INVALID_FLASHLOAN_MODE = '40', //Invalid flashloan mode selected
LP_INVALID_EQUAL_ASSETS_TO_SWAP = '56', // User can't use same reserve as destination of liquidity swap MATH_MULTIPLICATION_OVERFLOW = '41',
P_IS_PAUSED = '58', // Pool is paused MATH_ADDITION_OVERFLOW = '42',
LP_INVALID_FLASH_LOAN_EXECUTOR_RETURN = '60', // The flash loan received returned 0 (EOA) MATH_DIVISION_BY_ZERO = '43',
RL_LIQUIDITY_INDEX_OVERFLOW = '44', // Liquidity index overflows uint128
RL_VARIABLE_BORROW_INDEX_OVERFLOW = '45', // Variable borrow index overflows uint128
RL_LIQUIDITY_RATE_OVERFLOW = '46', // Liquidity rate overflows uint128
RL_VARIABLE_BORROW_RATE_OVERFLOW = '47', // Variable borrow rate overflows uint128
RL_STABLE_BORROW_RATE_OVERFLOW = '48', // Stable borrow rate overflows uint128
AT_INVALID_MINT_AMOUNT = '49', //invalid amount to mint
LP_FAILED_REPAY_WITH_COLLATERAL = '50',
AT_INVALID_BURN_AMOUNT = '51', //invalid amount to burn
LP_BORROW_ALLOWANCE_ARE_NOT_ENOUGH = '52', // User borrows on behalf, but allowance are too small
LP_FAILED_COLLATERAL_SWAP = '53',
LP_INVALID_EQUAL_ASSETS_TO_SWAP = '54',
LP_REENTRANCY_NOT_ALLOWED = '55',
P_IS_PAUSED = '56', // 'Pool is paused'
LP_NO_MORE_RESERVES_ALLOWED = '57',
LP_INVALID_FLASH_LOAN_EXECUTOR_RETURN = '58',
// old // old
INVALID_FROM_BALANCE_AFTER_TRANSFER = 'Invalid from balance after transfer', INVALID_FROM_BALANCE_AFTER_TRANSFER = 'Invalid from balance after transfer',