Skip to content

Commit

Permalink
add executor interface
Browse files Browse the repository at this point in the history
  • Loading branch information
novaknole committed Sep 26, 2024
1 parent 17169ba commit 4211987
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions packages/contracts/src/Admin.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {ProposalUpgradeable} from "@aragon/osx-commons-contracts/src/plugin/exte
import {PluginUUPSUpgradeable} from "@aragon/osx-commons-contracts/src/plugin/PluginUUPSUpgradeable.sol";
import {IDAO} from "@aragon/osx-commons-contracts/src/dao/IDAO.sol";
import {IProposal} from "@aragon/osx-commons-contracts/src/plugin/extensions/proposal/IProposal.sol";
import {IExecutor} from "@aragon/osx-commons-contracts/src/executors/IExecutor.sol";

/// @title Admin
/// @author Aragon X - 2022-2023
Expand Down Expand Up @@ -76,7 +77,7 @@ contract Admin is IMembership, PluginUUPSUpgradeable, ProposalUpgradeable {
/// @param _metadata The metadata of the proposal.
/// @return proposalId The ID of the proposal.
function createProposalId(
IDAO.Action[] calldata _actions,
IExecutor.Action[] calldata _actions,
bytes memory _metadata
) public pure override returns (uint256) {
return uint256(keccak256(abi.encode(_actions, _metadata)));
Expand All @@ -91,7 +92,7 @@ contract Admin is IMembership, PluginUUPSUpgradeable, ProposalUpgradeable {
/// @inheritdoc IProposal
function createProposal(
bytes calldata _metadata,
IDAO.Action[] calldata _actions,
IExecutor.Action[] calldata _actions,
uint64,
uint64,
bytes memory _data
Expand Down Expand Up @@ -119,7 +120,7 @@ contract Admin is IMembership, PluginUUPSUpgradeable, ProposalUpgradeable {
// of 0 requires every action to not revert.
function execute(
bytes calldata _metadata,
IDAO.Action[] calldata _actions,
IExecutor.Action[] calldata _actions,
uint256 _allowFailureMap
) public auth(EXECUTE_PROPOSAL_PERMISSION_ID) {
uint64 currentTimestamp64 = block.timestamp.toUint64();
Expand Down
4 changes: 2 additions & 2 deletions packages/contracts/src/mocks/CustomExecutorMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pragma solidity ^0.8.8;

import {IDAO} from "@aragon/osx-commons-contracts/src/dao/IDAO.sol";
import {IExecutor} from "@aragon/osx-commons-contracts/src/executors/IExecutor.sol";

/// @dev DO NOT USE IN PRODUCTION!
contract CustomExecutorMock {
Expand All @@ -12,7 +12,7 @@ contract CustomExecutorMock {

function execute(
bytes32 callId,
IDAO.Action[] memory,
IExecutor.Action[] memory,
uint256
) external returns (bytes[] memory execResults, uint256 failureMap) {
(execResults, failureMap);
Expand Down

0 comments on commit 4211987

Please sign in to comment.