-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
53ffb0c
commit 1da8e52
Showing
4 changed files
with
119 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// SPDX-License-Identifier: BUSL-1.1 | ||
pragma solidity ^0.8.12; | ||
|
||
import {Addresses, Environment, Params, EOADeployer} from "../templates/EOADeployer.sol"; | ||
|
||
contract Deploy is EOADeployer { | ||
Deployment[] private _deployments; | ||
|
||
function _deploy(Addresses memory, Environment memory, Params memory) | ||
internal | ||
override | ||
returns (Deployment[] memory) | ||
{ | ||
vm.startBroadcast(); | ||
|
||
////////////////////////// | ||
// deploy your contracts here | ||
////////////////////////// | ||
|
||
vm.stopBroadcast(); | ||
|
||
return _deployments; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// SPDX-License-Identifier: BUSL-1.1 | ||
pragma solidity ^0.8.12; | ||
|
||
import { | ||
Addresses, | ||
Environment, | ||
Params, | ||
MultisigCall, | ||
MultisigCallUtils, | ||
OpsTimelockBuilder | ||
} from "../templates/OpsTimelockBuilder.sol"; | ||
|
||
contract Queue is OpsTimelockBuilder { | ||
using MultisigCallUtils for MultisigCall[]; | ||
|
||
MultisigCall[] internal _executorCalls; | ||
|
||
function queue(Addresses memory addrs, Environment memory env, Params memory params) | ||
public | ||
override | ||
returns (MultisigCall[] memory) | ||
{ | ||
////////////////////////// | ||
// construct executor data here | ||
////////////////////////// | ||
|
||
return _executorCalls; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// SPDX-License-Identifier: BUSL-1.1 | ||
pragma solidity ^0.8.12; | ||
|
||
import { | ||
Addresses, | ||
Environment, | ||
Params, | ||
MultisigCall, | ||
MultisigCallUtils, | ||
MultisigBuilder | ||
} from "../templates/MultisigBuilder.sol"; | ||
import {SafeTx, SafeTxUtils} from "../utils/SafeTxUtils.sol"; | ||
import {ITimelock} from "../interfaces/ITimelock.sol"; | ||
import {Queue} from "./2-multisig.s.sol"; | ||
|
||
contract Execute is MultisigBuilder { | ||
using MultisigCallUtils for MultisigCall[]; | ||
using SafeTxUtils for SafeTx; | ||
|
||
MultisigCall[] internal _opsCalls; | ||
|
||
function _execute(Addresses memory addrs, Environment memory env, Params memory params) | ||
internal | ||
override | ||
returns (MultisigCall[] memory) | ||
{ | ||
Queue queue = new Queue(); | ||
|
||
MultisigCall[] memory _executorCalls = queue.queue(addrs, env, params); | ||
|
||
bytes memory executorCalldata = | ||
queue.makeExecutorCalldata(_executorCalls, params.multiSendCallOnly, addrs.timelock); | ||
|
||
// execute queued transaction | ||
_opsCalls.append({ | ||
to: addrs.timelock, | ||
value: 0, | ||
data: abi.encodeWithSelector(ITimelock.executeTransaction.selector, executorCalldata) | ||
}); | ||
|
||
////////////////////////// | ||
// add more opsCalls here | ||
////////////////////////// | ||
|
||
return _opsCalls; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Release Template | ||
|
||
This template is an example of the deploy-queue-upgrade structure that can be used for executing EigenLayer upgrades via the Ops Timelock Multisig, as described [here](https://docs.eigenlayer.xyz/eigenlayer/security/multisig-governance). | ||
|
||
Zeus can take this template and instantiate a new release template, allowing for quick setup of a common upgrade process. | ||
|
||
Note that the names follow the syntax `#-<signer>`, where `#` is the sequence number within the release (i.e. the order in which actions are taken), and `<signer>` is the signing strategy to be used for that script. | ||
|
||
## 1-eoa.s.sol | ||
|
||
This contract allows for deployments to be broadcast. An EOA is expected to take these actions. | ||
|
||
## 2-multisig.s.sol | ||
|
||
This contract allows for actions to be written from the perspective of the Executor Multisig, which will then be wrapped for the Timelock, then for the Ops Multisig to execute. | ||
|
||
## 3-multisig.s.sol | ||
|
||
The final execution step can be written in this contract. It will reuse the logic from the previous step by importing the contract, then allow for additional calls to be appended from the perspective of the Ops Multisig. |