From 69c58101b6c8fb564757ba133ad01d2725e51d93 Mon Sep 17 00:00:00 2001 From: Aleksandr Kuperman Date: Thu, 21 Nov 2024 11:00:10 +0000 Subject: [PATCH 1/2] chore: proposal scripts to update staking incentive params --- scripts/deployment/globals_mainnet.json | 2 +- ...sal_12_tokenomics_change_staking_params.js | 44 +++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 scripts/proposals/proposal_12_tokenomics_change_staking_params.js diff --git a/scripts/deployment/globals_mainnet.json b/scripts/deployment/globals_mainnet.json index 9344fce1..7d858a6b 100644 --- a/scripts/deployment/globals_mainnet.json +++ b/scripts/deployment/globals_mainnet.json @@ -1 +1 @@ -{"contractVerification":true,"useLedger":true,"derivationPath":"m/44'/60'/2'/0/0","providerName":"mainnet","olasAddress":"0x0001A500A6B18995B03f44bb040A5fFc28E45CB0","timelockAddress":"0x3C1fF68f5aa342D296d4DEe4Bb1cACCA912D95fE","veOLASAddress":"0x7e01A500805f8A52Fad229b3015AD130A332B7b3","governorAddress":"0x34C895f302D0b5cf52ec0Edd3945321EB0f83dd5","governorTwoAddress":"0x4E3e48bA826b15214FDe72a50BFd17aB286B584E","componentRegistryAddress":"0x15bd56669F57192a97dF41A2aa8f4403e9491776","agentRegistryAddress":"0x2F1f7D38e4772884b88f3eCd8B6b9faCdC319112","serviceRegistryAddress":"0x48b6af7B12C71f09e2fC8aF4855De4Ff54e775cA","epochLen":"2592000","donatorBlacklistAddress":"0xE85791B18F5df42163092Acc5C9da1c479AFEa9d","tokenomicsAddress":"0x87f89F94033305791B6269AE2F9cF4e09983E56e","tokenomicsProxyAddress":"0xc096362fa6f4A4B1a9ea68b1043416f3381ce300","treasuryAddress":"0xa0DA53447C0f6C4987964d8463da7e6628B30f82","genericBondCalculatorAddress":"0x1521918961bDBC9Ed4C67a7103D5999e4130E6CB","depositoryAddress":"0x52A043bcebdB2f939BaEF2E8b6F01652290eAB3f","dispenserAddress":"0x5650300fCBab43A0D7D02F8Cb5d0f039402593f0","tokenomicsTwoAddress":"0xD599ED4a5c45Fa66AA3C474b00701Fd452a2C30e","OLAS_ETH_PairAddress":"0x09D1d767eDF8Fa23A64C51fa559E0688E526812F","depositoryTwoAddress":"0xfF8697d8d2998d6AA2e09B405795C6F4BEeB0C81","XOLAS_WXDAI_PairAddress":"0x27df632fd0dcf191C418c803801D521cd579F18e","tokenomicsThreeAddress":"0x2C1633765c66a7CF0EC801a1046347bBee7344C9","voteWeightingAddress":"0x95418b46d5566d3d1ea62c12aea91227e566c5c1","retainerAddress":"0x000000000000000000000000000000000000000000000000000000000000dEaD","maxNumClaimingEpochs":"1","maxNumStakingTargets":"10","minStakingWeight":"100","maxStakingIncentive":"30000000000000000000000"} \ No newline at end of file +{"contractVerification":true,"useLedger":true,"derivationPath":"m/44'/60'/2'/0/0","providerName":"mainnet","olasAddress":"0x0001A500A6B18995B03f44bb040A5fFc28E45CB0","timelockAddress":"0x3C1fF68f5aa342D296d4DEe4Bb1cACCA912D95fE","veOLASAddress":"0x7e01A500805f8A52Fad229b3015AD130A332B7b3","governorAddress":"0x34C895f302D0b5cf52ec0Edd3945321EB0f83dd5","governorTwoAddress":"0x4E3e48bA826b15214FDe72a50BFd17aB286B584E","componentRegistryAddress":"0x15bd56669F57192a97dF41A2aa8f4403e9491776","agentRegistryAddress":"0x2F1f7D38e4772884b88f3eCd8B6b9faCdC319112","serviceRegistryAddress":"0x48b6af7B12C71f09e2fC8aF4855De4Ff54e775cA","epochLen":"2592000","donatorBlacklistAddress":"0xE85791B18F5df42163092Acc5C9da1c479AFEa9d","tokenomicsAddress":"0x87f89F94033305791B6269AE2F9cF4e09983E56e","tokenomicsProxyAddress":"0xc096362fa6f4A4B1a9ea68b1043416f3381ce300","treasuryAddress":"0xa0DA53447C0f6C4987964d8463da7e6628B30f82","genericBondCalculatorAddress":"0x1521918961bDBC9Ed4C67a7103D5999e4130E6CB","depositoryAddress":"0x52A043bcebdB2f939BaEF2E8b6F01652290eAB3f","dispenserAddress":"0x5650300fCBab43A0D7D02F8Cb5d0f039402593f0","tokenomicsTwoAddress":"0xD599ED4a5c45Fa66AA3C474b00701Fd452a2C30e","OLAS_ETH_PairAddress":"0x09D1d767eDF8Fa23A64C51fa559E0688E526812F","depositoryTwoAddress":"0xfF8697d8d2998d6AA2e09B405795C6F4BEeB0C81","XOLAS_WXDAI_PairAddress":"0x27df632fd0dcf191C418c803801D521cd579F18e","tokenomicsThreeAddress":"0x2C1633765c66a7CF0EC801a1046347bBee7344C9","voteWeightingAddress":"0x95418b46d5566d3d1ea62c12aea91227e566c5c1","retainerAddress":"0x000000000000000000000000000000000000000000000000000000000000dEaD","maxNumClaimingEpochs":"1","maxNumStakingTargets":"10","minStakingWeight":"100","maxStakingIncentive":"50000000000000000000000"} \ No newline at end of file diff --git a/scripts/proposals/proposal_12_tokenomics_change_staking_params.js b/scripts/proposals/proposal_12_tokenomics_change_staking_params.js new file mode 100644 index 00000000..e551cef6 --- /dev/null +++ b/scripts/proposals/proposal_12_tokenomics_change_staking_params.js @@ -0,0 +1,44 @@ +/*global process*/ + +const { ethers } = require("hardhat"); + +async function main() { + const fs = require("fs"); + const globalsFile = "globals.json"; + const dataFromJSON = fs.readFileSync(globalsFile, "utf8"); + let parsedData = JSON.parse(dataFromJSON); + const providerName = parsedData.providerName; + + const provider = await ethers.providers.getDefaultProvider(providerName); + + // Get all the necessary contract addresses + const tokenomicsProxyAddress = parsedData.tokenomicsProxyAddress; + const minStakingWeight = parsedData.minStakingWeight; + const maxStakingIncentive = parsedData.maxStakingIncentive; + + // Get contract instances + const tokenomics = await ethers.getContractAt("Tokenomics", tokenomicsProxyAddress); + + // Proposal preparation + console.log("Proposal 12. Change staking params"); + const targets = [tokenomicsProxyAddress]; + const values = [0]; + const callDatas = [ + tokenomics.interface.encodeFunctionData("changeStakingParams", [maxStakingIncentive, minStakingWeight]) + ]; + + const description = "Change staking params"; + + // Proposal details + console.log("targets:", targets); + console.log("values:", values); + console.log("call datas:", callDatas); + console.log("description:", description); +} + +main() + .then(() => process.exit(0)) + .catch((error) => { + console.error(error); + process.exit(1); + }); From 5f667a03e5e5094a00e071dd1ea9cfd42a05e1e4 Mon Sep 17 00:00:00 2001 From: Aleksandr Kuperman Date: Thu, 21 Nov 2024 11:28:45 +0000 Subject: [PATCH 2/2] chore: linters --- .gitleaksignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitleaksignore b/.gitleaksignore index 28093111..9aa4d4ab 100644 --- a/.gitleaksignore +++ b/.gitleaksignore @@ -207,3 +207,4 @@ ec017f7f1095f26fe63906ec36c9ede28030ea8a:scripts/deployment/staking/globals_main 1cb55f645a6f055a343fe46c4836b8353d3dfa3a:scripts/deployment/staking/globals_mainnet.json:generic-api-key:2 1926300a5ccfafa48b72a6a5aaf7ad481e9a8b8b:scripts/deployment/staking/globals_mainnet.json:generic-api-key:1 1926300a5ccfafa48b72a6a5aaf7ad481e9a8b8b:scripts/deployment/staking/globals_mainnet.json:generic-api-key:2 +69c58101b6c8fb564757ba133ad01d2725e51d93:scripts/deployment/globals_mainnet.json:generic-api-key:1