diff --git a/packages/contracts-ethers/package.json b/packages/contracts-ethers/package.json index a62f68fda..d6e5dcdf4 100644 --- a/packages/contracts-ethers/package.json +++ b/packages/contracts-ethers/package.json @@ -1,6 +1,6 @@ { "name": "@aragon/osx-ethers", - "version": "1.3.0-rc0.2", + "version": "1.3.1-rc0", "description": "The Aragon OSx contract definitions for ethers.js", "main": "dist/bundle-cjs.js", "module": "dist/bundle-esm.js", diff --git a/packages/contracts/CHANGELOG.md b/packages/contracts/CHANGELOG.md index dc6685d33..dcbf0d0b9 100644 --- a/packages/contracts/CHANGELOG.md +++ b/packages/contracts/CHANGELOG.md @@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## v1.3.1-rc0 + +### Added + +### Changed + +- Added missing `virtual` keyword to `PermissionCondition` and `PermissionConditionUpgradeable`. + +### Removed + ## v1.3.0-rc0 ### Added diff --git a/packages/contracts/package.json b/packages/contracts/package.json index 8c3497b97..8608f9e27 100644 --- a/packages/contracts/package.json +++ b/packages/contracts/package.json @@ -1,6 +1,6 @@ { "name": "@aragon/osx-artifacts", - "version": "1.3.0-rc0.2", + "version": "1.3.1-rc0", "description": "The Aragon OSx Solidity contracts", "main": "dist/bundle-cjs.js", "module": "dist/bundle-esm.js", diff --git a/packages/contracts/src/core/permission/IPermissionCondition.sol b/packages/contracts/src/core/permission/IPermissionCondition.sol index 4193f8e60..d0f67910b 100644 --- a/packages/contracts/src/core/permission/IPermissionCondition.sol +++ b/packages/contracts/src/core/permission/IPermissionCondition.sol @@ -4,18 +4,19 @@ pragma solidity ^0.8.8; /// @title IPermissionCondition /// @author Aragon Association - 2021-2023 -/// @notice This interface can be implemented to support more customary permissions depending on on- or off-chain state, e.g., by querying token ownershop or a secondary condition, respectively. +/// @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. interface IPermissionCondition { - /// @notice This method is used to check if a call is permitted. + /// @notice Checks if a call is permitted. /// @param _where The address of the target contract. /// @param _who The address (EOA or contract) for which the permissions are checked. /// @param _permissionId The permission identifier. /// @param _data Optional data passed to the `PermissionCondition` implementation. - /// @return allowed Returns true if the call is permitted. + /// @return isPermitted Returns true if the call is permitted. function isGranted( address _where, address _who, bytes32 _permissionId, bytes calldata _data - ) external view returns (bool allowed); + ) external view returns (bool isPermitted); } diff --git a/packages/contracts/src/core/permission/PermissionCondition.sol b/packages/contracts/src/core/permission/PermissionCondition.sol index 10ea7e35c..fd9daa463 100644 --- a/packages/contracts/src/core/permission/PermissionCondition.sol +++ b/packages/contracts/src/core/permission/PermissionCondition.sol @@ -13,7 +13,7 @@ abstract contract PermissionCondition is ERC165, IPermissionCondition { /// @notice Checks if an interface is supported by this or its parent contract. /// @param _interfaceId The ID of the interface. /// @return Returns `true` if the interface is supported. - function supportsInterface(bytes4 _interfaceId) public view override returns (bool) { + function supportsInterface(bytes4 _interfaceId) public view virtual override returns (bool) { return _interfaceId == type(IPermissionCondition).interfaceId || super.supportsInterface(_interfaceId); diff --git a/packages/contracts/src/core/permission/PermissionConditionUpgdaeable.sol b/packages/contracts/src/core/permission/PermissionConditionUpgradeable.sol similarity index 96% rename from packages/contracts/src/core/permission/PermissionConditionUpgdaeable.sol rename to packages/contracts/src/core/permission/PermissionConditionUpgradeable.sol index 293beebb2..d9b4142e8 100644 --- a/packages/contracts/src/core/permission/PermissionConditionUpgdaeable.sol +++ b/packages/contracts/src/core/permission/PermissionConditionUpgradeable.sol @@ -13,7 +13,7 @@ abstract contract PermissionConditionUpgradeable is ERC165Upgradeable, IPermissi /// @notice Checks if an interface is supported by this or its parent contract. /// @param _interfaceId The ID of the interface. /// @return Returns `true` if the interface is supported. - function supportsInterface(bytes4 _interfaceId) public view override returns (bool) { + function supportsInterface(bytes4 _interfaceId) public view virtual override returns (bool) { return _interfaceId == type(IPermissionCondition).interfaceId || super.supportsInterface(_interfaceId); diff --git a/packages/contracts/src/package.json b/packages/contracts/src/package.json index 6d8a807af..1093bcce6 100644 --- a/packages/contracts/src/package.json +++ b/packages/contracts/src/package.json @@ -1,6 +1,6 @@ { "name": "@aragon/osx", - "version": "1.3.0-rc0.2", + "version": "1.3.1-rc0", "description": "The Aragon OSx Solidity contracts", "publishConfig": { "access": "public"