diff --git a/hardhat.config.ts b/hardhat.config.ts index be8c4aa9..f4dcaf69 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -16,7 +16,7 @@ import '@tenderly/hardhat-tenderly'; const SKIP_LOAD = process.env.SKIP_LOAD === 'true'; const DEFAULT_BLOCK_GAS_LIMIT = 12450000; const DEFAULT_GAS_MUL = 5; -const DEFAULT_GAS_PRICE = 2000000000; +const DEFAULT_GAS_PRICE = 65000000000; const HARDFORK = 'istanbul'; const INFURA_KEY = process.env.INFURA_KEY || ''; const ALCHEMY_KEY = process.env.ALCHEMY_KEY || ''; diff --git a/package.json b/package.json index 15bcb96f..4c8fdd95 100644 --- a/package.json +++ b/package.json @@ -43,10 +43,10 @@ "print-contracts:main": "npm run hardhat:main -- print-contracts", "print-contracts:ropsten": "npm run hardhat:main -- print-contracts", "dev:deployUIProvider": "npm run hardhat:kovan deploy-UiPoolDataProvider", - "dev:deployUniswapRepayAdapter": "npm run hardhat:kovan deploy-UniswapRepayAdapter", - "dev:UniswapLiquiditySwapAdapter": "npm run hardhat:kovan deploy-UniswapLiquiditySwapAdapter", - "main:deployUniswapRepayAdapter": "npm run hardhat:main deploy-UniswapRepayAdapter", - "main:UniswapLiquiditySwapAdapter": "npm run hardhat:main deploy-UniswapLiquiditySwapAdapter", + "dev:deployUniswapRepayAdapter": "hardhat --network kovan deploy-UniswapRepayAdapter --provider 0x88757f2f99175387aB4C6a4b3067c77A695b0349 --router 0xfcd87315f0e4067070ade8682fcdbc3006631441", + "dev:UniswapLiquiditySwapAdapter": "hardhat --network kovan deploy-UniswapLiquiditySwapAdapter --provider 0x88757f2f99175387aB4C6a4b3067c77A695b0349 --router 0xfcd87315f0e4067070ade8682fcdbc3006631441", + "main:deployUniswapRepayAdapter": "hardhat --network main deploy-UniswapRepayAdapter --provider 0xB53C1a33016B2DC2fF3653530bfF1848a515c8c5 --router 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D", + "main:UniswapLiquiditySwapAdapter": "hardhat --network main deploy-UniswapLiquiditySwapAdapter --provider 0xB53C1a33016B2DC2fF3653530bfF1848a515c8c5 --router 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D", "kovan:verify": "npm run hardhat:kovan verify:general -- --all --pool Aave", "ropsten:verify": "npm run hardhat:ropsten verify:general -- --all --pool Aave", "mainnet:verify": "npm run hardhat:main verify:general -- --all --pool Aave", diff --git a/tasks/deployments/deploy-UniswapLiquiditySwapAdapter.ts b/tasks/deployments/deploy-UniswapLiquiditySwapAdapter.ts index 797ec36e..af9aaa04 100644 --- a/tasks/deployments/deploy-UniswapLiquiditySwapAdapter.ts +++ b/tasks/deployments/deploy-UniswapLiquiditySwapAdapter.ts @@ -7,8 +7,10 @@ import { getFirstSigner } from '../../helpers/contracts-getters'; const CONTRACT_NAME = 'UniswapLiquiditySwapAdapter'; task(`deploy-${CONTRACT_NAME}`, `Deploys the ${CONTRACT_NAME} contract`) + .addParam('provider', 'Address of the LendingPoolAddressesProvider') + .addParam('router', 'Address of the uniswap router') .addFlag('verify', `Verify ${CONTRACT_NAME} contract via Etherscan API.`) - .setAction(async ({ verify }, localBRE) => { + .setAction(async ({ provider, router, verify }, localBRE) => { await localBRE.run('set-DRE'); if (!localBRE.network.config.chainId) { @@ -16,16 +18,17 @@ task(`deploy-${CONTRACT_NAME}`, `Deploys the ${CONTRACT_NAME} contract`) } console.log(`\n- ${CONTRACT_NAME} deployment`); - const args = [ + /*const args = [ '0x88757f2f99175387aB4C6a4b3067c77A695b0349', // lending provider kovan address '0xfcd87315f0e4067070ade8682fcdbc3006631441', // uniswap router address ]; + */ const uniswapRepayAdapter = await new UniswapLiquiditySwapAdapterFactory( await getFirstSigner() - ).deploy(args[0], args[1]); + ).deploy(provider, router); await uniswapRepayAdapter.deployTransaction.wait(); console.log(`${CONTRACT_NAME}.address`, uniswapRepayAdapter.address); - await verifyContract(uniswapRepayAdapter.address, args); + await verifyContract(uniswapRepayAdapter.address, [provider, router]); console.log(`\tFinished ${CONTRACT_NAME} proxy and implementation deployment`); }); diff --git a/tasks/deployments/deploy-UniswapRepayAdapter.ts b/tasks/deployments/deploy-UniswapRepayAdapter.ts index 50bff115..5d52a36c 100644 --- a/tasks/deployments/deploy-UniswapRepayAdapter.ts +++ b/tasks/deployments/deploy-UniswapRepayAdapter.ts @@ -7,8 +7,10 @@ import { getFirstSigner } from '../../helpers/contracts-getters'; const CONTRACT_NAME = 'UniswapRepayAdapter'; task(`deploy-${CONTRACT_NAME}`, `Deploys the ${CONTRACT_NAME} contract`) + .addParam('provider', 'Address of the LendingPoolAddressesProvider') + .addParam('router', 'Address of the uniswap router') .addFlag('verify', `Verify ${CONTRACT_NAME} contract via Etherscan API.`) - .setAction(async ({ verify }, localBRE) => { + .setAction(async ({ provider, router, verify }, localBRE) => { await localBRE.run('set-DRE'); if (!localBRE.network.config.chainId) { @@ -21,12 +23,12 @@ task(`deploy-${CONTRACT_NAME}`, `Deploys the ${CONTRACT_NAME} contract`) '0xfcd87315f0e4067070ade8682fcdbc3006631441', // uniswap router address ]; const uniswapRepayAdapter = await new UniswapRepayAdapterFactory(await getFirstSigner()).deploy( - args[0], - args[1] + provider, + router ); await uniswapRepayAdapter.deployTransaction.wait(); console.log(`${CONTRACT_NAME}.address`, uniswapRepayAdapter.address); - await verifyContract(uniswapRepayAdapter.address, args); + await verifyContract(uniswapRepayAdapter.address, [provider, router]); console.log( `\tFinished ${CONTRACT_NAME}${CONTRACT_NAME}lDataProvider proxy and implementation deployment`