diff --git a/deploy/curve-yield-strategy.ts b/deploy/curve-yield-strategy.ts index ed4e87d0..9a62afa2 100644 --- a/deploy/curve-yield-strategy.ts +++ b/deploy/curve-yield-strategy.ts @@ -75,13 +75,13 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { if (ProxyDeployment.newlyDeployed) { await execute( 'CurveYieldStrategy', - { from: deployer, estimateGasExtra: 1_000_000, waitConfirmations }, + { from: deployer, estimateGasExtra: 1_000_000, waitConfirmations, log: true }, 'grantAllowances', ); await execute( 'CurveYieldStrategy', - { from: deployer, estimateGasExtra: 1_000_000, waitConfirmations }, + { from: deployer, estimateGasExtra: 1_000_000, waitConfirmations, log: true }, 'updateBaseParams', parseUnits(networkInfo.DEPOSIT_CAP_C3CLT.toString(), 18), networkInfo.KEEPER_ADDRESS, @@ -91,7 +91,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { await execute( 'CurveYieldStrategy', - { from: deployer, estimateGasExtra: 1_000_000, waitConfirmations }, + { from: deployer, estimateGasExtra: 1_000_000, waitConfirmations, log: true }, 'updateCurveParams', 1000, // feeBps 100, // stablecoinSlippage @@ -103,7 +103,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const MINTER_ROLE = await read('CollateralToken', 'MINTER_ROLE'); await execute( 'CollateralToken', - { from: deployer, estimateGasExtra: 1_000_000, waitConfirmations }, + { from: deployer, estimateGasExtra: 1_000_000, waitConfirmations, log: true }, 'grantRole', MINTER_ROLE, ProxyDeployment.address, @@ -112,7 +112,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { // transfer ownership to team multisig await execute( 'CurveYieldStrategy', - { from: deployer, estimateGasExtra: 1_000_000, waitConfirmations }, + { from: deployer, estimateGasExtra: 1_000_000, waitConfirmations, log: true }, 'transferOwnership', networkInfo.MULTISIG, ); diff --git a/deploy/gmx-vault/gmx-vault.ts b/deploy/gmx-vault/gmx-vault.ts index 0745743d..80417173 100644 --- a/deploy/gmx-vault/gmx-vault.ts +++ b/deploy/gmx-vault/gmx-vault.ts @@ -14,24 +14,30 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const networkInfo = getNetworkInfo(hre.network.config.chainId ?? 31337); - const gmxBatchingManagerDeployment = await get('GMXBatchingManager'); const gmxYieldStrategyDeployment = await get('GMXYieldStrategy'); + const gmxBatchingManagerDeployment = await get('GMXBatchingManager'); + const glpStakingManagerDeployment = await get('GlpStakingManager'); + + // + // provide minter role + // const MINTER_ROLE = await read('CollateralToken', 'MINTER_ROLE'); await execute( 'CollateralToken', - { from: deployer, estimateGasExtra: 1_000_000, waitConfirmations }, + { from: deployer, estimateGasExtra: 1_000_000, waitConfirmations, log: true }, 'grantRole', MINTER_ROLE, gmxYieldStrategyDeployment.address, ); // - // GlpStakingManager + // update params // + await execute( 'GlpStakingManager', - { from: deployer, estimateGasExtra: 1_000_000, waitConfirmations }, + { from: deployer, estimateGasExtra: 1_000_000, waitConfirmations, log: true }, 'updateGMXParams', 1000, // _feeBps, parseEther('0.01'), // _wethThreshold, @@ -39,53 +45,56 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { gmxBatchingManagerDeployment.address, ); - // - // GMXBatchingManager - // await execute( - 'GMXBatchingManager', - { from: deployer, estimateGasExtra: 1_000_000, waitConfirmations }, - 'addVault', - gmxYieldStrategyDeployment.address, + 'GMXYieldStrategy', + { from: deployer, estimateGasExtra: 1_000_000, waitConfirmations, log: true }, + 'updateBaseParams', + parseUnits(networkInfo.DEPOSIT_CAP_C3CLT.toString(), 18), + networkInfo.KEEPER_ADDRESS, + 86400, // rebalanceTimeThreshold + 500, // rebalancePriceThresholdBps + ); + + await execute( + 'GMXYieldStrategy', + { from: deployer, estimateGasExtra: 1_000_000, waitConfirmations, log: true }, + 'updateGMXParams', + glpStakingManagerDeployment.address, + 1000, // _usdcReedemSlippage + 1e6, // _usdcConversionThreshold ); await execute( 'GMXBatchingManager', - { from: deployer, estimateGasExtra: 1_000_000, waitConfirmations }, - 'grantAllowances', + { from: deployer, estimateGasExtra: 1_000_000, waitConfirmations, log: true }, + 'addVault', gmxYieldStrategyDeployment.address, ); // - // GMXYieldStrategy + // grant allowances // + await execute( - 'GMXYieldStrategy', - { from: deployer, estimateGasExtra: 1_000_000, waitConfirmations }, + 'GMXBatchingManager', + { from: deployer, estimateGasExtra: 1_000_000, waitConfirmations, log: true }, 'grantAllowances', + gmxYieldStrategyDeployment.address, ); await execute( 'GMXYieldStrategy', - { from: deployer, estimateGasExtra: 1_000_000, waitConfirmations }, - 'updateBaseParams', - parseUnits(networkInfo.DEPOSIT_CAP_C3CLT.toString(), 18), - networkInfo.KEEPER_ADDRESS, - 86400, // rebalanceTimeThreshold - 500, // rebalancePriceThresholdBps + { from: deployer, estimateGasExtra: 1_000_000, waitConfirmations, log: true }, + 'grantAllowances', ); - await execute( - 'GMXYieldStrategy', - { from: deployer, estimateGasExtra: 1_000_000, waitConfirmations }, - 'updateGMXParams', - 1000, // feeBps - gmxBatchingManagerDeployment.address, // batchingManager - ); + // + // finally transfer ownership + // await execute( 'GMXYieldStrategy', - { from: deployer, estimateGasExtra: 1_000_000, waitConfirmations }, + { from: deployer, estimateGasExtra: 1_000_000, waitConfirmations, log: true }, 'transferOwnership', networkInfo.MULTISIG, );