From 5b7b4c517f9b55841b8e5343030e0bdbbf826b8c Mon Sep 17 00:00:00 2001 From: andyk Date: Tue, 15 Sep 2020 18:25:34 +0300 Subject: [PATCH] fix ci:test env --- buidler.config.ts | 4 ++-- helpers/buidler-constants.ts | 3 +++ helpers/constants.ts | 36 +++++++++++++++--------------------- test/atoken-permit.spec.ts | 2 +- 4 files changed, 21 insertions(+), 24 deletions(-) create mode 100644 helpers/buidler-constants.ts diff --git a/buidler.config.ts b/buidler.config.ts index dd736359..03f42645 100644 --- a/buidler.config.ts +++ b/buidler.config.ts @@ -1,8 +1,8 @@ -import {usePlugin, BuidlerConfig} from '@nomiclabs/buidler/config'; +import {usePlugin} from '@nomiclabs/buidler/config'; // @ts-ignore import {accounts} from './test-wallets.js'; import {eEthereumNetwork} from './helpers/types'; -import { BUIDLEREVM_CHAINID, COVERAGE_CHAINID } from './helpers/constants'; +import {BUIDLEREVM_CHAINID, COVERAGE_CHAINID} from './helpers/buidler-constants'; usePlugin('@nomiclabs/buidler-ethers'); usePlugin('buidler-typechain'); diff --git a/helpers/buidler-constants.ts b/helpers/buidler-constants.ts new file mode 100644 index 00000000..5eb044c3 --- /dev/null +++ b/helpers/buidler-constants.ts @@ -0,0 +1,3 @@ +export const TEST_SNAPSHOT_ID = '0x1'; +export const BUIDLEREVM_CHAINID = 31337; +export const COVERAGE_CHAINID = 1337; diff --git a/helpers/constants.ts b/helpers/constants.ts index 54a10de5..457a7f1d 100644 --- a/helpers/constants.ts +++ b/helpers/constants.ts @@ -1,22 +1,17 @@ import { - iAssetBase, - iAavePoolAssets, - IMarketRates, - iAssetAggregatorBase, AavePools, + eEthereumNetwork, + iAavePoolAssets, + iAssetAggregatorBase, + iAssetBase, + iBasicDistributionParams, + IMarketRates, iMultiPoolsAssets, IReserveParams, tEthereumAddress, - iBasicDistributionParams, - eEthereumNetwork, } from './types'; import BigNumber from 'bignumber.js'; -import {getParamPerPool, getParamPerNetwork} from './contracts-helpers'; - -export const TEST_SNAPSHOT_ID = '0x1'; - -export const BUIDLEREVM_CHAINID = 31337; -export const COVERAGE_CHAINID = 1337; +import {getParamPerNetwork, getParamPerPool} from './contracts-helpers'; // ---------------- // MATH @@ -536,17 +531,16 @@ export const getFeeDistributionParamsCommon = ( }; }; -export const getATokenDomainSeparatorPerNetwork = ( - network: eEthereumNetwork -): tEthereumAddress => +export const getATokenDomainSeparatorPerNetwork = (network: eEthereumNetwork): tEthereumAddress => getParamPerNetwork( { - [eEthereumNetwork.coverage]: "0x95b73a72c6ecf4ccbbba5178800023260bad8e75cdccdb8e4827a2977a37c820", + [eEthereumNetwork.coverage]: + '0x95b73a72c6ecf4ccbbba5178800023260bad8e75cdccdb8e4827a2977a37c820', [eEthereumNetwork.buidlerevm]: - "0x76cbbf8aa4b11a7c207dd79ccf8c394f59475301598c9a083f8258b4fafcfa86", - [eEthereumNetwork.kovan]: "", - [eEthereumNetwork.ropsten]: "", - [eEthereumNetwork.main]: "", + '0x76cbbf8aa4b11a7c207dd79ccf8c394f59475301598c9a083f8258b4fafcfa86', + [eEthereumNetwork.kovan]: '', + [eEthereumNetwork.ropsten]: '', + [eEthereumNetwork.main]: '', }, network - ); \ No newline at end of file + ); diff --git a/test/atoken-permit.spec.ts b/test/atoken-permit.spec.ts index ef5a39e0..397eddb1 100644 --- a/test/atoken-permit.spec.ts +++ b/test/atoken-permit.spec.ts @@ -2,7 +2,6 @@ import { MAX_UINT_AMOUNT, ZERO_ADDRESS, getATokenDomainSeparatorPerNetwork, - BUIDLEREVM_CHAINID, } from '../helpers/constants'; import {buildPermitParams, getSignatureFromTypedData} from '../helpers/contracts-helpers'; import {expect} from 'chai'; @@ -11,6 +10,7 @@ import {eEthereumNetwork} from '../helpers/types'; import {makeSuite, TestEnv} from './helpers/make-suite'; import {BRE} from '../helpers/misc-utils'; import {waitForTx} from './__setup.spec'; +import {BUIDLEREVM_CHAINID} from '../helpers/buidler-constants'; const {parseEther} = ethers.utils;