diff --git a/test-suites/test-aave/mainnet/static-atoken-lm/static-atoken-liquidity-mining-rewards.spec.ts b/test-suites/test-aave/mainnet/static-atoken-lm/static-atoken-liquidity-mining-rewards.spec.ts index 50abee07..8326846b 100644 --- a/test-suites/test-aave/mainnet/static-atoken-lm/static-atoken-liquidity-mining-rewards.spec.ts +++ b/test-suites/test-aave/mainnet/static-atoken-lm/static-atoken-liquidity-mining-rewards.spec.ts @@ -12,7 +12,7 @@ import { WETH9, AToken, StaticATokenLM, -} from '../../../../types'; +} from '../../../types'; import { impersonateAccountsHardhat, DRE, @@ -21,17 +21,17 @@ import { evmSnapshot, timeLatest, advanceTimeAndBlock, -} from '../../../../helpers/misc-utils'; +} from '../../../helpers/misc-utils'; import { BigNumber, providers, Signer, utils } from 'ethers'; -import { MAX_UINT_AMOUNT } from '../../../../helpers/constants'; -import { tEthereumAddress } from '../../../../helpers/types'; +import { MAX_UINT_AMOUNT } from '../../../helpers/constants'; +import { tEthereumAddress } from '../../../helpers/types'; import { AbiCoder, formatEther, verifyTypedData } from 'ethers/lib/utils'; import { _TypedDataEncoder } from 'ethers/lib/utils'; import { expect, use } from 'chai'; import { stat } from 'fs'; -import { getCurrentBlock } from '../../../../helpers/contracts-helpers'; +import { getCurrentBlock } from '../../../helpers/contracts-helpers'; //use(solidity); diff --git a/test-suites/test-aave/mainnet/static-atoken-lm/static-atoken-liquidity-mining.spec.ts b/test-suites/test-aave/mainnet/static-atoken-lm/static-atoken-liquidity-mining.spec.ts index 8b102d86..93dcd90b 100644 --- a/test-suites/test-aave/mainnet/static-atoken-lm/static-atoken-liquidity-mining.spec.ts +++ b/test-suites/test-aave/mainnet/static-atoken-lm/static-atoken-liquidity-mining.spec.ts @@ -14,7 +14,7 @@ import { AToken, StaticAToken, StaticATokenLM, -} from '../../../../types'; +} from '../../../types'; import { impersonateAccountsHardhat, DRE, @@ -23,11 +23,11 @@ import { evmSnapshot, timeLatest, advanceTimeAndBlock, -} from '../../../../helpers/misc-utils'; +} from '../../../helpers/misc-utils'; import { BigNumber, providers, Signer, utils } from 'ethers'; -import { rayMul } from '../../../../helpers/ray-math'; -import { MAX_UINT_AMOUNT, ZERO_ADDRESS } from '../../../../helpers/constants'; -import { tEthereumAddress } from '../../../../helpers/types'; +import { rayMul } from '../../../helpers/ray-math'; +import { MAX_UINT_AMOUNT, ZERO_ADDRESS } from '../../../helpers/constants'; +import { tEthereumAddress } from '../../../helpers/types'; import { AbiCoder, formatEther, verifyTypedData } from 'ethers/lib/utils'; import { stat } from 'fs'; @@ -37,7 +37,7 @@ import { buildMetaWithdrawParams, buildPermitParams, getSignatureFromTypedData, -} from '../../../../helpers/contracts-helpers'; +} from '../../../helpers/contracts-helpers'; import { TypedDataUtils, typedSignatureHash, TYPED_MESSAGE_SCHEMA } from 'eth-sig-util'; import { zeroAddress } from 'ethereumjs-util'; @@ -398,7 +398,7 @@ describe('StaticATokenLM: aToken wrapper with static balances and liquidity mini await staticAToken.deposit(userSigner._address, amountToDeposit, 0, true, defaultTxParams) ); - const ownerPrivateKey = require('../../../../test-wallets.js').accounts[0].secretKey; + const ownerPrivateKey = require('../../../test-wallets.js').accounts[0].secretKey; if (!ownerPrivateKey) { throw new Error('INVALID_OWNER_PK'); } @@ -462,7 +462,7 @@ describe('StaticATokenLM: aToken wrapper with static balances and liquidity mini await staticAToken.deposit(userSigner._address, amountToDeposit, 0, true, defaultTxParams) ); - const ownerPrivateKey = require('../../../../test-wallets.js').accounts[0].secretKey; + const ownerPrivateKey = require('../../../test-wallets.js').accounts[0].secretKey; if (!ownerPrivateKey) { throw new Error('INVALID_OWNER_PK'); } @@ -528,7 +528,7 @@ describe('StaticATokenLM: aToken wrapper with static balances and liquidity mini const seperator = await staticAToken.getDomainSeparator(chainId); expect(seperator).to.be.eq(domainSeperator); - const userPrivateKey = require('../../../../test-wallets.js').accounts[0].secretKey; + const userPrivateKey = require('../../../test-wallets.js').accounts[0].secretKey; if (!userPrivateKey) { throw new Error('INVALID_OWNER_PK'); } @@ -684,7 +684,7 @@ describe('StaticATokenLM: aToken wrapper with static balances and liquidity mini const seperator = await staticAToken.getDomainSeparator(chainId); expect(seperator).to.be.eq(domainSeperator); - const userPrivateKey = require('../../../../test-wallets.js').accounts[0].secretKey; + const userPrivateKey = require('../../../test-wallets.js').accounts[0].secretKey; if (!userPrivateKey) { throw new Error('INVALID_OWNER_PK'); } @@ -811,7 +811,7 @@ describe('StaticATokenLM: aToken wrapper with static balances and liquidity mini const seperator = await staticAToken.getDomainSeparator(chainId); expect(seperator).to.be.eq(domainSeperator); - const userPrivateKey = require('../../../../test-wallets.js').accounts[0].secretKey; + const userPrivateKey = require('../../../test-wallets.js').accounts[0].secretKey; if (!userPrivateKey) { throw new Error('INVALID_OWNER_PK'); } diff --git a/test-suites/test-aave/mainnet/static-atoken.spec.ts b/test-suites/test-aave/mainnet/static-atoken.spec.ts index 6146e69e..776bb4c2 100644 --- a/test-suites/test-aave/mainnet/static-atoken.spec.ts +++ b/test-suites/test-aave/mainnet/static-atoken.spec.ts @@ -7,12 +7,12 @@ import { ATokenFactory, ERC20, LendingPool, -} from '../../../types'; -import { impersonateAccountsHardhat, DRE, waitForTx } from '../../../helpers/misc-utils'; +} from '../../types'; +import { impersonateAccountsHardhat, DRE, waitForTx } from '../../helpers/misc-utils'; import { utils } from 'ethers'; -import { rayMul } from '../../../helpers/ray-math'; -import { MAX_UINT_AMOUNT } from '../../../helpers/constants'; -import { tEthereumAddress } from '../../../helpers/types'; +import { rayMul } from '../../helpers/ray-math'; +import { MAX_UINT_AMOUNT } from '../../helpers/constants'; +import { tEthereumAddress } from '../../helpers/types'; const { expect } = require('chai'); diff --git a/test-suites/test-aave/mainnet/vamtoken-attack.spec.ts b/test-suites/test-aave/mainnet/vamtoken-attack.spec.ts index 5f08eb52..4980f541 100644 --- a/test-suites/test-aave/mainnet/vamtoken-attack.spec.ts +++ b/test-suites/test-aave/mainnet/vamtoken-attack.spec.ts @@ -12,17 +12,19 @@ import { AToken, WETH9, ERC20Factory, -} from '../../../types'; +} from '../../types'; import { impersonateAccountsHardhat, DRE, waitForTx, advanceTimeAndBlock, -} from '../../../helpers/misc-utils'; +} from '../../helpers/misc-utils'; import { utils } from 'ethers'; -import { MAX_UINT_AMOUNT } from '../../../helpers/constants'; -import { tEthereumAddress } from '../../../helpers/types'; +import { rayMul } from '../../helpers/ray-math'; +import { MAX_UINT_AMOUNT } from '../../helpers/constants'; +import { tEthereumAddress } from '../../helpers/types'; import { formatEther, parseEther } from 'ethers/lib/utils'; +import { mint } from '../helpers/actions'; const { expect } = require('chai'); @@ -155,7 +157,7 @@ describe('Attack', () => { console.log(`Total supply vamToken: ${formatEther(await vamToken.totalSupply())}`); // Step 4, Alice withdraws and claims - console.log('Step 4. Alice Withdraws and claim rewards'); + console.log('Step 4. Alice Withdraws'); const aliceBalance = await vamToken.balanceOf(userSigner._address); await waitForTx(await vamToken.connect(userSigner).burn(aliceBalance)); @@ -167,7 +169,7 @@ describe('Attack', () => { ); // Bob also withdraws - console.log(`Step 5. Bob withdraws and claim rewards`); + console.log(`Bob also withdraws`); const bobBalance = await vamToken.balanceOf(attackerSigner._address); await waitForTx(await vamToken.connect(attackerSigner).burn(bobBalance)); await waitForTx(await vamToken.connect(userSigner).claimRewards(userSigner._address, STKAAVE));