mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
22 lines
730 B
TypeScript
22 lines
730 B
TypeScript
import { task } from 'hardhat/config';
|
|
|
|
import { deployWETHGateway } from '../../helpers/contracts-deployments';
|
|
|
|
const CONTRACT_NAME = 'WETHGateway';
|
|
|
|
task(`deploy-${CONTRACT_NAME}`, `Deploys the ${CONTRACT_NAME} contract`)
|
|
.addParam('weth', 'Address of the weth token')
|
|
.addFlag('verify', `Verify ${CONTRACT_NAME} contract via Etherscan API.`)
|
|
.setAction(async ({ weth, verify }, localBRE) => {
|
|
await localBRE.run('set-DRE');
|
|
|
|
if (!localBRE.network.config.chainId) {
|
|
throw new Error('INVALID_CHAIN_ID');
|
|
}
|
|
|
|
const wethGateWay = await deployWETHGateway([weth], verify);
|
|
console.log(`${CONTRACT_NAME}.address`, wethGateWay.address);
|
|
|
|
console.log(`\tFinished ${CONTRACT_NAME} deployment`);
|
|
});
|