From afe5b812bd2042aa184515fa0e5ea68691f6adb3 Mon Sep 17 00:00:00 2001 From: Nicholas Addison Date: Wed, 26 Jul 2023 10:47:47 +1000 Subject: [PATCH 1/2] Enabled js lint for deploy scripts --- contracts/deploy/000_mock.js | 5 - contracts/deploy/001_core.js | 163 ++++++++---------- contracts/deploy/008_ousd_reset.js | 4 +- contracts/deploy/009_ousd_fix.js | 10 +- contracts/deploy/011_ousd_fix.js | 4 +- contracts/deploy/012_upgrades.js | 8 +- contracts/deploy/013_trustee.js | 6 +- contracts/deploy/014_3pool_strategy.js | 30 +--- contracts/deploy/016_chainlink_and_buyback.js | 2 +- contracts/deploy/017_3pool_strategy_update.js | 2 +- contracts/deploy/018_upgrade_governor.js | 2 - contracts/deploy/021_solidity_upgrade.js | 24 +-- contracts/deploy/029_convex.js | 12 +- contracts/deploy/032_convex_rewards.js | 20 +-- contracts/deploy/034_vault_value_checker.js | 13 +- contracts/deploy/035_reduce_collect_gas.js | 8 +- .../deploy/036_multiple_rewards_strategies.js | 8 +- contracts/deploy/037_dripper.js | 15 +- contracts/deploy/038_staking_patch.js | 2 +- contracts/deploy/039_wrapped_ousd.js | 14 +- contracts/deploy/040_vault_peg_check.js | 1 - contracts/deploy/041_stop_buyback_swaps.js | 4 +- contracts/deploy/043_convexOUSDMeta.js | 12 +- contracts/deploy/044_morpho_strategy.js | 12 +- contracts/deploy/046_value_value_checker.js | 10 +- contracts/deploy/047_morpho_aave_strategy.js | 12 +- .../deploy/048_deposit_withdraw_tooling.js | 11 +- contracts/deploy/049_oeth_proxy.js | 14 +- contracts/deploy/050_woeth_proxy.js | 14 +- contracts/deploy/051_upgrade_buyback.js | 13 +- contracts/deploy/053_oeth.js | 52 ++---- contracts/deploy/054_woeth.js | 27 +-- contracts/deploy/055_curve_amo.js | 86 ++++----- contracts/deploy/056_oeth_zapper_again.js | 5 +- contracts/deploy/057_drip_all.js | 31 ++-- .../deploy/058_oeth_vault_value_checker.js | 11 +- contracts/deploy/061_oeth_timelock_part_1.js | 3 +- contracts/deploy/062_oeth_timelock_part_2.js | 4 +- .../deploy/067_ousd_vault_value_checker.js | 10 +- contracts/package.json | 2 +- 40 files changed, 221 insertions(+), 465 deletions(-) diff --git a/contracts/deploy/000_mock.js b/contracts/deploy/000_mock.js index db93afa717..4be0d40cc9 100644 --- a/contracts/deploy/000_mock.js +++ b/contracts/deploy/000_mock.js @@ -17,11 +17,6 @@ const { bytecode: MANAGER_BYTECODE, } = require("@uniswap/v3-periphery/artifacts/contracts/NonfungiblePositionManager.sol/NonfungiblePositionManager.json"); -const { - abi: TOKEN_DESCRIPTOR_ABI, - bytecode: TOKEN_DESCRIPTOR_BYTECODE, -} = require("@uniswap/v3-periphery/artifacts/contracts/NonfungibleTokenPositionDescriptor.sol/NonfungibleTokenPositionDescriptor.json"); - const { abi: QUOTER_ABI, bytecode: QUOTER_BYTECODE, diff --git a/contracts/deploy/001_core.js b/contracts/deploy/001_core.js index a50e76741a..0afec2904e 100644 --- a/contracts/deploy/001_core.js +++ b/contracts/deploy/001_core.js @@ -60,6 +60,7 @@ const deployAaveStrategy = async () => { await withConfirmation( cAaveStrategy .connect(sDeployer) + // eslint-disable-next-line no-unexpected-multiline [initFunctionName]( assetAddresses.AAVE_ADDRESS_PROVIDER, cVaultProxy.address, @@ -189,23 +190,10 @@ const deployThreePoolStrategy = async () => { // Initialize Strategies const cVaultProxy = await ethers.getContract("VaultProxy"); await withConfirmation( - cThreePoolStrategy - .connect(sDeployer) - [ - "initialize(address,address,address[],address[],address[],address,address)" - ]( - assetAddresses.ThreePool, - cVaultProxy.address, - [assetAddresses.CRV], - [assetAddresses.DAI, assetAddresses.USDC, assetAddresses.USDT], - [ - assetAddresses.ThreePoolToken, - assetAddresses.ThreePoolToken, - assetAddresses.ThreePoolToken, - ], - assetAddresses.ThreePoolGauge, - assetAddresses.CRVMinter - ) + cThreePoolStrategy.connect(sDeployer)[ + // eslint-disable-next-line no-unexpected-multiline + "initialize(address,address,address[],address[],address[],address,address)" + ](assetAddresses.ThreePool, cVaultProxy.address, [assetAddresses.CRV], [assetAddresses.DAI, assetAddresses.USDC, assetAddresses.USDT], [assetAddresses.ThreePoolToken, assetAddresses.ThreePoolToken, assetAddresses.ThreePoolToken], assetAddresses.ThreePoolGauge, assetAddresses.CRVMinter) ); log("Initialized ThreePoolStrategy"); @@ -261,24 +249,23 @@ const deployConvexStrategy = async () => { const mockBooster = await ethers.getContract("MockBooster"); const mockRewardPool = await ethers.getContract("MockRewardPool"); await withConfirmation( - cConvexStrategy - .connect(sDeployer) + cConvexStrategy.connect(sDeployer)[ + // eslint-disable-next-line no-unexpected-multiline + "initialize(address,address,address[],address[],address[],address,address,uint256)" + ]( + assetAddresses.ThreePool, + cVaultProxy.address, + [assetAddresses.CRV, assetAddresses.CVX], + [assetAddresses.DAI, assetAddresses.USDC, assetAddresses.USDT], [ - "initialize(address,address,address[],address[],address[],address,address,uint256)" - ]( - assetAddresses.ThreePool, - cVaultProxy.address, - [assetAddresses.CRV, assetAddresses.CVX], - [assetAddresses.DAI, assetAddresses.USDC, assetAddresses.USDT], - [ - assetAddresses.ThreePoolToken, - assetAddresses.ThreePoolToken, - assetAddresses.ThreePoolToken, - ], - mockBooster.address, // _cvxDepositorAddress, - mockRewardPool.address, // _cvxRewardStakerAddress, - 9 // _cvxDepositorPTokenId - ) + assetAddresses.ThreePoolToken, + assetAddresses.ThreePoolToken, + assetAddresses.ThreePoolToken, + ], + mockBooster.address, // _cvxDepositorAddress, + mockRewardPool.address, // _cvxRewardStakerAddress, + 9 // _cvxDepositorPTokenId + ) ); log("Initialized ConvexStrategy"); @@ -339,29 +326,28 @@ const deployConvexLUSDMetaStrategy = async () => { const LUSD = await ethers.getContract("MockLUSD"); await withConfirmation( - cConvexLUSDMetaStrategy - .connect(sDeployer) + cConvexLUSDMetaStrategy.connect(sDeployer)[ + // eslint-disable-next-line no-unexpected-multiline + "initialize(address[],address[],address[],(address,address,address,address,address,address,address,uint256))" + ]( + [assetAddresses.CVX, assetAddresses.CRV], + [assetAddresses.DAI, assetAddresses.USDC, assetAddresses.USDT], [ - "initialize(address[],address[],address[],(address,address,address,address,address,address,address,uint256))" - ]( - [assetAddresses.CVX, assetAddresses.CRV], - [assetAddresses.DAI, assetAddresses.USDC, assetAddresses.USDT], - [ - assetAddresses.ThreePoolToken, - assetAddresses.ThreePoolToken, - assetAddresses.ThreePoolToken, - ], - [ - assetAddresses.ThreePool, - cVaultProxy.address, - mockBooster.address, // _cvxDepositorAddress, - assetAddresses.ThreePoolLUSDMetapool, // metapool address, - LUSD.address, // LUSD - mockRewardPool.address, // _cvxRewardStakerAddress, - assetAddresses.LUSDMetapoolToken, // metapoolLpToken - lusdMetapoolLPCRVPid, // _cvxDepositorPTokenId - ] - ) + assetAddresses.ThreePoolToken, + assetAddresses.ThreePoolToken, + assetAddresses.ThreePoolToken, + ], + [ + assetAddresses.ThreePool, + cVaultProxy.address, + mockBooster.address, // _cvxDepositorAddress, + assetAddresses.ThreePoolLUSDMetapool, // metapool address, + LUSD.address, // LUSD + mockRewardPool.address, // _cvxRewardStakerAddress, + assetAddresses.LUSDMetapoolToken, // metapoolLpToken + lusdMetapoolLPCRVPid, // _cvxDepositorPTokenId + ] + ) ); log("Initialized ConvexLUSDMetaStrategy"); @@ -422,29 +408,28 @@ const deployConvexOUSDMetaStrategy = async () => { const ousd = await ethers.getContract("OUSDProxy"); await withConfirmation( - cConvexOUSDMetaStrategy - .connect(sDeployer) + cConvexOUSDMetaStrategy.connect(sDeployer)[ + // eslint-disable-next-line no-unexpected-multiline + "initialize(address[],address[],address[],(address,address,address,address,address,address,address,uint256))" + ]( + [assetAddresses.CVX, assetAddresses.CRV], + [assetAddresses.DAI, assetAddresses.USDC, assetAddresses.USDT], [ - "initialize(address[],address[],address[],(address,address,address,address,address,address,address,uint256))" - ]( - [assetAddresses.CVX, assetAddresses.CRV], - [assetAddresses.DAI, assetAddresses.USDC, assetAddresses.USDT], - [ - assetAddresses.ThreePoolToken, - assetAddresses.ThreePoolToken, - assetAddresses.ThreePoolToken, - ], - [ - assetAddresses.ThreePool, - cVaultProxy.address, - mockBooster.address, // _cvxDepositorAddress, - assetAddresses.ThreePoolOUSDMetapool, // metapool address, - ousd.address, // _ousdAddress, - mockRewardPool.address, // _cvxRewardStakerAddress, - assetAddresses.ThreePoolOUSDMetapool, // metapoolLpToken (metapool address), - metapoolLPCRVPid, // _cvxDepositorPTokenId - ] - ) + assetAddresses.ThreePoolToken, + assetAddresses.ThreePoolToken, + assetAddresses.ThreePoolToken, + ], + [ + assetAddresses.ThreePool, + cVaultProxy.address, + mockBooster.address, // _cvxDepositorAddress, + assetAddresses.ThreePoolOUSDMetapool, // metapool address, + ousd.address, // _ousdAddress, + mockRewardPool.address, // _cvxRewardStakerAddress, + assetAddresses.ThreePoolOUSDMetapool, // metapoolLpToken (metapool address), + metapoolLPCRVPid, // _cvxDepositorPTokenId + ] + ) ); log("Initialized ConvexOUSDMetaStrategy"); @@ -1103,13 +1088,10 @@ const deployBuyback = async () => { // Init proxy to implementation await withConfirmation( - cBuybackProxy - .connect(sDeployer) - ["initialize(address,address,bytes)"]( - dBuybackImpl.address, - deployerAddr, - [] - ) + cBuybackProxy.connect(sDeployer)[ + // eslint-disable-next-line no-unexpected-multiline + "initialize(address,address,bytes)" + ](dBuybackImpl.address, deployerAddr, []) ); const cBuyback = await ethers.getContractAt("Buyback", cBuybackProxy.address); @@ -1178,13 +1160,10 @@ const deployWOusd = async () => { const wousdProxy = await ethers.getContract("WrappedOUSDProxy"); const wousd = await ethers.getContractAt("WrappedOusd", wousdProxy.address); - await wousdProxy - .connect(sDeployer) - ["initialize(address,address,bytes)"]( - dWrappedOusdImpl.address, - deployerAddr, - [] - ); + await wousdProxy.connect(sDeployer)[ + // eslint-disable-next-line no-unexpected-multiline + "initialize(address,address,bytes)" + ](dWrappedOusdImpl.address, deployerAddr, []); await wousd.connect(sDeployer)["initialize()"](); await wousd.connect(sDeployer).transferGovernance(governorAddr); await wousd.connect(sGovernor).claimGovernance(); diff --git a/contracts/deploy/008_ousd_reset.js b/contracts/deploy/008_ousd_reset.js index c18e784ccf..9b73df6eab 100644 --- a/contracts/deploy/008_ousd_reset.js +++ b/contracts/deploy/008_ousd_reset.js @@ -411,11 +411,9 @@ const deployVault = async () => { }; const upgradeAndResetOUSD = async () => { - const { depoyerAddr, governorAddr, v1GovernorAddr } = - await hre.getNamedAccounts(); + const { governorAddr, v1GovernorAddr } = await hre.getNamedAccounts(); // Signers - const sDeployer = await ethers.provider.getSigner(depoyerAddr); const sGovernor = await ethers.provider.getSigner(governorAddr); // Temporary OUSD for running a reset diff --git a/contracts/deploy/009_ousd_fix.js b/contracts/deploy/009_ousd_fix.js index 0795dd45e2..5faa55cf74 100644 --- a/contracts/deploy/009_ousd_fix.js +++ b/contracts/deploy/009_ousd_fix.js @@ -74,26 +74,24 @@ const fixOUSD = async () => { await withConfirmation( cOUSDProxy .connect(sGovernor) - .upgradeTo(dOUSDReset.address, await getTxOpts(gasLimit)) + .upgradeTo(dOUSDReset.address, await getTxOpts()) ); log("Upgraded OUSD to reset implementation"); await withConfirmation( cOUSDReset .connect(sGovernor) - .setVaultAddress(cVaultProxy.address, await getTxOpts(gasLimit)) + .setVaultAddress(cVaultProxy.address, await getTxOpts()) ); log("Vault address set"); await withConfirmation( - cOUSDReset.connect(sGovernor).reset(await getTxOpts(gasLimit)) + cOUSDReset.connect(sGovernor).reset(await getTxOpts()) ); log("Called reset on OUSD"); await withConfirmation( - cOUSDProxy - .connect(sGovernor) - .upgradeTo(dOUSD.address, await getTxOpts(gasLimit)) + cOUSDProxy.connect(sGovernor).upgradeTo(dOUSD.address, await getTxOpts()) ); log("Upgraded OUSD to standard implementation"); } diff --git a/contracts/deploy/011_ousd_fix.js b/contracts/deploy/011_ousd_fix.js index ec247d45ff..92a65cc1ff 100644 --- a/contracts/deploy/011_ousd_fix.js +++ b/contracts/deploy/011_ousd_fix.js @@ -46,9 +46,7 @@ const fixOUSD = async (hre) => { log("Proposal executed."); } else { await withConfirmation( - cOUSDProxy - .connect(sGovernor) - .upgradeTo(dOUSD.address, await getTxOpts(gasLimit)) + cOUSDProxy.connect(sGovernor).upgradeTo(dOUSD.address, await getTxOpts()) ); log("Upgraded OUSD to new implementation"); } diff --git a/contracts/deploy/012_upgrades.js b/contracts/deploy/012_upgrades.js index e767e3a153..ffe55a9452 100644 --- a/contracts/deploy/012_upgrades.js +++ b/contracts/deploy/012_upgrades.js @@ -77,23 +77,21 @@ const upgrades = async (hre) => { log("Proposal executed."); } else { await withConfirmation( - cOUSDProxy - .connect(sGovernor) - .upgradeTo(dOUSD.address, await getTxOpts(gasLimit)) + cOUSDProxy.connect(sGovernor).upgradeTo(dOUSD.address, await getTxOpts()) ); log("Upgraded OUSD to new implementation"); await withConfirmation( cVaultCoreProxy .connect(sGovernor) - .setAdminImpl(dVaultAdmin.address, await getTxOpts(gasLimit)) + .setAdminImpl(dVaultAdmin.address, await getTxOpts()) ); log("Upgraded VaultAdmin to new implementation"); await withConfirmation( cCompoundStrategyProxy .connect(sGovernor) - .upgradeTo(dCompoundStrategy.address, await getTxOpts(gasLimit)) + .upgradeTo(dCompoundStrategy.address, await getTxOpts()) ); log("Upgraded CompoundStrategy to new implementation"); } diff --git a/contracts/deploy/013_trustee.js b/contracts/deploy/013_trustee.js index 071aca8166..82a2478544 100644 --- a/contracts/deploy/013_trustee.js +++ b/contracts/deploy/013_trustee.js @@ -70,21 +70,21 @@ const trustee = async (hre) => { await withConfirmation( cVaultProxy .connect(sGovernor) - .upgradeTo(dVaultCore.address, await getTxOpts(gasLimit)) + .upgradeTo(dVaultCore.address, await getTxOpts()) ); log("Upgraded VaultCore to new implementation"); await withConfirmation( cvaultAdmin .connect(sGovernor) - .setTrusteeAddress(trusteeAddress, await getTxOpts(gasLimit)) + .setTrusteeAddress(trusteeAddress, await getTxOpts()) ); log("Trustee address set"); await withConfirmation( cvaultAdmin .connect(sGovernor) - .setTrusteeFeeBps(trusteeFeeBps, await getTxOpts(gasLimit)) + .setTrusteeFeeBps(trusteeFeeBps, await getTxOpts()) ); log("Trustee fee bps set"); } diff --git a/contracts/deploy/014_3pool_strategy.js b/contracts/deploy/014_3pool_strategy.js index 9a202f0745..164fb4c1a4 100644 --- a/contracts/deploy/014_3pool_strategy.js +++ b/contracts/deploy/014_3pool_strategy.js @@ -70,23 +70,10 @@ const runDeployment = async (hre) => { // Initialize 3Pool implementation. await withConfirmation( - cThreePoolStrategy - .connect(sDeployer) - [ - "initialize(address,address,address,address[],address[],address,address)" - ]( - assetAddresses.ThreePool, - cVaultProxy.address, - assetAddresses.CRV, - [assetAddresses.DAI, assetAddresses.USDC, assetAddresses.USDT], - [ - assetAddresses.ThreePoolToken, - assetAddresses.ThreePoolToken, - assetAddresses.ThreePoolToken, - ], - assetAddresses.ThreePoolGauge, - assetAddresses.CRVMinter - ) + cThreePoolStrategy.connect(sDeployer)[ + // eslint-disable-next-line + "initialize(address,address,address,address[],address[],address,address)" + ](assetAddresses.ThreePool, cVaultProxy.address, assetAddresses.CRV, [assetAddresses.DAI, assetAddresses.USDC, assetAddresses.USDT], [assetAddresses.ThreePoolToken, assetAddresses.ThreePoolToken, assetAddresses.ThreePoolToken], assetAddresses.ThreePoolGauge, assetAddresses.CRVMinter) ); log("Initialized ThreePoolStrategy"); @@ -140,18 +127,13 @@ const runDeployment = async (hre) => { log("Proposal executed."); } else { await withConfirmation( - cThreePoolStrategy - .connect(sGovernor) - .claimGovernance(await getTxOpts(gasLimit)) + cThreePoolStrategy.connect(sGovernor).claimGovernance(await getTxOpts()) ); log("Claimed governance of ThreePoolStrategy"); await withConfirmation( cVault .connect(sGovernor) - .approveStrategy( - cThreePoolStrategyProxy.address, - await getTxOpts(gasLimit) - ) + .approveStrategy(cThreePoolStrategyProxy.address, await getTxOpts()) ); log("Approved ThreePoolStrategy on Vault"); } diff --git a/contracts/deploy/016_chainlink_and_buyback.js b/contracts/deploy/016_chainlink_and_buyback.js index 37ffda5ece..e3e0c79ca6 100644 --- a/contracts/deploy/016_chainlink_and_buyback.js +++ b/contracts/deploy/016_chainlink_and_buyback.js @@ -105,7 +105,7 @@ const runDeployment = async (hre) => { ); log("Upgrade VaultCore implementation"); await withConfirmation( - cBuyback.connect(sGovernor).claimGovernance(await getTxOpts(gasLimit)) + cBuyback.connect(sGovernor).claimGovernance(await getTxOpts()) ); log("Claimed governance of Buyback contract"); await withConfirmation( diff --git a/contracts/deploy/017_3pool_strategy_update.js b/contracts/deploy/017_3pool_strategy_update.js index 2cecd1ddfa..2bb0fcca0c 100644 --- a/contracts/deploy/017_3pool_strategy_update.js +++ b/contracts/deploy/017_3pool_strategy_update.js @@ -49,7 +49,7 @@ const runDeployment = async (hre) => { await withConfirmation( cThreePoolStrategyProxy .connect(sGovernor) - .upgradeTo(dThreePoolStrategy.address, await getTxOpts(gasLimit)) + .upgradeTo(dThreePoolStrategy.address, await getTxOpts()) ); log("Switched implementation of ThreePoolStrategy"); } diff --git a/contracts/deploy/018_upgrade_governor.js b/contracts/deploy/018_upgrade_governor.js index 8d28a1f3ca..8cf912dd05 100644 --- a/contracts/deploy/018_upgrade_governor.js +++ b/contracts/deploy/018_upgrade_governor.js @@ -6,12 +6,10 @@ const { isMainnet, isFork, isSmokeTest } = require("../test/helpers.js"); const { log, deployWithConfirmation, - withConfirmation, executeProposal, sendProposal, } = require("../utils/deploy"); const { proposeArgs } = require("../utils/governor"); -const { getTxOpts } = require("../utils/tx"); const addresses = require("../utils/addresses"); const deployName = "018_upgrade_governor"; diff --git a/contracts/deploy/021_solidity_upgrade.js b/contracts/deploy/021_solidity_upgrade.js index 6e796204ab..9e1f0f660f 100644 --- a/contracts/deploy/021_solidity_upgrade.js +++ b/contracts/deploy/021_solidity_upgrade.js @@ -95,15 +95,10 @@ module.exports = deploymentWithProposal( dCompoundStrategyProxy.address ); await withConfirmation( - cCompoundStrategy - .connect(sDeployer) - ["initialize(address,address,address,address[],address[])"]( - addresses.dead, - cVaultProxy.address, - assetAddresses.COMP, - [assetAddresses.USDC, assetAddresses.USDT], - [assetAddresses.cUSDC, assetAddresses.cUSDT] - ) + cCompoundStrategy.connect(sDeployer)[ + // eslint-disable-next-line no-unexpected-multiline + "initialize(address,address,address,address[],address[])" + ](addresses.dead, cVaultProxy.address, assetAddresses.COMP, [assetAddresses.USDC, assetAddresses.USDT], [assetAddresses.cUSDC, assetAddresses.cUSDT]) ); log("Initialized CompoundStrategy..."); // Transfer CompoundStrategy governance to governor @@ -131,13 +126,10 @@ module.exports = deploymentWithProposal( dAaveStrategyProxy.address ); await withConfirmation( - cAaveStrategyProxy - .connect(sDeployer) - ["initialize(address,address,bytes)"]( - dAaveStrategy.address, - deployerAddr, - [] - ) + cAaveStrategyProxy.connect(sDeployer)[ + // eslint-disable-next-line no-unexpected-multiline + "initialize(address,address,bytes)" + ](dAaveStrategy.address, deployerAddr, []) ); log("Initialized AaveStrategyProxy..."); const initFunction = diff --git a/contracts/deploy/029_convex.js b/contracts/deploy/029_convex.js index 48e0cad1a8..bda0504eb3 100644 --- a/contracts/deploy/029_convex.js +++ b/contracts/deploy/029_convex.js @@ -41,14 +41,10 @@ module.exports = deploymentWithProposal( // 3. Init the proxy to point at the implementation await withConfirmation( - cConvexStrategyProxy - .connect(sDeployer) - ["initialize(address,address,bytes)"]( - dConvexStrategyImpl.address, - deployerAddr, - [], - await getTxOpts() - ) + cConvexStrategyProxy.connect(sDeployer)[ + // eslint-disable-next-line no-unexpected-multiline + "initialize(address,address,bytes)" + ](dConvexStrategyImpl.address, deployerAddr, [], await getTxOpts()) ); // 4. Init and configure new Convex strategy const initFunction = diff --git a/contracts/deploy/032_convex_rewards.js b/contracts/deploy/032_convex_rewards.js index ba05f63942..05a89aa48d 100644 --- a/contracts/deploy/032_convex_rewards.js +++ b/contracts/deploy/032_convex_rewards.js @@ -2,23 +2,7 @@ const { deploymentWithProposal } = require("../utils/deploy"); module.exports = deploymentWithProposal( { deployName: "032_convex_rewards", forceDeploy: false }, - async ({ - assetAddresses, - deployWithConfirmation, - ethers, - getTxOpts, - withConfirmation, - }) => { - const { deployerAddr, governorAddr } = await getNamedAccounts(); - const sDeployer = await ethers.provider.getSigner(deployerAddr); - - // Current contracts - const cVaultProxy = await ethers.getContract("VaultProxy"); - const cVaultAdmin = await ethers.getContractAt( - "VaultAdmin", - cVaultProxy.address - ); - + async ({ assetAddresses, deployWithConfirmation, ethers }) => { // Deployer Actions // ---------------- @@ -56,7 +40,7 @@ module.exports = deploymentWithProposal( signature: "setRewardTokenAddress(address)", args: [assetAddresses.CRV], }, - // 3. Use correct CVX token addresss + // 3. Use correct CVX token address { contract: cConvexStrategy, signature: "setCvxRewardTokenAddress(address)", diff --git a/contracts/deploy/034_vault_value_checker.js b/contracts/deploy/034_vault_value_checker.js index 513f7322e9..62ecdfbd18 100644 --- a/contracts/deploy/034_vault_value_checker.js +++ b/contracts/deploy/034_vault_value_checker.js @@ -2,13 +2,7 @@ const { deploymentWithProposal } = require("../utils/deploy"); module.exports = deploymentWithProposal( { deployName: "034_vault_value_checker", forceDeploy: false }, - async ({ - assetAddresses, - deployWithConfirmation, - ethers, - getTxOpts, - withConfirmation, - }) => { + async ({ deployWithConfirmation, ethers }) => { // Current contracts const cVaultProxy = await ethers.getContract("VaultProxy"); @@ -16,10 +10,7 @@ module.exports = deploymentWithProposal( // ---------------- // 1. Deploy new vault value checker - const dVaultValueChecker = await deployWithConfirmation( - "VaultValueChecker", - [cVaultProxy.address] - ); + await deployWithConfirmation("VaultValueChecker", [cVaultProxy.address]); const vaultValueChecker = await ethers.getContract("VaultValueChecker"); // Governance Actions diff --git a/contracts/deploy/035_reduce_collect_gas.js b/contracts/deploy/035_reduce_collect_gas.js index dcc4bed44b..a81a2fe2e8 100644 --- a/contracts/deploy/035_reduce_collect_gas.js +++ b/contracts/deploy/035_reduce_collect_gas.js @@ -2,13 +2,7 @@ const { deploymentWithProposal } = require("../utils/deploy"); module.exports = deploymentWithProposal( { deployName: "035_reduce_collect_gas", forceDeploy: false }, - async ({ - assetAddresses, - deployWithConfirmation, - ethers, - getTxOpts, - withConfirmation, - }) => { + async ({ deployWithConfirmation, ethers }) => { // Current contracts const cCompStratProxy = await ethers.getContract("CompoundStrategyProxy"); diff --git a/contracts/deploy/036_multiple_rewards_strategies.js b/contracts/deploy/036_multiple_rewards_strategies.js index c28fd312ca..50dff2211f 100644 --- a/contracts/deploy/036_multiple_rewards_strategies.js +++ b/contracts/deploy/036_multiple_rewards_strategies.js @@ -7,12 +7,10 @@ module.exports = deploymentWithProposal( assetAddresses, deployWithConfirmation, ethers, - getTxOpts, withConfirmation, }) => { - const { deployerAddr, governorAddr } = await getNamedAccounts(); + const { deployerAddr } = await getNamedAccounts(); const sDeployer = await ethers.provider.getSigner(deployerAddr); - const sGovernor = await ethers.provider.getSigner(governorAddr); const dVaultAdmin = await deployWithConfirmation( "VaultAdmin", undefined, @@ -34,10 +32,6 @@ module.exports = deploymentWithProposal( "VaultAdmin", cVaultProxy.address ); - const cVaultCore = await ethers.getContractAt( - "VaultCore", - cVaultProxy.address - ); const cVault = await ethers.getContractAt("Vault", cVaultProxy.address); // Deployer Actions diff --git a/contracts/deploy/037_dripper.js b/contracts/deploy/037_dripper.js index aca8585914..35f9b44a03 100644 --- a/contracts/deploy/037_dripper.js +++ b/contracts/deploy/037_dripper.js @@ -1,4 +1,4 @@ -const { deploymentWithProposal, log } = require("../utils/deploy"); +const { deploymentWithProposal } = require("../utils/deploy"); module.exports = deploymentWithProposal( { deployName: "037_dripper", forceDeploy: false }, @@ -11,7 +11,6 @@ module.exports = deploymentWithProposal( }) => { const { deployerAddr, governorAddr } = await getNamedAccounts(); const sDeployer = await ethers.provider.getSigner(deployerAddr); - const sGovernor = await ethers.provider.getSigner(governorAddr); // Current contracts const cVaultProxy = await ethers.getContract("VaultProxy"); @@ -49,14 +48,10 @@ module.exports = deploymentWithProposal( // 3. Configure Proxy await withConfirmation( - cDripperProxy - .connect(sDeployer) - ["initialize(address,address,bytes)"]( - cDripperImpl.address, - deployerAddr, - [], - await getTxOpts() - ) + cDripperProxy.connect(sDeployer)[ + // eslint-disable-next-line no-unexpected-multiline + "initialize(address,address,bytes)" + ](cDripperImpl.address, deployerAddr, [], await getTxOpts()) ); // 4. Configure Dripper to one week diff --git a/contracts/deploy/038_staking_patch.js b/contracts/deploy/038_staking_patch.js index 21cd90026d..bab4957279 100644 --- a/contracts/deploy/038_staking_patch.js +++ b/contracts/deploy/038_staking_patch.js @@ -1,4 +1,4 @@ -const { deploymentWithProposal, log } = require("../utils/deploy"); +const { deploymentWithProposal } = require("../utils/deploy"); // Deploy new staking implimentation contract with fix // Upgrade to using it diff --git a/contracts/deploy/039_wrapped_ousd.js b/contracts/deploy/039_wrapped_ousd.js index 95b3c0cd72..9b443f31aa 100644 --- a/contracts/deploy/039_wrapped_ousd.js +++ b/contracts/deploy/039_wrapped_ousd.js @@ -20,7 +20,7 @@ module.exports = deploymentWithProposal( ]); // 2. Deploy the new proxy - const dWrappedOUSDProxy = await deployWithConfirmation("WrappedOUSDProxy"); + await deployWithConfirmation("WrappedOUSDProxy"); const cWrappedOUSDProxy = await ethers.getContract("WrappedOUSDProxy"); const cWrappedOUSD = await ethers.getContractAt( "WrappedOusd", @@ -29,14 +29,10 @@ module.exports = deploymentWithProposal( // 3. Configure Proxy await withConfirmation( - cWrappedOUSDProxy - .connect(sDeployer) - ["initialize(address,address,bytes)"]( - dWrappedOusdImpl.address, - deployerAddr, - [], - await getTxOpts() - ) + cWrappedOUSDProxy.connect(sDeployer)[ + // eslint-disable-next-line no-unexpected-multiline + "initialize(address,address,bytes)" + ](dWrappedOusdImpl.address, deployerAddr, [], await getTxOpts()) ); // 3. Initialize Wrapped OUSD diff --git a/contracts/deploy/040_vault_peg_check.js b/contracts/deploy/040_vault_peg_check.js index 096ae27b3b..e102360b1f 100644 --- a/contracts/deploy/040_vault_peg_check.js +++ b/contracts/deploy/040_vault_peg_check.js @@ -4,7 +4,6 @@ module.exports = deploymentWithProposal( { deployName: "040_vault_peg_check", forceDeploy: false }, async ({ deployWithConfirmation }) => { // Current contracts - const cOUSDProxy = await ethers.getContract("OUSDProxy"); const cVaultProxy = await ethers.getContract("VaultProxy"); const cVaultCore = await ethers.getContractAt( "VaultCore", diff --git a/contracts/deploy/041_stop_buyback_swaps.js b/contracts/deploy/041_stop_buyback_swaps.js index 96c323d5f7..71d1df1d3b 100644 --- a/contracts/deploy/041_stop_buyback_swaps.js +++ b/contracts/deploy/041_stop_buyback_swaps.js @@ -1,10 +1,8 @@ -const hre = require("hardhat"); - const addresses = require("../utils/addresses"); const { deploymentWithProposal } = require("../utils/deploy"); module.exports = deploymentWithProposal( { deployName: "041_stop_buyback_swaps", forceDeploy: false }, - async ({}) => { + async () => { // Buyback contract const cBuyback = await ethers.getContract("Buyback"); diff --git a/contracts/deploy/043_convexOUSDMeta.js b/contracts/deploy/043_convexOUSDMeta.js index f6db5dbae2..33062f18fc 100644 --- a/contracts/deploy/043_convexOUSDMeta.js +++ b/contracts/deploy/043_convexOUSDMeta.js @@ -59,14 +59,10 @@ module.exports = deploymentWithProposal( // 3. Init the proxy to point at the implementation await withConfirmation( - cConvexOUSDMetaStrategyProxy - .connect(sDeployer) - ["initialize(address,address,bytes)"]( - dConvexOUSDMetaStrategyImpl.address, - deployerAddr, - [], - await getTxOpts() - ) + cConvexOUSDMetaStrategyProxy.connect(sDeployer)[ + // eslint-disable-next-line no-unexpected-multiline + "initialize(address,address,bytes)" + ](dConvexOUSDMetaStrategyImpl.address, deployerAddr, [], await getTxOpts()) ); // 4. Init and configure new Convex OUSD Meta strategy diff --git a/contracts/deploy/044_morpho_strategy.js b/contracts/deploy/044_morpho_strategy.js index 2e661419db..d2c177ae19 100644 --- a/contracts/deploy/044_morpho_strategy.js +++ b/contracts/deploy/044_morpho_strategy.js @@ -49,14 +49,10 @@ module.exports = deploymentWithProposal( // 3. Init the proxy to point at the implementation await withConfirmation( - cMorphoCompoundStrategyProxy - .connect(sDeployer) - ["initialize(address,address,bytes)"]( - dMorphoCompoundStrategyImpl.address, - deployerAddr, - [], - await getTxOpts() - ) + cMorphoCompoundStrategyProxy.connect(sDeployer)[ + // eslint-disable-next-line no-unexpected-multiline + "initialize(address,address,bytes)" + ](dMorphoCompoundStrategyImpl.address, deployerAddr, [], await getTxOpts()) ); // 4. Init and configure new Morpho strategy diff --git a/contracts/deploy/046_value_value_checker.js b/contracts/deploy/046_value_value_checker.js index 1e7ee74ac6..b434c4652a 100644 --- a/contracts/deploy/046_value_value_checker.js +++ b/contracts/deploy/046_value_value_checker.js @@ -2,13 +2,7 @@ const { deploymentWithProposal } = require("../utils/deploy"); module.exports = deploymentWithProposal( { deployName: "046_vault_value_checker", forceDeploy: false }, - async ({ - assetAddresses, - deployWithConfirmation, - ethers, - getTxOpts, - withConfirmation, - }) => { + async ({ deployWithConfirmation, ethers }) => { // Current contracts const cVaultProxy = await ethers.getContract("VaultProxy"); const cOUSDProxy = await ethers.getContract("OUSDProxy"); @@ -17,7 +11,7 @@ module.exports = deploymentWithProposal( // ---------------- // 1. Deploy new vault value checker - const dVaultValueChecker = await deployWithConfirmation( + await deployWithConfirmation( "VaultValueChecker", [cVaultProxy.address, cOUSDProxy.address], undefined, diff --git a/contracts/deploy/047_morpho_aave_strategy.js b/contracts/deploy/047_morpho_aave_strategy.js index 1674ccf8e1..4cd2a17649 100644 --- a/contracts/deploy/047_morpho_aave_strategy.js +++ b/contracts/deploy/047_morpho_aave_strategy.js @@ -53,14 +53,10 @@ module.exports = deploymentWithProposal( // 3. Init the proxy to point at the implementation await withConfirmation( - cMorphoAaveStrategyProxy - .connect(sDeployer) - ["initialize(address,address,bytes)"]( - dMorphoAaveStrategyImpl.address, - deployerAddr, - [], - await getTxOpts() - ) + cMorphoAaveStrategyProxy.connect(sDeployer)[ + // eslint-disable-next-line no-unexpected-multiline + "initialize(address,address,bytes)" + ](dMorphoAaveStrategyImpl.address, deployerAddr, [], await getTxOpts()) ); // 4. Init and configure new Morpho strategy diff --git a/contracts/deploy/048_deposit_withdraw_tooling.js b/contracts/deploy/048_deposit_withdraw_tooling.js index 3e75458537..8a9a616641 100644 --- a/contracts/deploy/048_deposit_withdraw_tooling.js +++ b/contracts/deploy/048_deposit_withdraw_tooling.js @@ -1,5 +1,4 @@ const { deploymentWithGovernanceProposal } = require("../utils/deploy"); -const addresses = require("../utils/addresses"); const { isMainnet } = require("../test/helpers.js"); module.exports = deploymentWithGovernanceProposal( @@ -8,15 +7,7 @@ module.exports = deploymentWithGovernanceProposal( forceDeploy: false, //proposalId: "40434364243407050666554191388123037800510237271029051418887027936281231737485" }, - async ({ - assetAddresses, - deployWithConfirmation, - ethers, - getTxOpts, - withConfirmation, - }) => { - const { deployerAddr, governorAddr } = await getNamedAccounts(); - const sDeployer = await ethers.provider.getSigner(deployerAddr); + async ({ deployWithConfirmation, ethers }) => { let dVaultAdmin; // Current contracts diff --git a/contracts/deploy/049_oeth_proxy.js b/contracts/deploy/049_oeth_proxy.js index 747c5fe862..e8130ea8d9 100644 --- a/contracts/deploy/049_oeth_proxy.js +++ b/contracts/deploy/049_oeth_proxy.js @@ -4,7 +4,7 @@ const addresses = require("../utils/addresses"); module.exports = deploymentWithProposal( { deployName: "049_oeth_proxy", forceDeploy: false, forceSkip: true }, async ({ deployWithConfirmation, ethers, getTxOpts, withConfirmation }) => { - const { deployerAddr, governorAddr } = await getNamedAccounts(); + const { deployerAddr } = await getNamedAccounts(); const sDeployer = await ethers.provider.getSigner(deployerAddr); // Deployer Actions @@ -23,14 +23,10 @@ module.exports = deploymentWithProposal( // 3. Init the proxy to point at the implementation await withConfirmation( - cOethProxy - .connect(sDeployer) - ["initialize(address,address,bytes)"]( - dOETHImpl.address, - deployerAddr, - [], - await getTxOpts() - ) + cOethProxy.connect(sDeployer)[ + // eslint-disable-next-line no-unexpected-multiline + "initialize(address,address,bytes)" + ](dOETHImpl.address, deployerAddr, [], await getTxOpts()) ); // 5. Transfer governance diff --git a/contracts/deploy/050_woeth_proxy.js b/contracts/deploy/050_woeth_proxy.js index cafe18b2fe..6d2d7f215b 100644 --- a/contracts/deploy/050_woeth_proxy.js +++ b/contracts/deploy/050_woeth_proxy.js @@ -4,7 +4,7 @@ const addresses = require("../utils/addresses"); module.exports = deploymentWithProposal( { deployName: "050_woeth_proxy", forceDeploy: false, forceSkip: true }, async ({ deployWithConfirmation, ethers, getTxOpts, withConfirmation }) => { - const { deployerAddr, governorAddr } = await getNamedAccounts(); + const { deployerAddr } = await getNamedAccounts(); const sDeployer = await ethers.provider.getSigner(deployerAddr); // Deployer Actions @@ -23,14 +23,10 @@ module.exports = deploymentWithProposal( // 3. Init the proxy to point at the implementation await withConfirmation( - cWoethProxy - .connect(sDeployer) - ["initialize(address,address,bytes)"]( - dWOETHImpl.address, - deployerAddr, - [], - await getTxOpts() - ) + cWoethProxy.connect(sDeployer)[ + // eslint-disable-next-line no-unexpected-multiline + "initialize(address,address,bytes)" + ](dWOETHImpl.address, deployerAddr, [], await getTxOpts()) ); // 5. Transfer governance diff --git a/contracts/deploy/051_upgrade_buyback.js b/contracts/deploy/051_upgrade_buyback.js index 4e65740cd7..6d70377ccf 100644 --- a/contracts/deploy/051_upgrade_buyback.js +++ b/contracts/deploy/051_upgrade_buyback.js @@ -1,6 +1,5 @@ const { deploymentWithGovernanceProposal } = require("../utils/deploy"); const { getTxOpts } = require("../utils/tx"); -// const addresses = require("../utils/addresses"); module.exports = deploymentWithGovernanceProposal( { @@ -61,14 +60,10 @@ module.exports = deploymentWithGovernanceProposal( // Initialize proxy contract await withConfirmation( - cBuybackProxy - .connect(sDeployer) - ["initialize(address,address,bytes)"]( - dBuybackImpl.address, - deployerAddr, - [], - await getTxOpts() - ) + cBuybackProxy.connect(sDeployer)[ + // eslint-disable-next-line no-unexpected-multiline + "initialize(address,address,bytes)" + ](dBuybackImpl.address, deployerAddr, [], await getTxOpts()) ); const cBuyback = await ethers.getContractAt( diff --git a/contracts/deploy/053_oeth.js b/contracts/deploy/053_oeth.js index d90f86c0a8..b35a108d48 100644 --- a/contracts/deploy/053_oeth.js +++ b/contracts/deploy/053_oeth.js @@ -2,23 +2,14 @@ const { deploymentWithGuardianGovernor } = require("../utils/deploy"); const addresses = require("../utils/addresses"); const hre = require("hardhat"); const { BigNumber, utils } = require("ethers"); -const { - getAssetAddresses, - getOracleAddresses, - isMainnet, - isFork, - isMainnetOrFork, -} = require("../test/helpers.js"); +const { getAssetAddresses } = require("../test/helpers.js"); // 5/8 multisig const guardianAddr = addresses.mainnet.Guardian; module.exports = deploymentWithGuardianGovernor( { deployName: "053_oeth" }, - async ({ deployWithConfirmation, ethers, getTxOpts, withConfirmation }) => { - const { deployerAddr, governorAddr } = await getNamedAccounts(); - const sDeployer = await ethers.provider.getSigner(deployerAddr); - + async ({ deployWithConfirmation, ethers, withConfirmation }) => { let actions = await deployCore({ deployWithConfirmation, withConfirmation, @@ -91,9 +82,10 @@ const deployCore = async ({ // Need to call the initializer on the Vault then upgraded it to the actual // VaultCore implementation await withConfirmation( - cVaultProxy - .connect(sDeployer) - ["initialize(address,address,bytes)"](dVault.address, deployerAddr, []) + cVaultProxy.connect(sDeployer)[ + // eslint-disable-next-line no-unexpected-multiline + "initialize(address,address,bytes)" + ](dVault.address, deployerAddr, []) ); console.log("Initialized OETHVaultProxy"); @@ -232,24 +224,18 @@ const deployDripper = async ({ cVaultProxy.address, assetAddresses.WETH, ]); - const dDripperProxy = await deployWithConfirmation("OETHDripperProxy"); + await deployWithConfirmation("OETHDripperProxy"); // Deploy Dripper Proxy - cDripperProxy = await ethers.getContract("OETHDripperProxy"); + const cDripperProxy = await ethers.getContract("OETHDripperProxy"); await withConfirmation( - cDripperProxy - .connect(sDeployer) - ["initialize(address,address,bytes)"](dDripper.address, guardianAddr, []) + cDripperProxy.connect(sDeployer)[ + // eslint-disable-next-line no-unexpected-multiline + "initialize(address,address,bytes)" + ](dDripper.address, guardianAddr, []) ); }; -const deployZapper = async ({ - deployWithConfirmation, - withConfirmation, - ethers, -}) => { - const { deployerAddr } = await getNamedAccounts(); - const sDeployer = await ethers.provider.getSigner(deployerAddr); - +const deployZapper = async ({ deployWithConfirmation, ethers }) => { const cOETHProxy = await ethers.getContract("OETHProxy"); const cVaultProxy = await ethers.getContract("OETHVaultProxy"); @@ -267,7 +253,6 @@ const deployFraxETHStrategy = async ({ withConfirmation, ethers, }) => { - const assetAddresses = await getAssetAddresses(deployments); const { deployerAddr } = await getNamedAccounts(); const sDeployer = await ethers.provider.getSigner(deployerAddr); const cVaultProxy = await ethers.getContract("OETHVaultProxy"); @@ -287,13 +272,10 @@ const deployFraxETHStrategy = async ({ dFraxETHStrategyProxy.address ); await withConfirmation( - cFraxETHStrategyProxy - .connect(sDeployer) - ["initialize(address,address,bytes)"]( - dFraxETHStrategy.address, - deployerAddr, - [] - ) + cFraxETHStrategyProxy.connect(sDeployer)[ + // eslint-disable-next-line no-unexpected-multiline + "initialize(address,address,bytes)" + ](dFraxETHStrategy.address, deployerAddr, []) ); console.log("Initialized FraxETHStrategyProxy"); diff --git a/contracts/deploy/054_woeth.js b/contracts/deploy/054_woeth.js index 78a9fe747e..960a348cbb 100644 --- a/contracts/deploy/054_woeth.js +++ b/contracts/deploy/054_woeth.js @@ -1,24 +1,8 @@ const { deploymentWithGuardianGovernor } = require("../utils/deploy"); -const addresses = require("../utils/addresses"); -const hre = require("hardhat"); -const { BigNumber, utils } = require("ethers"); -const { - getAssetAddresses, - getOracleAddresses, - isMainnet, - isFork, - isMainnetOrFork, -} = require("../test/helpers.js"); - -// 5/8 multisig -const guardianAddr = addresses.mainnet.Guardian; module.exports = deploymentWithGuardianGovernor( { deployName: "054_woeth" }, - async ({ deployWithConfirmation, ethers, getTxOpts, withConfirmation }) => { - const { deployerAddr, governorAddr } = await getNamedAccounts(); - const sDeployer = await ethers.provider.getSigner(deployerAddr); - + async ({ deployWithConfirmation, ethers, withConfirmation }) => { const actions = await deployWOETH({ deployWithConfirmation, withConfirmation, @@ -34,14 +18,7 @@ module.exports = deploymentWithGuardianGovernor( } ); -const deployWOETH = async ({ - deployWithConfirmation, - withConfirmation, - ethers, -}) => { - const { deployerAddr } = await getNamedAccounts(); - const sDeployer = await ethers.provider.getSigner(deployerAddr); - +const deployWOETH = async ({ deployWithConfirmation, ethers }) => { const cOETHProxy = await ethers.getContract("OETHProxy"); const cWOETHProxy = await ethers.getContract("WOETHProxy"); diff --git a/contracts/deploy/055_curve_amo.js b/contracts/deploy/055_curve_amo.js index 762e2727e2..6aaf9d45a1 100644 --- a/contracts/deploy/055_curve_amo.js +++ b/contracts/deploy/055_curve_amo.js @@ -1,21 +1,13 @@ const { deploymentWithGuardianGovernor, impersonateAccount, - sleep, } = require("../utils/deploy"); const addresses = require("../utils/addresses"); const hre = require("hardhat"); -const { BigNumber, utils, Contract } = require("ethers"); -const { - getAssetAddresses, - getOracleAddresses, - isMainnet, - isFork, - isMainnetOrFork, -} = require("../test/helpers.js"); +const { utils, Contract } = require("ethers"); +const { getAssetAddresses, isMainnet } = require("../test/helpers.js"); const { MAX_UINT256, oethPoolLpPID } = require("../utils/constants"); const crvRewards = "0x24b65DC1cf053A8D96872c323d29e86ec43eB33A"; -const gaugeAddress = "0xd03BE91b1932715709e18021734fcB91BB431715"; const poolAddress = "0x94b17476a93b3262d87b9a326965d1e91f9c13e7"; const tokenAddress = "0x94b17476a93b3262d87b9a326965d1e91f9c13e7"; @@ -27,10 +19,7 @@ module.exports = deploymentWithGuardianGovernor( deployName: "055_curve_amo", reduceQueueTime: true, }, - async ({ deployWithConfirmation, ethers, getTxOpts, withConfirmation }) => { - const { deployerAddr, governorAddr } = await getNamedAccounts(); - const sDeployer = await ethers.provider.getSigner(deployerAddr); - + async ({ deployWithConfirmation, ethers, withConfirmation }) => { let actions = []; // No need to Deploy Curve since it is already live on the mainnet @@ -84,16 +73,7 @@ module.exports = deploymentWithGuardianGovernor( } ); -const configureDripper = async ({ - deployWithConfirmation, - withConfirmation, - ethers, - cHarvester, -}) => { - const { deployerAddr } = await getNamedAccounts(); - const sDeployer = await ethers.provider.getSigner(deployerAddr); - - const cVaultProxy = await ethers.getContract("OETHVaultProxy"); +const configureDripper = async ({ ethers, cHarvester }) => { const cDripperProxy = await ethers.getContract("OETHDripperProxy"); const cDripper = await ethers.getContractAt( "OETHDripper", @@ -144,13 +124,10 @@ const deployConvexETHMetaStrategy = async ({ dConvexEthMetaStrategyProxy.address ); await withConfirmation( - cConvexEthMetaStrategyProxy - .connect(sDeployer) - ["initialize(address,address,bytes)"]( - dConvexETHMetaStrategy.address, - deployerAddr, - [] - ) + cConvexEthMetaStrategyProxy.connect(sDeployer)[ + // eslint-disable-next-line no-unexpected-multiline + "initialize(address,address,bytes)" + ](dConvexETHMetaStrategy.address, deployerAddr, []) ); console.log("Initialized ConvexETHMetaStrategyProxy"); @@ -160,6 +137,7 @@ const deployConvexETHMetaStrategy = async ({ await withConfirmation( cConvexETHMetaStrategy .connect(sDeployer) + // eslint-disable-next-line no-unexpected-multiline [initFunction]( [assetAddresses.CVX, assetAddresses.CRV], [addresses.mainnet.WETH], @@ -258,7 +236,7 @@ const deployHarvesterAndOracleRouter = async ({ }) => { await deployWithConfirmation("OETHOracleRouter"); - const { deployerAddr, governorAddr } = await getNamedAccounts(); + const { deployerAddr } = await getNamedAccounts(); const sDeployer = await ethers.provider.getSigner(deployerAddr); const dHarvesterProxy = await deployWithConfirmation("OETHHarvesterProxy"); const cVaultProxy = await ethers.getContract("OETHVaultProxy"); @@ -348,11 +326,8 @@ const deployHarvesterAndOracleRouter = async ({ // ]; // }; -const deployCurve = async ({ - deployWithConfirmation, - withConfirmation, - ethers, -}) => { +// eslint-disable-next-line no-unused-vars +const deployCurve = async ({ withConfirmation, ethers }) => { if (isMainnet) { throw new Error("This shouldn't happen on the mainnet"); } @@ -371,13 +346,13 @@ const deployCurve = async ({ ); // prettier-ignore - const curveFactoryAbi = [{name: "CryptoPoolDeployed",inputs: [{ name: "token", type: "address", indexed: false },{ name: "coins", type: "address[2]", indexed: false },{ name: "A", type: "uint256", indexed: false },{ name: "gamma", type: "uint256", indexed: false },{ name: "mid_fee", type: "uint256", indexed: false },{ name: "out_fee", type: "uint256", indexed: false },{ name: "allowed_extra_profit", type: "uint256", indexed: false },{ name: "fee_gamma", type: "uint256", indexed: false },{ name: "adjustment_step", type: "uint256", indexed: false },{ name: "admin_fee", type: "uint256", indexed: false },{ name: "ma_half_time", type: "uint256", indexed: false },{ name: "initial_price", type: "uint256", indexed: false },{ name: "deployer", type: "address", indexed: false },],anonymous: false,type: "event",},{name: "LiquidityGaugeDeployed",inputs: [{ name: "pool", type: "address", indexed: false },{ name: "token", type: "address", indexed: false },{ name: "gauge", type: "address", indexed: false },],anonymous: false,type: "event",},{name: "UpdateFeeReceiver",inputs: [{ name: "_old_fee_receiver", type: "address", indexed: false },{ name: "_new_fee_receiver", type: "address", indexed: false },],anonymous: false,type: "event",},{name: "UpdatePoolImplementation",inputs: [{ name: "_old_pool_implementation", type: "address", indexed: false },{ name: "_new_pool_implementation", type: "address", indexed: false },],anonymous: false,type: "event",},{name: "UpdateTokenImplementation",inputs: [{ name: "_old_token_implementation", type: "address", indexed: false },{ name: "_new_token_implementation", type: "address", indexed: false },],anonymous: false,type: "event",},{name: "UpdateGaugeImplementation",inputs: [{ name: "_old_gauge_implementation", type: "address", indexed: false },{ name: "_new_gauge_implementation", type: "address", indexed: false },],anonymous: false,type: "event",},{name: "TransferOwnership",inputs: [{ name: "_old_owner", type: "address", indexed: false },{ name: "_new_owner", type: "address", indexed: false },],anonymous: false,type: "event",},{stateMutability: "nonpayable",type: "constructor",inputs: [{ name: "_fee_receiver", type: "address" },{ name: "_pool_implementation", type: "address" },{ name: "_token_implementation", type: "address" },{ name: "_gauge_implementation", type: "address" },{ name: "_weth", type: "address" },],outputs: [],},{stateMutability: "nonpayable",type: "function",name: "deploy_pool",inputs: [{ name: "_name", type: "string" },{ name: "_symbol", type: "string" },{ name: "_coins", type: "address[2]" },{ name: "A", type: "uint256" },{ name: "gamma", type: "uint256" },{ name: "mid_fee", type: "uint256" },{ name: "out_fee", type: "uint256" },{ name: "allowed_extra_profit", type: "uint256" },{ name: "fee_gamma", type: "uint256" },{ name: "adjustment_step", type: "uint256" },{ name: "admin_fee", type: "uint256" },{ name: "ma_half_time", type: "uint256" },{ name: "initial_price", type: "uint256" },],outputs: [{ name: "", type: "address" }],},{stateMutability: "nonpayable",type: "function",name: "deploy_gauge",inputs: [{ name: "_pool", type: "address" }],outputs: [{ name: "", type: "address" }],},{stateMutability: "nonpayable",type: "function",name: "set_fee_receiver",inputs: [{ name: "_fee_receiver", type: "address" }],outputs: [],},{stateMutability: "nonpayable",type: "function",name: "set_pool_implementation",inputs: [{ name: "_pool_implementation", type: "address" }],outputs: [],},{stateMutability: "nonpayable",type: "function",name: "set_token_implementation",inputs: [{ name: "_token_implementation", type: "address" }],outputs: [],},{stateMutability: "nonpayable",type: "function",name: "set_gauge_implementation",inputs: [{ name: "_gauge_implementation", type: "address" }],outputs: [],},{stateMutability: "nonpayable",type: "function",name: "commit_transfer_ownership",inputs: [{ name: "_addr", type: "address" }],outputs: [],},{stateMutability: "nonpayable",type: "function",name: "accept_transfer_ownership",inputs: [],outputs: [],},{stateMutability: "view",type: "function",name: "find_pool_for_coins",inputs: [{ name: "_from", type: "address" },{ name: "_to", type: "address" },],outputs: [{ name: "", type: "address" }],},{stateMutability: "view",type: "function",name: "find_pool_for_coins",inputs: [{ name: "_from", type: "address" },{ name: "_to", type: "address" },{ name: "i", type: "uint256" },],outputs: [{ name: "", type: "address" }],},{stateMutability: "view",type: "function",name: "get_coins",inputs: [{ name: "_pool", type: "address" }],outputs: [{ name: "", type: "address[2]" }],},{stateMutability: "view",type: "function",name: "get_decimals",inputs: [{ name: "_pool", type: "address" }],outputs: [{ name: "", type: "uint256[2]" }],},{stateMutability: "view",type: "function",name: "get_balances",inputs: [{ name: "_pool", type: "address" }],outputs: [{ name: "", type: "uint256[2]" }],},{stateMutability: "view",type: "function",name: "get_coin_indices",inputs: [{ name: "_pool", type: "address" },{ name: "_from", type: "address" },{ name: "_to", type: "address" },],outputs: [{ name: "", type: "uint256" },{ name: "", type: "uint256" },],},{stateMutability: "view",type: "function",name: "get_gauge",inputs: [{ name: "_pool", type: "address" }],outputs: [{ name: "", type: "address" }],},{stateMutability: "view",type: "function",name: "get_eth_index",inputs: [{ name: "_pool", type: "address" }],outputs: [{ name: "", type: "uint256" }],},{stateMutability: "view",type: "function",name: "get_token",inputs: [{ name: "_pool", type: "address" }],outputs: [{ name: "", type: "address" }],},{stateMutability: "view",type: "function",name: "admin",inputs: [],outputs: [{ name: "", type: "address" }],},{stateMutability: "view",type: "function",name: "future_admin",inputs: [],outputs: [{ name: "", type: "address" }],},{stateMutability: "view",type: "function",name: "fee_receiver",inputs: [],outputs: [{ name: "", type: "address" }],},{stateMutability: "view",type: "function",name: "pool_implementation",inputs: [],outputs: [{ name: "", type: "address" }],},{stateMutability: "view",type: "function",name: "token_implementation",inputs: [],outputs: [{ name: "", type: "address" }],},{stateMutability: "view",type: "function",name: "gauge_implementation",inputs: [],outputs: [{ name: "", type: "address" }],},{stateMutability: "view",type: "function",name: "pool_count",inputs: [],outputs: [{ name: "", type: "uint256" }],},{stateMutability: "view",type: "function",name: "pool_list",inputs: [{ name: "arg0", type: "uint256" }],outputs: [{ name: "", type: "address" }]}]; + // const curveFactoryAbi = [{name: "CryptoPoolDeployed",inputs: [{ name: "token", type: "address", indexed: false },{ name: "coins", type: "address[2]", indexed: false },{ name: "A", type: "uint256", indexed: false },{ name: "gamma", type: "uint256", indexed: false },{ name: "mid_fee", type: "uint256", indexed: false },{ name: "out_fee", type: "uint256", indexed: false },{ name: "allowed_extra_profit", type: "uint256", indexed: false },{ name: "fee_gamma", type: "uint256", indexed: false },{ name: "adjustment_step", type: "uint256", indexed: false },{ name: "admin_fee", type: "uint256", indexed: false },{ name: "ma_half_time", type: "uint256", indexed: false },{ name: "initial_price", type: "uint256", indexed: false },{ name: "deployer", type: "address", indexed: false },],anonymous: false,type: "event",},{name: "LiquidityGaugeDeployed",inputs: [{ name: "pool", type: "address", indexed: false },{ name: "token", type: "address", indexed: false },{ name: "gauge", type: "address", indexed: false },],anonymous: false,type: "event",},{name: "UpdateFeeReceiver",inputs: [{ name: "_old_fee_receiver", type: "address", indexed: false },{ name: "_new_fee_receiver", type: "address", indexed: false },],anonymous: false,type: "event",},{name: "UpdatePoolImplementation",inputs: [{ name: "_old_pool_implementation", type: "address", indexed: false },{ name: "_new_pool_implementation", type: "address", indexed: false },],anonymous: false,type: "event",},{name: "UpdateTokenImplementation",inputs: [{ name: "_old_token_implementation", type: "address", indexed: false },{ name: "_new_token_implementation", type: "address", indexed: false },],anonymous: false,type: "event",},{name: "UpdateGaugeImplementation",inputs: [{ name: "_old_gauge_implementation", type: "address", indexed: false },{ name: "_new_gauge_implementation", type: "address", indexed: false },],anonymous: false,type: "event",},{name: "TransferOwnership",inputs: [{ name: "_old_owner", type: "address", indexed: false },{ name: "_new_owner", type: "address", indexed: false },],anonymous: false,type: "event",},{stateMutability: "nonpayable",type: "constructor",inputs: [{ name: "_fee_receiver", type: "address" },{ name: "_pool_implementation", type: "address" },{ name: "_token_implementation", type: "address" },{ name: "_gauge_implementation", type: "address" },{ name: "_weth", type: "address" },],outputs: [],},{stateMutability: "nonpayable",type: "function",name: "deploy_pool",inputs: [{ name: "_name", type: "string" },{ name: "_symbol", type: "string" },{ name: "_coins", type: "address[2]" },{ name: "A", type: "uint256" },{ name: "gamma", type: "uint256" },{ name: "mid_fee", type: "uint256" },{ name: "out_fee", type: "uint256" },{ name: "allowed_extra_profit", type: "uint256" },{ name: "fee_gamma", type: "uint256" },{ name: "adjustment_step", type: "uint256" },{ name: "admin_fee", type: "uint256" },{ name: "ma_half_time", type: "uint256" },{ name: "initial_price", type: "uint256" },],outputs: [{ name: "", type: "address" }],},{stateMutability: "nonpayable",type: "function",name: "deploy_gauge",inputs: [{ name: "_pool", type: "address" }],outputs: [{ name: "", type: "address" }],},{stateMutability: "nonpayable",type: "function",name: "set_fee_receiver",inputs: [{ name: "_fee_receiver", type: "address" }],outputs: [],},{stateMutability: "nonpayable",type: "function",name: "set_pool_implementation",inputs: [{ name: "_pool_implementation", type: "address" }],outputs: [],},{stateMutability: "nonpayable",type: "function",name: "set_token_implementation",inputs: [{ name: "_token_implementation", type: "address" }],outputs: [],},{stateMutability: "nonpayable",type: "function",name: "set_gauge_implementation",inputs: [{ name: "_gauge_implementation", type: "address" }],outputs: [],},{stateMutability: "nonpayable",type: "function",name: "commit_transfer_ownership",inputs: [{ name: "_addr", type: "address" }],outputs: [],},{stateMutability: "nonpayable",type: "function",name: "accept_transfer_ownership",inputs: [],outputs: [],},{stateMutability: "view",type: "function",name: "find_pool_for_coins",inputs: [{ name: "_from", type: "address" },{ name: "_to", type: "address" },],outputs: [{ name: "", type: "address" }],},{stateMutability: "view",type: "function",name: "find_pool_for_coins",inputs: [{ name: "_from", type: "address" },{ name: "_to", type: "address" },{ name: "i", type: "uint256" },],outputs: [{ name: "", type: "address" }],},{stateMutability: "view",type: "function",name: "get_coins",inputs: [{ name: "_pool", type: "address" }],outputs: [{ name: "", type: "address[2]" }],},{stateMutability: "view",type: "function",name: "get_decimals",inputs: [{ name: "_pool", type: "address" }],outputs: [{ name: "", type: "uint256[2]" }],},{stateMutability: "view",type: "function",name: "get_balances",inputs: [{ name: "_pool", type: "address" }],outputs: [{ name: "", type: "uint256[2]" }],},{stateMutability: "view",type: "function",name: "get_coin_indices",inputs: [{ name: "_pool", type: "address" },{ name: "_from", type: "address" },{ name: "_to", type: "address" },],outputs: [{ name: "", type: "uint256" },{ name: "", type: "uint256" },],},{stateMutability: "view",type: "function",name: "get_gauge",inputs: [{ name: "_pool", type: "address" }],outputs: [{ name: "", type: "address" }],},{stateMutability: "view",type: "function",name: "get_eth_index",inputs: [{ name: "_pool", type: "address" }],outputs: [{ name: "", type: "uint256" }],},{stateMutability: "view",type: "function",name: "get_token",inputs: [{ name: "_pool", type: "address" }],outputs: [{ name: "", type: "address" }],},{stateMutability: "view",type: "function",name: "admin",inputs: [],outputs: [{ name: "", type: "address" }],},{stateMutability: "view",type: "function",name: "future_admin",inputs: [],outputs: [{ name: "", type: "address" }],},{stateMutability: "view",type: "function",name: "fee_receiver",inputs: [],outputs: [{ name: "", type: "address" }],},{stateMutability: "view",type: "function",name: "pool_implementation",inputs: [],outputs: [{ name: "", type: "address" }],},{stateMutability: "view",type: "function",name: "token_implementation",inputs: [],outputs: [{ name: "", type: "address" }],},{stateMutability: "view",type: "function",name: "gauge_implementation",inputs: [],outputs: [{ name: "", type: "address" }],},{stateMutability: "view",type: "function",name: "pool_count",inputs: [],outputs: [{ name: "", type: "uint256" }],},{stateMutability: "view",type: "function",name: "pool_list",inputs: [{ name: "arg0", type: "uint256" }],outputs: [{ name: "", type: "address" }]}]; // prettier-ignore const convexPoolManagerAbi = [{inputs: [{ internalType: "address", name: "_pools", type: "address" }],stateMutability: "nonpayable",type: "constructor",},{inputs: [{ internalType: "address", name: "_gauge", type: "address" },{ internalType: "uint256", name: "_stashVersion", type: "uint256" },],name: "addPool",outputs: [{ internalType: "bool", name: "", type: "bool" }],stateMutability: "nonpayable",type: "function",},{inputs: [{ internalType: "address", name: "_gauge", type: "address" }],name: "addPool",outputs: [{ internalType: "bool", name: "", type: "bool" }],stateMutability: "nonpayable",type: "function",},{inputs: [{ internalType: "address", name: "", type: "address" }],name: "blockList",outputs: [{ internalType: "bool", name: "", type: "bool" }],stateMutability: "view",type: "function",},{inputs: [{ internalType: "address", name: "_lptoken", type: "address" },{ internalType: "address", name: "_gauge", type: "address" },{ internalType: "uint256", name: "_stashVersion", type: "uint256" },],name: "forceAddPool",outputs: [{ internalType: "bool", name: "", type: "bool" }],stateMutability: "nonpayable",type: "function",},{inputs: [],name: "gaugeController",outputs: [{ internalType: "address", name: "", type: "address" }],stateMutability: "view",type: "function",},{inputs: [],name: "operator",outputs: [{ internalType: "address", name: "", type: "address" }],stateMutability: "view",type: "function",},{inputs: [],name: "pools",outputs: [{ internalType: "address", name: "", type: "address" }],stateMutability: "view",type: "function",},{inputs: [],name: "postAddHook",outputs: [{ internalType: "address", name: "", type: "address" }],stateMutability: "view",type: "function",},{inputs: [{ internalType: "address", name: "_operator", type: "address" }],name: "setOperator",outputs: [],stateMutability: "nonpayable",type: "function",},{inputs: [{ internalType: "address", name: "_hook", type: "address" }],name: "setPostAddHook",outputs: [],stateMutability: "nonpayable",type: "function",},{inputs: [{ internalType: "uint256", name: "_pid", type: "uint256" }],name: "shutdownPool",outputs: [{ internalType: "bool", name: "", type: "bool" }],stateMutability: "nonpayable",type: "function"}]; // prettier-ignore const curveGaugeFactoryAbi = [{name: "SetManager",inputs: [{ name: "_manager", type: "address", indexed: true }],anonymous: false,type: "event",},{name: "SetGaugeManager",inputs: [{ name: "_gauge", type: "address", indexed: true },{ name: "_gauge_manager", type: "address", indexed: true },],anonymous: false,type: "event",},{stateMutability: "nonpayable",type: "constructor",inputs: [{ name: "_factory", type: "address" },{ name: "_manager", type: "address" },],outputs: [],},{stateMutability: "nonpayable",type: "function",name: "add_reward",inputs: [{ name: "_gauge", type: "address" },{ name: "_reward_token", type: "address" },{ name: "_distributor", type: "address" },],outputs: [],},{stateMutability: "nonpayable",type: "function",name: "set_reward_distributor",inputs: [{ name: "_gauge", type: "address" },{ name: "_reward_token", type: "address" },{ name: "_distributor", type: "address" },],outputs: [],},{stateMutability: "nonpayable",type: "function",name: "deploy_gauge",inputs: [{ name: "_pool", type: "address" }],outputs: [{ name: "", type: "address" }],},{stateMutability: "nonpayable",type: "function",name: "deploy_gauge",inputs: [{ name: "_pool", type: "address" },{ name: "_gauge_manager", type: "address" },],outputs: [{ name: "", type: "address" }],},{stateMutability: "nonpayable",type: "function",name: "set_gauge_manager",inputs: [{ name: "_gauge", type: "address" },{ name: "_gauge_manager", type: "address" },],outputs: [],},{stateMutability: "nonpayable",type: "function",name: "set_manager",inputs: [{ name: "_manager", type: "address" }],outputs: [],},{stateMutability: "pure",type: "function",name: "factory",inputs: [],outputs: [{ name: "", type: "address" }],},{stateMutability: "pure",type: "function",name: "owner_proxy",inputs: [],outputs: [{ name: "", type: "address" }],},{stateMutability: "view",type: "function",name: "gauge_manager",inputs: [{ name: "arg0", type: "address" }],outputs: [{ name: "", type: "address" }],},{stateMutability: "view",type: "function",name: "manager",inputs: [],outputs: [{ name: "", type: "address" }]}]; // prettier-ignore - const curveGaugeAbi = [{name: "Deposit",inputs: [{ name: "provider", type: "address", indexed: true },{ name: "value", type: "uint256", indexed: false },],anonymous: false,type: "event",},{name: "Withdraw",inputs: [{ name: "provider", type: "address", indexed: true },{ name: "value", type: "uint256", indexed: false },],anonymous: false,type: "event",},{name: "UpdateLiquidityLimit",inputs: [{ name: "user", type: "address", indexed: false },{ name: "original_balance", type: "uint256", indexed: false },{ name: "original_supply", type: "uint256", indexed: false },{ name: "working_balance", type: "uint256", indexed: false },{ name: "working_supply", type: "uint256", indexed: false },],anonymous: false,type: "event",},{name: "CommitOwnership",inputs: [{ name: "admin", type: "address", indexed: false }],anonymous: false,type: "event",},{name: "ApplyOwnership",inputs: [{ name: "admin", type: "address", indexed: false }],anonymous: false,type: "event",},{name: "Transfer",inputs: [{ name: "_from", type: "address", indexed: true },{ name: "_to", type: "address", indexed: true },{ name: "_value", type: "uint256", indexed: false },],anonymous: false,type: "event",},{name: "Approval",inputs: [{ name: "_owner", type: "address", indexed: true },{ name: "_spender", type: "address", indexed: true },{ name: "_value", type: "uint256", indexed: false },],anonymous: false,type: "event",},{stateMutability: "nonpayable",type: "constructor",inputs: [],outputs: [],},{stateMutability: "nonpayable",type: "function",name: "initialize",inputs: [{ name: "_lp_token", type: "address" }],outputs: [],gas: 374587,},{stateMutability: "view",type: "function",name: "decimals",inputs: [],outputs: [{ name: "", type: "uint256" }],gas: 318,},{stateMutability: "view",type: "function",name: "integrate_checkpoint",inputs: [],outputs: [{ name: "", type: "uint256" }],gas: 4590,},{stateMutability: "nonpayable",type: "function",name: "user_checkpoint",inputs: [{ name: "addr", type: "address" }],outputs: [{ name: "", type: "bool" }],gas: 3123886,},{stateMutability: "nonpayable",type: "function",name: "claimable_tokens",inputs: [{ name: "addr", type: "address" }],outputs: [{ name: "", type: "uint256" }],gas: 3038676,},{stateMutability: "view",type: "function",name: "claimed_reward",inputs: [{ name: "_addr", type: "address" },{ name: "_token", type: "address" },],outputs: [{ name: "", type: "uint256" }],gas: 3036,},{stateMutability: "view",type: "function",name: "claimable_reward",inputs: [{ name: "_user", type: "address" },{ name: "_reward_token", type: "address" },],outputs: [{ name: "", type: "uint256" }],gas: 20255,},{stateMutability: "nonpayable",type: "function",name: "set_rewards_receiver",inputs: [{ name: "_receiver", type: "address" }],outputs: [],gas: 35673,},{stateMutability: "nonpayable",type: "function",name: "claim_rewards",inputs: [],outputs: [],},{stateMutability: "nonpayable",type: "function",name: "claim_rewards",inputs: [{ name: "_addr", type: "address" }],outputs: [],},{stateMutability: "nonpayable",type: "function",name: "claim_rewards",inputs: [{ name: "_addr", type: "address" },{ name: "_receiver", type: "address" },],outputs: [],},{stateMutability: "nonpayable",type: "function",name: "kick",inputs: [{ name: "addr", type: "address" }],outputs: [],gas: 3137977,},{stateMutability: "nonpayable",type: "function",name: "deposit",inputs: [{ name: "_value", type: "uint256" }],outputs: [],},{stateMutability: "nonpayable",type: "function",name: "deposit",inputs: [{ name: "_value", type: "uint256" },{ name: "_addr", type: "address" },],outputs: [],},{stateMutability: "nonpayable",type: "function",name: "deposit",inputs: [{ name: "_value", type: "uint256" },{ name: "_addr", type: "address" },{ name: "_claim_rewards", type: "bool" },],outputs: [],},{stateMutability: "nonpayable",type: "function",name: "withdraw",inputs: [{ name: "_value", type: "uint256" }],outputs: [],},{stateMutability: "nonpayable",type: "function",name: "withdraw",inputs: [{ name: "_value", type: "uint256" },{ name: "_claim_rewards", type: "bool" },],outputs: [],},{stateMutability: "nonpayable",type: "function",name: "transfer",inputs: [{ name: "_to", type: "address" },{ name: "_value", type: "uint256" },],outputs: [{ name: "", type: "bool" }],gas: 18062826,},{stateMutability: "nonpayable",type: "function",name: "transferFrom",inputs: [{ name: "_from", type: "address" },{ name: "_to", type: "address" },{ name: "_value", type: "uint256" },],outputs: [{ name: "", type: "bool" }],gas: 18100776,},{stateMutability: "nonpayable",type: "function",name: "approve",inputs: [{ name: "_spender", type: "address" },{ name: "_value", type: "uint256" },],outputs: [{ name: "", type: "bool" }],gas: 38151,},{stateMutability: "nonpayable",type: "function",name: "increaseAllowance",inputs: [{ name: "_spender", type: "address" },{ name: "_added_value", type: "uint256" },],outputs: [{ name: "", type: "bool" }],gas: 40695,},{stateMutability: "nonpayable",type: "function",name: "decreaseAllowance",inputs: [{ name: "_spender", type: "address" },{ name: "_subtracted_value", type: "uint256" },],outputs: [{ name: "", type: "bool" }],gas: 40719,},{stateMutability: "nonpayable",type: "function",name: "add_reward",inputs: [{ name: "_reward_token", type: "address" },{ name: "_distributor", type: "address" },],outputs: [],gas: 115414,},{stateMutability: "nonpayable",type: "function",name: "set_reward_distributor",inputs: [{ name: "_reward_token", type: "address" },{ name: "_distributor", type: "address" },],outputs: [],gas: 43179,},{stateMutability: "nonpayable",type: "function",name: "deposit_reward_token",inputs: [{ name: "_reward_token", type: "address" },{ name: "_amount", type: "uint256" },],outputs: [],gas: 1540067,},{stateMutability: "nonpayable",type: "function",name: "set_killed",inputs: [{ name: "_is_killed", type: "bool" }],outputs: [],gas: 40529,},{stateMutability: "view",type: "function",name: "lp_token",inputs: [],outputs: [{ name: "", type: "address" }],gas: 3018,},{stateMutability: "view",type: "function",name: "future_epoch_time",inputs: [],outputs: [{ name: "", type: "uint256" }],gas: 3048,},{stateMutability: "view",type: "function",name: "balanceOf",inputs: [{ name: "arg0", type: "address" }],outputs: [{ name: "", type: "uint256" }],gas: 3293,},{stateMutability: "view",type: "function",name: "totalSupply",inputs: [],outputs: [{ name: "", type: "uint256" }],gas: 3108,},{stateMutability: "view",type: "function",name: "allowance",inputs: [{ name: "arg0", type: "address" },{ name: "arg1", type: "address" },],outputs: [{ name: "", type: "uint256" }],gas: 3568,},{stateMutability: "view",type: "function",name: "name",inputs: [],outputs: [{ name: "", type: "string" }],gas: 13398,},{stateMutability: "view",type: "function",name: "symbol",inputs: [],outputs: [{ name: "", type: "string" }],gas: 11151,},{stateMutability: "view",type: "function",name: "working_balances",inputs: [{ name: "arg0", type: "address" }],outputs: [{ name: "", type: "uint256" }],gas: 3443,},{stateMutability: "view",type: "function",name: "working_supply",inputs: [],outputs: [{ name: "", type: "uint256" }],gas: 3258,},{stateMutability: "view",type: "function",name: "period",inputs: [],outputs: [{ name: "", type: "int128" }],gas: 3288,},{stateMutability: "view",type: "function",name: "period_timestamp",inputs: [{ name: "arg0", type: "uint256" }],outputs: [{ name: "", type: "uint256" }],gas: 3363,},{stateMutability: "view",type: "function",name: "integrate_inv_supply",inputs: [{ name: "arg0", type: "uint256" }],outputs: [{ name: "", type: "uint256" }],gas: 3393,},{stateMutability: "view",type: "function",name: "integrate_inv_supply_of",inputs: [{ name: "arg0", type: "address" }],outputs: [{ name: "", type: "uint256" }],gas: 3593,},{stateMutability: "view",type: "function",name: "integrate_checkpoint_of",inputs: [{ name: "arg0", type: "address" }],outputs: [{ name: "", type: "uint256" }],gas: 3623,},{stateMutability: "view",type: "function",name: "integrate_fraction",inputs: [{ name: "arg0", type: "address" }],outputs: [{ name: "", type: "uint256" }],gas: 3653,},{stateMutability: "view",type: "function",name: "inflation_rate",inputs: [],outputs: [{ name: "", type: "uint256" }],gas: 3468,},{stateMutability: "view",type: "function",name: "reward_count",inputs: [],outputs: [{ name: "", type: "uint256" }],gas: 3498,},{stateMutability: "view",type: "function",name: "reward_tokens",inputs: [{ name: "arg0", type: "uint256" }],outputs: [{ name: "", type: "address" }],gas: 3573,},{stateMutability: "view",type: "function",name: "reward_data",inputs: [{ name: "arg0", type: "address" }],outputs: [{ name: "token", type: "address" },{ name: "distributor", type: "address" },{ name: "period_finish", type: "uint256" },{ name: "rate", type: "uint256" },{ name: "last_update", type: "uint256" },{ name: "integral", type: "uint256" },],gas: 15003,},{stateMutability: "view",type: "function",name: "rewards_receiver",inputs: [{ name: "arg0", type: "address" }],outputs: [{ name: "", type: "address" }],gas: 3803,},{stateMutability: "view",type: "function",name: "reward_integral_for",inputs: [{ name: "arg0", type: "address" },{ name: "arg1", type: "address" },],outputs: [{ name: "", type: "uint256" }],gas: 4048,},{stateMutability: "view",type: "function",name: "is_killed",inputs: [],outputs: [{ name: "", type: "bool" }],gas: 3648,},{stateMutability: "view",type: "function",name: "factory",inputs: [],outputs: [{ name: "", type: "address" }],gas: 3678,},]; + // const curveGaugeAbi = [{name: "Deposit",inputs: [{ name: "provider", type: "address", indexed: true },{ name: "value", type: "uint256", indexed: false },],anonymous: false,type: "event",},{name: "Withdraw",inputs: [{ name: "provider", type: "address", indexed: true },{ name: "value", type: "uint256", indexed: false },],anonymous: false,type: "event",},{name: "UpdateLiquidityLimit",inputs: [{ name: "user", type: "address", indexed: false },{ name: "original_balance", type: "uint256", indexed: false },{ name: "original_supply", type: "uint256", indexed: false },{ name: "working_balance", type: "uint256", indexed: false },{ name: "working_supply", type: "uint256", indexed: false },],anonymous: false,type: "event",},{name: "CommitOwnership",inputs: [{ name: "admin", type: "address", indexed: false }],anonymous: false,type: "event",},{name: "ApplyOwnership",inputs: [{ name: "admin", type: "address", indexed: false }],anonymous: false,type: "event",},{name: "Transfer",inputs: [{ name: "_from", type: "address", indexed: true },{ name: "_to", type: "address", indexed: true },{ name: "_value", type: "uint256", indexed: false },],anonymous: false,type: "event",},{name: "Approval",inputs: [{ name: "_owner", type: "address", indexed: true },{ name: "_spender", type: "address", indexed: true },{ name: "_value", type: "uint256", indexed: false },],anonymous: false,type: "event",},{stateMutability: "nonpayable",type: "constructor",inputs: [],outputs: [],},{stateMutability: "nonpayable",type: "function",name: "initialize",inputs: [{ name: "_lp_token", type: "address" }],outputs: [],gas: 374587,},{stateMutability: "view",type: "function",name: "decimals",inputs: [],outputs: [{ name: "", type: "uint256" }],gas: 318,},{stateMutability: "view",type: "function",name: "integrate_checkpoint",inputs: [],outputs: [{ name: "", type: "uint256" }],gas: 4590,},{stateMutability: "nonpayable",type: "function",name: "user_checkpoint",inputs: [{ name: "addr", type: "address" }],outputs: [{ name: "", type: "bool" }],gas: 3123886,},{stateMutability: "nonpayable",type: "function",name: "claimable_tokens",inputs: [{ name: "addr", type: "address" }],outputs: [{ name: "", type: "uint256" }],gas: 3038676,},{stateMutability: "view",type: "function",name: "claimed_reward",inputs: [{ name: "_addr", type: "address" },{ name: "_token", type: "address" },],outputs: [{ name: "", type: "uint256" }],gas: 3036,},{stateMutability: "view",type: "function",name: "claimable_reward",inputs: [{ name: "_user", type: "address" },{ name: "_reward_token", type: "address" },],outputs: [{ name: "", type: "uint256" }],gas: 20255,},{stateMutability: "nonpayable",type: "function",name: "set_rewards_receiver",inputs: [{ name: "_receiver", type: "address" }],outputs: [],gas: 35673,},{stateMutability: "nonpayable",type: "function",name: "claim_rewards",inputs: [],outputs: [],},{stateMutability: "nonpayable",type: "function",name: "claim_rewards",inputs: [{ name: "_addr", type: "address" }],outputs: [],},{stateMutability: "nonpayable",type: "function",name: "claim_rewards",inputs: [{ name: "_addr", type: "address" },{ name: "_receiver", type: "address" },],outputs: [],},{stateMutability: "nonpayable",type: "function",name: "kick",inputs: [{ name: "addr", type: "address" }],outputs: [],gas: 3137977,},{stateMutability: "nonpayable",type: "function",name: "deposit",inputs: [{ name: "_value", type: "uint256" }],outputs: [],},{stateMutability: "nonpayable",type: "function",name: "deposit",inputs: [{ name: "_value", type: "uint256" },{ name: "_addr", type: "address" },],outputs: [],},{stateMutability: "nonpayable",type: "function",name: "deposit",inputs: [{ name: "_value", type: "uint256" },{ name: "_addr", type: "address" },{ name: "_claim_rewards", type: "bool" },],outputs: [],},{stateMutability: "nonpayable",type: "function",name: "withdraw",inputs: [{ name: "_value", type: "uint256" }],outputs: [],},{stateMutability: "nonpayable",type: "function",name: "withdraw",inputs: [{ name: "_value", type: "uint256" },{ name: "_claim_rewards", type: "bool" },],outputs: [],},{stateMutability: "nonpayable",type: "function",name: "transfer",inputs: [{ name: "_to", type: "address" },{ name: "_value", type: "uint256" },],outputs: [{ name: "", type: "bool" }],gas: 18062826,},{stateMutability: "nonpayable",type: "function",name: "transferFrom",inputs: [{ name: "_from", type: "address" },{ name: "_to", type: "address" },{ name: "_value", type: "uint256" },],outputs: [{ name: "", type: "bool" }],gas: 18100776,},{stateMutability: "nonpayable",type: "function",name: "approve",inputs: [{ name: "_spender", type: "address" },{ name: "_value", type: "uint256" },],outputs: [{ name: "", type: "bool" }],gas: 38151,},{stateMutability: "nonpayable",type: "function",name: "increaseAllowance",inputs: [{ name: "_spender", type: "address" },{ name: "_added_value", type: "uint256" },],outputs: [{ name: "", type: "bool" }],gas: 40695,},{stateMutability: "nonpayable",type: "function",name: "decreaseAllowance",inputs: [{ name: "_spender", type: "address" },{ name: "_subtracted_value", type: "uint256" },],outputs: [{ name: "", type: "bool" }],gas: 40719,},{stateMutability: "nonpayable",type: "function",name: "add_reward",inputs: [{ name: "_reward_token", type: "address" },{ name: "_distributor", type: "address" },],outputs: [],gas: 115414,},{stateMutability: "nonpayable",type: "function",name: "set_reward_distributor",inputs: [{ name: "_reward_token", type: "address" },{ name: "_distributor", type: "address" },],outputs: [],gas: 43179,},{stateMutability: "nonpayable",type: "function",name: "deposit_reward_token",inputs: [{ name: "_reward_token", type: "address" },{ name: "_amount", type: "uint256" },],outputs: [],gas: 1540067,},{stateMutability: "nonpayable",type: "function",name: "set_killed",inputs: [{ name: "_is_killed", type: "bool" }],outputs: [],gas: 40529,},{stateMutability: "view",type: "function",name: "lp_token",inputs: [],outputs: [{ name: "", type: "address" }],gas: 3018,},{stateMutability: "view",type: "function",name: "future_epoch_time",inputs: [],outputs: [{ name: "", type: "uint256" }],gas: 3048,},{stateMutability: "view",type: "function",name: "balanceOf",inputs: [{ name: "arg0", type: "address" }],outputs: [{ name: "", type: "uint256" }],gas: 3293,},{stateMutability: "view",type: "function",name: "totalSupply",inputs: [],outputs: [{ name: "", type: "uint256" }],gas: 3108,},{stateMutability: "view",type: "function",name: "allowance",inputs: [{ name: "arg0", type: "address" },{ name: "arg1", type: "address" },],outputs: [{ name: "", type: "uint256" }],gas: 3568,},{stateMutability: "view",type: "function",name: "name",inputs: [],outputs: [{ name: "", type: "string" }],gas: 13398,},{stateMutability: "view",type: "function",name: "symbol",inputs: [],outputs: [{ name: "", type: "string" }],gas: 11151,},{stateMutability: "view",type: "function",name: "working_balances",inputs: [{ name: "arg0", type: "address" }],outputs: [{ name: "", type: "uint256" }],gas: 3443,},{stateMutability: "view",type: "function",name: "working_supply",inputs: [],outputs: [{ name: "", type: "uint256" }],gas: 3258,},{stateMutability: "view",type: "function",name: "period",inputs: [],outputs: [{ name: "", type: "int128" }],gas: 3288,},{stateMutability: "view",type: "function",name: "period_timestamp",inputs: [{ name: "arg0", type: "uint256" }],outputs: [{ name: "", type: "uint256" }],gas: 3363,},{stateMutability: "view",type: "function",name: "integrate_inv_supply",inputs: [{ name: "arg0", type: "uint256" }],outputs: [{ name: "", type: "uint256" }],gas: 3393,},{stateMutability: "view",type: "function",name: "integrate_inv_supply_of",inputs: [{ name: "arg0", type: "address" }],outputs: [{ name: "", type: "uint256" }],gas: 3593,},{stateMutability: "view",type: "function",name: "integrate_checkpoint_of",inputs: [{ name: "arg0", type: "address" }],outputs: [{ name: "", type: "uint256" }],gas: 3623,},{stateMutability: "view",type: "function",name: "integrate_fraction",inputs: [{ name: "arg0", type: "address" }],outputs: [{ name: "", type: "uint256" }],gas: 3653,},{stateMutability: "view",type: "function",name: "inflation_rate",inputs: [],outputs: [{ name: "", type: "uint256" }],gas: 3468,},{stateMutability: "view",type: "function",name: "reward_count",inputs: [],outputs: [{ name: "", type: "uint256" }],gas: 3498,},{stateMutability: "view",type: "function",name: "reward_tokens",inputs: [{ name: "arg0", type: "uint256" }],outputs: [{ name: "", type: "address" }],gas: 3573,},{stateMutability: "view",type: "function",name: "reward_data",inputs: [{ name: "arg0", type: "address" }],outputs: [{ name: "token", type: "address" },{ name: "distributor", type: "address" },{ name: "period_finish", type: "uint256" },{ name: "rate", type: "uint256" },{ name: "last_update", type: "uint256" },{ name: "integral", type: "uint256" },],gas: 15003,},{stateMutability: "view",type: "function",name: "rewards_receiver",inputs: [{ name: "arg0", type: "address" }],outputs: [{ name: "", type: "address" }],gas: 3803,},{stateMutability: "view",type: "function",name: "reward_integral_for",inputs: [{ name: "arg0", type: "address" },{ name: "arg1", type: "address" },],outputs: [{ name: "", type: "uint256" }],gas: 4048,},{stateMutability: "view",type: "function",name: "is_killed",inputs: [],outputs: [{ name: "", type: "bool" }],gas: 3648,},{stateMutability: "view",type: "function",name: "factory",inputs: [],outputs: [{ name: "", type: "address" }],gas: 3678,},]; // prettier-ignore const gaugeControllerAbi = [{name: "CommitOwnership",inputs: [{ type: "address", name: "admin", indexed: false }],anonymous: false,type: "event",},{name: "ApplyOwnership",inputs: [{ type: "address", name: "admin", indexed: false }],anonymous: false,type: "event",},{name: "AddType",inputs: [{ type: "string", name: "name", indexed: false },{ type: "int128", name: "type_id", indexed: false },],anonymous: false,type: "event",},{name: "NewTypeWeight",inputs: [{ type: "int128", name: "type_id", indexed: false },{ type: "uint256", name: "time", indexed: false },{ type: "uint256", name: "weight", indexed: false },{ type: "uint256", name: "total_weight", indexed: false },],anonymous: false,type: "event",},{name: "NewGaugeWeight",inputs: [{ type: "address", name: "gauge_address", indexed: false },{ type: "uint256", name: "time", indexed: false },{ type: "uint256", name: "weight", indexed: false },{ type: "uint256", name: "total_weight", indexed: false },],anonymous: false,type: "event",},{name: "VoteForGauge",inputs: [{ type: "uint256", name: "time", indexed: false },{ type: "address", name: "user", indexed: false },{ type: "address", name: "gauge_addr", indexed: false },{ type: "uint256", name: "weight", indexed: false },],anonymous: false,type: "event",},{name: "NewGauge",inputs: [{ type: "address", name: "addr", indexed: false },{ type: "int128", name: "gauge_type", indexed: false },{ type: "uint256", name: "weight", indexed: false },],anonymous: false,type: "event",},{outputs: [],inputs: [{ type: "address", name: "_token" },{ type: "address", name: "_voting_escrow" },],stateMutability: "nonpayable",type: "constructor",},{name: "commit_transfer_ownership",outputs: [],inputs: [{ type: "address", name: "addr" }],stateMutability: "nonpayable",type: "function",gas: 37597,},{name: "apply_transfer_ownership",outputs: [],inputs: [],stateMutability: "nonpayable",type: "function",gas: 38497,},{name: "gauge_types",outputs: [{ type: "int128", name: "" }],inputs: [{ type: "address", name: "_addr" }],stateMutability: "view",type: "function",gas: 1625,},{name: "add_gauge",outputs: [],inputs: [{ type: "address", name: "addr" },{ type: "int128", name: "gauge_type" },],stateMutability: "nonpayable",type: "function",},{name: "add_gauge",outputs: [],inputs: [{ type: "address", name: "addr" },{ type: "int128", name: "gauge_type" },{ type: "uint256", name: "weight" },],stateMutability: "nonpayable",type: "function",},{name: "checkpoint",outputs: [],inputs: [],stateMutability: "nonpayable",type: "function",gas: 18033784416,},{name: "checkpoint_gauge",outputs: [],inputs: [{ type: "address", name: "addr" }],stateMutability: "nonpayable",type: "function",gas: 18087678795,},{name: "gauge_relative_weight",outputs: [{ type: "uint256", name: "" }],inputs: [{ type: "address", name: "addr" }],stateMutability: "view",type: "function",},{name: "gauge_relative_weight",outputs: [{ type: "uint256", name: "" }],inputs: [{ type: "address", name: "addr" },{ type: "uint256", name: "time" },],stateMutability: "view",type: "function",},{name: "gauge_relative_weight_write",outputs: [{ type: "uint256", name: "" }],inputs: [{ type: "address", name: "addr" }],stateMutability: "nonpayable",type: "function",},{name: "gauge_relative_weight_write",outputs: [{ type: "uint256", name: "" }],inputs: [{ type: "address", name: "addr" },{ type: "uint256", name: "time" },],stateMutability: "nonpayable",type: "function",},{name: "add_type",outputs: [],inputs: [{ type: "string", name: "_name" }],stateMutability: "nonpayable",type: "function",},{name: "add_type",outputs: [],inputs: [{ type: "string", name: "_name" },{ type: "uint256", name: "weight" },],stateMutability: "nonpayable",type: "function",},{name: "change_type_weight",outputs: [],inputs: [{ type: "int128", name: "type_id" },{ type: "uint256", name: "weight" },],stateMutability: "nonpayable",type: "function",gas: 36246310050,},{name: "change_gauge_weight",outputs: [],inputs: [{ type: "address", name: "addr" },{ type: "uint256", name: "weight" },],stateMutability: "nonpayable",type: "function",gas: 36354170809,},{name: "vote_for_gauge_weights",outputs: [],inputs: [{ type: "address", name: "_gauge_addr" },{ type: "uint256", name: "_user_weight" },],stateMutability: "nonpayable",type: "function",gas: 18142052127,},{name: "get_gauge_weight",outputs: [{ type: "uint256", name: "" }],inputs: [{ type: "address", name: "addr" }],stateMutability: "view",type: "function",gas: 2974,},{name: "get_type_weight",outputs: [{ type: "uint256", name: "" }],inputs: [{ type: "int128", name: "type_id" }],stateMutability: "view",type: "function",gas: 2977,},{name: "get_total_weight",outputs: [{ type: "uint256", name: "" }],inputs: [],stateMutability: "view",type: "function",gas: 2693,},{name: "get_weights_sum_per_type",outputs: [{ type: "uint256", name: "" }],inputs: [{ type: "int128", name: "type_id" }],stateMutability: "view",type: "function",gas: 3109,},{name: "admin",outputs: [{ type: "address", name: "" }],inputs: [],stateMutability: "view",type: "function",gas: 1841,},{name: "future_admin",outputs: [{ type: "address", name: "" }],inputs: [],stateMutability: "view",type: "function",gas: 1871,},{name: "token",outputs: [{ type: "address", name: "" }],inputs: [],stateMutability: "view",type: "function",gas: 1901,},{name: "voting_escrow",outputs: [{ type: "address", name: "" }],inputs: [],stateMutability: "view",type: "function",gas: 1931,},{name: "n_gauge_types",outputs: [{ type: "int128", name: "" }],inputs: [],stateMutability: "view",type: "function",gas: 1961,},{name: "n_gauges",outputs: [{ type: "int128", name: "" }],inputs: [],stateMutability: "view",type: "function",gas: 1991,},{name: "gauge_type_names",outputs: [{ type: "string", name: "" }],inputs: [{ type: "int128", name: "arg0" }],stateMutability: "view",type: "function",gas: 8628,},{name: "gauges",outputs: [{ type: "address", name: "" }],inputs: [{ type: "uint256", name: "arg0" }],stateMutability: "view",type: "function",gas: 2160,},{name: "vote_user_slopes",outputs: [{ type: "uint256", name: "slope" },{ type: "uint256", name: "power" },{ type: "uint256", name: "end" },],inputs: [{ type: "address", name: "arg0" },{ type: "address", name: "arg1" },],stateMutability: "view",type: "function",gas: 5020,},{name: "vote_user_power",outputs: [{ type: "uint256", name: "" }],inputs: [{ type: "address", name: "arg0" }],stateMutability: "view",type: "function",gas: 2265,},{name: "last_user_vote",outputs: [{ type: "uint256", name: "" }],inputs: [{ type: "address", name: "arg0" },{ type: "address", name: "arg1" },],stateMutability: "view",type: "function",gas: 2449,},{name: "points_weight",outputs: [{ type: "uint256", name: "bias" },{ type: "uint256", name: "slope" },],inputs: [{ type: "address", name: "arg0" },{ type: "uint256", name: "arg1" },],stateMutability: "view",type: "function",gas: 3859,},{name: "time_weight",outputs: [{ type: "uint256", name: "" }],inputs: [{ type: "address", name: "arg0" }],stateMutability: "view",type: "function",gas: 2355,},{name: "points_sum",outputs: [{ type: "uint256", name: "bias" },{ type: "uint256", name: "slope" },],inputs: [{ type: "int128", name: "arg0" },{ type: "uint256", name: "arg1" },],stateMutability: "view",type: "function",gas: 3970,},{name: "time_sum",outputs: [{ type: "uint256", name: "" }],inputs: [{ type: "uint256", name: "arg0" }],stateMutability: "view",type: "function",gas: 2370,},{name: "points_total",outputs: [{ type: "uint256", name: "" }],inputs: [{ type: "uint256", name: "arg0" }],stateMutability: "view",type: "function",gas: 2406,},{name: "time_total",outputs: [{ type: "uint256", name: "" }],inputs: [],stateMutability: "view",type: "function",gas: 2321,},{name: "points_type_weight",outputs: [{ type: "uint256", name: "" }],inputs: [{ type: "int128", name: "arg0" },{ type: "uint256", name: "arg1" },],stateMutability: "view",type: "function",gas: 2671,},{name: "time_type_weight",outputs: [{ type: "uint256", name: "" }],inputs: [{ type: "uint256", name: "arg0" }],stateMutability: "view",type: "function",gas: 2490,},]; // prettier-ignore @@ -409,19 +384,20 @@ const deployCurve = async ({ console.log("Gauge deployed to address: ", gaugeAddress); - const gaugeControllerTx = await withConfirmation( - gaugeController - .connect(sGaugeControllerAdmin) - ["add_gauge(address,int128)"](gaugeAddress, 0) + await withConfirmation( + gaugeController.connect(sGaugeControllerAdmin)[ + // eslint-disable-next-line no-unexpected-multiline + "add_gauge(address,int128)" + ](gaugeAddress, 0) ); - const gaugeControllerTx2 = await withConfirmation( + await withConfirmation( gaugeController .connect(sGaugeControllerAdmin) .change_gauge_weight(gaugeAddress, 100, { gasLimit: 2000000 }) ); - const convexTx = await withConfirmation( + await withConfirmation( cConvexPoolManager.connect(sDeployer)["addPool(address)"](gaugeAddress) ); @@ -461,19 +437,23 @@ const deployCurve = async ({ .approve(poolAddress, utils.parseUnits("1", 50)); const depositValue = utils.parseUnits("50", 18); - await curvePool - .connect(sWethWhale) - ["add_liquidity(uint256[2],uint256)"]([depositValue, depositValue], 0, { - value: depositValue, - }); + await curvePool.connect(sWethWhale)[ + // eslint-disable-next-line no-unexpected-multiline + "add_liquidity(uint256[2],uint256)" + ]([depositValue, depositValue], 0, { + value: depositValue, + }); const tokenContract = new Contract(tokenAddress, erc20Abi); - // console.log("LP RECEIVED:", (await tokenContract.connect(sWethWhale).balanceOf(weth_whale)).toString()); + console.log( + "LP RECEIVED:", + (await tokenContract.connect(sWethWhale).balanceOf(weth_whale)).toString() + ); // find out the CVX booster PID // prettier-ignore - const cvxBoosterABI = [{inputs: [{ internalType: "address", name: "_staker", type: "address" },{ internalType: "address", name: "_minter", type: "address" },],stateMutability: "nonpayable",type: "constructor",},{anonymous: false,inputs: [{indexed: true,internalType: "address",name: "user",type: "address",},{indexed: true,internalType: "uint256",name: "poolid",type: "uint256",},{indexed: false,internalType: "uint256",name: "amount",type: "uint256",},],name: "Deposited",type: "event",},{anonymous: false,inputs: [{indexed: true,internalType: "address",name: "user",type: "address",},{indexed: true,internalType: "uint256",name: "poolid",type: "uint256",},{indexed: false,internalType: "uint256",name: "amount",type: "uint256",},],name: "Withdrawn",type: "event",},{inputs: [],name: "FEE_DENOMINATOR",outputs: [{ internalType: "uint256", name: "", type: "uint256" }],stateMutability: "view",type: "function",},{inputs: [],name: "MaxFees",outputs: [{ internalType: "uint256", name: "", type: "uint256" }],stateMutability: "view",type: "function",},{inputs: [{ internalType: "address", name: "_lptoken", type: "address" },{ internalType: "address", name: "_gauge", type: "address" },{ internalType: "uint256", name: "_stashVersion", type: "uint256" },],name: "addPool",outputs: [{ internalType: "bool", name: "", type: "bool" }],stateMutability: "nonpayable",type: "function",},{inputs: [{ internalType: "uint256", name: "_pid", type: "uint256" },{ internalType: "address", name: "_gauge", type: "address" },],name: "claimRewards",outputs: [{ internalType: "bool", name: "", type: "bool" }],stateMutability: "nonpayable",type: "function",},{inputs: [],name: "crv",outputs: [{ internalType: "address", name: "", type: "address" }],stateMutability: "view",type: "function",},{inputs: [{ internalType: "uint256", name: "_pid", type: "uint256" },{ internalType: "uint256", name: "_amount", type: "uint256" },{ internalType: "bool", name: "_stake", type: "bool" },],name: "deposit",outputs: [{ internalType: "bool", name: "", type: "bool" }],stateMutability: "nonpayable",type: "function",},{inputs: [{ internalType: "uint256", name: "_pid", type: "uint256" },{ internalType: "bool", name: "_stake", type: "bool" },],name: "depositAll",outputs: [{ internalType: "bool", name: "", type: "bool" }],stateMutability: "nonpayable",type: "function",},{inputs: [],name: "distributionAddressId",outputs: [{ internalType: "uint256", name: "", type: "uint256" }],stateMutability: "view",type: "function",},{inputs: [],name: "earmarkFees",outputs: [{ internalType: "bool", name: "", type: "bool" }],stateMutability: "nonpayable",type: "function",},{inputs: [],name: "earmarkIncentive",outputs: [{ internalType: "uint256", name: "", type: "uint256" }],stateMutability: "view",type: "function",},{inputs: [{ internalType: "uint256", name: "_pid", type: "uint256" }],name: "earmarkRewards",outputs: [{ internalType: "bool", name: "", type: "bool" }],stateMutability: "nonpayable",type: "function",},{inputs: [],name: "feeDistro",outputs: [{ internalType: "address", name: "", type: "address" }],stateMutability: "view",type: "function",},{inputs: [],name: "feeManager",outputs: [{ internalType: "address", name: "", type: "address" }],stateMutability: "view",type: "function",},{inputs: [],name: "feeToken",outputs: [{ internalType: "address", name: "", type: "address" }],stateMutability: "view",type: "function",},{inputs: [{ internalType: "address", name: "", type: "address" }],name: "gaugeMap",outputs: [{ internalType: "bool", name: "", type: "bool" }],stateMutability: "view",type: "function",},{inputs: [],name: "isShutdown",outputs: [{ internalType: "bool", name: "", type: "bool" }],stateMutability: "view",type: "function",},{inputs: [],name: "lockFees",outputs: [{ internalType: "address", name: "", type: "address" }],stateMutability: "view",type: "function",},{inputs: [],name: "lockIncentive",outputs: [{ internalType: "uint256", name: "", type: "uint256" }],stateMutability: "view",type: "function",},{inputs: [],name: "lockRewards",outputs: [{ internalType: "address", name: "", type: "address" }],stateMutability: "view",type: "function",},{inputs: [],name: "minter",outputs: [{ internalType: "address", name: "", type: "address" }],stateMutability: "view",type: "function",},{inputs: [],name: "owner",outputs: [{ internalType: "address", name: "", type: "address" }],stateMutability: "view",type: "function",},{inputs: [],name: "platformFee",outputs: [{ internalType: "uint256", name: "", type: "uint256" }],stateMutability: "view",type: "function",},{inputs: [{ internalType: "uint256", name: "", type: "uint256" }],name: "poolInfo",outputs: [{ internalType: "address", name: "lptoken", type: "address" },{ internalType: "address", name: "token", type: "address" },{ internalType: "address", name: "gauge", type: "address" },{ internalType: "address", name: "crvRewards", type: "address" },{ internalType: "address", name: "stash", type: "address" },{ internalType: "bool", name: "shutdown", type: "bool" },],stateMutability: "view",type: "function",},{inputs: [],name: "poolLength",outputs: [{ internalType: "uint256", name: "", type: "uint256" }],stateMutability: "view",type: "function",},{inputs: [],name: "poolManager",outputs: [{ internalType: "address", name: "", type: "address" }],stateMutability: "view",type: "function",},{inputs: [],name: "registry",outputs: [{ internalType: "address", name: "", type: "address" }],stateMutability: "view",type: "function",},{inputs: [],name: "rewardArbitrator",outputs: [{ internalType: "address", name: "", type: "address" }],stateMutability: "view",type: "function",},{inputs: [{ internalType: "uint256", name: "_pid", type: "uint256" },{ internalType: "address", name: "_address", type: "address" },{ internalType: "uint256", name: "_amount", type: "uint256" },],name: "rewardClaimed",outputs: [{ internalType: "bool", name: "", type: "bool" }],stateMutability: "nonpayable",type: "function",},{inputs: [],name: "rewardFactory",outputs: [{ internalType: "address", name: "", type: "address" }],stateMutability: "view",type: "function",},{inputs: [{ internalType: "address", name: "_arb", type: "address" }],name: "setArbitrator",outputs: [],stateMutability: "nonpayable",type: "function",},{inputs: [{ internalType: "address", name: "_rfactory", type: "address" },{ internalType: "address", name: "_sfactory", type: "address" },{ internalType: "address", name: "_tfactory", type: "address" },],name: "setFactories",outputs: [],stateMutability: "nonpayable",type: "function",},{inputs: [],name: "setFeeInfo",outputs: [],stateMutability: "nonpayable",type: "function",},{inputs: [{ internalType: "address", name: "_feeM", type: "address" }],name: "setFeeManager",outputs: [],stateMutability: "nonpayable",type: "function",},{inputs: [{ internalType: "uint256", name: "_lockFees", type: "uint256" },{ internalType: "uint256", name: "_stakerFees", type: "uint256" },{ internalType: "uint256", name: "_callerFees", type: "uint256" },{ internalType: "uint256", name: "_platform", type: "uint256" },],name: "setFees",outputs: [],stateMutability: "nonpayable",type: "function",},{inputs: [{ internalType: "uint256", name: "_pid", type: "uint256" }],name: "setGaugeRedirect",outputs: [{ internalType: "bool", name: "", type: "bool" }],stateMutability: "nonpayable",type: "function",},{inputs: [{ internalType: "address", name: "_owner", type: "address" }],name: "setOwner",outputs: [],stateMutability: "nonpayable",type: "function",},{inputs: [{ internalType: "address", name: "_poolM", type: "address" }],name: "setPoolManager",outputs: [],stateMutability: "nonpayable",type: "function",},{inputs: [{ internalType: "address", name: "_rewards", type: "address" },{ internalType: "address", name: "_stakerRewards", type: "address" },],name: "setRewardContracts",outputs: [],stateMutability: "nonpayable",type: "function",},{inputs: [{ internalType: "address", name: "_treasury", type: "address" }],name: "setTreasury",outputs: [],stateMutability: "nonpayable",type: "function",},{inputs: [{ internalType: "address", name: "_voteDelegate", type: "address" },],name: "setVoteDelegate",outputs: [],stateMutability: "nonpayable",type: "function",},{inputs: [{ internalType: "uint256", name: "_pid", type: "uint256" }],name: "shutdownPool",outputs: [{ internalType: "bool", name: "", type: "bool" }],stateMutability: "nonpayable",type: "function",},{inputs: [],name: "shutdownSystem",outputs: [],stateMutability: "nonpayable",type: "function",},{inputs: [],name: "staker",outputs: [{ internalType: "address", name: "", type: "address" }],stateMutability: "view",type: "function",},{inputs: [],name: "stakerIncentive",outputs: [{ internalType: "uint256", name: "", type: "uint256" }],stateMutability: "view",type: "function",},{inputs: [],name: "stakerRewards",outputs: [{ internalType: "address", name: "", type: "address" }],stateMutability: "view",type: "function",},{inputs: [],name: "stashFactory",outputs: [{ internalType: "address", name: "", type: "address" }],stateMutability: "view",type: "function",},{inputs: [],name: "tokenFactory",outputs: [{ internalType: "address", name: "", type: "address" }],stateMutability: "view",type: "function",},{inputs: [],name: "treasury",outputs: [{ internalType: "address", name: "", type: "address" }],stateMutability: "view",type: "function",},{inputs: [{ internalType: "uint256", name: "_voteId", type: "uint256" },{ internalType: "address", name: "_votingAddress", type: "address" },{ internalType: "bool", name: "_support", type: "bool" },],name: "vote",outputs: [{ internalType: "bool", name: "", type: "bool" }],stateMutability: "nonpayable",type: "function",},{inputs: [],name: "voteDelegate",outputs: [{ internalType: "address", name: "", type: "address" }],stateMutability: "view",type: "function",},{inputs: [{ internalType: "address[]", name: "_gauge", type: "address[]" },{ internalType: "uint256[]", name: "_weight", type: "uint256[]" },],name: "voteGaugeWeight",outputs: [{ internalType: "bool", name: "", type: "bool" }],stateMutability: "nonpayable",type: "function",},{inputs: [],name: "voteOwnership",outputs: [{ internalType: "address", name: "", type: "address" }],stateMutability: "view",type: "function",},{inputs: [],name: "voteParameter",outputs: [{ internalType: "address", name: "", type: "address" }],stateMutability: "view",type: "function",},{inputs: [{ internalType: "uint256", name: "_pid", type: "uint256" },{ internalType: "uint256", name: "_amount", type: "uint256" },],name: "withdraw",outputs: [{ internalType: "bool", name: "", type: "bool" }],stateMutability: "nonpayable",type: "function",},{inputs: [{ internalType: "uint256", name: "_pid", type: "uint256" }],name: "withdrawAll",outputs: [{ internalType: "bool", name: "", type: "bool" }],stateMutability: "nonpayable",type: "function",},{inputs: [{ internalType: "uint256", name: "_pid", type: "uint256" },{ internalType: "uint256", name: "_amount", type: "uint256" },{ internalType: "address", name: "_to", type: "address" },],name: "withdrawTo",outputs: [{ internalType: "bool", name: "", type: "bool" }],stateMutability: "nonpayable",type: "function",},]; - const cvxBooster = new Contract(addresses.mainnet.CVXBooster, cvxBoosterABI); + // const cvxBoosterABI = [{inputs: [{ internalType: "address", name: "_staker", type: "address" },{ internalType: "address", name: "_minter", type: "address" },],stateMutability: "nonpayable",type: "constructor",},{anonymous: false,inputs: [{indexed: true,internalType: "address",name: "user",type: "address",},{indexed: true,internalType: "uint256",name: "poolid",type: "uint256",},{indexed: false,internalType: "uint256",name: "amount",type: "uint256",},],name: "Deposited",type: "event",},{anonymous: false,inputs: [{indexed: true,internalType: "address",name: "user",type: "address",},{indexed: true,internalType: "uint256",name: "poolid",type: "uint256",},{indexed: false,internalType: "uint256",name: "amount",type: "uint256",},],name: "Withdrawn",type: "event",},{inputs: [],name: "FEE_DENOMINATOR",outputs: [{ internalType: "uint256", name: "", type: "uint256" }],stateMutability: "view",type: "function",},{inputs: [],name: "MaxFees",outputs: [{ internalType: "uint256", name: "", type: "uint256" }],stateMutability: "view",type: "function",},{inputs: [{ internalType: "address", name: "_lptoken", type: "address" },{ internalType: "address", name: "_gauge", type: "address" },{ internalType: "uint256", name: "_stashVersion", type: "uint256" },],name: "addPool",outputs: [{ internalType: "bool", name: "", type: "bool" }],stateMutability: "nonpayable",type: "function",},{inputs: [{ internalType: "uint256", name: "_pid", type: "uint256" },{ internalType: "address", name: "_gauge", type: "address" },],name: "claimRewards",outputs: [{ internalType: "bool", name: "", type: "bool" }],stateMutability: "nonpayable",type: "function",},{inputs: [],name: "crv",outputs: [{ internalType: "address", name: "", type: "address" }],stateMutability: "view",type: "function",},{inputs: [{ internalType: "uint256", name: "_pid", type: "uint256" },{ internalType: "uint256", name: "_amount", type: "uint256" },{ internalType: "bool", name: "_stake", type: "bool" },],name: "deposit",outputs: [{ internalType: "bool", name: "", type: "bool" }],stateMutability: "nonpayable",type: "function",},{inputs: [{ internalType: "uint256", name: "_pid", type: "uint256" },{ internalType: "bool", name: "_stake", type: "bool" },],name: "depositAll",outputs: [{ internalType: "bool", name: "", type: "bool" }],stateMutability: "nonpayable",type: "function",},{inputs: [],name: "distributionAddressId",outputs: [{ internalType: "uint256", name: "", type: "uint256" }],stateMutability: "view",type: "function",},{inputs: [],name: "earmarkFees",outputs: [{ internalType: "bool", name: "", type: "bool" }],stateMutability: "nonpayable",type: "function",},{inputs: [],name: "earmarkIncentive",outputs: [{ internalType: "uint256", name: "", type: "uint256" }],stateMutability: "view",type: "function",},{inputs: [{ internalType: "uint256", name: "_pid", type: "uint256" }],name: "earmarkRewards",outputs: [{ internalType: "bool", name: "", type: "bool" }],stateMutability: "nonpayable",type: "function",},{inputs: [],name: "feeDistro",outputs: [{ internalType: "address", name: "", type: "address" }],stateMutability: "view",type: "function",},{inputs: [],name: "feeManager",outputs: [{ internalType: "address", name: "", type: "address" }],stateMutability: "view",type: "function",},{inputs: [],name: "feeToken",outputs: [{ internalType: "address", name: "", type: "address" }],stateMutability: "view",type: "function",},{inputs: [{ internalType: "address", name: "", type: "address" }],name: "gaugeMap",outputs: [{ internalType: "bool", name: "", type: "bool" }],stateMutability: "view",type: "function",},{inputs: [],name: "isShutdown",outputs: [{ internalType: "bool", name: "", type: "bool" }],stateMutability: "view",type: "function",},{inputs: [],name: "lockFees",outputs: [{ internalType: "address", name: "", type: "address" }],stateMutability: "view",type: "function",},{inputs: [],name: "lockIncentive",outputs: [{ internalType: "uint256", name: "", type: "uint256" }],stateMutability: "view",type: "function",},{inputs: [],name: "lockRewards",outputs: [{ internalType: "address", name: "", type: "address" }],stateMutability: "view",type: "function",},{inputs: [],name: "minter",outputs: [{ internalType: "address", name: "", type: "address" }],stateMutability: "view",type: "function",},{inputs: [],name: "owner",outputs: [{ internalType: "address", name: "", type: "address" }],stateMutability: "view",type: "function",},{inputs: [],name: "platformFee",outputs: [{ internalType: "uint256", name: "", type: "uint256" }],stateMutability: "view",type: "function",},{inputs: [{ internalType: "uint256", name: "", type: "uint256" }],name: "poolInfo",outputs: [{ internalType: "address", name: "lptoken", type: "address" },{ internalType: "address", name: "token", type: "address" },{ internalType: "address", name: "gauge", type: "address" },{ internalType: "address", name: "crvRewards", type: "address" },{ internalType: "address", name: "stash", type: "address" },{ internalType: "bool", name: "shutdown", type: "bool" },],stateMutability: "view",type: "function",},{inputs: [],name: "poolLength",outputs: [{ internalType: "uint256", name: "", type: "uint256" }],stateMutability: "view",type: "function",},{inputs: [],name: "poolManager",outputs: [{ internalType: "address", name: "", type: "address" }],stateMutability: "view",type: "function",},{inputs: [],name: "registry",outputs: [{ internalType: "address", name: "", type: "address" }],stateMutability: "view",type: "function",},{inputs: [],name: "rewardArbitrator",outputs: [{ internalType: "address", name: "", type: "address" }],stateMutability: "view",type: "function",},{inputs: [{ internalType: "uint256", name: "_pid", type: "uint256" },{ internalType: "address", name: "_address", type: "address" },{ internalType: "uint256", name: "_amount", type: "uint256" },],name: "rewardClaimed",outputs: [{ internalType: "bool", name: "", type: "bool" }],stateMutability: "nonpayable",type: "function",},{inputs: [],name: "rewardFactory",outputs: [{ internalType: "address", name: "", type: "address" }],stateMutability: "view",type: "function",},{inputs: [{ internalType: "address", name: "_arb", type: "address" }],name: "setArbitrator",outputs: [],stateMutability: "nonpayable",type: "function",},{inputs: [{ internalType: "address", name: "_rfactory", type: "address" },{ internalType: "address", name: "_sfactory", type: "address" },{ internalType: "address", name: "_tfactory", type: "address" },],name: "setFactories",outputs: [],stateMutability: "nonpayable",type: "function",},{inputs: [],name: "setFeeInfo",outputs: [],stateMutability: "nonpayable",type: "function",},{inputs: [{ internalType: "address", name: "_feeM", type: "address" }],name: "setFeeManager",outputs: [],stateMutability: "nonpayable",type: "function",},{inputs: [{ internalType: "uint256", name: "_lockFees", type: "uint256" },{ internalType: "uint256", name: "_stakerFees", type: "uint256" },{ internalType: "uint256", name: "_callerFees", type: "uint256" },{ internalType: "uint256", name: "_platform", type: "uint256" },],name: "setFees",outputs: [],stateMutability: "nonpayable",type: "function",},{inputs: [{ internalType: "uint256", name: "_pid", type: "uint256" }],name: "setGaugeRedirect",outputs: [{ internalType: "bool", name: "", type: "bool" }],stateMutability: "nonpayable",type: "function",},{inputs: [{ internalType: "address", name: "_owner", type: "address" }],name: "setOwner",outputs: [],stateMutability: "nonpayable",type: "function",},{inputs: [{ internalType: "address", name: "_poolM", type: "address" }],name: "setPoolManager",outputs: [],stateMutability: "nonpayable",type: "function",},{inputs: [{ internalType: "address", name: "_rewards", type: "address" },{ internalType: "address", name: "_stakerRewards", type: "address" },],name: "setRewardContracts",outputs: [],stateMutability: "nonpayable",type: "function",},{inputs: [{ internalType: "address", name: "_treasury", type: "address" }],name: "setTreasury",outputs: [],stateMutability: "nonpayable",type: "function",},{inputs: [{ internalType: "address", name: "_voteDelegate", type: "address" },],name: "setVoteDelegate",outputs: [],stateMutability: "nonpayable",type: "function",},{inputs: [{ internalType: "uint256", name: "_pid", type: "uint256" }],name: "shutdownPool",outputs: [{ internalType: "bool", name: "", type: "bool" }],stateMutability: "nonpayable",type: "function",},{inputs: [],name: "shutdownSystem",outputs: [],stateMutability: "nonpayable",type: "function",},{inputs: [],name: "staker",outputs: [{ internalType: "address", name: "", type: "address" }],stateMutability: "view",type: "function",},{inputs: [],name: "stakerIncentive",outputs: [{ internalType: "uint256", name: "", type: "uint256" }],stateMutability: "view",type: "function",},{inputs: [],name: "stakerRewards",outputs: [{ internalType: "address", name: "", type: "address" }],stateMutability: "view",type: "function",},{inputs: [],name: "stashFactory",outputs: [{ internalType: "address", name: "", type: "address" }],stateMutability: "view",type: "function",},{inputs: [],name: "tokenFactory",outputs: [{ internalType: "address", name: "", type: "address" }],stateMutability: "view",type: "function",},{inputs: [],name: "treasury",outputs: [{ internalType: "address", name: "", type: "address" }],stateMutability: "view",type: "function",},{inputs: [{ internalType: "uint256", name: "_voteId", type: "uint256" },{ internalType: "address", name: "_votingAddress", type: "address" },{ internalType: "bool", name: "_support", type: "bool" },],name: "vote",outputs: [{ internalType: "bool", name: "", type: "bool" }],stateMutability: "nonpayable",type: "function",},{inputs: [],name: "voteDelegate",outputs: [{ internalType: "address", name: "", type: "address" }],stateMutability: "view",type: "function",},{inputs: [{ internalType: "address[]", name: "_gauge", type: "address[]" },{ internalType: "uint256[]", name: "_weight", type: "uint256[]" },],name: "voteGaugeWeight",outputs: [{ internalType: "bool", name: "", type: "bool" }],stateMutability: "nonpayable",type: "function",},{inputs: [],name: "voteOwnership",outputs: [{ internalType: "address", name: "", type: "address" }],stateMutability: "view",type: "function",},{inputs: [],name: "voteParameter",outputs: [{ internalType: "address", name: "", type: "address" }],stateMutability: "view",type: "function",},{inputs: [{ internalType: "uint256", name: "_pid", type: "uint256" },{ internalType: "uint256", name: "_amount", type: "uint256" },],name: "withdraw",outputs: [{ internalType: "bool", name: "", type: "bool" }],stateMutability: "nonpayable",type: "function",},{inputs: [{ internalType: "uint256", name: "_pid", type: "uint256" }],name: "withdrawAll",outputs: [{ internalType: "bool", name: "", type: "bool" }],stateMutability: "nonpayable",type: "function",},{inputs: [{ internalType: "uint256", name: "_pid", type: "uint256" },{ internalType: "uint256", name: "_amount", type: "uint256" },{ internalType: "address", name: "_to", type: "address" },],name: "withdrawTo",outputs: [{ internalType: "bool", name: "", type: "bool" }],stateMutability: "nonpayable",type: "function",},]; + // const cvxBooster = new Contract(addresses.mainnet.CVXBooster, cvxBoosterABI); return { actions: [], diff --git a/contracts/deploy/056_oeth_zapper_again.js b/contracts/deploy/056_oeth_zapper_again.js index 625b416c81..82e1de4066 100644 --- a/contracts/deploy/056_oeth_zapper_again.js +++ b/contracts/deploy/056_oeth_zapper_again.js @@ -1,14 +1,13 @@ const { deploymentWithProposal } = require("../utils/deploy"); -const addresses = require("../utils/addresses"); module.exports = deploymentWithProposal( { deployName: "056_oeth_zapper_again", forceDeploy: false }, - async ({ deployWithConfirmation, withConfirmation }) => { + async ({ deployWithConfirmation }) => { // Deployer Actions // ---------------- // 1. Deploy new Zapper - const dOETHZapper = await deployWithConfirmation( + await deployWithConfirmation( "OETHZapper", [ "0x856c4Efb76C1D1AE02e20CEB03A2A6a08b0b8dC3", diff --git a/contracts/deploy/057_drip_all.js b/contracts/deploy/057_drip_all.js index c421401384..c812f4674d 100644 --- a/contracts/deploy/057_drip_all.js +++ b/contracts/deploy/057_drip_all.js @@ -1,6 +1,4 @@ const { deploymentWithGovernanceProposal } = require("../utils/deploy"); -const addresses = require("../utils/addresses"); -const { isMainnet } = require("../test/helpers.js"); module.exports = deploymentWithGovernanceProposal( { @@ -9,31 +7,22 @@ module.exports = deploymentWithGovernanceProposal( onlyOnFork: true, // this is only executed in forked environment //proposalId: "40434364243407050666554191388123037800510237271029051418887027936281231737485" }, - async ({ - assetAddresses, - deployWithConfirmation, - ethers, - getTxOpts, - withConfirmation, - }) => { - const { deployerAddr, governorAddr } = await getNamedAccounts(); - const sDeployer = await ethers.provider.getSigner(deployerAddr); - + async ({ deployWithConfirmation, ethers }) => { // Current contracts const cVaultProxy = await ethers.getContract("VaultProxy"); // const cHarvester = await ethers.getContract("Harvester"); const dVaultCore = await deployWithConfirmation("VaultCore"); - const dVaultAdmin = await deployWithConfirmation("VaultAdmin"); + // const dVaultAdmin = await deployWithConfirmation("VaultAdmin"); - const cVaultCore = await ethers.getContract( - "VaultCore", - cVaultProxy.address - ); - const cVaultAdmin = await ethers.getContract( - "VaultAdmin", - cVaultProxy.address - ); + // const cVaultCore = await ethers.getContract( + // "VaultCore", + // cVaultProxy.address + // ); + // const cVaultAdmin = await ethers.getContract( + // "VaultAdmin", + // cVaultProxy.address + // ); // Governance Actions // ---------------- diff --git a/contracts/deploy/058_oeth_vault_value_checker.js b/contracts/deploy/058_oeth_vault_value_checker.js index e3fbf3e0c1..0cd242ae45 100644 --- a/contracts/deploy/058_oeth_vault_value_checker.js +++ b/contracts/deploy/058_oeth_vault_value_checker.js @@ -2,13 +2,7 @@ const { deploymentWithProposal } = require("../utils/deploy"); module.exports = deploymentWithProposal( { deployName: "058_oeth_vault_value_checker" }, - async ({ - assetAddresses, - deployWithConfirmation, - ethers, - getTxOpts, - withConfirmation, - }) => { + async ({ ethers, deployWithConfirmation }) => { // Current contracts const cOETHVaultProxy = await ethers.getContract("OETHVaultProxy"); const cOETHProxy = await ethers.getContract("OETHProxy"); @@ -17,13 +11,12 @@ module.exports = deploymentWithProposal( // ---------------- // 1. Deploy new vault value checker - const dVaultValueChecker = await deployWithConfirmation( + await deployWithConfirmation( "OETHVaultValueChecker", [cOETHVaultProxy.address, cOETHProxy.address], undefined, true // Incompatibable storage layout ); - const vaultValueChecker = await ethers.getContract("OETHVaultValueChecker"); // Governance Actions // ---------------- diff --git a/contracts/deploy/061_oeth_timelock_part_1.js b/contracts/deploy/061_oeth_timelock_part_1.js index ea9adb6a9b..6f3c7badd2 100644 --- a/contracts/deploy/061_oeth_timelock_part_1.js +++ b/contracts/deploy/061_oeth_timelock_part_1.js @@ -1,10 +1,9 @@ const { deploymentWithGuardianGovernor } = require("../utils/deploy"); const addresses = require("../utils/addresses"); -const ethers = require("ethers"); module.exports = deploymentWithGuardianGovernor( { deployName: "061_oeth_timelock_part_1" }, - async ({ deployWithConfirmation, ethers, getTxOpts, withConfirmation }) => { + async ({ ethers }) => { const cFraxETHStrategyProxy = await ethers.getContract( "FraxETHStrategyProxy" ); diff --git a/contracts/deploy/062_oeth_timelock_part_2.js b/contracts/deploy/062_oeth_timelock_part_2.js index 1cc6d636f5..bc6dbfa3c2 100644 --- a/contracts/deploy/062_oeth_timelock_part_2.js +++ b/contracts/deploy/062_oeth_timelock_part_2.js @@ -1,10 +1,8 @@ const { deploymentWithProposal } = require("../utils/deploy"); -const addresses = require("../utils/addresses"); -const ethers = require("ethers"); module.exports = deploymentWithProposal( { deployName: "062_oeth_timelock_part_2" }, - async ({ deployWithConfirmation, ethers, getTxOpts, withConfirmation }) => { + async ({ ethers }) => { const cFraxETHStrategyProxy = await ethers.getContract( "FraxETHStrategyProxy" ); diff --git a/contracts/deploy/067_ousd_vault_value_checker.js b/contracts/deploy/067_ousd_vault_value_checker.js index 991c7a7500..b567d06547 100644 --- a/contracts/deploy/067_ousd_vault_value_checker.js +++ b/contracts/deploy/067_ousd_vault_value_checker.js @@ -2,13 +2,7 @@ const { deploymentWithProposal } = require("../utils/deploy"); module.exports = deploymentWithProposal( { deployName: "067_ousd_vault_value_checker" }, - async ({ - assetAddresses, - deployWithConfirmation, - ethers, - getTxOpts, - withConfirmation, - }) => { + async ({ deployWithConfirmation, ethers }) => { // Current contracts const cVaultProxy = await ethers.getContract("VaultProxy"); const cOUSDProxy = await ethers.getContract("OUSDProxy"); @@ -17,7 +11,7 @@ module.exports = deploymentWithProposal( // ---------------- // 1. Deploy new vault value checker - const dVaultValueChecker = await deployWithConfirmation( + await deployWithConfirmation( "VaultValueChecker", [cVaultProxy.address, cOUSDProxy.address], undefined, diff --git a/contracts/package.json b/contracts/package.json index f36c5fbc1f..b7270c166b 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -11,7 +11,7 @@ "node": "yarn run node:fork", "node:fork": "./node.sh fork", "lint": "yarn run lint:js && yarn run lint:sol", - "lint:js": "eslint \"test/**/*.js\" \"tasks/**/*.js\"", + "lint:js": "eslint \"test/**/*.js\" \"tasks/**/*.js\" \"deploy/**/*.js\"", "lint:sol": "solhint \"contracts/**/*.sol\"", "prettier": "yarn run prettier:js && yarn run prettier:sol", "prettier:check": "prettier -c \"*.js\" \"deploy/**/*.js\" \"scripts/**/*.js\" \"smoke/**/*.js\" \"scripts/**/*.js\" \"tasks/**/*.js\" \"test/**/*.js\" \"utils/**/*.js\"", From a5482f7f7efca59a3f2f54af8939da594244ba3b Mon Sep 17 00:00:00 2001 From: Nicholas Addison Date: Wed, 26 Jul 2023 12:00:24 +1000 Subject: [PATCH 2/2] Fix failing fork test --- contracts/test/vault/oeth_vault.fork-test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contracts/test/vault/oeth_vault.fork-test.js b/contracts/test/vault/oeth_vault.fork-test.js index 92d6d9efa0..cc25c2b034 100644 --- a/contracts/test/vault/oeth_vault.fork-test.js +++ b/contracts/test/vault/oeth_vault.fork-test.js @@ -502,8 +502,8 @@ forkOnlyDescribe("ForkTest: OETH Vault", function () { error: "BALANCE_EXCEEDED", from: "stETH", to: "WETH", - fromAmount: 1000, - minToAssetAmount: 990, + fromAmount: 10000, + minToAssetAmount: 9900, }, { error: "ERC20: transfer amount exceeds balance",