From 5a3be49ddebd79b9fb92c3f795b9fc86559ee558 Mon Sep 17 00:00:00 2001 From: Vladyslav Burtsevych Date: Tue, 3 Dec 2024 16:40:00 +0100 Subject: [PATCH] add: permissioned payloads controller interfaces --- .../IPermissionedPayloadsController.sol | 27 +++++++++++++++++++ src/governance-v3/IWithPayloadsManager.sol | 26 ++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 src/governance-v3/IPermissionedPayloadsController.sol create mode 100644 src/governance-v3/IWithPayloadsManager.sol diff --git a/src/governance-v3/IPermissionedPayloadsController.sol b/src/governance-v3/IPermissionedPayloadsController.sol new file mode 100644 index 00000000..158536fc --- /dev/null +++ b/src/governance-v3/IPermissionedPayloadsController.sol @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {IPayloadsControllerCore} from "./IPayloadsControllerCore.sol"; +import {IWithPayloadsManager} from "./IWithPayloadsManager.sol"; +import {PayloadsControllerUtils} from "./PayloadsControllerUtils.sol"; + +/** + * @title IPermissionedPayloadsController + * @author BGD Labs + * @notice interface containing the objects, events and methods definitions of the IPermissionedPayloadsController contract + */ +interface IPermissionedPayloadsController is IPayloadsControllerCore, IWithPayloadsManager { + /** + * @notice method to initialize the contract with starter params. Only callable by proxy + * @param guardian address of the guardian. With permissions to call certain methods + * @param initialPayloadsManager address of the initial payload manager + * @param executors array of executor configurations + */ + function initialize( + address guardian, + address initialPayloadsManager, + UpdateExecutorInput[] calldata executors + ) external; + + function setExecutionDelay(uint40 delay) external; +} \ No newline at end of file diff --git a/src/governance-v3/IWithPayloadsManager.sol b/src/governance-v3/IWithPayloadsManager.sol new file mode 100644 index 00000000..4f453167 --- /dev/null +++ b/src/governance-v3/IWithPayloadsManager.sol @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +/** + * @title IWithPayloadsManager + * @author BGD Labs + * @notice interface containing the objects, events and methods definitions of the IWithPayloadsManager contract + */ +interface IWithPayloadsManager { + /** + * @notice Emitted when the payload manager gets updated. + * @param newPayloadsManager The address of the new payload manager. + */ + event PayloadsManagerUpdated(address newPayloadsManager); + + /** + * @notice method to get payload manager address; + */ + function payloadsManager() external view returns(address); + + /** + * @notice method to update payload manager. + * @param newPayloadsManager The new payload manager address. + */ + function updatePayloadsManager(address newPayloadsManager) external; +} \ No newline at end of file