Skip to content

Commit

Permalink
fix: add Sonic legacy params
Browse files Browse the repository at this point in the history
  • Loading branch information
lekhovitsky committed Feb 25, 2025
1 parent ec89b41 commit 65b055c
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 3 deletions.
64 changes: 63 additions & 1 deletion script/LegacyHelper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ contract LegacyHelper {
}

function _getChains() internal pure returns (ChainInfo[] memory chains) {
ChainInfo[3] memory chains_ = [
ChainInfo[4] memory chains_ = [
ChainInfo({
chainId: 1,
name: "Ethereum",
Expand All @@ -51,6 +51,14 @@ contract LegacyHelper {
treasury: 0x1ACc5BC353f23B901801f3Ba48e1E51a14263808,
router: 0x89f2E8F1c8d6D7cb276c81dd89128D08fc8E3363
}),
ChainInfo({
chainId: 146,
name: "Sonic",
weth: 0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38,
gear: 0x0fDbce271bea0d9819034cd09021e0bBE94be3Fd,
treasury: 0x74028Cf1cBa6A4513c9a27137E7d0F3847833795,
router: 0x9Fae6aA45aF0fcf94819fCE4f40416C76ce0928b
}),
ChainInfo({
chainId: 42161,
name: "Arbitrum",
Expand Down Expand Up @@ -124,6 +132,15 @@ contract LegacyHelper {
deployGovernor: false,
legacyParams: _getChaosLabsOptimismLegacyParams()
}),
CuratorInfo({
chainId: 146,
chainName: "Sonic",
name: "Chaos Labs",
admin: address(0),
emergencyAdmin: address(0),
deployGovernor: false,
legacyParams: _getChaosLabsSonicLegacyParams()
}),
CuratorInfo({
chainId: 42161,
chainName: "Arbitrum",
Expand Down Expand Up @@ -310,6 +327,51 @@ contract LegacyHelper {
});
}

function _getChaosLabsSonicLegacyParams() internal pure returns (LegacyParams memory) {
address acl = 0xAd131da4BDdb40EbB5CEeaea87067553D4313895;
address contractsRegister = 0xF2b8E0f4705ceC47a8B8Eb7Dbc29B3322198058b;
address gearStaking = 0xe88846b6C85AA67688e453c7eaeeeb40F51e1F0a;
address priceOracle = 0x39Be03d0275292dF39439722C610E7db3F155d05;
address zapperRegister = 0x7e10482eEF36dA8e732e86C5de6282fF13B71Fe1;

address[] memory pausableAdmins = new address[](5);
pausableAdmins[0] = 0xAdbF876ce58CB65c99b18078353e1DCB16E69e84;
pausableAdmins[1] = 0x65b384cEcb12527Da51d52f15b4140ED7FaD7308;
pausableAdmins[2] = 0xD5C96E5c1E1C84dFD293473fC195BbE7FC8E4840;
pausableAdmins[3] = 0xacEB9dc6a81f1C9E2d8a86c3bFec3f6EF584139D;
pausableAdmins[4] = 0x393eC629b90389F957c5a2E4FC2F8F488e735BFC;

address[] memory unpausableAdmins = new address[](3);
unpausableAdmins[0] = 0xAdbF876ce58CB65c99b18078353e1DCB16E69e84;
unpausableAdmins[1] = 0xacEB9dc6a81f1C9E2d8a86c3bFec3f6EF584139D;
unpausableAdmins[2] = 0x393eC629b90389F957c5a2E4FC2F8F488e735BFC;

address[] memory emergencyLiquidators = new address[](2);
emergencyLiquidators[0] = 0x7BD9c8161836b1F402233E80F55E3CaE0Fde4d87;
emergencyLiquidators[1] = 0x16040e932b5Ac7A3aB23b88a2f230B4185727b0d;

PeripheryContract[] memory peripheryContracts = new PeripheryContract[](7);
peripheryContracts[0] = PeripheryContract("DEGEN_NFT", 0xf24411cB47918057587b793e98aC7fA9A8a710c2);
peripheryContracts[1] = PeripheryContract("MULTI_PAUSE", 0xaF1470dED2BE116dbBE6A5090078feC21B02F78E);
peripheryContracts[2] = PeripheryContract("DEGEN_DISTRIBUTOR", 0x1998956732cD652FF3d35134294Ad20aCB2CDA80);
peripheryContracts[3] = PeripheryContract("BOT", 0x47d2a88f32b630f6C8b107c37d0AF58a861d3406);
peripheryContracts[4] = PeripheryContract("BOT", 0x2A8446D5305499F5A9C8f3768104562eBD45e941);
peripheryContracts[5] = PeripheryContract("BOT", 0xEF74B1273FD4cb49109230EDa9b72f0B50031f5b);
peripheryContracts[6] = PeripheryContract("BOT", 0xd2D1E5afeE34abf1CfA27eA94af25d3AF8fFe31A);

return LegacyParams({
acl: acl,
contractsRegister: contractsRegister,
gearStaking: gearStaking,
priceOracle: priceOracle,
zapperRegister: zapperRegister,
pausableAdmins: pausableAdmins,
unpausableAdmins: unpausableAdmins,
emergencyLiquidators: emergencyLiquidators,
peripheryContracts: peripheryContracts
});
}

function _getChaosLabsArbitrumLegacyParams() internal pure returns (LegacyParams memory) {
address acl = 0xb2FA6c1a629Ed72BF99fbB24f75E5D130A5586F1;
address contractsRegister = 0xc3e00cdA97D5779BFC8f17588d55b4544C8a6c47;
Expand Down

0 comments on commit 65b055c

Please sign in to comment.