From fdf3b41ce850f4cbd5847193aa2005ff540f82f2 Mon Sep 17 00:00:00 2001 From: nickkatsios Date: Mon, 16 Sep 2024 11:31:04 +0300 Subject: [PATCH 1/3] whitelist milestone season ifx --- protocol/reseed/data/r9-whitelist.json | 8 +++--- .../reseed/dataConverts/convertWhitelist.js | 25 ++++++++++--------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/protocol/reseed/data/r9-whitelist.json b/protocol/reseed/data/r9-whitelist.json index 8357100df..36c5b4064 100644 --- a/protocol/reseed/data/r9-whitelist.json +++ b/protocol/reseed/data/r9-whitelist.json @@ -206,7 +206,7 @@ "0xc84c7727", "1", "10000", - "0", + "0x5fbc", "0", "0x01", "0", @@ -246,7 +246,7 @@ "0xc84c7727", "1", "10000", - "0", + "0x5fbc", "0", "0x01", "0", @@ -283,7 +283,7 @@ "0xBEA00dAf62D5549D265c5cA6D6BE87eF17881279", "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", [ - "0x00000000", + "0xc84c7727", "0x1", "0x2540be400", "0x5525", @@ -326,7 +326,7 @@ "0xc84c7727", "1", "10000", - "0", + "0x5fbc", "0", "0x01", "0", diff --git a/protocol/reseed/dataConverts/convertWhitelist.js b/protocol/reseed/dataConverts/convertWhitelist.js index 12b31ddac..e91a3a6de 100644 --- a/protocol/reseed/dataConverts/convertWhitelist.js +++ b/protocol/reseed/dataConverts/convertWhitelist.js @@ -93,18 +93,6 @@ const tokensToWhitelist = [ "0xBEA00bE150FEF7560A8ff3C68D07387693Ddfd0b" ]; -const defaultAssetSettings = { - selector: "0xc84c7727", - stalkEarnedPerSeason: "1", - stalkIssuedPerBdv: "10000", - milestoneSeason: "0", - milestoneStem: "0", - encodeType: "0x01", - deltaStalkEarnedPerSeason: "0", - gaugePoints: "0", - optimalPercentDepositedBdv: "0" -}; - const tokenToWhitelistMapping = { "0xBEA0005B8599265D41256905A9B3073D397812E4": [ "0xBEA0005B8599265D41256905A9B3073D397812E4", @@ -186,6 +174,19 @@ const tokenToGpAndOptimalPercentDepositedBdvMapping = { function parseWhitelist(inputFilePath, outputFilePath) { try { const data = JSON.parse(fs.readFileSync(inputFilePath, "utf8")); + + const defaultAssetSettings = { + selector: "0xc84c7727", + stalkEarnedPerSeason: "1", + stalkIssuedPerBdv: "10000", + milestoneSeason: data.season.current, + milestoneStem: "0", + encodeType: "0x01", + deltaStalkEarnedPerSeason: "0", + gaugePoints: "0", + optimalPercentDepositedBdv: "0" + }; + const assetSettings = data.silo.assetSettings; const output = {}; From c24dcd88cadb9a42ebbbecc90e4135fec1123a14 Mon Sep 17 00:00:00 2001 From: nickkatsios Date: Mon, 16 Sep 2024 15:53:15 +0300 Subject: [PATCH 2/3] fix ratios and lsd chainlink oracle address --- protocol/reseed/reseed9.js | 8 ++++++- .../reseed/reseedAddLiquidityAndTransfer.js | 22 +++++++++---------- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/protocol/reseed/reseed9.js b/protocol/reseed/reseed9.js index 35269825f..72027affe 100644 --- a/protocol/reseed/reseed9.js +++ b/protocol/reseed/reseed9.js @@ -22,7 +22,13 @@ async function reseed9(account, L2Beanstalk, mock = false) { let oracles = assets.map((asset) => asset[4]); // deploy LSD chainlink oracle for whitelist: - await deployContract("LSDChainlinkOracle", account, true, []); + const LSDChainlinkOracle = await deployContract("LSDChainlinkOracle", account, true, []); + console.log("LSDChainlinkOracle deployed at:", LSDChainlinkOracle.address); + + // modify oracles for token 4 (WSTETH) and token 5 (WEETH) to use LSDChainlinkOracle address. + oracles[4][0] = LSDChainlinkOracle.address; + oracles[5][0] = LSDChainlinkOracle.address; + await upgradeWithNewFacets({ diamondAddress: L2Beanstalk, diff --git a/protocol/reseed/reseedAddLiquidityAndTransfer.js b/protocol/reseed/reseedAddLiquidityAndTransfer.js index 7f1f1186a..f659ea82e 100644 --- a/protocol/reseed/reseedAddLiquidityAndTransfer.js +++ b/protocol/reseed/reseedAddLiquidityAndTransfer.js @@ -7,7 +7,7 @@ const { L2_USDC, L2_USDT } = require("../test/hardhat/utils/constants.js"); -const { to18, to6 } = require("../test/hardhat/utils/helpers.js"); +const { to18, to6, toX } = require("../test/hardhat/utils/helpers.js"); const { impersonateToken } = require("../scripts/impersonate.js"); const fs = require("fs"); @@ -36,20 +36,20 @@ async function reseedAddLiquidityAndTransfer(account, L2Beanstalk, mock = true, ); const nonBeanAmounts = [ - balancesInBeanEthWell[1], // BEAN/WETH - balancesInBeanWstEthWell[1], // BEAN/WstETH - to18("1000"), // BEAN/WEEETH - to18("1"), // BEAN/WBTC - balancesInBeanStableWell[1], // BEAN/USDC - to6("100000") // BEAN/USDT + to18("100"), // BEAN/WETH + to18("100"), // BEAN/WstETH + to18("1500"), // BEAN/WEEETH + toX("20", 8), // BEAN/WBTC (8 decimals) + to6("1000000"), // BEAN/USDC + to6("1000000") // BEAN/USDT ]; const beanAmounts = [ - balancesInBeanEthWell[0], // BEAN/WETH - balancesInBeanWstEthWell[0], // BEAN/WstETH + to6("1000000"), // BEAN/WETH + to6("1000000"), // BEAN/WstETH to6("1000000"), // BEAN/WEEETH - to6("100000000000000000"), // BEAN/WBTC - to6("1000000000000"), // BEAN/USDC + to6("1000000"), // BEAN/WBTC + to6("1000000"), // BEAN/USDC to6("1000000") // BEAN/USDT ]; console.log("-----------------------------------"); From d812f74bcb1953bca27e3a2202b692bf98b7d1ee Mon Sep 17 00:00:00 2001 From: nickkatsios Date: Mon, 16 Sep 2024 18:48:53 +0300 Subject: [PATCH 3/3] update stalkIssuedPerBdv precision in convertWhitelist --- protocol/reseed/dataConverts/convertWhitelist.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocol/reseed/dataConverts/convertWhitelist.js b/protocol/reseed/dataConverts/convertWhitelist.js index e91a3a6de..977bfbdb3 100644 --- a/protocol/reseed/dataConverts/convertWhitelist.js +++ b/protocol/reseed/dataConverts/convertWhitelist.js @@ -178,7 +178,7 @@ function parseWhitelist(inputFilePath, outputFilePath) { const defaultAssetSettings = { selector: "0xc84c7727", stalkEarnedPerSeason: "1", - stalkIssuedPerBdv: "10000", + stalkIssuedPerBdv: "10000000000", milestoneSeason: data.season.current, milestoneStem: "0", encodeType: "0x01",