-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feature/OS-656-oz-dependency-bump
- Loading branch information
Showing
73 changed files
with
907 additions
and
397 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
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 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 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 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 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 |
---|---|---|
|
@@ -25,6 +25,7 @@ import {IDAO} from "./IDAO.sol"; | |
/// @author Aragon Association - 2021-2023 | ||
/// @notice This contract is the entry point to the Aragon DAO framework and provides our users a simple and easy to use public interface. | ||
/// @dev Public API of the Aragon DAO framework. | ||
/// @custom:security-contact [email protected] | ||
contract DAO is | ||
IEIP4824, | ||
Initializable, | ||
|
@@ -70,7 +71,7 @@ contract DAO is | |
uint256 private constant _ENTERED = 2; | ||
|
||
/// @notice Removed variable that is left here to maintain the storage layout. | ||
/// @dev Introducedd in v1.0.0. Removed in v1.4.0. | ||
/// @dev Introduced in v1.0.0. Removed in v1.4.0. | ||
/// @custom:oz-renamed-from signatureValidator | ||
address private __removed0; | ||
|
||
|
@@ -186,6 +187,15 @@ contract DAO is | |
_reentrancyStatus = _NOT_ENTERED; | ||
_registerInterface(type(IProtocolVersion).interfaceId); | ||
} | ||
|
||
// Revoke the `SET_SIGNATURE_VALIDATOR_PERMISSION` that was deprecated in v1.4.0. | ||
if (_previousProtocolVersion[1] <= 3) { | ||
_revoke({ | ||
_where: address(this), | ||
_who: address(this), | ||
_permissionId: keccak256("SET_SIGNATURE_VALIDATOR_PERMISSION") | ||
}); | ||
} | ||
} | ||
|
||
/// @inheritdoc PermissionManager | ||
|
@@ -223,7 +233,7 @@ contract DAO is | |
bytes32 _permissionId, | ||
bytes memory _data | ||
) external view override returns (bool) { | ||
return isGranted(_where, _who, _permissionId, _data); | ||
return isGranted({_where: _where, _who: _who, _permissionId: _permissionId, _data: _data}); | ||
} | ||
|
||
/// @inheritdoc IDAO | ||
|
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 |
---|---|---|
|
@@ -5,6 +5,7 @@ pragma solidity ^0.8.8; | |
/// @title IDAO | ||
/// @author Aragon Association - 2022-2023 | ||
/// @notice The interface required for DAOs within the Aragon App DAO framework. | ||
/// @custom:security-contact [email protected] | ||
interface IDAO { | ||
/// @notice The action struct to be consumed by the DAO's `execute` function resulting in an external call. | ||
/// @param to The address to call. | ||
|
@@ -115,7 +116,7 @@ interface IDAO { | |
/// @notice Checks whether a signature is valid for a provided hash according to [ERC-1271](https://eips.ethereum.org/EIPS/eip-1271). | ||
/// @param _hash The hash of the data to be signed. | ||
/// @param _signature The signature byte array associated with `_hash`. | ||
/// @return Returns the `bytes4` magic value `0x1626ba7e` if the signature is valid. | ||
/// @return Returns the `bytes4` magic value `0x1626ba7e` if the signature is valid and `0xffffffff` if not. | ||
function isValidSignature(bytes32 _hash, bytes memory _signature) external returns (bytes4); | ||
|
||
/// @notice Registers an ERC standard having a callback by registering its [ERC-165](https://eips.ethereum.org/EIPS/eip-165) interface ID and callback function signature. | ||
|
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 |
---|---|---|
|
@@ -5,6 +5,7 @@ pragma solidity 0.8.17; | |
/// @title EIP-4824 Common Interfaces for DAOs | ||
/// @dev See https://eips.ethereum.org/EIPS/eip-4824 | ||
/// @author Aragon Association - 2021-2023 | ||
/// @custom:security-contact [email protected] | ||
interface IEIP4824 { | ||
/// @notice A distinct Uniform Resource Identifier (URI) pointing to a JSON object following the "EIP-4824 DAO JSON-LD Schema". This JSON file splits into four URIs: membersURI, proposalsURI, activityLogURI, and governanceURI. The membersURI should point to a JSON file that conforms to the "EIP-4824 Members JSON-LD Schema". The proposalsURI should point to a JSON file that conforms to the "EIP-4824 Proposals JSON-LD Schema". The activityLogURI should point to a JSON file that conforms to the "EIP-4824 Activity Log JSON-LD Schema". The governanceURI should point to a flatfile, normatively a .md file. Each of the JSON files named above can be statically hosted or dynamically-generated. | ||
/// @return _daoURI The DAO URI. | ||
|
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 |
---|---|---|
|
@@ -6,6 +6,7 @@ pragma solidity ^0.8.8; | |
/// @author Aragon Association - 2021-2023 | ||
/// @notice An interface to be implemented to support custom permission logic. | ||
/// @dev To attach a condition to a permission, the `grantWithCondition` function must be used and refer to the implementing contract's address with the `condition` argument. | ||
/// @custom:security-contact [email protected] | ||
interface IPermissionCondition { | ||
/// @notice Checks if a call is permitted. | ||
/// @param _where The address of the target contract. | ||
|
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 |
---|---|---|
|
@@ -10,6 +10,7 @@ import {IPermissionCondition} from "./IPermissionCondition.sol"; | |
/// @title PermissionCondition | ||
/// @author Aragon Association - 2023 | ||
/// @notice An abstract contract for non-upgradeable contracts instantiated via the `new` keyword to inherit from to support customary permissions depending on arbitrary on-chain state. | ||
/// @custom:security-contact [email protected] | ||
abstract contract PermissionCondition is ERC165, IPermissionCondition, ProtocolVersion { | ||
/// @notice Checks if an interface is supported by this or its parent contract. | ||
/// @param _interfaceId The ID of the interface. | ||
|
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 |
---|---|---|
|
@@ -10,6 +10,7 @@ import {IPermissionCondition} from "./IPermissionCondition.sol"; | |
/// @title PermissionConditionUpgradeable | ||
/// @author Aragon Association - 2023 | ||
/// @notice An abstract contract for upgradeable or cloneable contracts to inherit from and to support customary permissions depending on arbitrary on-chain state. | ||
/// @custom:security-contact [email protected] | ||
abstract contract PermissionConditionUpgradeable is | ||
ERC165Upgradeable, | ||
IPermissionCondition, | ||
|
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 |
---|---|---|
|
@@ -5,6 +5,7 @@ pragma solidity ^0.8.8; | |
/// @title PermissionLib | ||
/// @author Aragon Association - 2021-2023 | ||
/// @notice A library containing objects for permission processing. | ||
/// @custom:security-contact [email protected] | ||
library PermissionLib { | ||
/// @notice A constant expressing that no condition is applied to a permission. | ||
address public constant NO_CONDITION = address(0); | ||
|
Oops, something went wrong.