This contract contains the logic to be able to execute governance changes on layer 2. All changes must be triggered by the Ethereum mainnet governance contract.
To generate calldata for this, you can use script/GenerateCalldata.s.sol (on Ethereum).
To generate calldata to help using the GovernanceRoleManager use script/GenerateL2Calldata.s.sol and the commands in the justfile.
To deploy, use scripts/*.s.sol. We use create3 to get deterministic addresses. You need PRIVATE_KEY in your .env.
Bytes32-encoded form of "PROTOCOL_SWAP_FEE_PERC" = 0x50524f544f434f4c5f535741505f4645455f5045524300000000000000000000
- Add the GyroConfig address to
script/DeployGyroConfigManager.s.sol. - Deploy GovernanceRoleManager using the script. Initial governor will be the deployer. To verify the contracts, you have to verify both the implementation and the UUPS proxy. Use
forge verify-contractand use the constructor args output by the script. - Deploy GyroConfigManager using the script. Owner will be the GovernanceRoleManager. This is not a proxy. To verify, use the constructor args output by the script.
- Add these two new deployments to
docs/deployed-contracts.json5. - Add permission to call any action on GyroConfigManager for the designated admin (currently a multisig) using the selector whildcard,
0x00000000. - !DANGER ZONE, don't mess this up! Move governance of GyroConfig to GyroConfigManager
- From the old governor (likely a multisig), call
GyroConfig.changeGovernor(GyroConfigManager). - From the new admin (perhaps a multisig), call
GovernanceRoleManager.executeActions([[GyroConfigManager, GyroConfig.acceptGovernance, 0]]).
- From the old governor (likely a multisig), call
- Move ownership of the GovernanceRoleManager to its target owner (currently often a multisig)