Skip to content

Commit

Permalink
sonic deploy script; add swapper as dex agg to sonic
Browse files Browse the repository at this point in the history
  • Loading branch information
a17 committed Dec 24, 2024
1 parent 1de1760 commit c0f9f47
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
6 changes: 6 additions & 0 deletions chains/SonicLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,12 @@ library SonicLib {
_addStrategyLogic(factory, StrategyIdLib.BEETS_STABLE_FARM, address(new BeetsStableFarm()), true);
LogDeployLib.logDeployStrategies(platform, showLog);
//endregion ----- Deploy strategy logics -----

//region ----- Add DeX aggregators -----
address[] memory dexAggRouter = new address[](1);
dexAggRouter[0] = IPlatform(platform).swapper();
IPlatform(platform).addDexAggregators(dexAggRouter);
//endregion -- Add DeX aggregators -----
}

function routes()
Expand Down
18 changes: 18 additions & 0 deletions script/deploy-core/Deploy.Sonic.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;

import "forge-std/Script.sol";
import "../../chains/SonicLib.sol";
import {DeployCore} from "../base/DeployCore.sol";

contract DeploySonic is Script, DeployCore {
function run() external {
uint deployerPrivateKey = vm.envUint("PRIVATE_KEY");
vm.startBroadcast(deployerPrivateKey);
address platform = _deployCore(SonicLib.platformDeployParams());
SonicLib.deployAndSetupInfrastructure(platform, false);
vm.stopBroadcast();
}

function testDeploySonic() external {}
}

0 comments on commit c0f9f47

Please sign in to comment.