-
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
0e91e5e
commit 5f2207a
Showing
4 changed files
with
55 additions
and
93 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 |
---|---|---|
@@ -1,18 +1,47 @@ | ||
// SPDX-License-Identifier: BUSL-1.1 | ||
pragma solidity ^0.8.12; | ||
|
||
import {MultisigCall, MultisigCallUtils, OpsTimelockBuilder} from "../templates/OpsTimelockBuilder.sol"; | ||
import {MultisigCall, MultisigCallUtils, MultisigBuilder} from "../templates/MultisigBuilder.sol"; | ||
import {ITimelock} from "../interfaces/ITimelock.sol"; | ||
|
||
contract Queue is OpsTimelockBuilder { | ||
contract Queue is MultisigBuilder { | ||
using MultisigCallUtils for MultisigCall[]; | ||
|
||
MultisigCall[] internal _executorCalls; | ||
MultisigCall[] private _executorCalls; | ||
MultisigCall[] private _opsCalls; | ||
|
||
function _queue() internal returns (MultisigCall[] memory) { | ||
|
||
function queue() public override returns (MultisigCall[] memory) { | ||
////////////////////////// | ||
// construct executor data here | ||
////////////////////////// | ||
|
||
return _executorCalls; | ||
} | ||
|
||
/** | ||
* @dev Can be overridden so that executing script can inherit this contract. | ||
*/ | ||
function _execute() internal virtual override returns (MultisigCall[] memory) { | ||
// get the queue data | ||
MultisigCall[] memory calls = _queue(); | ||
|
||
address multiSendCallOnly = zeusAddress("MultiSendCallOnly"); | ||
address timelock = zeusAddress("Timelock"); | ||
|
||
// encode calls for executor | ||
bytes memory executorCalldata = calls.makeExecutorCalldata(multiSendCallOnly, timelock); | ||
|
||
address executorMultisig = zeusAddress("ExecutorMultisig"); | ||
|
||
// encode executor data for timelock | ||
bytes memory timelockCalldata = abi.encodeWithSelector( | ||
ITimelock.queueTransaction.selector, executorMultisig, 0, "", executorCalldata, type(uint256).max | ||
); | ||
|
||
_opsCalls.append(timelock, timelockCalldata); | ||
|
||
// encode timelock data for ops multisig | ||
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
This file was deleted.
Oops, something went wrong.
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