From e5fb17d220ea03f098a7c6dddc8d807275da4513 Mon Sep 17 00:00:00 2001 From: Joshua Date: Tue, 8 Oct 2024 19:54:10 -0700 Subject: [PATCH] feat: new chain core --- deployments/123987/core.json | 13 +++++++++++++ deployments/123987/shared.json | 9 +++++++++ deployments/456654/core.json | 13 +++++++++++++ deployments/456654/shared.json | 9 +++++++++ scripts/deploy-core.s.sol | 4 +++- scripts/deploy-erc20s.s.sol | 17 ++++++++++------- 6 files changed, 57 insertions(+), 8 deletions(-) create mode 100644 deployments/123987/core.json create mode 100644 deployments/123987/shared.json create mode 100644 deployments/456654/core.json create mode 100644 deployments/456654/shared.json diff --git a/deployments/123987/core.json b/deployments/123987/core.json new file mode 100644 index 00000000..8e1a1f34 --- /dev/null +++ b/deployments/123987/core.json @@ -0,0 +1,13 @@ +{ + "auction": "0xDf72bB31D759c4AB17fbBbc5D1e0D1081C4626BE", + "cash": "0xfc9f7168dCcF3b0E7F9DC4D0967d9F9b5b9d40f0", + "dataSubmitter": "0x2A69EFA58248647D57D0A3a09e7ED38D2a8343d2", + "optionSettlementHelper": "0x5eccd7500D3Dc844E0a3c4e50aA31A313460e5a0", + "perpSettlementHelper": "0x236D36C52bC56a37d9094B424A1420BE21f6392c", + "rateModel": "0xE47e447DAFf1537e8D69d8c626e624c5b44A9BA2", + "securityModule": "0xfcE44D7253C6f589d5A2E9AAFE11dFcA4464269a", + "srm": "0xD3D11C146D892af11Cebed9Ea04e29D27d49Bf03", + "srmViewer": "0xF151509ABefb08EdaF4CFd95fE6B3Eecb7d5C158", + "stableFeed": "0xbf89A191a7F3678Baaa44064632835E08A0657cA", + "subAccounts": "0xe1719F71E56341d35767dd30D4a554c92B0d086f" +} \ No newline at end of file diff --git a/deployments/123987/shared.json b/deployments/123987/shared.json new file mode 100644 index 00000000..5b40862d --- /dev/null +++ b/deployments/123987/shared.json @@ -0,0 +1,9 @@ +{ + "usdc": "0x251F53D6E1f79d548f1013F3A78F18841750C76A", + "useMockedFeed": false, + "feedSigners": [ + "0x555eB362b5057e36f88cCb42b44D6dA5Fe7A0656", + "0x47ebFBAda4d85Dac6b9018C0CE75774556A8243f" + ], + "requiredSigners": 2 +} \ No newline at end of file diff --git a/deployments/456654/core.json b/deployments/456654/core.json new file mode 100644 index 00000000..8e1a1f34 --- /dev/null +++ b/deployments/456654/core.json @@ -0,0 +1,13 @@ +{ + "auction": "0xDf72bB31D759c4AB17fbBbc5D1e0D1081C4626BE", + "cash": "0xfc9f7168dCcF3b0E7F9DC4D0967d9F9b5b9d40f0", + "dataSubmitter": "0x2A69EFA58248647D57D0A3a09e7ED38D2a8343d2", + "optionSettlementHelper": "0x5eccd7500D3Dc844E0a3c4e50aA31A313460e5a0", + "perpSettlementHelper": "0x236D36C52bC56a37d9094B424A1420BE21f6392c", + "rateModel": "0xE47e447DAFf1537e8D69d8c626e624c5b44A9BA2", + "securityModule": "0xfcE44D7253C6f589d5A2E9AAFE11dFcA4464269a", + "srm": "0xD3D11C146D892af11Cebed9Ea04e29D27d49Bf03", + "srmViewer": "0xF151509ABefb08EdaF4CFd95fE6B3Eecb7d5C158", + "stableFeed": "0xbf89A191a7F3678Baaa44064632835E08A0657cA", + "subAccounts": "0xe1719F71E56341d35767dd30D4a554c92B0d086f" +} \ No newline at end of file diff --git a/deployments/456654/shared.json b/deployments/456654/shared.json new file mode 100644 index 00000000..5b40862d --- /dev/null +++ b/deployments/456654/shared.json @@ -0,0 +1,9 @@ +{ + "usdc": "0x251F53D6E1f79d548f1013F3A78F18841750C76A", + "useMockedFeed": false, + "feedSigners": [ + "0x555eB362b5057e36f88cCb42b44D6dA5Fe7A0656", + "0x47ebFBAda4d85Dac6b9018C0CE75774556A8243f" + ], + "requiredSigners": 2 +} \ No newline at end of file diff --git a/scripts/deploy-core.s.sol b/scripts/deploy-core.s.sol index 47e6cc22..96fbc8c2 100644 --- a/scripts/deploy-core.s.sol +++ b/scripts/deploy-core.s.sol @@ -24,6 +24,8 @@ import "./config-mainnet.sol"; import "../src/periphery/PerpSettlementHelper.sol"; import "../src/periphery/OptionSettlementHelper.sol"; +// PRIVATE_KEY={} forge script scripts/deploy-perp-only-market.s.sol --private-key {} --rpc-url {} --verify --verifier blockscout --verifier-url {} --broadcast --priority-gas-price 1 + contract DeployCore is Utils { /// @dev main function @@ -81,7 +83,7 @@ contract DeployCore is Utils { for (uint i = 0; i < config.feedSigners.length; ++i) { stableFeed.addSigner(config.feedSigners[i], true); } - stableFeed.setRequiredSigners(config.feedSigners.length); + stableFeed.setRequiredSigners(uint8(config.feedSigners.length)); deployment.stableFeed = stableFeed; deployment.dataSubmitter = new OracleDataSubmitter(); diff --git a/scripts/deploy-erc20s.s.sol b/scripts/deploy-erc20s.s.sol index 98349cd0..0c9281ec 100644 --- a/scripts/deploy-erc20s.s.sol +++ b/scripts/deploy-erc20s.s.sol @@ -25,11 +25,11 @@ contract DeployERC20s is Utils { // write to configs file: eg: input/31337/config.json string memory objKey = "network-config"; vm.serializeAddress(objKey, "usdc", address(new LyraERC20("USDC", "USDC", 6))); - vm.serializeAddress(objKey, "btc", address(new LyraERC20("Lyra WBTC", "WBTC", 8))); - vm.serializeAddress(objKey, "eth", address(new LyraERC20("Lyra WETH", "WETH", 18))); - vm.serializeAddress(objKey, "usdt", address(new LyraERC20("Lyra USDT", "USDT", 6))); - vm.serializeAddress(objKey, "snx", address(new LyraERC20("Lyra SNX", "SNX", 18))); - vm.serializeAddress(objKey, "wsteth", address(new LyraERC20("Lyra x Lido wstETH", "wstETH", 18))); + // vm.serializeAddress(objKey, "btc", address(new LyraERC20("Lyra WBTC", "WBTC", 8))); + // vm.serializeAddress(objKey, "eth", address(new LyraERC20("Lyra WETH", "WETH", 18))); + // vm.serializeAddress(objKey, "usdt", address(new LyraERC20("Lyra USDT", "USDT", 6))); + // vm.serializeAddress(objKey, "snx", address(new LyraERC20("Lyra SNX", "SNX", 18))); + // vm.serializeAddress(objKey, "wsteth", address(new LyraERC20("Lyra x Lido wstETH", "wstETH", 18))); // vm.serializeAddress(objKey, "rsweth", address(new LyraERC20("Lyra rswETH", "wstETH", 18))); // vm.serializeAddress(objKey, "susde", address(new LyraERC20("Lyra Staked USDe", "sUSDe", 18))); @@ -37,8 +37,11 @@ contract DeployERC20s is Utils { string memory finalObj = vm.serializeBool(objKey, "useMockedFeed", false); // build path - _writeToInput("config", finalObj); + // _writeToInput("config", finalObj); vm.stopBroadcast(); } -} \ No newline at end of file +} + +// PRIVATE_KEY=0x136cfb508c086319f2cd5e7b3d60923c0b6ccee8bd8404fb4f5ed435980f1598 forge script scripts/deploy-erc20s.s.sol --private-key 0x136cfb508c086319f2cd5e7b3d60923c0b6ccee8bd8404fb4f5ed435980f1598 --rpc-url https://rpc-derive-fork-testnet-tsbukxq8bm.t.conduit.xyz --verify --verifier blockscout --verifier-url https://explorer-derive-fork-testnet-tsbukxq8bm.t.conduit.xyz/api --broadcast --priority-gas-price 1 +// PRIVATE_KEY=0x136cfb508c086319f2cd5e7b3d60923c0b6ccee8bd8404fb4f5ed435980f1598 forge script scripts/deploy-erc20s.s.sol --private-key 0x136cfb508c086319f2cd5e7b3d60923c0b6ccee8bd8404fb4f5ed435980f1598 --rpc-url https://rpc-derive-fork-mainnet-uwnjei7co0.t.conduit.xyz --verify --verifier blockscout --verifier-url https://explorer-derive-fork-mainnet-uwnjei7co0.t.conduit.xyz/api --broadcast --priority-gas-price 1 \ No newline at end of file