Skip to content

Commit

Permalink
feat: timelock accept ownership
Browse files Browse the repository at this point in the history
* feat: timelock accept ownership

* fix: fix timelock accept ownership
  • Loading branch information
GuillaumeNervoXS authored Jan 25, 2024
1 parent 33b69f7 commit 37c6fa6
Show file tree
Hide file tree
Showing 6 changed files with 148 additions and 52 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ This repository contains the smart contracts for the cross-chain governance syst

It also comes with some utils and scripts to facilitate the creation and execution of proposals on top of the deployed system.

## Simulate a Proposal
## Create and Simulate a Proposal

- Complete `test/Proposal.sol`
- You can simulate the proposal's execution by running `forge test -vvvv --match-contract Simulate`
- Eventually add tests to `test/Simulate.t.sol`
- Create a script in `scripts/proposals`. Take for example `scripts/proposals/SetMinDelayTimelock.s.sol` and the contract name is `SetMinDelayTimelock`
- Create the associate test in `tests/scripts`. If the script contract name is `XXX` the test contract should be named `XXXTest`.
- You can create, simulate and potentially send (you will be asked if you want) the proposals by running `yarn create:proposal`. You will be prompted to specify the script you want to run, you should enter `XXX`. Then asks on which chains you want to run the script, and finally after tests are passing you are asked if you want to send the proposal to the on chain governance.

## System Architecture 🏘️

Expand Down
14 changes: 11 additions & 3 deletions scripts/Interfaces.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ interface IAccessControlViewVyper {
interface IAccessControlWriteVyper {
function commit_transfer_ownership(address newAdmin) external;

function apply_transfer_ownership() external;
function accept_transfer_ownership() external;
}

interface IVaultManagerGovernance {
Expand Down Expand Up @@ -47,9 +47,17 @@ interface ILiquidityGauge is IAccessControlViewVyper, IAccessControlWriteVyper {

interface IVeBoostProxy is IAccessControlViewVyper, IAccessControlWriteVyper {}

interface ISmartWalletWhitelist is IAccessControlViewVyper, IAccessControlWriteVyper {}
interface ISmartWalletWhitelist is IAccessControlViewVyper {
function commitAdmin(address newAdmin) external;

interface IFeeDistributor is IAccessControlWriteVyper {}
function applyAdmin() external;
}

interface IFeeDistributor is IAccessControlViewVyper {
function commit_admin(address newAdmin) external;

function accept_admin() external;
}

interface IGenericAccessControl is IAccessControl, IAccessControlCore, IAccessControlViewVyper {
function owner() external returns (address);
Expand Down
1 change: 1 addition & 0 deletions scripts/proposals/Wrapper.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ contract Wrapper is Utils {
mstore(targets, finalPropLength)
mstore(values, finalPropLength)
mstore(calldatas, finalPropLength)
mstore(chainIds, finalPropLength)
}
}

Expand Down
Loading

0 comments on commit 37c6fa6

Please sign in to comment.