Skip to content

Commit

Permalink
Merge pull request #197 from valory-xyz/staking_incentive_proposal
Browse files Browse the repository at this point in the history
chore: proposal scripts to update staking incentive params
  • Loading branch information
DavidMinarsch authored Nov 21, 2024
2 parents aa1f2ef + 5f667a0 commit 8757835
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitleaksignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion scripts/deployment/globals_mainnet.json
Original file line number Diff line number Diff line change
@@ -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"}
{"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"}
44 changes: 44 additions & 0 deletions scripts/proposals/proposal_12_tokenomics_change_staking_params.js
Original file line number Diff line number Diff line change
@@ -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);
});

0 comments on commit 8757835

Please sign in to comment.