-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #92 from stabilitydao/90-proposed-gamma-quickswap-…
…merkl-farm GQMF
- Loading branch information
Showing
15 changed files
with
187 additions
and
204 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.23; | ||
|
||
import "forge-std/Script.sol"; | ||
import "../src/strategies/GammaQuickSwapMerklFarmStrategy.sol"; | ||
import "../src/strategies/libs/ALMPositionNameLib.sol"; | ||
import "../chains/PolygonLib.sol"; | ||
|
||
contract DeployStrategyGQMFPolygon is Script { | ||
address public constant PLATFORM = 0xb2a0737ef27b5Cc474D24c779af612159b1c3e60; | ||
|
||
function run() external { | ||
uint deployerPrivateKey = vm.envUint("PRIVATE_KEY"); | ||
vm.startBroadcast(deployerPrivateKey); | ||
|
||
new GammaQuickSwapMerklFarmStrategy(); | ||
|
||
IFactory factory = IFactory(IPlatform(PLATFORM).factory()); | ||
IFactory.Farm[] memory _farms = new IFactory.Farm[](1); | ||
_farms[0] = _makeGammaQuickSwapMerklFarm( | ||
PolygonLib.TOKEN_dQUICK, | ||
PolygonLib.GAMMA_POS_USDCe_USDT, | ||
PolygonLib.GAMMA_UNIPROXY_2, | ||
ALMPositionNameLib.STABLE | ||
); | ||
factory.addFarms(_farms); | ||
|
||
vm.stopBroadcast(); | ||
} | ||
|
||
function _makeGammaQuickSwapMerklFarm( | ||
address rewardAsset0, | ||
address hypervisor, | ||
address uniProxy, | ||
uint preset | ||
) internal view returns (IFactory.Farm memory) { | ||
IFactory.Farm memory farm; | ||
farm.status = 0; | ||
farm.pool = IHypervisor(hypervisor).pool(); | ||
farm.strategyLogicId = StrategyIdLib.GAMMA_QUICKSWAP_MERKL_FARM; | ||
farm.rewardAssets = new address[](1); | ||
farm.rewardAssets[0] = rewardAsset0; | ||
farm.addresses = new address[](2); | ||
farm.addresses[0] = uniProxy; | ||
farm.addresses[1] = hypervisor; | ||
farm.nums = new uint[](1); | ||
farm.nums[0] = preset; | ||
farm.ticks = new int24[](0); | ||
return farm; | ||
} | ||
|
||
function testDeployPolygon() external {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.