From f0cc526c866fdac6fb6cc0d0a634110754efd559 Mon Sep 17 00:00:00 2001 From: pizzaman1337 Date: Thu, 12 Sep 2024 16:05:38 -0600 Subject: [PATCH 1/5] WIP update reseed whitelist json dynamically --- .../reseed/dataConverts/convertWhitelist.js | 282 ++++++++++++++++++ protocol/reseed/reseedL2.js | 2 + 2 files changed, 284 insertions(+) create mode 100644 protocol/reseed/dataConverts/convertWhitelist.js diff --git a/protocol/reseed/dataConverts/convertWhitelist.js b/protocol/reseed/dataConverts/convertWhitelist.js new file mode 100644 index 000000000..1dd0eec8d --- /dev/null +++ b/protocol/reseed/dataConverts/convertWhitelist.js @@ -0,0 +1,282 @@ +const fs = require("fs"); +const { convertToBigNum } = require("../../utils/read.js"); + +// map from LP token to non-bean token +const nonBeanTokenMapping = { + "0xBEA0005B8599265D41256905A9B3073D397812E4": "0xBEA0005B8599265D41256905A9B3073D397812E4", + "0x1BEA054dddBca12889e07B3E076f511Bf1d27543": "0x1BEA054dddBca12889e07B3E076f511Bf1d27543", + "0x1BEA059c3Ea15F6C10be1c53d70C75fD1266D788": "0x1BEA059c3Ea15F6C10be1c53d70C75fD1266D788", + "0xBEA00A3F7aaF99476862533Fe7DcA4b50f6158cB": "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + "0xBEA0093f626Ce32dd6dA19617ba4e7aA0c3228e8": "0x5979D7b546E38E414F7E9822514be443A4800529", + "0xBEA00865405A02215B44eaADB853d0d2192Fc29D": "0x35751007a407ca6FEFfE80b3cB397736D2cf4dbe", + "0xBEA008aC57c2bEfe82E87d1D8Fb9f4784d0B73cA": "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f", + "0xBEA00dAf62D5549D265c5cA6D6BE87eF17881279": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + "0xBEA00bE150FEF7560A8ff3C68D07387693Ddfd0b": "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9" +}; + +const tokenToOracleMapping = { + "0xBEA0005B8599265D41256905A9B3073D397812E4": [ + "0x0000000000000000000000000000000000000000", + "0x00000000", + "0x00", + "0x00" + ], + "0x1BEA054dddBca12889e07B3E076f511Bf1d27543": [ + "0x0000000000000000000000000000000000000000", + "0x00000000", + "0x00", + "0x00" + ], + "0x1BEA059c3Ea15F6C10be1c53d70C75fD1266D788": [ + "0x0000000000000000000000000000000000000000", + "0x00000000", + "0x00", + "0x00" + ], + "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1": [ + "0x639Fe6ab55C921f74e7fac1ee960C0B6293ba612", + "0x00000000", + "0x01", + "0x000000000000000000000000000000000000000000000000000000000001fa40" + ], + "0x5979D7b546E38E414F7E9822514be443A4800529": [ + "0x74749a1c8b2faa03c7259F90919628b1241A2ea5", + "0xb0dd7409", + "0x00", + "0x000000000000000000000000639fe6ab55c921f74e7fac1ee960c0b6293ba6120000000000000000000000000000000000000000000000000000000000003840000000000000000000000000e141425bc1594b8039de6390db1cdaf4397ea22b000000000000000000000000000000000000000000000000000000000001fa4000000000000000000000000035751007a407ca6feffe80b3cb397736d2cf4dbe" + ], + "0x35751007a407ca6FEFfE80b3cB397736D2cf4dbe": [ + "0x74749a1c8b2faa03c7259F90919628b1241A2ea5", + "0xb0dd7409", + "0x00", + "0x000000000000000000000000639fe6ab55c921f74e7fac1ee960c0b6293ba6120000000000000000000000000000000000000000000000000000000000003840000000000000000000000000b523ae262d20a936bc152e6023996e46fdc2a95d000000000000000000000000000000000000000000000000000000000001fa400000000000000000000000005979d7b546e38e414f7e9822514be443a4800529" + ], + "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f": [ + "0xd0C7101eACbB49F3deCcCc166d238410D6D46d57", + "0x00000000", + "0x01", + "0x000000000000000000000000000000000000000000000000000000000001fa40" + ], + "0xaf88d065e77c8cC2239327C5EDb3A432268e5831": [ + "0x50834F3163758fcC1Df9973b6e91f0F0F0434aD3", + "0x00000000", + "0x01", + "0x000000000000000000000000000000000000000000000000000000000001fa40" + ], + "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9": [ + "0x3f3f5dF88dC9F13eac63DF89EC16ef6e7E25DdE7", + "0x00000000", + "0x01", + "0x000000000000000000000000000000000000000000000000000000000001fa40" + ] +}; + +// 0x2c5fa218 is sig for "maxWeight(bytes memory)" +const liquidityWeightImpl = [ + "0x0000000000000000000000000000000000000000", + "0x2c5fa218", + "0x00", + "0x00" +]; +// 0xe4b8d822 is sig for ""function defaultGaugePointFunction(uint256 currentGaugePoints,uint256 optimalPercentDepositedBdv,uint256 percentOfDepositedBdv,bytes memory)"" +const gaugePointImpl = ["0x0000000000000000000000000000000000000000", "0xe4b8d822", "0x00", "0x00"]; + +const tokensToWhitelist = [ + "0xBEA0005B8599265D41256905A9B3073D397812E4", + "0x1BEA054dddBca12889e07B3E076f511Bf1d27543", + "0x1BEA059c3Ea15F6C10be1c53d70C75fD1266D788", + "0xBEA00A3F7aaF99476862533Fe7DcA4b50f6158cB", + "0xBEA0093f626Ce32dd6dA19617ba4e7aA0c3228e8", + "0xBEA00865405A02215B44eaADB853d0d2192Fc29D", + "0xBEA008aC57c2bEfe82E87d1D8Fb9f4784d0B73cA", + "0xBEA00dAf62D5549D265c5cA6D6BE87eF17881279", + "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", + true, + false, + false, + false + ], + "0x1BEA054dddBca12889e07B3E076f511Bf1d27543": [ + "0x1BEA054dddBca12889e07B3E076f511Bf1d27543", + true, + false, + false, + false + ], + "0x1BEA059c3Ea15F6C10be1c53d70C75fD1266D788": [ + "0x1BEA059c3Ea15F6C10be1c53d70C75fD1266D788", + true, + false, + false, + false + ], + "0xBEA00A3F7aaF99476862533Fe7DcA4b50f6158cB": [ + "0xBEA00A3F7aaF99476862533Fe7DcA4b50f6158cB", + true, + true, + true, + true + ], + "0xBEA0093f626Ce32dd6dA19617ba4e7aA0c3228e8": [ + "0xBEA0093f626Ce32dd6dA19617ba4e7aA0c3228e8", + true, + true, + true, + true + ], + "0xBEA00865405A02215B44eaADB853d0d2192Fc29D": [ + "0xBEA00865405A02215B44eaADB853d0d2192Fc29D", + true, + true, + true, + true + ], + "0xBEA008aC57c2bEfe82E87d1D8Fb9f4784d0B73cA": [ + "0xBEA008aC57c2bEfe82E87d1D8Fb9f4784d0B73cA", + true, + true, + true, + true + ], + "0xBEA00dAf62D5549D265c5cA6D6BE87eF17881279": [ + "0xBEA00dAf62D5549D265c5cA6D6BE87eF17881279", + true, + true, + true, + true + ], + "0xBEA00bE150FEF7560A8ff3C68D07387693Ddfd0b": [ + "0xBEA00bE150FEF7560A8ff3C68D07387693Ddfd0b", + true, + true, + true, + true + ] +}; + +function parseWhitelist(inputFilePath, outputFilePath) { + try { + const data = JSON.parse(fs.readFileSync(inputFilePath, "utf8")); + const assetSettings = data.silo.assetSettings; + + const whitelistStatuses = Object.fromEntries( + data.silo.whitelistStatuses.map((item) => [item.token, item]) + ); + + console.log("assetSettings:", assetSettings); + console.log("whitelistStatuses:", whitelistStatuses); + + /* + Implementation memory liquidityWeightImpl = Implementation( + address(0), + ILiquidityWeightFacet.maxWeight.selector, + bytes1(0), + new bytes(0) + ); + Implementation memory gaugePointImpl = Implementation( + address(0), + IGaugePointFacet.defaultGaugePointFunction.selector, + bytes1(0), + new bytes(0) + ); + */ + + const output = {}; + + for (const token of tokensToWhitelist) { + // each key has 3 values + // 0 whitelisted token + // 1 non-bean token + // 2 silo settings AssetSettings + // 3 whitelist status WhitelistStatus + // 4 oracles Implementation + /* + [ + "0xBEA0005B8599265D41256905A9B3073D397812E4", + "0xBEA0005B8599265D41256905A9B3073D397812E4", + [ // silo settings + "0x5a049a47", + "0", + "10000", + "0", + "0", + "0x00", + "0", + "0", + "0", + ["0x0000000000000000000000000000000000000000", "0x00000000", "0x00", "0x00"], + ["0x0000000000000000000000000000000000000000", "0x00000000", "0x00", "0x00"] + ], + ["0xBEA0005B8599265D41256905A9B3073D397812E4", true, false, false, false], // whitelist status + ["0x0000000000000000000000000000000000000000", "0x00000000", "0x00", "0x00"] // oracles + ], + */ + + var nonBeanToken = nonBeanTokenMapping[token]; + + var tokenAssetSettings = defaultAssetSettings; + if (token in assetSettings) { + tokenAssetSettings = assetSettings[token]; + } + + output[token] = [ + token, + // non-bean token, this is used for Oracle settings + nonBeanToken, + // silo settings array + [ + tokenAssetSettings.selector, + tokenAssetSettings.stalkEarnedPerSeason, + tokenAssetSettings.stalkIssuedPerBdv, + tokenAssetSettings.milestoneSeason, + tokenAssetSettings.milestoneStem, + tokenAssetSettings.encodeType, + tokenAssetSettings.deltaStalkEarnedPerSeason, + tokenAssetSettings.gaugePoints, + tokenAssetSettings.optimalPercentDepositedBdv, + liquidityWeightImpl, // these 2 are new so are set manually + gaugePointImpl + ], + // whitelist status + tokenToWhitelistMapping[token], + // oracle implementation (for the non-bean token) + tokenToOracleMapping[nonBeanToken] + ]; + } + + console.log("output:", output); + + // only order requirement is that unripe tokens should be first + + var finalOutput = []; + + // loop through output and put into finalOutput in order of tokensToWhitelist + for (const token of tokensToWhitelist) { + finalOutput.push(output[token]); + } + + fs.writeFileSync(outputFilePath, JSON.stringify(finalOutput, null, 2)); + console.log("Field JSON has been written successfully"); + } catch (err) { + console.error("Error:", err); + } +} + +exports.parseWhitelist = parseWhitelist; diff --git a/protocol/reseed/reseedL2.js b/protocol/reseed/reseedL2.js index 468b46619..37cf01869 100644 --- a/protocol/reseed/reseedL2.js +++ b/protocol/reseed/reseedL2.js @@ -1,6 +1,7 @@ const { parseAccountStatus } = require("./dataConverts/convertAccountStatuses.js"); const { parseInternalBalances } = require("./dataConverts/convertInternalBalances.js"); const { parseField } = require("./dataConverts/convertField.js"); +const { parseWhitelist } = require("./dataConverts/convertWhitelist.js"); const { parseDeposits } = require("./dataConverts/convertDeposits.js"); const { parseFertilizer } = require("./dataConverts/convertFert.js"); const { parsePodMarketplace } = require("./dataConverts/convertPodMarketplace.js"); @@ -176,6 +177,7 @@ function parseBeanstalkData() { "./reseed/data/r2/L2_external_unripe_lp_balances.json", contractAccounts ); + parseWhitelist(storageSystemPath, "./reseed/data/r9-whitelist-test.json"); } async function printBeanstalk() { From dd6304419da90013d15216352ce051528e07caa8 Mon Sep 17 00:00:00 2001 From: pizzaman1337 Date: Thu, 12 Sep 2024 21:11:14 -0600 Subject: [PATCH 2/5] Add gaugePoints and optimalPercentDepositedBdv --- .../reseed/dataConverts/convertWhitelist.js | 19 +++- .../test/foundry/Migration/data/accounts.txt | 92 +------------------ 2 files changed, 18 insertions(+), 93 deletions(-) diff --git a/protocol/reseed/dataConverts/convertWhitelist.js b/protocol/reseed/dataConverts/convertWhitelist.js index 1dd0eec8d..d91e36c04 100644 --- a/protocol/reseed/dataConverts/convertWhitelist.js +++ b/protocol/reseed/dataConverts/convertWhitelist.js @@ -171,6 +171,18 @@ const tokenToWhitelistMapping = { ] }; +const tokenToGpAndOptimalPercentDepositedBdvMapping = { + "0xBEA0005B8599265D41256905A9B3073D397812E4": ["0", "0"], + "0x1BEA054dddBca12889e07B3E076f511Bf1d27543": ["0", "0"], + "0x1BEA059c3Ea15F6C10be1c53d70C75fD1266D788": ["0", "0"], + "0xBEA00A3F7aaF99476862533Fe7DcA4b50f6158cB": ["160000000000000000000", "16000000"], + "0xBEA0093f626Ce32dd6dA19617ba4e7aA0c3228e8": ["260000000000000000000", "26000000"], + "0xBEA00865405A02215B44eaADB853d0d2192Fc29D": ["140000000000000000000", "14000000"], + "0xBEA008aC57c2bEfe82E87d1D8Fb9f4784d0B73cA": ["200000000000000000000", "20000000"], + "0xBEA00dAf62D5549D265c5cA6D6BE87eF17881279": ["120000000000000000000", "12000000"], + "0xBEA00bE150FEF7560A8ff3C68D07387693Ddfd0b": ["120000000000000000000", "12000000"] +}; + function parseWhitelist(inputFilePath, outputFilePath) { try { const data = JSON.parse(fs.readFileSync(inputFilePath, "utf8")); @@ -236,6 +248,9 @@ function parseWhitelist(inputFilePath, outputFilePath) { tokenAssetSettings = assetSettings[token]; } + var tokenToGpAndOptimalPercentDepositedBdv = + tokenToGpAndOptimalPercentDepositedBdvMapping[token]; + output[token] = [ token, // non-bean token, this is used for Oracle settings @@ -249,8 +264,8 @@ function parseWhitelist(inputFilePath, outputFilePath) { tokenAssetSettings.milestoneStem, tokenAssetSettings.encodeType, tokenAssetSettings.deltaStalkEarnedPerSeason, - tokenAssetSettings.gaugePoints, - tokenAssetSettings.optimalPercentDepositedBdv, + tokenToGpAndOptimalPercentDepositedBdv[0], + tokenToGpAndOptimalPercentDepositedBdv[1], liquidityWeightImpl, // these 2 are new so are set manually gaugePointImpl ], diff --git a/protocol/test/foundry/Migration/data/accounts.txt b/protocol/test/foundry/Migration/data/accounts.txt index ebd76bd1b..f1af72ef5 100644 --- a/protocol/test/foundry/Migration/data/accounts.txt +++ b/protocol/test/foundry/Migration/data/accounts.txt @@ -7,94 +7,4 @@ 0x0086e622aC7afa3e5502dc895Fd0EAB8B3A78D97 0x008829aCd7Ec452Fc50989aA9BFa5d196Baae20a 0x008D63fab8179Ee0aE2082Bb57C72ED0c61f990f -0x00975ae9c986df066c7bbDA496103B4cC44B26c3 -0x00aaEa7B4dC89E4a4fACDa32da496ba5D8E1216d -0x00C459905bC314E03Af933020dea4644BE06aaD9 -0x00Ca340D789F00d4c978b236606C3105A09254F8 -0x0106B2C42DB283a5faf3FAA351ed5b9f00FD51ce -0x0127F5b0e559D1C8C054d83f8F187CDFDc80B608 -0x01914D6E47657d6A7893F84Fc84660dc5aec08b6 -0x01C7145c01d06a026D3dDA4700b727fE62677628 -0x01e82e6c90fa599067E1F59323064055F5007A26 -0x02009370Ff755704E9acbD96042C1ab832D6067e -0x0245934a930544C7046069968eB4339B03adDFcf -0x0255b20571acc2e1708ADE387b692360537F9e89 -0x0259D65954DfbD0735E094C9CdACC256e5A29dD4 -0x028afa72DADB6311107c382cF87504F37F11D482 -0x029D058CFdBE37eb93949e4143c516557B89EB3c -0x02A527084F5E73AF7781846762c8753aCD096461 -0x02bfbb25bf8396910378bF3b3ce82C0CE6d5E61d -0x02df7e960FFda6Db4030003D1784A7639947d200 -0x02FE27e7000C7B31E25E08dC3cDFdE5F39d659c5 -0x0301871FeDc523AB336535Ed14B939A956c4c39F -0x030ae585DB6d5169B3594eC37c008662f2494a1D -0x031B8ece36b2C1f14C870421A1989AEbe3d7bcFa -0x03768446C681761669Ab6DC721762Aa065c81f26 -0x0399ecFbb2a9D0D520738b3179FA685cD5c6D692 -0x03F52a039d9665C19a771204493B53B81C9405aF -0x0440bDd684444f1433f3d1E0208656abF9993C52 -0x04776ef6C70C281E13deDaf50AA8bbA75fbecA31 -0x047B22BFE547d29843c825dbcBd9E0168649d631 -0x04Dc1bDcb450Ea6734F5001B9CeCb0Cd09690f4f -0x04F095a8B608527B336DcfE5cC8A5Ac253007Dec -0x0519064e3216cf6d6643Cc65dB1C39C20ABE50e0 -0x051f77131b0ea6d149608021E06c7206317782CC -0x052E8fABDCE1dB054590664944B16e1df4B57898 -0x055C419F4841f6A3153E64a4E174a242A4fFA6f0 -0x0562695929503E930DE265F944B899dEBF93Df7c -0x056590F16D5b314a132BbCFb1283fEc5D5C6E670 -0x05cD14412ccd74F05379199181aA1847ed4802fd -0x05Dc8E95a479dDA8C8Fc5a27Eb825f5042048937 -0x0625fAaD99bCD3d22C91aB317079F6616e81e3c0 -0x06319B2e91A7C559105eE81fF599FaFFEDbAd000 -0x066E9372fF4D618ba8f9b1E366463A18DD711e5E -0x0679bE304b60cd6ff0c254a16Ceef02Cb19ca1B8 -0x0686002661e6a2A1E86b8Cb897C2eC226060481b -0x0692Ee6b5c88870DA8105aFEAA834A20091a29Ff -0x0694356524F17a18A0Ac3e1d8e767eeEBd8A4ad9 -0x069e85D4F1010DD961897dC8C095FBB5FF297434 -0x072Fa8a20fA621665B94745A8075073ceAdFE1DC -0x077165031d8d46B52368A8C92E8333437fb60EF8 -0x07806c232D6F669Eb9cD33FD2834869aa14EE4F4 -0x078ad2Aa3B4527e4996D087906B2a3DA51BbA122 -0x07A75Ba044cDAaa624aAbAD27CB95C42510AF4B5 -0x083aA7FF9AE00099471902178bf2fda4e6aC14Bf -0x084D73726d2824478dF09bE72EcAB4177F7F1bd7 -0x08535BBDd792254C23d6fBE21c25252461E740b8 -0x0872FcfE9C10993c0e55bb0d0c61c327933D6549 -0x0898512055826732026aC02242E7D7B66fccC2B0 -0x08b4aeB2b1475214aa7a3E9aCc6C5E359796f297 -0x08fD119453cD459F7E9e4232AD9816266863BFb1 -0x093037BA3A1e350f549F0Ff8Ff17C86B1FfA2B4b -0x0933F554312C7bcB86dF896c46A44AC2381383D1 -0x0959BE05E1C3aDC6Ee20D6fA1252Bb0906A94743 -0x095B9C41921415636F91F9B5754786Ed6CA6f1d4 -0x0968d6491823b97446220081C511328d8d9Fb61D -0x0988D84619708DCe4a9298939e5449d528Dc800B -0x09Ad186D43615aa3131c6064538aF6E0A643Ce12 -0x09Bc3c127ED4c491880c2A250d6d034696cb5fC1 -0x0ab72D3f6eddF0e382f5CF4098fFAb85EA961077 -0x0b248c6A152F35A4678dF45Baf5958Ce8A8CaCCc -0x0B54B916E90b8f28ad21dA40638E0724132C9c93 -0x0b8e605A7446801ae645e57de5AAbbc251cD1e3c -0x0b8fc89A38698B9BB52C544a1dBCc85ADfcA4153 -0x0baBD9Eba4c7C739Edd2dBCd6de0b7C483068948 -0x0Bb53dE33DF0F8BA40E0E06Be85998f506c4C7bc -0x0Bbe643D5d9DD0498d0C9546F728504A4aAb78f4 -0x0Bc7F48e752407108C0A164928DF7c65Aa4de31f -0x0be9A9100A95075270e47De519D53c5fc8F7C936 -0x0bFD9FC73C82bE0558f3A651F10a8BD8c784F45E -0x0C040E41b5b17374b060872295cBE10Ec8954550 -0x0cb556AebE39b3c9EF5CBe8b668E925DB10a2D7D -0x0ccBCaA60D8b59bDf751B70Ee623d58c609170ac -0x0d07708d0E155865D9baEe9963E16ddd46F5dECF -0x0d0bD6469BE80d57893cf1B21434936dfAA35319 -0x0d3fc68CA620bCFac48F18d75C6B6a8b0ffb8Fbb -0x0d5d11732391E14E2084596F0F521d4d363164B6 -0x0d7E219D07ddE19fc3dfA9Ede55528b725231Ee5 -0x0D935eaA0EaFcFe11f111638FEe358651456D29C -0x0d94B6e4c2Aa9383964986020B3534D34885f700 -0x0DBFe040866BBF36f0231b589d26020bBAb923D2 -0x0DE299534957329688a735d03961dBd848A5f87f -0x0df3e4945E0Fa652D0FFEBc1bce58D1a14d9f9e0 -0x0e0826998f02b2353499a12a0Ea8d8EEbe27567f \ No newline at end of file +0x00975ae9c986df066c7bbDA496103B4cC44B26c3 \ No newline at end of file From 0060f626aae4407d0b4e949f3e1a4a636b773643 Mon Sep 17 00:00:00 2001 From: pizzaman1337 Date: Fri, 13 Sep 2024 09:56:26 -0600 Subject: [PATCH 3/5] Update system storage json, cleanup convertWhitelist --- .../data/exports/storage-system20577510.json | 116 +++---- protocol/reseed/data/r9-whitelist.json | 297 ++++++++++++++---- .../reseed/dataConverts/convertWhitelist.js | 54 ---- protocol/reseed/reseedL2.js | 2 +- 4 files changed, 287 insertions(+), 182 deletions(-) diff --git a/protocol/reseed/data/exports/storage-system20577510.json b/protocol/reseed/data/exports/storage-system20577510.json index 68a13169c..07809f7bf 100644 --- a/protocol/reseed/data/exports/storage-system20577510.json +++ b/protocol/reseed/data/exports/storage-system20577510.json @@ -301,28 +301,28 @@ }, "internalTokenBalanceTotal": { "0xBEA0005B8599265D41256905A9B3073D397812E4": "0xe9b38900c8", - "0xBEA00ebA46820994d24E45dffc5c006bBE35FD89": "0x0", - "0xBEA0039bC614D95B65AB843C4482a1A5D2214396": "0x0", - "0xBEA00C30023E873D881da4363C00F600f5e14c12": "0x76f2234d2", + "0xBEA00A3F7aaF99476862533Fe7DcA4b50f6158cB": "0x0", + "0xBEA0093f626Ce32dd6dA19617ba4e7aA0c3228e8": "0x0", + "0xBEA00dAf62D5549D265c5cA6D6BE87eF17881279": "0x76f2234d2", "0x1BEA054dddBca12889e07B3E076f511Bf1d27543": "0x23bfb0382fc", "0x1BEA059c3Ea15F6C10be1c53d70C75fD1266D788": "0x3120d987ec7" }, "wellOracleSnapshots": { - "0xBEA00ebA46820994d24E45dffc5c006bBE35FD89": "0x401d3b23ea1bc05738e4dcc7e169dbb400000000000000000000000000000000401e083a6cb20086a94bb3a84e834df900000000000000000000000000000000", - "0xBEA0039bC614D95B65AB843C4482a1A5D2214396": "0x4019f9c7680e0b64a4a1647a657c304c00000000000000000000000000000000401aaf40da666523ad9aeae70f0cbd8300000000000000000000000000000000" + "0xBEA00A3F7aaF99476862533Fe7DcA4b50f6158cB": "0x401d3b23ea1bc05738e4dcc7e169dbb400000000000000000000000000000000401e083a6cb20086a94bb3a84e834df900000000000000000000000000000000", + "0xBEA0093f626Ce32dd6dA19617ba4e7aA0c3228e8": "0x4019f9c7680e0b64a4a1647a657c304c00000000000000000000000000000000401aaf40da666523ad9aeae70f0cbd8300000000000000000000000000000000" }, "twaReserves": { - "0xBEA00ebA46820994d24E45dffc5c006bBE35FD89": { + "0xBEA00A3F7aaF99476862533Fe7DcA4b50f6158cB": { "reserve0": "0x1", "reserve1": "0x1" }, - "0xBEA0039bC614D95B65AB843C4482a1A5D2214396": { + "0xBEA0093f626Ce32dd6dA19617ba4e7aA0c3228e8": { "reserve0": "0x1", "reserve1": "0x1" } }, "usdTokenPrice": { - "0xBEA00ebA46820994d24E45dffc5c006bBE35FD89": 1 + "0xBEA00A3F7aaF99476862533Fe7DcA4b50f6158cB": 1 }, "sops": {}, "fields": { @@ -490,15 +490,15 @@ "deposited": "0x3fe1ca62260", "depositedBdv": "0x40113df7b30" }, - "0xBEA00ebA46820994d24E45dffc5c006bBE35FD89": { + "0xBEA00A3F7aaF99476862533Fe7DcA4b50f6158cB": { "deposited": "0xd0a51c903c", "depositedBdv": "0x1e3f64cd50" }, - "0xBEA0039bC614D95B65AB843C4482a1A5D2214396": { + "0xBEA0093f626Ce32dd6dA19617ba4e7aA0c3228e8": { "deposited": "0x1dc298d4", "depositedBdv": "0x321cde6fa" }, - "0xBEA00C30023E873D881da4363C00F600f5e14c12": { + "0xBEA00dAf62D5549D265c5cA6D6BE87eF17881279": { "deposited": "0xe1218492b2", "depositedBdv": "0x15134cc4b6" }, @@ -512,51 +512,23 @@ } }, "assetSettings": { - "0x1BEA054dddBca12889e07B3E076f511Bf1d27543": { - "selector": "0xc8cda2a0", - "stalkEarnedPerSeason": "0xf4240", - "stalkIssuedPerBdv": "0x2540be400", - "milestoneSeason": "0x5525", - "milestoneStem": "0x0", - "encodeType": "0x00", - "deltaStalkEarnedPerSeason": "0xf4240", - "gaugePoints": "0x0", - "optimalPercentDepositedBdv": "0x0", - "gaugePointImplementation": null, - "liquidityWeightImplementation": null, - "oracleImplementation": null - }, - "0x1BEA059c3Ea15F6C10be1c53d70C75fD1266D788": { - "selector": "0xb0c22bb1", - "stalkEarnedPerSeason": "0xf4240", - "stalkIssuedPerBdv": "0x2540be400", - "milestoneSeason": "0x5525", - "milestoneStem": "0x0", - "encodeType": "0x00", - "deltaStalkEarnedPerSeason": "0xf4240", - "gaugePoints": "0x0", - "optimalPercentDepositedBdv": "0x0", - "gaugePointImplementation": null, - "liquidityWeightImplementation": null, - "oracleImplementation": null - }, "0xBEA0005B8599265D41256905A9B3073D397812E4": { "selector": "0x5a049a47", - "stalkEarnedPerSeason": "0x51c2819c280", + "stalkEarnedPerSeason": "0x55bb3a", "stalkIssuedPerBdv": "0x2540be400", "milestoneSeason": "0x5da8", "milestoneStem": "0x7ca7bfc44", "encodeType": "0x00", - "deltaStalkEarnedPerSeason": "-0x71aa82c0", + "deltaStalkEarnedPerSeason": "-0x773", "gaugePoints": "0x0", "optimalPercentDepositedBdv": "0x0", "gaugePointImplementation": null, "liquidityWeightImplementation": null, "oracleImplementation": null }, - "0xBEA00ebA46820994d24E45dffc5c006bBE35FD89": { + "0xBEA00A3F7aaF99476862533Fe7DcA4b50f6158cB": { "selector": "0xc84c7727", - "stalkEarnedPerSeason": "0xf4240", + "stalkEarnedPerSeason": "0x1", "stalkIssuedPerBdv": "0x2540be400", "milestoneSeason": "0x5da8", "milestoneStem": "0x8af1713bf", @@ -568,28 +540,56 @@ "liquidityWeightImplementation": null, "oracleImplementation": null }, - "0xBEA0039bC614D95B65AB843C4482a1A5D2214396": { + "0xBEA0093f626Ce32dd6dA19617ba4e7aA0c3228e8": { "selector": "0xc84c7727", - "stalkEarnedPerSeason": "0x51c2819c280", + "stalkEarnedPerSeason": "0x55bb3a", "stalkIssuedPerBdv": "0x2540be400", "milestoneSeason": "0x5da8", "milestoneStem": "0xd385df6d", "encodeType": "0x01", - "deltaStalkEarnedPerSeason": "-0x71aa82c0", + "deltaStalkEarnedPerSeason": "-0x773", "gaugePoints": "0x3635c9adc5dea00000", "optimalPercentDepositedBdv": "0x4c4b400", "gaugePointImplementation": null, "liquidityWeightImplementation": null, "oracleImplementation": null }, - "0xBEA00C30023E873D881da4363C00F600f5e14c12": { + "0xBEA00dAf62D5549D265c5cA6D6BE87eF17881279": { "selector": "0x00000000", - "stalkEarnedPerSeason": "0xf4240", + "stalkEarnedPerSeason": "0x1", "stalkIssuedPerBdv": "0x2540be400", "milestoneSeason": "0x5525", "milestoneStem": "0x5f35c50f0", "encodeType": "0x00", - "deltaStalkEarnedPerSeason": "-0x2f4b30931c0", + "deltaStalkEarnedPerSeason": "-0x31974f", + "gaugePoints": "0x0", + "optimalPercentDepositedBdv": "0x0", + "gaugePointImplementation": null, + "liquidityWeightImplementation": null, + "oracleImplementation": null + }, + "0x1BEA054dddBca12889e07B3E076f511Bf1d27543": { + "selector": "0xc8cda2a0", + "stalkEarnedPerSeason": "0x1", + "stalkIssuedPerBdv": "0x2540be400", + "milestoneSeason": "0x5525", + "milestoneStem": "0x0", + "encodeType": "0x00", + "deltaStalkEarnedPerSeason": "0x1", + "gaugePoints": "0x0", + "optimalPercentDepositedBdv": "0x0", + "gaugePointImplementation": null, + "liquidityWeightImplementation": null, + "oracleImplementation": null + }, + "0x1BEA059c3Ea15F6C10be1c53d70C75fD1266D788": { + "selector": "0xb0c22bb1", + "stalkEarnedPerSeason": "0x1", + "stalkIssuedPerBdv": "0x2540be400", + "milestoneSeason": "0x5525", + "milestoneStem": "0x0", + "encodeType": "0x00", + "deltaStalkEarnedPerSeason": "0x1", "gaugePoints": "0x0", "optimalPercentDepositedBdv": "0x0", "gaugePointImplementation": null, @@ -616,14 +616,14 @@ "isSoppable": false }, { - "token": "0xBEA00ebA46820994d24E45dffc5c006bBE35FD89", + "token": "0xBEA00A3F7aaF99476862533Fe7DcA4b50f6158cB", "isWhitelisted": true, "isWhitelistedLp": true, "isWhitelistedWell": true, "isSoppable": true }, { - "token": "0xBEA00C30023E873D881da4363C00F600f5e14c12", + "token": "0xBEA00dAf62D5549D265c5cA6D6BE87eF17881279", "isWhitelisted": false, "isWhitelistedLp": false, "isWhitelistedWell": false, @@ -644,7 +644,7 @@ "isSoppable": false }, { - "token": "0xBEA0039bC614D95B65AB843C4482a1A5D2214396", + "token": "0xBEA0093f626Ce32dd6dA19617ba4e7aA0c3228e8", "isWhitelisted": true, "isWhitelistedLp": true, "isWhitelistedWell": true, @@ -657,15 +657,15 @@ "amount": "0x0", "bdv": "0x0" }, - "0xBEA00ebA46820994d24E45dffc5c006bBE35FD89": { + "0xBEA00A3F7aaF99476862533Fe7DcA4b50f6158cB": { "amount": "0x0", "bdv": "0x0" }, - "0xBEA0039bC614D95B65AB843C4482a1A5D2214396": { + "0xBEA0093f626Ce32dd6dA19617ba4e7aA0c3228e8": { "amount": "0x0", "bdv": "0x0" }, - "0xBEA00C30023E873D881da4363C00F600f5e14c12": { + "0xBEA00dAf62D5549D265c5cA6D6BE87eF17881279": { "amount": "0x0", "bdv": "0x0" }, @@ -683,15 +683,15 @@ "amount": "0x0", "bdv": "0x0" }, - "0xBEA00ebA46820994d24E45dffc5c006bBE35FD89": { + "0xBEA00A3F7aaF99476862533Fe7DcA4b50f6158cB": { "amount": "0x0", "bdv": "0x0" }, - "0xBEA0039bC614D95B65AB843C4482a1A5D2214396": { + "0xBEA0093f626Ce32dd6dA19617ba4e7aA0c3228e8": { "amount": "0x1692fd40", "bdv": "0x26ec2793c" }, - "0xBEA00C30023E873D881da4363C00F600f5e14c12": { + "0xBEA00dAf62D5549D265c5cA6D6BE87eF17881279": { "amount": "0x0", "bdv": "0x0" }, diff --git a/protocol/reseed/data/r9-whitelist.json b/protocol/reseed/data/r9-whitelist.json index 6240a1f74..bbabf2b95 100644 --- a/protocol/reseed/data/r9-whitelist.json +++ b/protocol/reseed/data/r9-whitelist.json @@ -4,75 +4,154 @@ "0xBEA0005B8599265D41256905A9B3073D397812E4", [ "0x5a049a47", - "0", - "10000", - "0", - "0", + "0x55bb3a", + "0x2540be400", + "0x5da8", + "0x7ca7bfc44", "0x00", - "0", - "0", - "0", - ["0x0000000000000000000000000000000000000000", "0x00000000", "0x00", "0x00"], - ["0x0000000000000000000000000000000000000000", "0x00000000", "0x00", "0x00"] + "-0x773", + "0", + "0", + [ + "0x0000000000000000000000000000000000000000", + "0x2c5fa218", + "0x00", + "0x00" + ], + [ + "0x0000000000000000000000000000000000000000", + "0xe4b8d822", + "0x00", + "0x00" + ] + ], + [ + "0xBEA0005B8599265D41256905A9B3073D397812E4", + true, + false, + false, + false ], - ["0xBEA0005B8599265D41256905A9B3073D397812E4", true, false, false, false], - ["0x0000000000000000000000000000000000000000", "0x00000000", "0x00", "0x00"] + [ + "0x0000000000000000000000000000000000000000", + "0x00000000", + "0x00", + "0x00" + ] ], [ "0x1BEA054dddBca12889e07B3E076f511Bf1d27543", "0x1BEA054dddBca12889e07B3E076f511Bf1d27543", [ "0xc8cda2a0", - "1", - "10000", - "0", - "0", + "0x1", + "0x2540be400", + "0x5525", + "0x0", "0x00", - "0", - "0", - "0", - ["0x0000000000000000000000000000000000000000", "0x00000000", "0x00", "0x00"], - ["0x0000000000000000000000000000000000000000", "0x00000000", "0x00", "0x00"] + "0x1", + "0", + "0", + [ + "0x0000000000000000000000000000000000000000", + "0x2c5fa218", + "0x00", + "0x00" + ], + [ + "0x0000000000000000000000000000000000000000", + "0xe4b8d822", + "0x00", + "0x00" + ] ], - ["0x1BEA054dddBca12889e07B3E076f511Bf1d27543", true, false, false, false], - ["0x0000000000000000000000000000000000000000", "0x00000000", "0x00", "0x00"] + [ + "0x1BEA054dddBca12889e07B3E076f511Bf1d27543", + true, + false, + false, + false + ], + [ + "0x0000000000000000000000000000000000000000", + "0x00000000", + "0x00", + "0x00" + ] ], [ "0x1BEA059c3Ea15F6C10be1c53d70C75fD1266D788", "0x1BEA059c3Ea15F6C10be1c53d70C75fD1266D788", [ "0xb0c22bb1", - "1", - "10000", - "0", - "0", + "0x1", + "0x2540be400", + "0x5525", + "0x0", "0x00", - "0", - "0", - "0", - ["0x0000000000000000000000000000000000000000", "0x00000000", "0x00", "0x00"], - ["0x0000000000000000000000000000000000000000", "0x00000000", "0x00", "0x00"] + "0x1", + "0", + "0", + [ + "0x0000000000000000000000000000000000000000", + "0x2c5fa218", + "0x00", + "0x00" + ], + [ + "0x0000000000000000000000000000000000000000", + "0xe4b8d822", + "0x00", + "0x00" + ] + ], + [ + "0x1BEA059c3Ea15F6C10be1c53d70C75fD1266D788", + true, + false, + false, + false ], - ["0x1BEA059c3Ea15F6C10be1c53d70C75fD1266D788", true, false, false, false], - ["0x0000000000000000000000000000000000000000", "0x00000000", "0x00", "0x00"] + [ + "0x0000000000000000000000000000000000000000", + "0x00000000", + "0x00", + "0x00" + ] ], [ "0xBEA00A3F7aaF99476862533Fe7DcA4b50f6158cB", "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", [ "0xc84c7727", - "0", - "10000", - "0", - "0", + "0x1", + "0x2540be400", + "0x5da8", + "0x8af1713bf", "0x01", - "0", + "0x0", "160000000000000000000", "16000000", - ["0x0000000000000000000000000000000000000000", "0xd8317c71", "0x00", "0x00"], - ["0x0000000000000000000000000000000000000000", "0xa8b0bb83", "0x00", "0x00"] + [ + "0x0000000000000000000000000000000000000000", + "0x2c5fa218", + "0x00", + "0x00" + ], + [ + "0x0000000000000000000000000000000000000000", + "0xe4b8d822", + "0x00", + "0x00" + ] + ], + [ + "0xBEA00A3F7aaF99476862533Fe7DcA4b50f6158cB", + true, + true, + true, + true ], - ["0xBEA00A3F7aaF99476862533Fe7DcA4b50f6158cB", true, true, true, true], [ "0x639Fe6ab55C921f74e7fac1ee960C0B6293ba612", "0x00000000", @@ -85,18 +164,34 @@ "0x5979D7b546E38E414F7E9822514be443A4800529", [ "0xc84c7727", - "0", - "10000", - "0", - "0", + "0x55bb3a", + "0x2540be400", + "0x5da8", + "0xd385df6d", "0x01", - "0", + "-0x773", "260000000000000000000", "26000000", - ["0x0000000000000000000000000000000000000000", "0xd8317c71", "0x00", "0x00"], - ["0x0000000000000000000000000000000000000000", "0xa8b0bb83", "0x00", "0x00"] + [ + "0x0000000000000000000000000000000000000000", + "0x2c5fa218", + "0x00", + "0x00" + ], + [ + "0x0000000000000000000000000000000000000000", + "0xe4b8d822", + "0x00", + "0x00" + ] + ], + [ + "0xBEA0093f626Ce32dd6dA19617ba4e7aA0c3228e8", + true, + true, + true, + true ], - ["0xBEA0093f626Ce32dd6dA19617ba4e7aA0c3228e8", true, true, true, true], [ "0x74749a1c8b2faa03c7259F90919628b1241A2ea5", "0xb0dd7409", @@ -117,10 +212,26 @@ "0", "140000000000000000000", "14000000", - ["0x0000000000000000000000000000000000000000", "0xd8317c71", "0x00", "0x00"], - ["0x0000000000000000000000000000000000000000", "0xa8b0bb83", "0x00", "0x00"] + [ + "0x0000000000000000000000000000000000000000", + "0x2c5fa218", + "0x00", + "0x00" + ], + [ + "0x0000000000000000000000000000000000000000", + "0xe4b8d822", + "0x00", + "0x00" + ] + ], + [ + "0xBEA00865405A02215B44eaADB853d0d2192Fc29D", + true, + true, + true, + true ], - ["0xBEA00865405A02215B44eaADB853d0d2192Fc29D", true, true, true, true], [ "0x74749a1c8b2faa03c7259F90919628b1241A2ea5", "0xb0dd7409", @@ -141,10 +252,26 @@ "0", "200000000000000000000", "20000000", - ["0x0000000000000000000000000000000000000000", "0xd8317c71", "0x00", "0x00"], - ["0x0000000000000000000000000000000000000000", "0xa8b0bb83", "0x00", "0x00"] + [ + "0x0000000000000000000000000000000000000000", + "0x2c5fa218", + "0x00", + "0x00" + ], + [ + "0x0000000000000000000000000000000000000000", + "0xe4b8d822", + "0x00", + "0x00" + ] + ], + [ + "0xBEA008aC57c2bEfe82E87d1D8Fb9f4784d0B73cA", + true, + true, + true, + true ], - ["0xBEA008aC57c2bEfe82E87d1D8Fb9f4784d0B73cA", true, true, true, true], [ "0xd0C7101eACbB49F3deCcCc166d238410D6D46d57", "0x00000000", @@ -156,19 +283,35 @@ "0xBEA00dAf62D5549D265c5cA6D6BE87eF17881279", "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", [ - "0xc84c7727", - "1", - "10000", - "0", - "0", - "0x01", - "0", + "0x00000000", + "0x1", + "0x2540be400", + "0x5525", + "0x5f35c50f0", + "0x00", + "-0x31974f", "120000000000000000000", "12000000", - ["0x0000000000000000000000000000000000000000", "0xd8317c71", "0x00", "0x00"], - ["0x0000000000000000000000000000000000000000", "0xa8b0bb83", "0x00", "0x00"] + [ + "0x0000000000000000000000000000000000000000", + "0x2c5fa218", + "0x00", + "0x00" + ], + [ + "0x0000000000000000000000000000000000000000", + "0xe4b8d822", + "0x00", + "0x00" + ] + ], + [ + "0xBEA00dAf62D5549D265c5cA6D6BE87eF17881279", + true, + true, + true, + true ], - ["0xBEA00dAf62D5549D265c5cA6D6BE87eF17881279", true, true, true, true], [ "0x50834F3163758fcC1Df9973b6e91f0F0F0434aD3", "0x00000000", @@ -189,10 +332,26 @@ "0", "120000000000000000000", "12000000", - ["0x0000000000000000000000000000000000000000", "0xd8317c71", "0x00", "0x00"], - ["0x0000000000000000000000000000000000000000", "0xa8b0bb83", "0x00", "0x00"] + [ + "0x0000000000000000000000000000000000000000", + "0x2c5fa218", + "0x00", + "0x00" + ], + [ + "0x0000000000000000000000000000000000000000", + "0xe4b8d822", + "0x00", + "0x00" + ] + ], + [ + "0xBEA00bE150FEF7560A8ff3C68D07387693Ddfd0b", + true, + true, + true, + true ], - ["0xBEA00bE150FEF7560A8ff3C68D07387693Ddfd0b", true, true, true, true], [ "0x3f3f5dF88dC9F13eac63DF89EC16ef6e7E25DdE7", "0x00000000", @@ -200,4 +359,4 @@ "0x000000000000000000000000000000000000000000000000000000000001fa40" ] ] -] +] \ No newline at end of file diff --git a/protocol/reseed/dataConverts/convertWhitelist.js b/protocol/reseed/dataConverts/convertWhitelist.js index d91e36c04..77ecab2c4 100644 --- a/protocol/reseed/dataConverts/convertWhitelist.js +++ b/protocol/reseed/dataConverts/convertWhitelist.js @@ -187,62 +187,10 @@ function parseWhitelist(inputFilePath, outputFilePath) { try { const data = JSON.parse(fs.readFileSync(inputFilePath, "utf8")); const assetSettings = data.silo.assetSettings; - - const whitelistStatuses = Object.fromEntries( - data.silo.whitelistStatuses.map((item) => [item.token, item]) - ); - - console.log("assetSettings:", assetSettings); - console.log("whitelistStatuses:", whitelistStatuses); - - /* - Implementation memory liquidityWeightImpl = Implementation( - address(0), - ILiquidityWeightFacet.maxWeight.selector, - bytes1(0), - new bytes(0) - ); - Implementation memory gaugePointImpl = Implementation( - address(0), - IGaugePointFacet.defaultGaugePointFunction.selector, - bytes1(0), - new bytes(0) - ); - */ - const output = {}; for (const token of tokensToWhitelist) { - // each key has 3 values - // 0 whitelisted token - // 1 non-bean token - // 2 silo settings AssetSettings - // 3 whitelist status WhitelistStatus - // 4 oracles Implementation - /* - [ - "0xBEA0005B8599265D41256905A9B3073D397812E4", - "0xBEA0005B8599265D41256905A9B3073D397812E4", - [ // silo settings - "0x5a049a47", - "0", - "10000", - "0", - "0", - "0x00", - "0", - "0", - "0", - ["0x0000000000000000000000000000000000000000", "0x00000000", "0x00", "0x00"], - ["0x0000000000000000000000000000000000000000", "0x00000000", "0x00", "0x00"] - ], - ["0xBEA0005B8599265D41256905A9B3073D397812E4", true, false, false, false], // whitelist status - ["0x0000000000000000000000000000000000000000", "0x00000000", "0x00", "0x00"] // oracles - ], - */ - var nonBeanToken = nonBeanTokenMapping[token]; - var tokenAssetSettings = defaultAssetSettings; if (token in assetSettings) { tokenAssetSettings = assetSettings[token]; @@ -276,8 +224,6 @@ function parseWhitelist(inputFilePath, outputFilePath) { ]; } - console.log("output:", output); - // only order requirement is that unripe tokens should be first var finalOutput = []; diff --git a/protocol/reseed/reseedL2.js b/protocol/reseed/reseedL2.js index 37cf01869..dea21c4c7 100644 --- a/protocol/reseed/reseedL2.js +++ b/protocol/reseed/reseedL2.js @@ -177,7 +177,7 @@ function parseBeanstalkData() { "./reseed/data/r2/L2_external_unripe_lp_balances.json", contractAccounts ); - parseWhitelist(storageSystemPath, "./reseed/data/r9-whitelist-test.json"); + parseWhitelist(storageSystemPath, "./reseed/data/r9-whitelist.json"); } async function printBeanstalk() { From 079bc90a720b09dc84ca3081695f667a778e6a77 Mon Sep 17 00:00:00 2001 From: Brean0 Date: Sat, 14 Sep 2024 17:38:43 +0200 Subject: [PATCH 4/5] update comment --- 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 77ecab2c4..42906f037 100644 --- a/protocol/reseed/dataConverts/convertWhitelist.js +++ b/protocol/reseed/dataConverts/convertWhitelist.js @@ -234,7 +234,7 @@ function parseWhitelist(inputFilePath, outputFilePath) { } fs.writeFileSync(outputFilePath, JSON.stringify(finalOutput, null, 2)); - console.log("Field JSON has been written successfully"); + console.log("Whitelist JSON has been written successfully"); } catch (err) { console.error("Error:", err); } From 7bb1ab646e2efddf9a9a88911ff1805879fb6906 Mon Sep 17 00:00:00 2001 From: Brean0 Date: Sat, 14 Sep 2024 17:42:12 +0200 Subject: [PATCH 5/5] fix implementation order. --- protocol/reseed/dataConverts/convertWhitelist.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/protocol/reseed/dataConverts/convertWhitelist.js b/protocol/reseed/dataConverts/convertWhitelist.js index 42906f037..12b31ddac 100644 --- a/protocol/reseed/dataConverts/convertWhitelist.js +++ b/protocol/reseed/dataConverts/convertWhitelist.js @@ -204,6 +204,8 @@ function parseWhitelist(inputFilePath, outputFilePath) { // non-bean token, this is used for Oracle settings nonBeanToken, // silo settings array + // the gaugePoint and LiquidityWeight Selectors are now moved due + // to the Implementation Update, and thus are set manually. [ tokenAssetSettings.selector, tokenAssetSettings.stalkEarnedPerSeason, @@ -214,8 +216,8 @@ function parseWhitelist(inputFilePath, outputFilePath) { tokenAssetSettings.deltaStalkEarnedPerSeason, tokenToGpAndOptimalPercentDepositedBdv[0], tokenToGpAndOptimalPercentDepositedBdv[1], - liquidityWeightImpl, // these 2 are new so are set manually - gaugePointImpl + gaugePointImpl, + liquidityWeightImpl ], // whitelist status tokenToWhitelistMapping[token],