mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
Testing mumbai network deployment, Oracles fail
This commit is contained in:
parent
51ea7364e1
commit
379761b56f
|
@ -9,6 +9,7 @@ import {
|
|||
import { getParamPerPool } from './contracts-helpers';
|
||||
import AaveConfig from '../markets/aave';
|
||||
import LpConfig from '../markets/lp';
|
||||
import MaticConfig from '../markets/matic'
|
||||
import { CommonsConfig } from '../markets/aave/commons';
|
||||
import { DRE, filterMapBy } from './misc-utils';
|
||||
import { tEthereumAddress } from './types';
|
||||
|
@ -19,6 +20,7 @@ export enum ConfigNames {
|
|||
Commons = 'Commons',
|
||||
Aave = 'Aave',
|
||||
Lp = 'Lp',
|
||||
Matic = 'Matic',
|
||||
}
|
||||
|
||||
export const loadPoolConfig = (configName: ConfigNames): PoolConfiguration => {
|
||||
|
@ -27,6 +29,8 @@ export const loadPoolConfig = (configName: ConfigNames): PoolConfiguration => {
|
|||
return AaveConfig;
|
||||
case ConfigNames.Lp:
|
||||
return LpConfig;
|
||||
case ConfigNames.Matic:
|
||||
return MaticConfig;
|
||||
case ConfigNames.Commons:
|
||||
return CommonsConfig;
|
||||
default:
|
||||
|
@ -47,6 +51,9 @@ export const getReservesConfigByPool = (pool: AavePools): iMultiPoolsAssets<IRes
|
|||
[AavePools.lp]: {
|
||||
...LpConfig.ReservesConfig,
|
||||
},
|
||||
[AavePools.matic] : {
|
||||
...MaticConfig.ReservesConfig,
|
||||
},
|
||||
},
|
||||
pool
|
||||
);
|
||||
|
|
|
@ -133,7 +133,7 @@ export const linkBytecode = (artifact: BuidlerArtifact | Artifact, libraries: an
|
|||
};
|
||||
|
||||
export const getParamPerNetwork = <T>(
|
||||
{ kovan, ropsten, main, buidlerevm, coverage, tenderlyMain }: iParamsPerNetwork<T>,
|
||||
{ kovan, ropsten, main, buidlerevm, coverage, tenderlyMain, matic, mumbai }: iParamsPerNetwork<T>,
|
||||
network: eEthereumNetwork
|
||||
) => {
|
||||
const MAINNET_FORK = process.env.MAINNET_FORK === 'true';
|
||||
|
@ -154,6 +154,10 @@ export const getParamPerNetwork = <T>(
|
|||
return ropsten;
|
||||
case eEthereumNetwork.main:
|
||||
return main;
|
||||
case eEthereumNetwork.matic:
|
||||
return matic;
|
||||
case eEthereumNetwork.mumbai:
|
||||
return mumbai;
|
||||
case eEthereumNetwork.tenderlyMain:
|
||||
return tenderlyMain;
|
||||
}
|
||||
|
|
|
@ -20,11 +20,14 @@ export enum EthereumNetworkNames {
|
|||
kovan = 'kovan',
|
||||
ropsten = 'ropsten',
|
||||
main = 'main',
|
||||
matic = 'matic',
|
||||
mumbai = 'mumbai',
|
||||
}
|
||||
|
||||
export enum AavePools {
|
||||
proto = 'proto',
|
||||
lp = 'lp',
|
||||
matic = 'matic',
|
||||
}
|
||||
|
||||
export enum eContractid {
|
||||
|
@ -394,6 +397,7 @@ export interface iParamsPerNetwork<T> {
|
|||
export interface iParamsPerPool<T> {
|
||||
[AavePools.proto]: T;
|
||||
[AavePools.lp]: T;
|
||||
[AavePools.matic]: T;
|
||||
}
|
||||
|
||||
export interface iBasicDistributionParams {
|
||||
|
|
|
@ -134,7 +134,7 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
[eEthereumNetwork.hardhat]: '',
|
||||
[eEthereumNetwork.buidlerevm]: '',
|
||||
[eEthereumNetwork.tenderlyMain]: '0x52D306e36E3B6B02c153d0266ff0f85d18BCD413',
|
||||
[eEthereumNetwork.mumbai]: '',
|
||||
[eEthereumNetwork.mumbai]: '0x569859d41499B4dDC28bfaA43915051FF0A38a6F', // TEMP
|
||||
[eEthereumNetwork.matic]: '',
|
||||
},
|
||||
ProviderRegistryOwner: {
|
||||
|
@ -145,7 +145,7 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
[eEthereumNetwork.hardhat]: '',
|
||||
[eEthereumNetwork.buidlerevm]: '',
|
||||
[eEthereumNetwork.tenderlyMain]: '0xbd723fc4f1d737dcfc48a07fe7336766d34cad5f',
|
||||
[eEthereumNetwork.mumbai]: '',
|
||||
[eEthereumNetwork.mumbai]: '0x18d9bA2baEfBdE0FF137C4ad031427EF205f1Fd9', // TEMP
|
||||
[eEthereumNetwork.matic]: '',
|
||||
},
|
||||
LendingRateOracle: {
|
||||
|
@ -271,7 +271,7 @@ export const CommonsConfig: ICommonConfiguration = {
|
|||
[eEthereumNetwork.ropsten]: '0x464c71f6c2f760dda6093dcb91c24c39e5d6e18c',
|
||||
[eEthereumNetwork.main]: '0x464c71f6c2f760dda6093dcb91c24c39e5d6e18c',
|
||||
[eEthereumNetwork.tenderlyMain]: '0x464c71f6c2f760dda6093dcb91c24c39e5d6e18c',
|
||||
[EthereumNetwork.mumbai]: ZERO_ADDRESS, // TEMP
|
||||
[EthereumNetwork.matic]: ZERO_ADDRESS, // TEMP
|
||||
[EthereumNetwork.mumbai]: '0x464c71f6c2f760dda6093dcb91c24c39e5d6e18c', // TEMP
|
||||
[EthereumNetwork.matic]: '0x464c71f6c2f760dda6093dcb91c24c39e5d6e18c', // TEMP
|
||||
},
|
||||
};
|
||||
|
|
|
@ -15,7 +15,7 @@ import {
|
|||
// POOL--SPECIFIC PARAMS
|
||||
// ----------------
|
||||
|
||||
export const AaveConfig: IMaticConfiguration = {
|
||||
export const MaticConfig: IMaticConfiguration = {
|
||||
...CommonsConfig,
|
||||
MarketId: 'Matic Market',
|
||||
ProviderId: 3, // Unknown?
|
||||
|
@ -68,4 +68,4 @@ export const AaveConfig: IMaticConfiguration = {
|
|||
},
|
||||
};
|
||||
|
||||
export default AaveConfig;
|
||||
export default MaticConfig;
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
"hardhat:ropsten": "hardhat--network ropsten",
|
||||
"hardhat:main": "hardhat --network main",
|
||||
"hardhat:docker": "hardhat --network hardhatevm_docker",
|
||||
"hardhat:mumbai": "hardhat --network mumbai",
|
||||
"compile": "SKIP_LOAD=true hardhat compile",
|
||||
"console:fork": "MAINNET_FORK=true hardhat console",
|
||||
"test": "TS_NODE_TRANSPILE_ONLY=1 hardhat test ./test-suites/test-aave/*.spec.ts",
|
||||
|
@ -40,6 +41,7 @@
|
|||
"aave:docker:full:migration": "npm run compile && npm run hardhat:docker -- aave:mainnet",
|
||||
"aave:kovan:full:migration": "npm run compile && npm run hardhat:kovan -- aave:mainnet --verify",
|
||||
"lp:kovan:full:migration": "npm run compile && npm run hardhat:kovan -- lp:mainnet --verify",
|
||||
"matic:mumbai:full:migration": "npm run compile && npm run hardhat:mumbai matic:mainnet",
|
||||
"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",
|
||||
"aave:fork:main:tenderly": "npm run compile && npm run hardhat:tenderly-main -- aave:mainnet",
|
||||
|
|
50
tasks/migrations/matic.mainnet.ts
Normal file
50
tasks/migrations/matic.mainnet.ts
Normal file
|
@ -0,0 +1,50 @@
|
|||
import { task } from 'hardhat/config';
|
||||
import { checkVerification } from '../../helpers/etherscan-verification';
|
||||
import { ConfigNames } from '../../helpers/configuration';
|
||||
import { printContracts } from '../../helpers/misc-utils';
|
||||
import { usingTenderly } from '../../helpers/tenderly-utils';
|
||||
|
||||
task('matic:mainnet', 'Deploy development enviroment')
|
||||
.addFlag('verify', 'Verify contracts at Etherscan')
|
||||
.setAction(async ({ verify }, DRE) => {
|
||||
const POOL_NAME = ConfigNames.Matic;
|
||||
await DRE.run('set-DRE');
|
||||
|
||||
// Prevent loss of gas verifying all the needed ENVs for Etherscan verification
|
||||
if (verify) {
|
||||
checkVerification();
|
||||
}
|
||||
|
||||
console.log('Migration started\n');
|
||||
|
||||
console.log('1. Deploy address provider');
|
||||
await DRE.run('full:deploy-address-provider', { pool: POOL_NAME });
|
||||
|
||||
console.log('2. Deploy lending pool');
|
||||
await DRE.run('full:deploy-lending-pool');
|
||||
|
||||
console.log('3. Deploy oracles');
|
||||
await DRE.run('full:deploy-oracles', { pool: POOL_NAME });
|
||||
|
||||
console.log('4. Deploy Data Provider');
|
||||
await DRE.run('full:data-provider', { pool: POOL_NAME });
|
||||
|
||||
console.log('5. Initialize lending pool');
|
||||
await DRE.run('full:initialize-lending-pool', { pool: POOL_NAME });
|
||||
|
||||
if (verify) {
|
||||
printContracts();
|
||||
console.log('4. Veryfing contracts');
|
||||
await DRE.run('verify:general', { all: true, pool: POOL_NAME });
|
||||
|
||||
console.log('5. Veryfing aTokens and debtTokens');
|
||||
await DRE.run('verify:tokens', { pool: POOL_NAME });
|
||||
}
|
||||
|
||||
if (usingTenderly()) {
|
||||
const postDeployHead = DRE.tenderlyRPC.getHead();
|
||||
console.log('Tenderly UUID', postDeployHead);
|
||||
}
|
||||
console.log('\nFinished migrations');
|
||||
printContracts();
|
||||
});
|
Loading…
Reference in New Issue
Block a user