aave-protocol-v2/tasks/deployments/deploy-UiIncentiveDataProvider.ts
2021-10-08 12:27:23 +02:00

24 lines
914 B
TypeScript

import { task } from 'hardhat/config';
import { eContractid, eEthereumNetwork, eNetwork, ePolygonNetwork } from '../../helpers/types';
import { deployUiIncentiveDataProvider } from '../../helpers/contracts-deployments';
import { exit } from 'process';
task(
`deploy-${eContractid.UiIncentiveDataProvider}`,
`Deploys the UiIncentiveDataProvider contract`
)
.addFlag('verify', 'Verify UiIncentiveDataProvider contract via Etherscan API.')
.setAction(async ({ verify }, localBRE) => {
await localBRE.run('set-DRE');
if (!localBRE.network.config.chainId) {
throw new Error('INVALID_CHAIN_ID');
}
console.log(`\n- UiIncentiveDataProvider deployment`);
const uiIncentiveDataProvider = await deployUiIncentiveDataProvider(verify);
console.log('UiPoolDataProvider deployed at:', uiIncentiveDataProvider.address);
console.log(`\tFinished UiPoolDataProvider deployment`);
});