mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
Updated migration scripts to receive external parameters
This commit is contained in:
parent
2e23281cdc
commit
8113cdaef1
|
@ -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 || '';
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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`);
|
||||
});
|
||||
|
|
|
@ -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`
|
||||
|
|
Loading…
Reference in New Issue
Block a user