mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
feat: prepare scripts to support Curve AToken deployment, move Curve constants into separated file
This commit is contained in:
parent
cd1b4b3625
commit
549bd7c944
|
@ -93,7 +93,8 @@ const buidlerConfig: HardhatUserConfig = {
|
|||
kovan: getCommonNetworkConfig(eEthereumNetwork.kovan, 42),
|
||||
ropsten: getCommonNetworkConfig(eEthereumNetwork.ropsten, 3),
|
||||
main: getCommonNetworkConfig(eEthereumNetwork.main, 1),
|
||||
tenderlyMain: getCommonNetworkConfig(eEthereumNetwork.tenderlyMain, 3030),
|
||||
tenderlyMain: getCommonNetworkConfig(eEthereumNetwork.tenderly, 3030),
|
||||
tenderly: getCommonNetworkConfig(eEthereumNetwork.tenderly, 3030),
|
||||
matic: getCommonNetworkConfig(ePolygonNetwork.matic, 137),
|
||||
mumbai: getCommonNetworkConfig(ePolygonNetwork.mumbai, 80001),
|
||||
xdai: getCommonNetworkConfig(eXDaiNetwork.xdai, 100),
|
||||
|
|
|
@ -45,7 +45,8 @@ export const NETWORKS_RPC_URL: iParamsPerNetwork<string> = {
|
|||
[eEthereumNetwork.coverage]: 'http://localhost:8555',
|
||||
[eEthereumNetwork.hardhat]: 'http://localhost:8545',
|
||||
[eEthereumNetwork.buidlerevm]: 'http://localhost:8545',
|
||||
[eEthereumNetwork.tenderlyMain]: `https://rpc.tenderly.co/fork/${TENDERLY_FORK_ID}`,
|
||||
[eEthereumNetwork.tenderly]: `https://rpc.tenderly.co/fork/${TENDERLY_FORK_ID}`,
|
||||
[eEthereumNetwork.tenderly]: `https://rpc.tenderly.co/fork/${TENDERLY_FORK_ID}`,
|
||||
[ePolygonNetwork.mumbai]: 'https://rpc-mumbai.maticvigil.com',
|
||||
[ePolygonNetwork.matic]: 'https://rpc-mainnet.matic.network',
|
||||
[eXDaiNetwork.xdai]: 'https://rpc.xdaichain.com/',
|
||||
|
@ -58,7 +59,7 @@ export const NETWORKS_DEFAULT_GAS: iParamsPerNetwork<number> = {
|
|||
[eEthereumNetwork.coverage]: 65 * GWEI,
|
||||
[eEthereumNetwork.hardhat]: 65 * GWEI,
|
||||
[eEthereumNetwork.buidlerevm]: 65 * GWEI,
|
||||
[eEthereumNetwork.tenderlyMain]: 0.01 * GWEI,
|
||||
[eEthereumNetwork.tenderly]: 0.01 * GWEI,
|
||||
[ePolygonNetwork.mumbai]: 1 * GWEI,
|
||||
[ePolygonNetwork.matic]: 1 * GWEI,
|
||||
[eXDaiNetwork.xdai]: 1 * GWEI,
|
||||
|
@ -71,7 +72,7 @@ export const BLOCK_TO_FORK: iParamsPerNetwork<number | undefined> = {
|
|||
[eEthereumNetwork.coverage]: undefined,
|
||||
[eEthereumNetwork.hardhat]: undefined,
|
||||
[eEthereumNetwork.buidlerevm]: undefined,
|
||||
[eEthereumNetwork.tenderlyMain]: 12406069,
|
||||
[eEthereumNetwork.tenderly]: 12406069,
|
||||
[ePolygonNetwork.mumbai]: undefined,
|
||||
[ePolygonNetwork.matic]: undefined,
|
||||
[eXDaiNetwork.xdai]: undefined,
|
||||
|
|
|
@ -73,8 +73,9 @@ export const MOCK_CHAINLINK_AGGREGATORS_PRICES = {
|
|||
xSUSHI: oneEther.multipliedBy('0.00913428586').toFixed(),
|
||||
USD: '5848466240000000',
|
||||
REW: oneEther.multipliedBy('0.00137893825230').toFixed(),
|
||||
a3CRVGauge: '0',
|
||||
saCRVGauge: '0',
|
||||
a3CRV: '0',
|
||||
saCRV: '0',
|
||||
'3CRV': '0',
|
||||
};
|
||||
|
||||
export const MOCK_CHAINLINK_AGGREGATORS_USD_CURVE_AMM_PRICES = {
|
||||
|
@ -91,24 +92,3 @@ export const MOCK_CHAINLINK_AGGREGATORS_USD_CURVE_AMM_PRICES = {
|
|||
saCRV: oneUsd.multipliedBy('1.0318').toFixed(),
|
||||
'3CRV': oneUsd.multipliedBy('1.0179').toFixed(),
|
||||
};
|
||||
|
||||
export const CRV_TOKEN = {
|
||||
[eEthereumNetwork.main]: '0xD533a949740bb3306d119CC777fa900bA034cd52',
|
||||
[eEthereumNetwork.tenderlyMain]: '0xD533a949740bb3306d119CC777fa900bA034cd52',
|
||||
};
|
||||
|
||||
export const CURVE_TREASURY = {
|
||||
[eEthereumNetwork.main]: ZERO_ADDRESS,
|
||||
};
|
||||
|
||||
export const CURVE_CONFIG = {
|
||||
votingEscrow: {
|
||||
[eEthereumNetwork.main]: '0x5f3b5DfEb7B28CDbD7FAba78963EE202a494e2A2',
|
||||
},
|
||||
curveFeeDistributor: {
|
||||
[eEthereumNetwork.main]: '0xA464e6DCda8AC41e03616F95f4BC98a13b8922Dc',
|
||||
},
|
||||
gaugeController: {
|
||||
[eEthereumNetwork.main]: '0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB',
|
||||
},
|
||||
};
|
||||
|
|
|
@ -15,7 +15,7 @@ import {
|
|||
import { MintableERC20 } from '../types/MintableERC20';
|
||||
import { MockContract } from 'ethereum-waffle';
|
||||
import { ConfigNames, getReservesConfigByPool, loadPoolConfig } from './configuration';
|
||||
import { getFirstSigner } from './contracts-getters';
|
||||
import { getCurveTreasuryAddress, getFirstSigner } from './contracts-getters';
|
||||
import {
|
||||
AaveProtocolDataProviderFactory,
|
||||
ATokenFactory,
|
||||
|
@ -72,7 +72,7 @@ import { readArtifact as buidlerReadArtifact } from '@nomiclabs/buidler/plugins'
|
|||
import { HardhatRuntimeEnvironment } from 'hardhat/types';
|
||||
import { LendingPoolLibraryAddresses } from '../types/LendingPoolFactory';
|
||||
import { UiPoolDataProvider } from '../types';
|
||||
import { CRV_TOKEN, CURVE_TREASURY } from './constants';
|
||||
import { CRV_TOKEN } from './external/curve/constants';
|
||||
|
||||
export const deployUiPoolDataProvider = async (
|
||||
[incentivesController, aaveOracle]: [tEthereumAddress, tEthereumAddress],
|
||||
|
@ -764,7 +764,12 @@ export const deployCurveGaugeRewardsAwareAToken = async (
|
|||
|
||||
export const deployCurveGaugeRewardsAwareATokenByNetwork = async (verify?: boolean) => {
|
||||
const network = DRE.network.name as eEthereumNetwork;
|
||||
return deployCurveGaugeRewardsAwareAToken(CRV_TOKEN[network], CURVE_TREASURY[network], verify);
|
||||
console.log(CRV_TOKEN[network], await getCurveTreasuryAddress());
|
||||
return deployCurveGaugeRewardsAwareAToken(
|
||||
CRV_TOKEN[network],
|
||||
await getCurveTreasuryAddress(),
|
||||
verify
|
||||
);
|
||||
};
|
||||
|
||||
export const deployCurveTreasury = async (
|
||||
|
|
|
@ -34,6 +34,7 @@ import {
|
|||
RewardsTokenFactory,
|
||||
} from '../types';
|
||||
import { IERC20DetailedFactory } from '../types/IERC20DetailedFactory';
|
||||
import { CURVE_TREASURY } from './external/curve/constants';
|
||||
import { MockTokenMap, getEthersSigners } from './contracts-helpers';
|
||||
import { DRE, getDb, notFalsyOrZeroAddress, omit } from './misc-utils';
|
||||
import { eContractid, PoolConfiguration, tEthereumAddress, TokenContractId } from './types';
|
||||
|
@ -440,3 +441,7 @@ export const getRewardsATokenMock = async (address?: tEthereumAddress) =>
|
|||
|
||||
export const getRewardsAToken = async (address: tEthereumAddress) =>
|
||||
await RewardsATokenMockFactory.connect(address, await getFirstSigner());
|
||||
|
||||
export const getCurveTreasuryAddress = async () =>
|
||||
(await getDb().get(`${eContractid.CurveTreasury}.${DRE.network.name}`).value()).address ||
|
||||
CURVE_TREASURY[DRE.network.name];
|
||||
|
|
|
@ -145,7 +145,7 @@ export const linkBytecode = (artifact: BuidlerArtifact | Artifact, libraries: an
|
|||
};
|
||||
|
||||
export const getParamPerNetwork = <T>(param: iParamsPerNetwork<T>, network: eNetwork) => {
|
||||
const { main, ropsten, kovan, coverage, buidlerevm, tenderlyMain } =
|
||||
const { main, ropsten, kovan, coverage, buidlerevm, tenderly } =
|
||||
param as iEthereumParamsPerNetwork<T>;
|
||||
const { matic, mumbai } = param as iPolygonParamsPerNetwork<T>;
|
||||
const { xdai } = param as iXDaiParamsPerNetwork<T>;
|
||||
|
@ -166,8 +166,8 @@ export const getParamPerNetwork = <T>(param: iParamsPerNetwork<T>, network: eNet
|
|||
return ropsten;
|
||||
case eEthereumNetwork.main:
|
||||
return main;
|
||||
case eEthereumNetwork.tenderlyMain:
|
||||
return tenderlyMain;
|
||||
case eEthereumNetwork.tenderly:
|
||||
return tenderly;
|
||||
case ePolygonNetwork.matic:
|
||||
return matic;
|
||||
case ePolygonNetwork.mumbai:
|
||||
|
|
85
helpers/external/curve/constants.ts
vendored
Normal file
85
helpers/external/curve/constants.ts
vendored
Normal file
|
@ -0,0 +1,85 @@
|
|||
import { ZERO_ADDRESS } from '../../constants';
|
||||
import { eEthereumNetwork, tEthereumAddress } from '../../types';
|
||||
|
||||
export interface GaugeInfo {
|
||||
underlying: tEthereumAddress;
|
||||
address: tEthereumAddress;
|
||||
name: string;
|
||||
symbol: string;
|
||||
rewardTokens: tEthereumAddress[];
|
||||
}
|
||||
|
||||
export const GAUGE_3POOL: GaugeInfo = {
|
||||
underlying: '0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490',
|
||||
address: '0xbFcF63294aD7105dEa65aA58F8AE5BE2D9d0952A',
|
||||
name: 'aToken 3pool',
|
||||
symbol: 'a-3poolCRV',
|
||||
rewardTokens: [],
|
||||
};
|
||||
|
||||
export const GAUGE_AAVE3: GaugeInfo = {
|
||||
underlying: '0xFd2a8fA60Abd58Efe3EeE34dd494cD491dC14900',
|
||||
address: '0xd662908ADA2Ea1916B3318327A97eB18aD588b5d',
|
||||
name: 'aToken a3CRV',
|
||||
symbol: 'a-a3CRV',
|
||||
rewardTokens: [],
|
||||
};
|
||||
|
||||
export const GAUGE_SAAVE: GaugeInfo = {
|
||||
underlying: '0x02d341CcB60fAaf662bC0554d13778015d1b285C',
|
||||
address: '0x462253b8F74B72304c145DB0e4Eebd326B22ca39',
|
||||
name: 'aToken a3CRV',
|
||||
symbol: 'a-a3CRV',
|
||||
rewardTokens: [],
|
||||
};
|
||||
|
||||
export const GAUGE_EURS: GaugeInfo = {
|
||||
underlying: '0x194eBd173F6cDacE046C53eACcE9B953F28411d1',
|
||||
address: '0x90Bb609649E0451E5aD952683D64BD2d1f245840',
|
||||
name: 'aToken eursCRV Gauge Deposit',
|
||||
symbol: 'a-eursCRV',
|
||||
rewardTokens: ['0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F'],
|
||||
};
|
||||
|
||||
export const GAUGE_ANKR: GaugeInfo = {
|
||||
underlying: '0xaA17A236F2bAdc98DDc0Cf999AbB47D47Fc0A6Cf',
|
||||
address: '0x6d10ed2cf043e6fcf51a0e7b4c2af3fa06695707',
|
||||
name: 'aToken ankrCRV Gauge Deposit',
|
||||
symbol: 'a-ankrCRV',
|
||||
rewardTokens: [
|
||||
'0xE0aD1806Fd3E7edF6FF52Fdb822432e847411033',
|
||||
'0x8290333ceF9e6D528dD5618Fb97a76f268f3EDD4',
|
||||
],
|
||||
};
|
||||
|
||||
export const isCurveGaugeV2 = (address: tEthereumAddress) =>
|
||||
GAUGE_3POOL.address.toLowerCase() !== address.toLowerCase();
|
||||
|
||||
export const poolToGauge = {
|
||||
[GAUGE_EURS.underlying]: GAUGE_EURS.address,
|
||||
[GAUGE_AAVE3.underlying]: GAUGE_AAVE3.address,
|
||||
[GAUGE_3POOL.underlying]: GAUGE_3POOL.address,
|
||||
[GAUGE_SAAVE.underlying]: GAUGE_SAAVE.address,
|
||||
[GAUGE_ANKR.underlying]: GAUGE_ANKR.address,
|
||||
};
|
||||
|
||||
export const CRV_TOKEN = {
|
||||
[eEthereumNetwork.main]: '0xD533a949740bb3306d119CC777fa900bA034cd52',
|
||||
[eEthereumNetwork.tenderly]: '0xD533a949740bb3306d119CC777fa900bA034cd52',
|
||||
};
|
||||
|
||||
export const CURVE_TREASURY = {
|
||||
[eEthereumNetwork.main]: ZERO_ADDRESS,
|
||||
};
|
||||
|
||||
export const CURVE_CONFIG = {
|
||||
votingEscrow: {
|
||||
[eEthereumNetwork.main]: '0x5f3b5DfEb7B28CDbD7FAba78963EE202a494e2A2',
|
||||
},
|
||||
curveFeeDistributor: {
|
||||
[eEthereumNetwork.main]: '0xA464e6DCda8AC41e03616F95f4BC98a13b8922Dc',
|
||||
},
|
||||
gaugeController: {
|
||||
[eEthereumNetwork.main]: '0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB',
|
||||
},
|
||||
};
|
|
@ -20,6 +20,21 @@ import {
|
|||
import { BigNumberish } from 'ethers';
|
||||
import { deployDefaultReserveInterestRateStrategy } from './contracts-deployments';
|
||||
import { ConfigNames } from './configuration';
|
||||
import { defaultAbiCoder } from 'ethers/lib/utils';
|
||||
import { isCurveGaugeV2, poolToGauge } from './external/curve/constants';
|
||||
|
||||
export const getATokenExtraParams = async (aTokenName: string, tokenAddress: tEthereumAddress) => {
|
||||
console.log(aTokenName);
|
||||
switch (aTokenName) {
|
||||
case 'CurveGaugeRewardsAwareAToken':
|
||||
return defaultAbiCoder.encode(
|
||||
['address', 'bool'],
|
||||
[poolToGauge[tokenAddress], isCurveGaugeV2(poolToGauge[tokenAddress])]
|
||||
);
|
||||
default:
|
||||
return '0x10';
|
||||
}
|
||||
};
|
||||
|
||||
export const initReservesByHelper = async (
|
||||
reservesParams: iMultiPoolsAssets<IReserveParams>,
|
||||
|
@ -37,7 +52,7 @@ export const initReservesByHelper = async (
|
|||
const addressProvider = await getLendingPoolAddressesProvider();
|
||||
|
||||
// CHUNK CONFIGURATION
|
||||
const initChunks = 4;
|
||||
const initChunks = 1;
|
||||
|
||||
// Initialize variables for future reserves initialization
|
||||
let reserveSymbols: string[] = [];
|
||||
|
@ -131,7 +146,7 @@ export const initReservesByHelper = async (
|
|||
variableDebtTokenSymbol: `variableDebt${symbolPrefix}${symbol}`,
|
||||
stableDebtTokenName: `${stableDebtTokenNamePrefix} ${symbol}`,
|
||||
stableDebtTokenSymbol: `stableDebt${symbolPrefix}${symbol}`,
|
||||
params: '0x10',
|
||||
params: await getATokenExtraParams(aTokenImpl, tokenAddresses[symbol]),
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -165,10 +180,9 @@ export const getPairsTokenAggregator = (
|
|||
const aggregatorAddressIndex = Object.keys(aggregatorsAddresses).findIndex(
|
||||
(value) => value === tokenSymbol
|
||||
);
|
||||
const [, aggregatorAddress] = (Object.entries(aggregatorsAddresses) as [
|
||||
string,
|
||||
tEthereumAddress
|
||||
][])[aggregatorAddressIndex];
|
||||
const [, aggregatorAddress] = (
|
||||
Object.entries(aggregatorsAddresses) as [string, tEthereumAddress][]
|
||||
)[aggregatorAddressIndex];
|
||||
return [tokenAddress, aggregatorAddress];
|
||||
}
|
||||
}) as [string, string][];
|
||||
|
|
|
@ -9,7 +9,7 @@ export const usingTenderly = () =>
|
|||
|
||||
export const verifyAtTenderly = async (id: string, instance: Contract) => {
|
||||
console.log('\n- Doing Tenderly contract verification of', id);
|
||||
await (DRE as any).tenderlyNetwork.verify({
|
||||
await (DRE as any).tenderly.network().verify({
|
||||
name: id,
|
||||
address: instance.address,
|
||||
});
|
||||
|
|
|
@ -13,7 +13,7 @@ export enum eEthereumNetwork {
|
|||
main = 'main',
|
||||
coverage = 'coverage',
|
||||
hardhat = 'hardhat',
|
||||
tenderlyMain = 'tenderlyMain',
|
||||
tenderly = 'tenderly',
|
||||
}
|
||||
|
||||
export enum ePolygonNetwork {
|
||||
|
@ -424,7 +424,7 @@ export interface iEthereumParamsPerNetwork<T> {
|
|||
[eEthereumNetwork.ropsten]: T;
|
||||
[eEthereumNetwork.main]: T;
|
||||
[eEthereumNetwork.hardhat]: T;
|
||||
[eEthereumNetwork.tenderlyMain]: T;
|
||||
[eEthereumNetwork.tenderly]: T;
|
||||
}
|
||||
|
||||
export interface iPolygonParamsPerNetwork<T> {
|
||||
|
|
|
@ -113,7 +113,7 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
[eEthereumNetwork.kovan]: undefined,
|
||||
[eEthereumNetwork.ropsten]: undefined,
|
||||
[eEthereumNetwork.main]: undefined,
|
||||
[eEthereumNetwork.tenderlyMain]: undefined,
|
||||
[eEthereumNetwork.tenderly]: undefined,
|
||||
},
|
||||
PoolAdminIndex: 0,
|
||||
EmergencyAdmin: {
|
||||
|
@ -123,7 +123,7 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
[eEthereumNetwork.kovan]: undefined,
|
||||
[eEthereumNetwork.ropsten]: undefined,
|
||||
[eEthereumNetwork.main]: undefined,
|
||||
[eEthereumNetwork.tenderlyMain]: undefined,
|
||||
[eEthereumNetwork.tenderly]: undefined,
|
||||
},
|
||||
EmergencyAdminIndex: 1,
|
||||
ProviderRegistry: {
|
||||
|
@ -133,7 +133,7 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
[eEthereumNetwork.coverage]: '',
|
||||
[eEthereumNetwork.hardhat]: '',
|
||||
[eEthereumNetwork.buidlerevm]: '',
|
||||
[eEthereumNetwork.tenderlyMain]: '0x52D306e36E3B6B02c153d0266ff0f85d18BCD413',
|
||||
[eEthereumNetwork.tenderly]: '0x52D306e36E3B6B02c153d0266ff0f85d18BCD413',
|
||||
},
|
||||
ProviderRegistryOwner: {
|
||||
[eEthereumNetwork.kovan]: '0x85e4A467343c0dc4aDAB74Af84448D9c45D8ae6F',
|
||||
|
@ -142,7 +142,7 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
[eEthereumNetwork.coverage]: '',
|
||||
[eEthereumNetwork.hardhat]: '',
|
||||
[eEthereumNetwork.buidlerevm]: '',
|
||||
[eEthereumNetwork.tenderlyMain]: '0xB9062896ec3A615a4e4444DF183F0531a77218AE',
|
||||
[eEthereumNetwork.tenderly]: '0xB9062896ec3A615a4e4444DF183F0531a77218AE',
|
||||
},
|
||||
LendingRateOracle: {
|
||||
[eEthereumNetwork.coverage]: '',
|
||||
|
@ -151,7 +151,7 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
[eEthereumNetwork.kovan]: '', //'0xdCde9Bb6a49e37fA433990832AB541AE2d4FEB4a',
|
||||
[eEthereumNetwork.ropsten]: '0x05dcca805a6562c1bdd0423768754acb6993241b',
|
||||
[eEthereumNetwork.main]: '', //'0x8A32f49FFbA88aba6EFF96F45D8BD1D4b3f35c7D',
|
||||
[eEthereumNetwork.tenderlyMain]: '0x8A32f49FFbA88aba6EFF96F45D8BD1D4b3f35c7D',
|
||||
[eEthereumNetwork.tenderly]: '0x8A32f49FFbA88aba6EFF96F45D8BD1D4b3f35c7D',
|
||||
},
|
||||
LendingPoolCollateralManager: {
|
||||
[eEthereumNetwork.coverage]: '',
|
||||
|
@ -160,7 +160,7 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
[eEthereumNetwork.kovan]: '0x9269b6453d0d75370c4c85e5a42977a53efdb72a',
|
||||
[eEthereumNetwork.ropsten]: '',
|
||||
[eEthereumNetwork.main]: '0xbd4765210d4167CE2A5b87280D9E8Ee316D5EC7C',
|
||||
[eEthereumNetwork.tenderlyMain]: '0xbd4765210d4167CE2A5b87280D9E8Ee316D5EC7C',
|
||||
[eEthereumNetwork.tenderly]: '0xbd4765210d4167CE2A5b87280D9E8Ee316D5EC7C',
|
||||
},
|
||||
LendingPoolConfigurator: {
|
||||
[eEthereumNetwork.coverage]: '',
|
||||
|
@ -169,7 +169,7 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
[eEthereumNetwork.kovan]: '',
|
||||
[eEthereumNetwork.ropsten]: '',
|
||||
[eEthereumNetwork.main]: '',
|
||||
[eEthereumNetwork.tenderlyMain]: '',
|
||||
[eEthereumNetwork.tenderly]: '',
|
||||
},
|
||||
LendingPool: {
|
||||
[eEthereumNetwork.coverage]: '',
|
||||
|
@ -178,7 +178,7 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
[eEthereumNetwork.kovan]: '',
|
||||
[eEthereumNetwork.ropsten]: '',
|
||||
[eEthereumNetwork.main]: '',
|
||||
[eEthereumNetwork.tenderlyMain]: '',
|
||||
[eEthereumNetwork.tenderly]: '',
|
||||
},
|
||||
WethGateway: {
|
||||
[eEthereumNetwork.coverage]: '',
|
||||
|
@ -187,7 +187,7 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
[eEthereumNetwork.kovan]: '',
|
||||
[eEthereumNetwork.ropsten]: '',
|
||||
[eEthereumNetwork.main]: '',
|
||||
[eEthereumNetwork.tenderlyMain]: '',
|
||||
[eEthereumNetwork.tenderly]: '',
|
||||
},
|
||||
TokenDistributor: {
|
||||
[eEthereumNetwork.coverage]: '',
|
||||
|
@ -196,7 +196,7 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
[eEthereumNetwork.kovan]: '0x971efe90088f21dc6a36f610ffed77fc19710708',
|
||||
[eEthereumNetwork.ropsten]: '0xeba2ea67942b8250d870b12750b594696d02fc9c',
|
||||
[eEthereumNetwork.main]: '0xe3d9988f676457123c5fd01297605efdd0cba1ae',
|
||||
[eEthereumNetwork.tenderlyMain]: '0xe3d9988f676457123c5fd01297605efdd0cba1ae',
|
||||
[eEthereumNetwork.tenderly]: '0xe3d9988f676457123c5fd01297605efdd0cba1ae',
|
||||
},
|
||||
AaveOracle: {
|
||||
[eEthereumNetwork.coverage]: '',
|
||||
|
@ -205,7 +205,7 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
[eEthereumNetwork.kovan]: '', //'0xB8bE51E6563BB312Cbb2aa26e352516c25c26ac1',
|
||||
[eEthereumNetwork.ropsten]: ZERO_ADDRESS,
|
||||
[eEthereumNetwork.main]: '', //'0xA50ba011c48153De246E5192C8f9258A2ba79Ca9',
|
||||
[eEthereumNetwork.tenderlyMain]: '0xA50ba011c48153De246E5192C8f9258A2ba79Ca9',
|
||||
[eEthereumNetwork.tenderly]: '0xA50ba011c48153De246E5192C8f9258A2ba79Ca9',
|
||||
},
|
||||
FallbackOracle: {
|
||||
[eEthereumNetwork.coverage]: '',
|
||||
|
@ -214,7 +214,7 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
[eEthereumNetwork.kovan]: '0x50913E8E1c650E790F8a1E741FF9B1B1bB251dfe',
|
||||
[eEthereumNetwork.ropsten]: '0xAD1a978cdbb8175b2eaeC47B01404f8AEC5f4F0d',
|
||||
[eEthereumNetwork.main]: ZERO_ADDRESS,
|
||||
[eEthereumNetwork.tenderlyMain]: ZERO_ADDRESS,
|
||||
[eEthereumNetwork.tenderly]: ZERO_ADDRESS,
|
||||
},
|
||||
ChainlinkAggregator: {
|
||||
[eEthereumNetwork.coverage]: {},
|
||||
|
@ -287,7 +287,7 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
USD: '0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419',
|
||||
xSUSHI: '0x9b26214bEC078E68a394AaEbfbffF406Ce14893F',
|
||||
},
|
||||
[eEthereumNetwork.tenderlyMain]: {
|
||||
[eEthereumNetwork.tenderly]: {
|
||||
AAVE: '0x6Df09E975c830ECae5bd4eD9d90f3A95a4f88012',
|
||||
BAT: '0x0d16d4528239e9ee52fa531af613AcdB23D88c94',
|
||||
BUSD: '0x614715d2Af89E6EC99A233818275142cE88d1Cfd',
|
||||
|
@ -318,7 +318,7 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
[eEthereumNetwork.main]: {},
|
||||
[eEthereumNetwork.kovan]: {},
|
||||
[eEthereumNetwork.ropsten]: {},
|
||||
[eEthereumNetwork.tenderlyMain]: {},
|
||||
[eEthereumNetwork.tenderly]: {},
|
||||
},
|
||||
ReservesConfig: {},
|
||||
ATokenDomainSeparator: {
|
||||
|
@ -331,7 +331,7 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
[eEthereumNetwork.kovan]: '',
|
||||
[eEthereumNetwork.ropsten]: '',
|
||||
[eEthereumNetwork.main]: '',
|
||||
[eEthereumNetwork.tenderlyMain]: '',
|
||||
[eEthereumNetwork.tenderly]: '',
|
||||
},
|
||||
WETH: {
|
||||
[eEthereumNetwork.coverage]: '', // deployed in local evm
|
||||
|
@ -340,7 +340,7 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
[eEthereumNetwork.kovan]: '0xd0a1e359811322d97991e03f863a0c30c2cf029c',
|
||||
[eEthereumNetwork.ropsten]: '0xc778417e063141139fce010982780140aa0cd5ab',
|
||||
[eEthereumNetwork.main]: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
|
||||
[eEthereumNetwork.tenderlyMain]: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
|
||||
[eEthereumNetwork.tenderly]: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
|
||||
},
|
||||
WrappedNativeToken: {
|
||||
[eEthereumNetwork.coverage]: '', // deployed in local evm
|
||||
|
@ -349,7 +349,7 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
[eEthereumNetwork.kovan]: '0xd0a1e359811322d97991e03f863a0c30c2cf029c',
|
||||
[eEthereumNetwork.ropsten]: '0xc778417e063141139fce010982780140aa0cd5ab',
|
||||
[eEthereumNetwork.main]: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
|
||||
[eEthereumNetwork.tenderlyMain]: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
|
||||
[eEthereumNetwork.tenderly]: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
|
||||
},
|
||||
ReserveFactorTreasuryAddress: {
|
||||
[eEthereumNetwork.coverage]: '0x464c71f6c2f760dda6093dcb91c24c39e5d6e18c',
|
||||
|
@ -358,7 +358,7 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
[eEthereumNetwork.kovan]: '0x464c71f6c2f760dda6093dcb91c24c39e5d6e18c',
|
||||
[eEthereumNetwork.ropsten]: '0x464c71f6c2f760dda6093dcb91c24c39e5d6e18c',
|
||||
[eEthereumNetwork.main]: '0x464c71f6c2f760dda6093dcb91c24c39e5d6e18c',
|
||||
[eEthereumNetwork.tenderlyMain]: '0x464c71f6c2f760dda6093dcb91c24c39e5d6e18c',
|
||||
[eEthereumNetwork.tenderly]: '0x464c71f6c2f760dda6093dcb91c24c39e5d6e18c',
|
||||
},
|
||||
IncentivesController: {
|
||||
[eEthereumNetwork.coverage]: ZERO_ADDRESS,
|
||||
|
@ -367,6 +367,6 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
[eEthereumNetwork.kovan]: ZERO_ADDRESS,
|
||||
[eEthereumNetwork.ropsten]: ZERO_ADDRESS,
|
||||
[eEthereumNetwork.main]: ZERO_ADDRESS,
|
||||
[eEthereumNetwork.tenderlyMain]: ZERO_ADDRESS,
|
||||
[eEthereumNetwork.tenderly]: ZERO_ADDRESS,
|
||||
},
|
||||
};
|
||||
|
|
|
@ -128,7 +128,7 @@ export const AaveConfig: IAaveConfiguration = {
|
|||
ZRX: '0xE41d2489571d322189246DaFA5ebDe1F4699F498',
|
||||
xSUSHI: '0x8798249c2E607446EfB7Ad49eC89dD1865Ff4272',
|
||||
},
|
||||
[eEthereumNetwork.tenderlyMain]: {
|
||||
[eEthereumNetwork.tenderly]: {
|
||||
AAVE: '0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9',
|
||||
BAT: '0x0d8775f648430679a709e98d2b0cb6250d2887ef',
|
||||
BUSD: '0x4Fabb145d64652a948d72533023f6E7A623C7C53',
|
||||
|
|
|
@ -119,7 +119,7 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
[eEthereumNetwork.kovan]: undefined,
|
||||
[eEthereumNetwork.ropsten]: undefined,
|
||||
[eEthereumNetwork.main]: undefined,
|
||||
[eEthereumNetwork.tenderlyMain]: undefined,
|
||||
[eEthereumNetwork.tenderly]: undefined,
|
||||
},
|
||||
PoolAdminIndex: 0,
|
||||
EmergencyAdmin: {
|
||||
|
@ -129,7 +129,7 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
[eEthereumNetwork.kovan]: undefined,
|
||||
[eEthereumNetwork.ropsten]: undefined,
|
||||
[eEthereumNetwork.main]: undefined,
|
||||
[eEthereumNetwork.tenderlyMain]: undefined,
|
||||
[eEthereumNetwork.tenderly]: undefined,
|
||||
},
|
||||
EmergencyAdminIndex: 1,
|
||||
ProviderRegistry: {
|
||||
|
@ -139,7 +139,7 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
[eEthereumNetwork.coverage]: '',
|
||||
[eEthereumNetwork.hardhat]: '',
|
||||
[eEthereumNetwork.buidlerevm]: '',
|
||||
[eEthereumNetwork.tenderlyMain]: '0x52D306e36E3B6B02c153d0266ff0f85d18BCD413',
|
||||
[eEthereumNetwork.tenderly]: '0x52D306e36E3B6B02c153d0266ff0f85d18BCD413',
|
||||
},
|
||||
ProviderRegistryOwner: {
|
||||
[eEthereumNetwork.kovan]: '0x85e4A467343c0dc4aDAB74Af84448D9c45D8ae6F',
|
||||
|
@ -148,7 +148,7 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
[eEthereumNetwork.coverage]: '',
|
||||
[eEthereumNetwork.hardhat]: '',
|
||||
[eEthereumNetwork.buidlerevm]: '',
|
||||
[eEthereumNetwork.tenderlyMain]: '0xB9062896ec3A615a4e4444DF183F0531a77218AE',
|
||||
[eEthereumNetwork.tenderly]: '0xB9062896ec3A615a4e4444DF183F0531a77218AE',
|
||||
},
|
||||
LendingRateOracle: {
|
||||
[eEthereumNetwork.coverage]: '',
|
||||
|
@ -157,7 +157,7 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
[eEthereumNetwork.kovan]: '0xd00Bd28FAdDa9d5658D1D4e0c151973146C7A533', //'0xE48F95873855bfd97BF89572DDf5cBC44D9c545b'
|
||||
[eEthereumNetwork.ropsten]: '0x05dcca805a6562c1bdd0423768754acb6993241b',
|
||||
[eEthereumNetwork.main]: '', //'0x8A32f49FFbA88aba6EFF96F45D8BD1D4b3f35c7D', // Need to re-deploy because of onlyOwner
|
||||
[eEthereumNetwork.tenderlyMain]: '0x8A32f49FFbA88aba6EFF96F45D8BD1D4b3f35c7D',
|
||||
[eEthereumNetwork.tenderly]: '0x8A32f49FFbA88aba6EFF96F45D8BD1D4b3f35c7D',
|
||||
},
|
||||
LendingPoolCollateralManager: {
|
||||
[eEthereumNetwork.coverage]: '',
|
||||
|
@ -166,7 +166,7 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
[eEthereumNetwork.kovan]: '0x9269b6453d0d75370c4c85e5a42977a53efdb72a',
|
||||
[eEthereumNetwork.ropsten]: '',
|
||||
[eEthereumNetwork.main]: '0xbd4765210d4167CE2A5b87280D9E8Ee316D5EC7C',
|
||||
[eEthereumNetwork.tenderlyMain]: '0xbd4765210d4167CE2A5b87280D9E8Ee316D5EC7C',
|
||||
[eEthereumNetwork.tenderly]: '0xbd4765210d4167CE2A5b87280D9E8Ee316D5EC7C',
|
||||
},
|
||||
LendingPoolConfigurator: {
|
||||
[eEthereumNetwork.coverage]: '',
|
||||
|
@ -175,7 +175,7 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
[eEthereumNetwork.kovan]: '0x36eB31800aa67a9c50df1d56EE01981A6E14Cce5',
|
||||
[eEthereumNetwork.ropsten]: '',
|
||||
[eEthereumNetwork.main]: '',
|
||||
[eEthereumNetwork.tenderlyMain]: '',
|
||||
[eEthereumNetwork.tenderly]: '',
|
||||
},
|
||||
LendingPool: {
|
||||
[eEthereumNetwork.coverage]: '',
|
||||
|
@ -184,7 +184,7 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
[eEthereumNetwork.kovan]: '0x78142De7a1930412E9e50dEB3b80dB284c2dFa3A',
|
||||
[eEthereumNetwork.ropsten]: '',
|
||||
[eEthereumNetwork.main]: '',
|
||||
[eEthereumNetwork.tenderlyMain]: '',
|
||||
[eEthereumNetwork.tenderly]: '',
|
||||
},
|
||||
WethGateway: {
|
||||
[eEthereumNetwork.coverage]: '',
|
||||
|
@ -193,7 +193,7 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
[eEthereumNetwork.kovan]: '0x1c4A1cC35A477aa1cF35DF671d93ACc04d8131E0',
|
||||
[eEthereumNetwork.ropsten]: '',
|
||||
[eEthereumNetwork.main]: '',
|
||||
[eEthereumNetwork.tenderlyMain]: '',
|
||||
[eEthereumNetwork.tenderly]: '',
|
||||
},
|
||||
TokenDistributor: {
|
||||
[eEthereumNetwork.coverage]: '',
|
||||
|
@ -202,7 +202,7 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
[eEthereumNetwork.kovan]: '0x971efe90088f21dc6a36f610ffed77fc19710708',
|
||||
[eEthereumNetwork.ropsten]: '0xeba2ea67942b8250d870b12750b594696d02fc9c',
|
||||
[eEthereumNetwork.main]: '0xe3d9988f676457123c5fd01297605efdd0cba1ae',
|
||||
[eEthereumNetwork.tenderlyMain]: '0xe3d9988f676457123c5fd01297605efdd0cba1ae',
|
||||
[eEthereumNetwork.tenderly]: '0xe3d9988f676457123c5fd01297605efdd0cba1ae',
|
||||
},
|
||||
AaveOracle: {
|
||||
[eEthereumNetwork.coverage]: '',
|
||||
|
@ -211,7 +211,7 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
[eEthereumNetwork.kovan]: '0x8fb777d67e9945e2c01936e319057f9d41d559e6', // Need to re-deploy because of onlyOwner
|
||||
[eEthereumNetwork.ropsten]: ZERO_ADDRESS,
|
||||
[eEthereumNetwork.main]: '', //'0xA50ba011c48153De246E5192C8f9258A2ba79Ca9', // Need to re-deploy because of onlyOwner
|
||||
[eEthereumNetwork.tenderlyMain]: '0xA50ba011c48153De246E5192C8f9258A2ba79Ca9',
|
||||
[eEthereumNetwork.tenderly]: '0xA50ba011c48153De246E5192C8f9258A2ba79Ca9',
|
||||
},
|
||||
FallbackOracle: {
|
||||
[eEthereumNetwork.coverage]: '',
|
||||
|
@ -220,7 +220,7 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
[eEthereumNetwork.kovan]: '0x50913E8E1c650E790F8a1E741FF9B1B1bB251dfe',
|
||||
[eEthereumNetwork.ropsten]: '0xAD1a978cdbb8175b2eaeC47B01404f8AEC5f4F0d',
|
||||
[eEthereumNetwork.main]: ZERO_ADDRESS,
|
||||
[eEthereumNetwork.tenderlyMain]: ZERO_ADDRESS,
|
||||
[eEthereumNetwork.tenderly]: ZERO_ADDRESS,
|
||||
},
|
||||
ChainlinkAggregator: {
|
||||
[eEthereumNetwork.coverage]: {},
|
||||
|
@ -273,7 +273,7 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
BptBALWETH: '0x2e4e78936b100be6Ef85BCEf7FB25bC770B02B85',
|
||||
USD: '0x9326BFA02ADD2366b30bacB125260Af641031331',
|
||||
},
|
||||
[eEthereumNetwork.tenderlyMain]: {
|
||||
[eEthereumNetwork.tenderly]: {
|
||||
USDT: '0xEe9F2375b4bdF6387aa8265dD4FB8F16512A1d46',
|
||||
WBTC: '0xdeb288F737066589598e9214E782fa5A8eD689e8',
|
||||
USDC: '0x986b5E1e1755e3C2440e960477f25201B0a8bbD4',
|
||||
|
@ -304,7 +304,7 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
[eEthereumNetwork.main]: {},
|
||||
[eEthereumNetwork.kovan]: {},
|
||||
[eEthereumNetwork.ropsten]: {},
|
||||
[eEthereumNetwork.tenderlyMain]: {},
|
||||
[eEthereumNetwork.tenderly]: {},
|
||||
},
|
||||
ReservesConfig: {},
|
||||
ATokenDomainSeparator: {
|
||||
|
@ -317,7 +317,7 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
[eEthereumNetwork.kovan]: '',
|
||||
[eEthereumNetwork.ropsten]: '',
|
||||
[eEthereumNetwork.main]: '',
|
||||
[eEthereumNetwork.tenderlyMain]: '',
|
||||
[eEthereumNetwork.tenderly]: '',
|
||||
},
|
||||
WETH: {
|
||||
[eEthereumNetwork.coverage]: '', // deployed in local evm
|
||||
|
@ -326,7 +326,7 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
[eEthereumNetwork.kovan]: '0xd0a1e359811322d97991e03f863a0c30c2cf029c',
|
||||
[eEthereumNetwork.ropsten]: '0xc778417e063141139fce010982780140aa0cd5ab',
|
||||
[eEthereumNetwork.main]: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
|
||||
[eEthereumNetwork.tenderlyMain]: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
|
||||
[eEthereumNetwork.tenderly]: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
|
||||
},
|
||||
WrappedNativeToken: {
|
||||
[eEthereumNetwork.coverage]: '', // deployed in local evm
|
||||
|
@ -335,7 +335,7 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
[eEthereumNetwork.kovan]: '0xd0a1e359811322d97991e03f863a0c30c2cf029c',
|
||||
[eEthereumNetwork.ropsten]: '0xc778417e063141139fce010982780140aa0cd5ab',
|
||||
[eEthereumNetwork.main]: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
|
||||
[eEthereumNetwork.tenderlyMain]: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
|
||||
[eEthereumNetwork.tenderly]: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
|
||||
},
|
||||
ReserveFactorTreasuryAddress: {
|
||||
[eEthereumNetwork.coverage]: '0x464c71f6c2f760dda6093dcb91c24c39e5d6e18c',
|
||||
|
@ -344,7 +344,7 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
[eEthereumNetwork.kovan]: '0x464c71f6c2f760dda6093dcb91c24c39e5d6e18c',
|
||||
[eEthereumNetwork.ropsten]: '0x464c71f6c2f760dda6093dcb91c24c39e5d6e18c',
|
||||
[eEthereumNetwork.main]: '0x464c71f6c2f760dda6093dcb91c24c39e5d6e18c',
|
||||
[eEthereumNetwork.tenderlyMain]: '0x464c71f6c2f760dda6093dcb91c24c39e5d6e18c',
|
||||
[eEthereumNetwork.tenderly]: '0x464c71f6c2f760dda6093dcb91c24c39e5d6e18c',
|
||||
},
|
||||
IncentivesController: {
|
||||
[eEthereumNetwork.coverage]: ZERO_ADDRESS,
|
||||
|
@ -353,6 +353,6 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
[eEthereumNetwork.kovan]: ZERO_ADDRESS,
|
||||
[eEthereumNetwork.ropsten]: ZERO_ADDRESS,
|
||||
[eEthereumNetwork.main]: ZERO_ADDRESS,
|
||||
[eEthereumNetwork.tenderlyMain]: ZERO_ADDRESS,
|
||||
[eEthereumNetwork.tenderly]: ZERO_ADDRESS,
|
||||
},
|
||||
};
|
||||
|
|
|
@ -83,8 +83,7 @@ export const AmmConfig: IAmmConfiguration = {
|
|||
BptWBTCWETH: '0x110569E3261bC0934dA637b019f6f1b6F50ec574',
|
||||
BptBALWETH: '0xad01D8e0Fa9EAA8Fe76dA30CFb1BCe12707aE6c5',
|
||||
},
|
||||
[eEthereumNetwork.ropsten]: {
|
||||
},
|
||||
[eEthereumNetwork.ropsten]: {},
|
||||
[eEthereumNetwork.main]: {
|
||||
DAI: '0x6B175474E89094C44Da98b954EedeAC495271d0F',
|
||||
USDC: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
|
||||
|
@ -108,7 +107,7 @@ export const AmmConfig: IAmmConfiguration = {
|
|||
BptWBTCWETH: '0x1efF8aF5D577060BA4ac8A29A13525bb0Ee2A3D5',
|
||||
BptBALWETH: '0x59A19D8c652FA0284f44113D0ff9aBa70bd46fB4',
|
||||
},
|
||||
[eEthereumNetwork.tenderlyMain]: {
|
||||
[eEthereumNetwork.tenderly]: {
|
||||
DAI: '0x6B175474E89094C44Da98b954EedeAC495271d0F',
|
||||
USDC: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
|
||||
USDT: '0xdAC17F958D2ee523a2206206994597C13D831ec7',
|
||||
|
|
|
@ -58,7 +58,7 @@ export const AmmConfig: IUsdAmmConfiguration = {
|
|||
[eEthereumNetwork.kovan]: undefined,
|
||||
[eEthereumNetwork.ropsten]: undefined,
|
||||
[eEthereumNetwork.main]: undefined,
|
||||
[eEthereumNetwork.tenderlyMain]: undefined,
|
||||
[eEthereumNetwork.tenderly]: undefined,
|
||||
},
|
||||
PoolAdminIndex: 0,
|
||||
EmergencyAdmin: {
|
||||
|
@ -68,7 +68,7 @@ export const AmmConfig: IUsdAmmConfiguration = {
|
|||
[eEthereumNetwork.kovan]: undefined,
|
||||
[eEthereumNetwork.ropsten]: undefined,
|
||||
[eEthereumNetwork.main]: undefined,
|
||||
[eEthereumNetwork.tenderlyMain]: undefined,
|
||||
[eEthereumNetwork.tenderly]: undefined,
|
||||
},
|
||||
EmergencyAdminIndex: 1,
|
||||
ProviderRegistry: {
|
||||
|
@ -78,7 +78,7 @@ export const AmmConfig: IUsdAmmConfiguration = {
|
|||
[eEthereumNetwork.coverage]: '',
|
||||
[eEthereumNetwork.hardhat]: '',
|
||||
[eEthereumNetwork.buidlerevm]: '',
|
||||
[eEthereumNetwork.tenderlyMain]: '0x52D306e36E3B6B02c153d0266ff0f85d18BCD413',
|
||||
[eEthereumNetwork.tenderly]: '0x52D306e36E3B6B02c153d0266ff0f85d18BCD413',
|
||||
},
|
||||
ProviderRegistryOwner: {
|
||||
[eEthereumNetwork.kovan]: '0x85e4A467343c0dc4aDAB74Af84448D9c45D8ae6F',
|
||||
|
@ -87,7 +87,7 @@ export const AmmConfig: IUsdAmmConfiguration = {
|
|||
[eEthereumNetwork.coverage]: '',
|
||||
[eEthereumNetwork.hardhat]: '',
|
||||
[eEthereumNetwork.buidlerevm]: '',
|
||||
[eEthereumNetwork.tenderlyMain]: '0xB9062896ec3A615a4e4444DF183F0531a77218AE',
|
||||
[eEthereumNetwork.tenderly]: '0xB9062896ec3A615a4e4444DF183F0531a77218AE',
|
||||
},
|
||||
LendingRateOracle: {
|
||||
[eEthereumNetwork.coverage]: '',
|
||||
|
@ -96,7 +96,7 @@ export const AmmConfig: IUsdAmmConfiguration = {
|
|||
[eEthereumNetwork.kovan]: '0xd00Bd28FAdDa9d5658D1D4e0c151973146C7A533', //'0xE48F95873855bfd97BF89572DDf5cBC44D9c545b'
|
||||
[eEthereumNetwork.ropsten]: '0x05dcca805a6562c1bdd0423768754acb6993241b',
|
||||
[eEthereumNetwork.main]: '', //'0x8A32f49FFbA88aba6EFF96F45D8BD1D4b3f35c7D', // Need to re-deploy because of onlyOwner
|
||||
[eEthereumNetwork.tenderlyMain]: '0x8A32f49FFbA88aba6EFF96F45D8BD1D4b3f35c7D',
|
||||
[eEthereumNetwork.tenderly]: '0x8A32f49FFbA88aba6EFF96F45D8BD1D4b3f35c7D',
|
||||
},
|
||||
LendingPoolCollateralManager: {
|
||||
[eEthereumNetwork.coverage]: '',
|
||||
|
@ -105,7 +105,7 @@ export const AmmConfig: IUsdAmmConfiguration = {
|
|||
[eEthereumNetwork.kovan]: '0x9269b6453d0d75370c4c85e5a42977a53efdb72a',
|
||||
[eEthereumNetwork.ropsten]: '',
|
||||
[eEthereumNetwork.main]: '0xbd4765210d4167CE2A5b87280D9E8Ee316D5EC7C',
|
||||
[eEthereumNetwork.tenderlyMain]: '0xbd4765210d4167CE2A5b87280D9E8Ee316D5EC7C',
|
||||
[eEthereumNetwork.tenderly]: '0xbd4765210d4167CE2A5b87280D9E8Ee316D5EC7C',
|
||||
},
|
||||
LendingPoolConfigurator: {
|
||||
[eEthereumNetwork.coverage]: '',
|
||||
|
@ -114,7 +114,7 @@ export const AmmConfig: IUsdAmmConfiguration = {
|
|||
[eEthereumNetwork.kovan]: '0x36eB31800aa67a9c50df1d56EE01981A6E14Cce5',
|
||||
[eEthereumNetwork.ropsten]: '',
|
||||
[eEthereumNetwork.main]: '',
|
||||
[eEthereumNetwork.tenderlyMain]: '',
|
||||
[eEthereumNetwork.tenderly]: '',
|
||||
},
|
||||
LendingPool: {
|
||||
[eEthereumNetwork.coverage]: '',
|
||||
|
@ -123,7 +123,7 @@ export const AmmConfig: IUsdAmmConfiguration = {
|
|||
[eEthereumNetwork.kovan]: '0x78142De7a1930412E9e50dEB3b80dB284c2dFa3A',
|
||||
[eEthereumNetwork.ropsten]: '',
|
||||
[eEthereumNetwork.main]: '',
|
||||
[eEthereumNetwork.tenderlyMain]: '',
|
||||
[eEthereumNetwork.tenderly]: '',
|
||||
},
|
||||
WethGateway: {
|
||||
[eEthereumNetwork.coverage]: '',
|
||||
|
@ -132,7 +132,7 @@ export const AmmConfig: IUsdAmmConfiguration = {
|
|||
[eEthereumNetwork.kovan]: '0x1c4A1cC35A477aa1cF35DF671d93ACc04d8131E0',
|
||||
[eEthereumNetwork.ropsten]: '',
|
||||
[eEthereumNetwork.main]: '',
|
||||
[eEthereumNetwork.tenderlyMain]: '',
|
||||
[eEthereumNetwork.tenderly]: '',
|
||||
},
|
||||
TokenDistributor: {
|
||||
[eEthereumNetwork.coverage]: '',
|
||||
|
@ -141,7 +141,7 @@ export const AmmConfig: IUsdAmmConfiguration = {
|
|||
[eEthereumNetwork.kovan]: '0x971efe90088f21dc6a36f610ffed77fc19710708',
|
||||
[eEthereumNetwork.ropsten]: '0xeba2ea67942b8250d870b12750b594696d02fc9c',
|
||||
[eEthereumNetwork.main]: '0xe3d9988f676457123c5fd01297605efdd0cba1ae',
|
||||
[eEthereumNetwork.tenderlyMain]: '0xe3d9988f676457123c5fd01297605efdd0cba1ae',
|
||||
[eEthereumNetwork.tenderly]: '0xe3d9988f676457123c5fd01297605efdd0cba1ae',
|
||||
},
|
||||
AaveOracle: {
|
||||
[eEthereumNetwork.coverage]: '',
|
||||
|
@ -150,7 +150,7 @@ export const AmmConfig: IUsdAmmConfiguration = {
|
|||
[eEthereumNetwork.kovan]: '0x8fb777d67e9945e2c01936e319057f9d41d559e6', // Need to re-deploy because of onlyOwner
|
||||
[eEthereumNetwork.ropsten]: ZERO_ADDRESS,
|
||||
[eEthereumNetwork.main]: ZERO_ADDRESS,
|
||||
[eEthereumNetwork.tenderlyMain]: '0x3a463fFE9b69364B51113352a17839e36268e657',
|
||||
[eEthereumNetwork.tenderly]: '0x3a463fFE9b69364B51113352a17839e36268e657',
|
||||
},
|
||||
FallbackOracle: {
|
||||
[eEthereumNetwork.coverage]: '',
|
||||
|
@ -159,7 +159,7 @@ export const AmmConfig: IUsdAmmConfiguration = {
|
|||
[eEthereumNetwork.kovan]: '0x50913E8E1c650E790F8a1E741FF9B1B1bB251dfe',
|
||||
[eEthereumNetwork.ropsten]: '0xAD1a978cdbb8175b2eaeC47B01404f8AEC5f4F0d',
|
||||
[eEthereumNetwork.main]: ZERO_ADDRESS,
|
||||
[eEthereumNetwork.tenderlyMain]: ZERO_ADDRESS,
|
||||
[eEthereumNetwork.tenderly]: ZERO_ADDRESS,
|
||||
},
|
||||
ChainlinkAggregator: {
|
||||
[eEthereumNetwork.coverage]: {},
|
||||
|
@ -176,7 +176,7 @@ export const AmmConfig: IUsdAmmConfiguration = {
|
|||
saCRV: '0x1eD0819bD513A0B9271Fa831f1C3dbab8d80C36c', // Oracle deployed at fork
|
||||
'3CRV': '0x03c3614b6888842EcCAc71ADA1Ef1ad8e54f6D89', // Oracle deployed at fork
|
||||
},
|
||||
[eEthereumNetwork.tenderlyMain]: {
|
||||
[eEthereumNetwork.tenderly]: {
|
||||
DAI: '0xAed0c38402a5d19df6E4c03F4E2DceD6e29c1ee9',
|
||||
SUSD: '0xad35Bd71b9aFE6e4bDc266B345c198eaDEf9Ad94',
|
||||
USDC: '0x8fFfFfd4AfB6115b954Bd326cbe7B4BA576818f6',
|
||||
|
@ -196,7 +196,7 @@ export const AmmConfig: IUsdAmmConfiguration = {
|
|||
[eEthereumNetwork.kovan]: '',
|
||||
[eEthereumNetwork.ropsten]: '',
|
||||
[eEthereumNetwork.main]: '',
|
||||
[eEthereumNetwork.tenderlyMain]: '',
|
||||
[eEthereumNetwork.tenderly]: '',
|
||||
},
|
||||
WETH: {
|
||||
[eEthereumNetwork.coverage]: '', // deployed in local evm
|
||||
|
@ -205,7 +205,7 @@ export const AmmConfig: IUsdAmmConfiguration = {
|
|||
[eEthereumNetwork.kovan]: '0xd0a1e359811322d97991e03f863a0c30c2cf029c',
|
||||
[eEthereumNetwork.ropsten]: '0xc778417e063141139fce010982780140aa0cd5ab',
|
||||
[eEthereumNetwork.main]: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
|
||||
[eEthereumNetwork.tenderlyMain]: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
|
||||
[eEthereumNetwork.tenderly]: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
|
||||
},
|
||||
WrappedNativeToken: {
|
||||
[eEthereumNetwork.coverage]: '', // deployed in local evm
|
||||
|
@ -214,7 +214,7 @@ export const AmmConfig: IUsdAmmConfiguration = {
|
|||
[eEthereumNetwork.kovan]: '0xd0a1e359811322d97991e03f863a0c30c2cf029c',
|
||||
[eEthereumNetwork.ropsten]: '0xc778417e063141139fce010982780140aa0cd5ab',
|
||||
[eEthereumNetwork.main]: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
|
||||
[eEthereumNetwork.tenderlyMain]: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
|
||||
[eEthereumNetwork.tenderly]: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
|
||||
},
|
||||
ReserveFactorTreasuryAddress: {
|
||||
[eEthereumNetwork.coverage]: '0x464c71f6c2f760dda6093dcb91c24c39e5d6e18c',
|
||||
|
@ -223,7 +223,7 @@ export const AmmConfig: IUsdAmmConfiguration = {
|
|||
[eEthereumNetwork.kovan]: '0x464c71f6c2f760dda6093dcb91c24c39e5d6e18c',
|
||||
[eEthereumNetwork.ropsten]: '0x464c71f6c2f760dda6093dcb91c24c39e5d6e18c',
|
||||
[eEthereumNetwork.main]: '0x464c71f6c2f760dda6093dcb91c24c39e5d6e18c',
|
||||
[eEthereumNetwork.tenderlyMain]: '0x464c71f6c2f760dda6093dcb91c24c39e5d6e18c',
|
||||
[eEthereumNetwork.tenderly]: '0x464c71f6c2f760dda6093dcb91c24c39e5d6e18c',
|
||||
},
|
||||
IncentivesController: {
|
||||
[eEthereumNetwork.coverage]: ZERO_ADDRESS,
|
||||
|
@ -232,7 +232,7 @@ export const AmmConfig: IUsdAmmConfiguration = {
|
|||
[eEthereumNetwork.kovan]: ZERO_ADDRESS,
|
||||
[eEthereumNetwork.ropsten]: ZERO_ADDRESS,
|
||||
[eEthereumNetwork.main]: '0xd784927Ff2f95ba542BfC824c8a8a98F3495f6b5',
|
||||
[eEthereumNetwork.tenderlyMain]: '0xd784927Ff2f95ba542BfC824c8a8a98F3495f6b5',
|
||||
[eEthereumNetwork.tenderly]: '0xd784927Ff2f95ba542BfC824c8a8a98F3495f6b5',
|
||||
},
|
||||
ReservesConfig: {
|
||||
DAI: strategyDAI,
|
||||
|
@ -258,7 +258,7 @@ export const AmmConfig: IUsdAmmConfiguration = {
|
|||
saCRV: '0x02d341CcB60fAaf662bC0554d13778015d1b285C',
|
||||
'3CRV': '0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490',
|
||||
},
|
||||
[eEthereumNetwork.tenderlyMain]: {
|
||||
[eEthereumNetwork.tenderly]: {
|
||||
DAI: '0x6B175474E89094C44Da98b954EedeAC495271d0F',
|
||||
SUSD: '0x57Ab1ec28D129707052df4dF418D58a2D46d5f51',
|
||||
USDC: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
"run-env": "npm i && tail -f /dev/null",
|
||||
"hardhat": "hardhat",
|
||||
"hardhat:kovan": "hardhat --network kovan",
|
||||
"hardhat:tenderly-main": "hardhat --network tenderlyMain",
|
||||
"hardhat:tenderly": "hardhat --network tenderly",
|
||||
"hardhat:ropsten": "hardhat --network ropsten",
|
||||
"hardhat:main": "hardhat --network main",
|
||||
"hardhat:docker": "hardhat --network hardhatevm_docker",
|
||||
|
@ -53,13 +53,13 @@
|
|||
"aave:main:add-market-to-new-registry": "npm run compile && npm run hardhat:matic -- add-market-to-registry --pool Matic --verify --deploy-registry",
|
||||
"aave:kovan:full:initialize": "npm run hardhat:kovan -- full:initialize-lending-pool --verify --pool Aave",
|
||||
"aave:ropsten:full:migration": "npm run compile && npm run hardhat:ropsten -- aave:mainnet --verify",
|
||||
"usd:fork:main:tenderly": "npm run compile && npm run hardhat:tenderly-main -- usd:mainnet --skip-registry",
|
||||
"aave:fork:main:tenderly": "npm run compile && npm run hardhat:tenderly-main -- aave:mainnet",
|
||||
"usd:fork:main:tenderly": "npm run compile && FORK=main npm run hardhat:tenderly -- usd:mainnet --skip-registry",
|
||||
"aave:fork:main:tenderly": "npm run compile && npm run hardhat:tenderly -- aave:mainnet",
|
||||
"aave:fork:main": "npm run compile && FORK=main hardhat aave:mainnet",
|
||||
"aave:fork:kovan": "npm run compile && FORK=kovan hardhat aave:mainnet",
|
||||
"amm:fork:main": "npm run compile && FORK=main hardhat amm:mainnet",
|
||||
"amm:fork:kovan": "npm run compile && FORK=kovan hardhat amm:mainnet",
|
||||
"amm:fork:main:tenderly": "npm run compile && npm run hardhat:tenderly-main -- amm:mainnet",
|
||||
"amm:fork:main:tenderly": "npm run compile && npm run hardhat:tenderly -- amm:mainnet",
|
||||
"aave:main:full:migration": "npm run compile && npm run hardhat:main -- aave:mainnet --verify",
|
||||
"aave:main:full:initialize": "npm run compile && FORK=main full:initialize-tokens --pool Aave",
|
||||
"amm:main:full:migration": "npm run compile && npm run hardhat:main -- amm:mainnet --verify",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { task } from 'hardhat/config';
|
||||
import { loadPoolConfig } from '../../helpers/configuration';
|
||||
import { CRV_TOKEN, CURVE_CONFIG, ZERO_ADDRESS } from '../../helpers/constants';
|
||||
import { CRV_TOKEN, CURVE_CONFIG } from '../../helpers/external/curve/constants';
|
||||
import { ZERO_ADDRESS } from '../../helpers/constants';
|
||||
import {
|
||||
deployCurveTreasury,
|
||||
deployInitializableAdminUpgradeabilityProxy,
|
||||
|
|
|
@ -33,7 +33,7 @@ task(`deploy-${eContractid.UiPoolDataProvider}`, `Deploys the UiPoolDataProvider
|
|||
incentivesController: '0xd41aE58e803Edf4304334acCE4DC4Ec34a63C644',
|
||||
aaveOracle: '0xC365C653f7229894F93994CD0b30947Ab69Ff1D5',
|
||||
},
|
||||
[eEthereumNetwork.tenderlyMain]: {
|
||||
[eEthereumNetwork.tenderly]: {
|
||||
incentivesController: '0xd784927Ff2f95ba542BfC824c8a8a98F3495f6b5',
|
||||
aaveOracle: '0x3a463fFE9b69364B51113352a17839e36268e657',
|
||||
},
|
||||
|
@ -62,8 +62,8 @@ task(`deploy-${eContractid.UiPoolDataProvider}`, `Deploys the UiPoolDataProvider
|
|||
console.log('UiPoolDataProvider deployed at:', uiPoolDataProvider.address);
|
||||
console.log(`\tFinished UiPoolDataProvider deployment`);
|
||||
if (usingTenderly()) {
|
||||
const postDeployHead = localBRE.tenderlyRPC.getHead();
|
||||
const postDeployFork = localBRE.tenderlyRPC.getFork();
|
||||
const postDeployHead = localBRE.tenderly.network().getHead();
|
||||
const postDeployFork = localBRE.tenderly.network().getFork();
|
||||
console.log('Tenderly Info');
|
||||
console.log('- Head', postDeployHead);
|
||||
console.log('- Fork', postDeployFork);
|
||||
|
|
|
@ -84,7 +84,7 @@ task('full:deploy-lending-pool', 'Deploy lending pool for dev enviroment')
|
|||
if (DRE.network.name.includes('tenderly')) {
|
||||
const transactionLink = `https://dashboard.tenderly.co/${DRE.config.tenderly.username}/${
|
||||
DRE.config.tenderly.project
|
||||
}/fork/${DRE.tenderlyNetwork.getFork()}/simulation/${DRE.tenderlyNetwork.getHead()}`;
|
||||
}/fork/${DRE.tenderly.network().getFork()}/simulation/${DRE.tenderly.network().getHead()}`;
|
||||
console.error('Check tx error:', transactionLink);
|
||||
}
|
||||
throw error;
|
||||
|
|
|
@ -95,7 +95,7 @@ task('full:deploy-oracles', 'Deploy oracles for dev enviroment')
|
|||
if (DRE.network.name.includes('tenderly')) {
|
||||
const transactionLink = `https://dashboard.tenderly.co/${DRE.config.tenderly.username}/${
|
||||
DRE.config.tenderly.project
|
||||
}/fork/${DRE.tenderlyNetwork.getFork()}/simulation/${DRE.tenderlyNetwork.getHead()}`;
|
||||
}/fork/${DRE.tenderly.network().getFork()}/simulation/${DRE.tenderly.network().getHead()}`;
|
||||
console.error('Check tx error:', transactionLink);
|
||||
}
|
||||
throw error;
|
||||
|
|
|
@ -30,8 +30,8 @@ task('dev:impersonate-transfer', 'Send ERC20 from an impersonated address')
|
|||
console.log('- Address:', to);
|
||||
console.log('- Balance:', formatUnits(await erc20.balanceOf(to), decimals), symbol);
|
||||
if (usingTenderly()) {
|
||||
const postDeployHead = localBRE.tenderlyRPC.getHead();
|
||||
const postDeployFork = localBRE.tenderlyRPC.getFork();
|
||||
const postDeployHead = localBRE.tenderly.network().getHead();
|
||||
const postDeployFork = localBRE.tenderly.network().getFork();
|
||||
console.log('Tenderly Info');
|
||||
console.log('- Head', postDeployHead);
|
||||
console.log('- Fork', postDeployFork);
|
||||
|
|
|
@ -46,8 +46,8 @@ task('aave:mainnet', 'Deploy development enviroment')
|
|||
}
|
||||
|
||||
if (usingTenderly()) {
|
||||
const postDeployHead = DRE.tenderlyNetwork.getHead();
|
||||
const postDeployFork = DRE.tenderlyNetwork.getFork();
|
||||
const postDeployHead = DRE.tenderly.network().getHead();
|
||||
const postDeployFork = DRE.tenderly.network().getFork();
|
||||
console.log('Tenderly Info');
|
||||
console.log('- Head', postDeployHead);
|
||||
console.log('- Fork', postDeployFork);
|
||||
|
|
|
@ -46,8 +46,8 @@ task('amm:mainnet', 'Deploy development enviroment')
|
|||
}
|
||||
|
||||
if (usingTenderly()) {
|
||||
const postDeployHead = DRE.tenderlyNetwork.getHead();
|
||||
const postDeployFork = DRE.tenderlyNetwork.getFork();
|
||||
const postDeployHead = DRE.tenderly.network().getHead();
|
||||
const postDeployFork = DRE.tenderly.network().getFork();
|
||||
console.log('Tenderly Info');
|
||||
console.log('- Head', postDeployHead);
|
||||
console.log('- Fork', postDeployFork);
|
||||
|
|
|
@ -49,8 +49,8 @@ task('sidechain:mainnet', 'Deploy market at sidechain')
|
|||
}
|
||||
|
||||
if (usingTenderly()) {
|
||||
const postDeployHead = DRE.tenderlyNetwork.getHead();
|
||||
const postDeployFork = DRE.tenderlyNetwork.getFork();
|
||||
const postDeployHead = DRE.tenderly.network().getHead();
|
||||
const postDeployFork = DRE.tenderly.network().getFork();
|
||||
console.log('Tenderly Info');
|
||||
console.log('- Head', postDeployHead);
|
||||
console.log('- Fork', postDeployFork);
|
||||
|
|
|
@ -27,7 +27,7 @@ task('usd:mainnet', 'Deploy development environment')
|
|||
await DRE.run('deploy-curve-treasury', {
|
||||
treasuryAdmin: await getGenesisPoolAdmin(poolConfig), // TBD
|
||||
proxyAdmin: await getEmergencyAdmin(poolConfig), // TBD, address provider?
|
||||
collector: poolConfig.ReserveFactorTreasuryAddress,
|
||||
collector: poolConfig.ReserveFactorTreasuryAddress['main'],
|
||||
});
|
||||
|
||||
console.log('1. Deploy address provider');
|
||||
|
@ -58,8 +58,8 @@ task('usd:mainnet', 'Deploy development environment')
|
|||
}
|
||||
|
||||
if (usingTenderly()) {
|
||||
const postDeployHead = DRE.tenderlyNetwork.getHead();
|
||||
const postDeployFork = DRE.tenderlyNetwork.getFork();
|
||||
const postDeployHead = DRE.tenderly.network().getHead();
|
||||
const postDeployFork = DRE.tenderly.network().getFork();
|
||||
console.log('Tenderly Info');
|
||||
console.log('- Head', postDeployHead);
|
||||
console.log('- Fork', postDeployFork);
|
||||
|
|
|
@ -21,8 +21,8 @@ task('dev:set-price-providers-to-aave-oracle', 'Set price providers ')
|
|||
});
|
||||
|
||||
if (usingTenderly()) {
|
||||
const postDeployHead = localBRE.tenderlyRPC.getHead();
|
||||
const postDeployFork = localBRE.tenderlyRPC.getFork();
|
||||
const postDeployHead = localBRE.tenderly.network().getHead();
|
||||
const postDeployFork = localBRE.tenderly.network().getFork();
|
||||
console.log('Tenderly Info');
|
||||
console.log('- Head', postDeployHead);
|
||||
console.log('- Fork', postDeployFork);
|
||||
|
|
|
@ -172,7 +172,7 @@ export async function initializeMakeSuite() {
|
|||
const setSnapshot = async () => {
|
||||
const hre = DRE as HardhatRuntimeEnvironment;
|
||||
if (usingTenderly()) {
|
||||
setBuidlerevmSnapshotId((await hre.tenderlyNetwork.getHead()) || '0x1');
|
||||
setBuidlerevmSnapshotId((await hre.tenderly.network().getHead()) || '0x1');
|
||||
return;
|
||||
}
|
||||
setBuidlerevmSnapshotId(await evmSnapshot());
|
||||
|
@ -181,7 +181,7 @@ const setSnapshot = async () => {
|
|||
const revertHead = async () => {
|
||||
const hre = DRE as HardhatRuntimeEnvironment;
|
||||
if (usingTenderly()) {
|
||||
await hre.tenderlyNetwork.setHead(buidlerevmSnapshotId);
|
||||
await hre.tenderly.network().setHead(buidlerevmSnapshotId);
|
||||
return;
|
||||
}
|
||||
await evmRevert(buidlerevmSnapshotId);
|
||||
|
|
|
@ -37,66 +37,30 @@ import {
|
|||
} from '../../../helpers/contracts-helpers';
|
||||
import { ConfigNames, loadPoolConfig } from '../../../helpers/configuration';
|
||||
import { ICurveGaugeFactory } from '../../../types/ICurveGaugeFactory';
|
||||
import {
|
||||
GaugeInfo,
|
||||
GAUGE_3POOL,
|
||||
GAUGE_AAVE3,
|
||||
GAUGE_ANKR,
|
||||
GAUGE_EURS,
|
||||
isCurveGaugeV2,
|
||||
} from '../../../helpers/external/curve/constants';
|
||||
const ONE_DAY = 86400;
|
||||
const { expect } = require('chai');
|
||||
|
||||
interface GaugeInfo {
|
||||
underlying: tEthereumAddress;
|
||||
address: tEthereumAddress;
|
||||
name: string;
|
||||
symbol: string;
|
||||
rewardTokens: tEthereumAddress[];
|
||||
}
|
||||
const USER_ADDRESS = '0x9c5083dd4838E120Dbeac44C052179692Aa5dAC5';
|
||||
|
||||
const CRV_TOKEN = '0xd533a949740bb3306d119cc777fa900ba034cd52';
|
||||
const SNX_TOKEN = '0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f';
|
||||
|
||||
const GAUGE_3POOL: GaugeInfo = {
|
||||
underlying: '0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490',
|
||||
address: '0xbFcF63294aD7105dEa65aA58F8AE5BE2D9d0952A',
|
||||
name: 'aToken 3pool Gauge Deposit',
|
||||
symbol: 'a-3poolCRV-gauge',
|
||||
rewardTokens: [],
|
||||
};
|
||||
|
||||
const GAUGE_AAVE3: GaugeInfo = {
|
||||
underlying: '0xFd2a8fA60Abd58Efe3EeE34dd494cD491dC14900',
|
||||
address: '0xd662908ADA2Ea1916B3318327A97eB18aD588b5d',
|
||||
name: 'aToken a3CRV Gauge Deposit',
|
||||
symbol: 'a-a3CRV-gauge',
|
||||
rewardTokens: [],
|
||||
};
|
||||
|
||||
const GAUGE_EURS: GaugeInfo = {
|
||||
underlying: '0x194eBd173F6cDacE046C53eACcE9B953F28411d1',
|
||||
address: '0x90Bb609649E0451E5aD952683D64BD2d1f245840',
|
||||
name: 'aToken eursCRV Gauge Deposit',
|
||||
symbol: 'a-eursCRV-gauge',
|
||||
rewardTokens: ['0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F'],
|
||||
};
|
||||
|
||||
const GAUGE_ANKR: GaugeInfo = {
|
||||
underlying: '0xaA17A236F2bAdc98DDc0Cf999AbB47D47Fc0A6Cf',
|
||||
address: '0x6d10ed2cf043e6fcf51a0e7b4c2af3fa06695707',
|
||||
name: 'aToken ankrCRV Gauge Deposit',
|
||||
symbol: 'a-ankrCRV-gauge',
|
||||
rewardTokens: [
|
||||
'0xE0aD1806Fd3E7edF6FF52Fdb822432e847411033',
|
||||
'0x8290333ceF9e6D528dD5618Fb97a76f268f3EDD4',
|
||||
],
|
||||
};
|
||||
const isGaugeV2 = (address: tEthereumAddress) =>
|
||||
GAUGE_3POOL.address.toLowerCase() !== address.toLowerCase();
|
||||
|
||||
const unstakeAllGauges = async (key: SignerWithAddress, gauges: tEthereumAddress[]) => {
|
||||
for (let x = 0; x < gauges.length; x++) {
|
||||
if (isGaugeV2(gauges[x])) {
|
||||
if (isCurveGaugeV2(gauges[x])) {
|
||||
await waitForTx(
|
||||
await IERC20Factory.connect(gauges[x], key.signer).approve(gauges[x], MAX_UINT_AMOUNT)
|
||||
);
|
||||
}
|
||||
const balance = IERC20Factory.connect(gauges[x], key.signer).balanceOf(key.address);
|
||||
const balance = await IERC20Factory.connect(gauges[x], key.signer).balanceOf(key.address);
|
||||
await waitForTx(await ICurveGaugeFactory.connect(gauges[x], key.signer).withdraw(balance));
|
||||
}
|
||||
};
|
||||
|
@ -148,7 +112,7 @@ const listCurveLPToken = async (gauge: GaugeInfo, curveTreasury: tEthereumAddres
|
|||
const interestRateStrategyAddress = interestStrategy.address;
|
||||
const encodedParams = defaultAbiCoder.encode(
|
||||
['address', 'bool'],
|
||||
[gauge.address, isGaugeV2(gauge.address)]
|
||||
[gauge.address, isCurveGaugeV2(gauge.address)]
|
||||
);
|
||||
const curveReserveInitParams = [
|
||||
{
|
||||
|
|
|
@ -163,7 +163,7 @@ export async function initializeMakeSuite() {
|
|||
const setSnapshot = async () => {
|
||||
const hre = DRE as HardhatRuntimeEnvironment;
|
||||
if (usingTenderly()) {
|
||||
setBuidlerevmSnapshotId((await hre.tenderlyNetwork.getHead()) || '0x1');
|
||||
setBuidlerevmSnapshotId((await hre.tenderly.network().getHead()) || '0x1');
|
||||
return;
|
||||
}
|
||||
setBuidlerevmSnapshotId(await evmSnapshot());
|
||||
|
@ -172,7 +172,7 @@ const setSnapshot = async () => {
|
|||
const revertHead = async () => {
|
||||
const hre = DRE as HardhatRuntimeEnvironment;
|
||||
if (usingTenderly()) {
|
||||
await hre.tenderlyNetwork.setHead(buidlerevmSnapshotId);
|
||||
await hre.tenderly.network().setHead(buidlerevmSnapshotId);
|
||||
return;
|
||||
}
|
||||
await evmRevert(buidlerevmSnapshotId);
|
||||
|
|
Loading…
Reference in New Issue
Block a user