mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
add task for realT deployment
This commit is contained in:
parent
4597bca488
commit
2a194a6568
|
@ -23,7 +23,8 @@ export enum ConfigNames {
|
|||
Aave = 'Aave',
|
||||
Matic = 'Matic',
|
||||
Amm = 'Amm',
|
||||
Avalanche = 'Avalanche'
|
||||
Avalanche = 'Avalanche',
|
||||
RealT = 'RealT'
|
||||
}
|
||||
|
||||
export const loadPoolConfig = (configName: ConfigNames): PoolConfiguration => {
|
||||
|
|
|
@ -73,5 +73,15 @@ export const MOCK_CHAINLINK_AGGREGATORS_PRICES = {
|
|||
STAKE: oneEther.multipliedBy('0.003620948469').toFixed(),
|
||||
xSUSHI: oneEther.multipliedBy('0.00913428586').toFixed(),
|
||||
WAVAX: oneEther.multipliedBy('0.006051936629').toFixed(),
|
||||
"REALTOKEN-S-13895-SARATOGA-ST-DETROIT-MI": '12940476190476185',
|
||||
"REALTOKEN-S-4380-BEACONSFIELD-ST-DETROIT-MI": '12269047619047614',
|
||||
"REALTOKEN-S-17813-BRADFORD-ST-DETROIT-M": '11816666666666661',
|
||||
"REALTOKEN-S-15796-HARTWELL-ST-DETROIT-MI": '12047619047619042',
|
||||
"REALTOKEN-S-9717-EVERTS-ST-DETROIT-MI": '11376190476190471',
|
||||
"REALTOKEN-S-19201-WESTPHALIA-ST-DETROIT-MI": '11816666666666661',
|
||||
"REALTOKEN-S-19163-MITCHELL-ST-DETROIT-MI": '12257142857142852',
|
||||
"REALTOKEN-S-4061-GRAND-ST-DETROIT-M": '13873809523809518',
|
||||
"REALTOKEN-S-4680-BUCKINGHAM-AVE-DETROIT-MI": '11385714285714281',
|
||||
"REALTOKEN-S-19311-KEYSTONE-ST-DETROIT-MI": '11804761904761900',
|
||||
USD: '5848466240000000',
|
||||
};
|
||||
|
|
|
@ -293,7 +293,7 @@ export type iAavePoolAssets<T> = Pick<
|
|||
| 'xSUSHI'
|
||||
>;
|
||||
|
||||
export type iAaveRealTPoolAssets<T> = Pick<
|
||||
export type iRealTPoolAssets<T> = Pick<
|
||||
iAssetsWithoutUSD<T>,
|
||||
| 'DAI'
|
||||
| 'USDC'
|
||||
|
@ -578,8 +578,8 @@ export interface IAvalancheConfiguration extends ICommonConfiguration {
|
|||
ReservesConfig: iAvalanchePoolAssets<IReserveParams>;
|
||||
}
|
||||
|
||||
export interface IAaveRealTConfiguration extends ICommonConfiguration {
|
||||
ReservesConfig: iAaveRealTPoolAssets<IReserveParams>;
|
||||
export interface IRealTConfiguration extends ICommonConfiguration {
|
||||
ReservesConfig: iRealTPoolAssets<IReserveParams>;
|
||||
}
|
||||
|
||||
export interface ITokenAddress {
|
||||
|
|
57
tasks/migrations/realT.mainnet.ts
Normal file
57
tasks/migrations/realT.mainnet.ts
Normal file
|
@ -0,0 +1,57 @@
|
|||
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('realT:mainnet', 'Deploy development enviroment')
|
||||
.addFlag('verify', 'Verify contracts at Etherscan')
|
||||
.addFlag('skipRegistry', 'Skip addresses provider registration at Addresses Provider Registry')
|
||||
.setAction(async ({ verify, skipRegistry }, DRE) => {
|
||||
const POOL_NAME = ConfigNames.RealT;
|
||||
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, skipRegistry });
|
||||
|
||||
console.log('2. Deploy lending pool');
|
||||
await DRE.run('full:deploy-lending-pool', { pool: POOL_NAME });
|
||||
|
||||
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. Deploy WETH Gateway');
|
||||
await DRE.run('full-deploy-weth-gateway', { pool: POOL_NAME });
|
||||
|
||||
console.log('6. Initialize lending pool');
|
||||
await DRE.run('full:initialize-lending-pool', { pool: POOL_NAME });
|
||||
|
||||
if (verify) {
|
||||
printContracts();
|
||||
console.log('7. Veryfing contracts');
|
||||
await DRE.run('verify:general', { all: true, pool: POOL_NAME });
|
||||
|
||||
console.log('8. Veryfing aTokens and debtTokens');
|
||||
await DRE.run('verify:tokens', { pool: POOL_NAME });
|
||||
}
|
||||
|
||||
if (usingTenderly()) {
|
||||
const postDeployHead = DRE.tenderlyNetwork.getHead();
|
||||
const postDeployFork = DRE.tenderlyNetwork.getFork();
|
||||
console.log('Tenderly Info');
|
||||
console.log('- Head', postDeployHead);
|
||||
console.log('- Fork', postDeployFork);
|
||||
}
|
||||
console.log('\nFinished migrations');
|
||||
printContracts();
|
||||
});
|
Loading…
Reference in New Issue
Block a user