-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathExecutor.sol
More file actions
37 lines (32 loc) · 1.66 KB
/
Copy pathExecutor.sol
File metadata and controls
37 lines (32 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity ^0.8.8;
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { Action } from "@aragon/osx-commons-contracts/src/executors/IExecutor.sol";
import { Executor as CommonsExecutor } from "@aragon/osx-commons-contracts/src/executors/Executor.sol";
/// @title Executor
/// @notice An `Executor` whose execution is restricted to a single owner.
/// @dev The commons `Executor` is permissionless by design: anyone can call
/// `execute`. This variant gates it behind `Ownable`, so it can be deployed
/// standalone (not via `delegatecall`) and pointed at by a
/// `CrossChainController` that is set as its owner.
/// @custom:security-contact sirt@aragon.org
contract Executor is CommonsExecutor, Ownable {
/// @inheritdoc CommonsExecutor
/// @dev Restricted to the owner; the rest of the behaviour (bounds check,
/// failure map, reentrancy guard, `Executed` event) is unchanged.
function execute(bytes32 _callId, Action[] memory _actions, uint256 _allowFailureMap)
public
virtual
override
onlyOwner
returns (bytes[] memory execResults, uint256 failureMap)
{
return super.execute(_callId, _actions, _allowFailureMap);
}
/// @notice Accepts native currency so the executor can be pre-funded.
/// @dev The receive path is non-payable end to end, so an action carrying
/// `value > 0` spends from this balance rather than from the message.
/// The commons `Executor` has no payable path, so without this the
/// contract could not be topped up at all.
receive() external payable { }
}