Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create proposal_05 #111

Merged
merged 11 commits into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .gitleaksignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,14 @@ bd442a4d40914bfc4d062cc5625b5b3d532328d8:scripts/deployment/globals_goerli.json:
bd442a4d40914bfc4d062cc5625b5b3d532328d8:scripts/deployment/globals_goerli.json:generic-api-key:2
ad016dbb808b6fa8c8a6a689a7140d68e868414d:scripts/deployment/globals_goerli.json:generic-api-key:1
ad016dbb808b6fa8c8a6a689a7140d68e868414d:scripts/deployment/globals_goerli.json:generic-api-key:2
84085316cf76a2b672b04ebb059d6708513d60ec:scripts/deployment/globals_mainnet.json:generic-api-key:1
84085316cf76a2b672b04ebb059d6708513d60ec:scripts/deployment/globals_mainnet.json:generic-api-key:2
315db969e64f91be368626b58bce68147d1d64ff:scripts/deployment/globals_mainnet.json:generic-api-key:1
315db969e64f91be368626b58bce68147d1d64ff:scripts/deployment/globals_mainnet.json:generic-api-key:2
6000d77e8fe678f7e4b0c025bdac834183825afd:scripts/deployment/globals_mainnet.json:generic-api-key:1
6000d77e8fe678f7e4b0c025bdac834183825afd:scripts/deployment/globals_mainnet.json:generic-api-key:2
6000d77e8fe678f7e4b0c025bdac834183825afd:scripts/proposals/proposal_04_CM_guard.js:generic-api-key:17
6000d77e8fe678f7e4b0c025bdac834183825afd:scripts/proposals/proposal_04_CM_guard.js:generic-api-key:14
c91f775ec4afeb1737af25b8325201c090d48c23:scripts/proposals/proposal_04_CM_guard.js:generic-api-key:14
c91f775ec4afeb1737af25b8325201c090d48c23:scripts/proposals/proposal_04_CM_guard.js:generic-api-key:17
c91f775ec4afeb1737af25b8325201c090d48c23:scripts/deployment/globals_mainnet.json:generic-api-key:2
2 changes: 1 addition & 1 deletion docs/configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
{
"name": "GuardCM",
"artifact": "abis/0.8.23/GuardCM.json",
"address": "0x1a0bADb278dE44E261DEC9f4225E3DD761336DA8"
"address": "0x7bB7998b210cFfE10ca1e41f16341Abe53f76f3a"
},
{
"name": "BridgedERC20",
Expand Down
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,"valoryMultisig":"0x87cc0d34f6111c8A7A4Bdf758a9a715A3675f941","derivationPath":"m/44'/60'/2'/0/0","CM":"0x04C06323Fe3D53Deb7364c0055E1F68458Cc2570","providerName":"mainnet","olasSaltString":"0xeb2a22b27c7ad5eee424fd90b376c745e60f914e25fe2b399268300038939d65","timelockMinDelay":"13091","veOlasSaltString":"0xeb2a22b27c7ad5eee424fd90b376c745e60f914e8c4b6f56e64f24010eba714f","initialVotingDelay":"13091","initialVotingPeriod":"19636","initialProposalThreshold":"5000000000000000000000","quorum":"3","initSupply":"526500000000000000000000000","timelockSupply":"100000000000000000000000000","saleSupply":"292874580000000000000000000","valorySupply":"133625420000000000000000000","GnosisSafe":"0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552","GnosisSafeProxyFactory":"0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2","MultiSendCallOnly":"0x40A2aCCbd92BCA938b02010E17A5b8929b49130D","deploymentFactory":"0x9338b5153AE39BB89f50468E608eD9d764B755fD","olasAddress":"0x0001A500A6B18995B03f44bb040A5fFc28E45CB0","timelockAddress":"0x3C1fF68f5aa342D296d4DEe4Bb1cACCA912D95fE","veOLASAddress":"0x7e01A500805f8A52Fad229b3015AD130A332B7b3","governorAddress":"0x34C895f302D0b5cf52ec0Edd3945321EB0f83dd5","buOLASAddress":"0xb09CcF0Dbf0C178806Aaee28956c74bd66d21f73","wveOLASAddress":"0x4039B809E0C0Ad04F6Fc880193366b251dDf4B40","governorTwoAddress":"0x8E84B5055492901988B831817e4Ace5275A3b401","treasuryAddress":"0xa0DA53447C0f6C4987964d8463da7e6628B30f82","guardCMAddress":"0x1a0bADb278dE44E261DEC9f4225E3DD761336DA8","depositoryAddress":"0xfF8697d8d2998d6AA2e09B405795C6F4BEeB0C81","serviceRegistryTokenUtilityAddress":"0x3Fb926116D454b95c669B6Bf2E7c3bad8d19affA","bridgedERC20Address":"0x06512E620A8317da51a73690A596Aca97287b31D","fxRootAddress":"0xfe5e5D361b2ad62c541bAb87C45a0B9B018389a2","childTokenAddress":"0x62309056c759c36879Cde93693E7903bF415E4Bc","checkpointManagerAddress":"0x86E4Dc95c7FBdBf52e33D563BbDB00823894C287","fxERC20RootTunnelAddress":"0x1737408def992AF04b29C8Ba4BBcD7397B08c930", "fxERC20ChildTunnelAddress": "0x1fe74A08ac89300B102AdCd474C721AE8764E850"}
{"contractVerification":true,"useLedger":true,"valoryMultisig":"0x87cc0d34f6111c8A7A4Bdf758a9a715A3675f941","derivationPath":"m/44'/60'/2'/0/0","CM":"0x04C06323Fe3D53Deb7364c0055E1F68458Cc2570","providerName":"mainnet","olasSaltString":"0xeb2a22b27c7ad5eee424fd90b376c745e60f914e25fe2b399268300038939d65","timelockMinDelay":"13091","veOlasSaltString":"0xeb2a22b27c7ad5eee424fd90b376c745e60f914e8c4b6f56e64f24010eba714f","initialVotingDelay":"13091","initialVotingPeriod":"19636","initialProposalThreshold":"5000000000000000000000","quorum":"3","initSupply":"526500000000000000000000000","timelockSupply":"100000000000000000000000000","saleSupply":"292874580000000000000000000","valorySupply":"133625420000000000000000000","GnosisSafe":"0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552","GnosisSafeProxyFactory":"0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2","MultiSendCallOnly":"0x40A2aCCbd92BCA938b02010E17A5b8929b49130D","deploymentFactory":"0x9338b5153AE39BB89f50468E608eD9d764B755fD","olasAddress":"0x0001A500A6B18995B03f44bb040A5fFc28E45CB0","timelockAddress":"0x3C1fF68f5aa342D296d4DEe4Bb1cACCA912D95fE","veOLASAddress":"0x7e01A500805f8A52Fad229b3015AD130A332B7b3","governorAddress":"0x34C895f302D0b5cf52ec0Edd3945321EB0f83dd5","buOLASAddress":"0xb09CcF0Dbf0C178806Aaee28956c74bd66d21f73","wveOLASAddress":"0x4039B809E0C0Ad04F6Fc880193366b251dDf4B40","governorTwoAddress":"0x8E84B5055492901988B831817e4Ace5275A3b401","treasuryAddress":"0xa0DA53447C0f6C4987964d8463da7e6628B30f82","guardCMAddress":"0x7bB7998b210cFfE10ca1e41f16341Abe53f76f3a","depositoryAddress":"0xfF8697d8d2998d6AA2e09B405795C6F4BEeB0C81","bridgedERC20Address":"0x06512E620A8317da51a73690A596Aca97287b31D","fxRootAddress":"0xfe5e5D361b2ad62c541bAb87C45a0B9B018389a2","childTokenAddress":"0x62309056c759c36879Cde93693E7903bF415E4Bc","checkpointManagerAddress":"0x86E4Dc95c7FBdBf52e33D563BbDB00823894C287","fxERC20RootTunnelAddress":"0x1737408def992AF04b29C8Ba4BBcD7397B08c930", "fxERC20ChildTunnelAddress": "0x1fe74A08ac89300B102AdCd474C721AE8764E850"}
32 changes: 22 additions & 10 deletions scripts/proposals/proposal_04_CM_guard.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,38 @@
const dataFromJSON = fs.readFileSync(globalsFile, "utf8");
let parsedData = JSON.parse(dataFromJSON);

const cancellerRole = ethers.utils.id("CANCELLER_ROLE");
const timelockAddress = parsedData.timelockAddress;

Check warning on line 11 in scripts/proposals/proposal_04_CM_guard.js

View workflow job for this annotation

GitHub Actions / build

'timelockAddress' is assigned a value but never used
const treasuryAddress = parsedData.treasuryAddress;
const depositoryAddress = parsedData.depositoryAddress;
const serviceRegistryTokenUtilityAddress = parsedData.serviceRegistryTokenUtilityAddress;
const serviceRegistryTokenUtilityAddress = "0x3Fb926116D454b95c669B6Bf2E7c3bad8d19affA";
const serviceRegistryL2PolygonAddress = "0xE3607b00E75f6405248323A9417ff6b39B244b50";
const serviceRegistryL2GnosisAddress = "0x9338b5153AE39BB89f50468E608eD9d764B755fD";
const serviceRegistryTokenUtilityGnosisAddress = "0xa45E64d13A30a51b91ae0eb182e88a40e9b18eD8";
const guardCMAddress = parsedData.guardCMAddress;
const AMBContractProxyForeignAddress = "0x4C36d2919e407f0Cc2Ee3c993ccF8ac26d9CE64e";
const homeMediatorAddress = "0x15bd56669F57192a97dF41A2aa8f4403e9491776";
const fxRootAddress = parsedData.fxRootAddress;
const fxGovernorTunnelAddress = "0x9338b5153AE39BB89f50468E608eD9d764B755fD";
const CMAddress = parsedData.CM;

Check warning on line 23 in scripts/proposals/proposal_04_CM_guard.js

View workflow job for this annotation

GitHub Actions / build

'CMAddress' is assigned a value but never used



// Obtaining proposal values
console.log("Revoking canceller role of CM in the Timelock, updating proposal Id and enabling selectors");
const timelock = await ethers.getContractAt("Timelock", timelockAddress);
console.log("Guard CM setup");
const guardCM = await ethers.getContractAt("GuardCM", guardCMAddress);
const targets = [guardCMAddress, guardCMAddress, timelockAddress];
const values = new Array(3).fill(0);
const targets = [guardCMAddress, guardCMAddress];
const values = new Array(2).fill(0);
const callDatas = [
guardCM.interface.encodeFunctionData("changeGovernorCheckProposalId", ["88250008686885504216650933897987879122244685460173810624866685274624741477673"]),
guardCM.interface.encodeFunctionData("setTargetSelectors", [[treasuryAddress, treasuryAddress, depositoryAddress, serviceRegistryTokenUtilityAddress], [0x8456cb59, 0x8f202bf9, 0x58d3ec6a, 0xece53132], [true, true, true, true]]),
timelock.interface.encodeFunctionData("revokeRole", [cancellerRole, CMAddress])
guardCM.interface.encodeFunctionData("setBridgeMediatorChainIds", [[AMBContractProxyForeignAddress, fxRootAddress],
[homeMediatorAddress, fxGovernorTunnelAddress], ["100", "137"]]),
guardCM.interface.encodeFunctionData("setTargetSelectorChainIds", [[treasuryAddress, treasuryAddress, depositoryAddress,
serviceRegistryTokenUtilityAddress, serviceRegistryL2PolygonAddress, serviceRegistryL2GnosisAddress,
serviceRegistryTokenUtilityGnosisAddress],
["0x8456cb59", "0x8f202bf9", "0x58d3ec6a", "0xece53132", "0x9890220b", "0x9890220b", "0xece53132"],
[1, 1, 1, 1, 137, 100, 100],
[true, true, true, true, true, true, true]])
];
const description = "Timelock to revoke CM roles";
const description = "Guard CM setup";

// Proposal details
console.log("targets:", targets);
Expand Down
42 changes: 42 additions & 0 deletions scripts/proposals/proposal_05_CM_guard.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*global process*/

const { ethers } = require("hardhat");
const safeContracts = require("@gnosis.pm/safe-contracts");

async function main() {
const fs = require("fs");
const globalsFile = "globals.json";
const dataFromJSON = fs.readFileSync(globalsFile, "utf8");
const parsedData = JSON.parse(dataFromJSON);

// Get the multisig
const multisig = await ethers.getContractAt("GnosisSafe", parsedData.CM);
const nonce = await multisig.nonce();

const timelockAddress = parsedData.timelockAddress;

Check warning on line 16 in scripts/proposals/proposal_05_CM_guard.js

View workflow job for this annotation

GitHub Actions / build

'timelockAddress' is assigned a value but never used
const guardCMAddress = parsedData.guardCMAddress;

// Construct the payload for the multisig to swap the guard by the Timelock
const txHashData = await safeContracts.buildContractCall(multisig, "setGuard", [guardCMAddress], nonce, 0, 0);

console.log("Set new guard via Timelock Module");
const targets = [multisig.address];
const values = new Array(1).fill(0);
const callDatas = [
multisig.interface.encodeFunctionData("execTransactionFromModule", [txHashData.to, 0, txHashData.data, txHashData.operation])
];
const description = "Timelock to change guard via module and select selects";

// 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);
});
Loading