From ff2e0a8baa68b1cf6d3f8967bf57545aa3572ece Mon Sep 17 00:00:00 2001 From: The3D Date: Thu, 6 May 2021 09:32:16 +0200 Subject: [PATCH] fix: fixed deployment script --- package-lock.json | 2 +- tasks/proposals/proposal-stk-extensions.ts | 24 +++++++++++----------- tasks/proposals/propose-extension.ts | 12 ++++++----- 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/package-lock.json b/package-lock.json index 21e6efb..9fb3d85 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13325,7 +13325,7 @@ } }, "ethereumjs-abi": { - "version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#1a27c59c15ab1e95ee8e5c4ed6ad814c49cc439e", + "version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#1ce6a1d64235fabe2aaf827fd606def55693508f", "from": "git+https://github.com/ethereumjs/ethereumjs-abi.git", "dev": true, "requires": { diff --git a/tasks/proposals/proposal-stk-extensions.ts b/tasks/proposals/proposal-stk-extensions.ts index 06d71b1..5b285c9 100644 --- a/tasks/proposals/proposal-stk-extensions.ts +++ b/tasks/proposals/proposal-stk-extensions.ts @@ -4,10 +4,10 @@ import { Signer } from 'ethers'; import { getDefenderRelaySigner } from '../../helpers/defender-utils'; task('proposal-stk-extensions', 'Deploy implementations and create proposal') - .addOptionalParam('stkAaveImpl') - .addOptionalParam('stkBptImpl') + .addOptionalParam('stkaaveimpl') + .addOptionalParam('stkbptimpl') .addFlag('defender') - .setAction(async ({ defender, stkAaveImpl, stkBptImpl }, localBRE: any) => { + .setAction(async ({ defender, stkaaveimpl, stkbptimpl }, localBRE: any) => { await localBRE.run('set-dre'); let deployer: Signer; @@ -21,7 +21,7 @@ task('proposal-stk-extensions', 'Deploy implementations and create proposal') const { AAVE_TOKEN = '0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9', - IPFS_HASH = 'QmT9qk3CRYbFDWpDFYeAv8T8H1gnongwKhh5J68NLkLir6', // WIP + IPFS_HASH = '0x4d4a4bda3036f8da3f6911941df8c185f0e4ec248de44b44253dae5a4798a001', AAVE_GOVERNANCE_V2 = '0xEC568fffba86c094cf06b22134B23074DFE2252c', // mainnet AAVE_LONG_EXECUTOR = '0x61910ecd7e8e942136ce7fe7943f956cea1cc2f7', // mainnet } = process.env; @@ -33,18 +33,18 @@ task('proposal-stk-extensions', 'Deploy implementations and create proposal') const AAVE_STAKE = '0x4da27a545c0c5B758a6BA100e3a049001de870f5'; const STK_BPT_STAKE = '0xa1116930326D21fB917d5A27F1E9943A9595fb47'; - if (!stkAaveImpl) { - stkAaveImpl = await DRE.run('deploy-staked-aave-rev3', { defender: !!defender }); + if (!stkaaveimpl) { + stkaaveimpl = await DRE.run('deploy-staked-aave-rev3', { defender: !!defender }); } - if (!stkBptImpl) { - stkBptImpl = await DRE.run('deploy-staked-bpt-rev2', { defender: !!defender }); + if (!stkbptimpl) { + stkbptimpl = await DRE.run('deploy-staked-bpt-rev2', { defender: !!defender }); } await DRE.run('propose-extension', { stkAaveProxy: AAVE_STAKE, - stkAaveImpl, + stkAaveImpl: stkaaveimpl, stkBptProxy: STK_BPT_STAKE, - stkBptImpl, + stkBptImpl: stkbptimpl, aaveGovernance: AAVE_GOVERNANCE_V2, longExecutor: AAVE_LONG_EXECUTOR, ipfsHash: IPFS_HASH, @@ -52,7 +52,7 @@ task('proposal-stk-extensions', 'Deploy implementations and create proposal') }); return { - stkAaveImpl, - stkBptImpl, + stkaaveimpl, + stkbptimpl, }; }); diff --git a/tasks/proposals/propose-extension.ts b/tasks/proposals/propose-extension.ts index c8b592d..7ab896b 100644 --- a/tasks/proposals/propose-extension.ts +++ b/tasks/proposals/propose-extension.ts @@ -17,6 +17,7 @@ task('propose-extension', 'Create some proposals and votes') .addParam('stkBptImpl') .addParam('aaveGovernance') .addParam('longExecutor') + .addParam('ipfsHash') .addFlag('defender') .setAction( async ( @@ -28,6 +29,7 @@ task('propose-extension', 'Create some proposals and votes') stkAaveImpl, stkBptProxy, stkBptImpl, + ipfsHash }, localBRE: any ) => { @@ -56,6 +58,9 @@ task('propose-extension', 'Create some proposals and votes') if (!stkBptProxy) { throw '[hh-task][propose-extension] stkBptProxy param is missing'; } + if (!ipfsHash) { + throw '[hh-task][propose-extension] ipfsHash param is missing'; + } // Calldata for StkAave implementation const payloadStkAave = StakedTokenV2Rev3__factory.connect( @@ -80,9 +85,6 @@ task('propose-extension', 'Create some proposals and votes') const executeSignature = 'upgradeToAndCall(address,bytes)'; const gov = await IAaveGovernanceV2__factory.connect(aaveGovernance, proposer); - // WIP IPFS - const ipfsEncoded = '0xf7a1f565fcd7684fba6fea5d77c5e699653e21cb6ae25fbf8c5dbc8d694c7949'; - try { const tx = await gov.create( longExecutor, @@ -91,8 +93,8 @@ task('propose-extension', 'Create some proposals and votes') [executeSignature, executeSignature], [callDataStkAave, callDataStkBpt], [false, false], - ipfsEncoded, - { gasLimit: 3000000 } + ipfsHash, + { gasLimit: 1000000 } ); console.log('- Proposal submitted to Governance'); await tx.wait();