Skip to content

Commit

Permalink
feat: new chain core
Browse files Browse the repository at this point in the history
  • Loading branch information
joshpwrk committed Oct 9, 2024
1 parent 8192dab commit e5fb17d
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 8 deletions.
13 changes: 13 additions & 0 deletions deployments/123987/core.json
Original file line number Diff line number Diff line change
@@ -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"
}
9 changes: 9 additions & 0 deletions deployments/123987/shared.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"usdc": "0x251F53D6E1f79d548f1013F3A78F18841750C76A",
"useMockedFeed": false,
"feedSigners": [
"0x555eB362b5057e36f88cCb42b44D6dA5Fe7A0656",
"0x47ebFBAda4d85Dac6b9018C0CE75774556A8243f"
],
"requiredSigners": 2
}
13 changes: 13 additions & 0 deletions deployments/456654/core.json
Original file line number Diff line number Diff line change
@@ -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"
}
9 changes: 9 additions & 0 deletions deployments/456654/shared.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"usdc": "0x251F53D6E1f79d548f1013F3A78F18841750C76A",
"useMockedFeed": false,
"feedSigners": [
"0x555eB362b5057e36f88cCb42b44D6dA5Fe7A0656",
"0x47ebFBAda4d85Dac6b9018C0CE75774556A8243f"
],
"requiredSigners": 2
}
4 changes: 3 additions & 1 deletion scripts/deploy-core.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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();
Expand Down
17 changes: 10 additions & 7 deletions scripts/deploy-erc20s.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,23 @@ 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)));

vm.serializeAddress(objKey, "feedSigners", feedSigners);
string memory finalObj = vm.serializeBool(objKey, "useMockedFeed", false);

// build path
_writeToInput("config", finalObj);
// _writeToInput("config", finalObj);

vm.stopBroadcast();
}
}
}

// 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

0 comments on commit e5fb17d

Please sign in to comment.