Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document AccessManager functions and events in IAccessManager #4660

Merged
merged 10 commits into from
Oct 5, 2023
4 changes: 4 additions & 0 deletions contracts/access/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,12 @@ This directory provides ways to restrict who can access the functions of a contr

{{IAuthority}}

{{IAccessManager}}

{{AccessManager}}

{{IAccessManaged}}
frangio marked this conversation as resolved.
Show resolved Hide resolved

{{AccessManaged}}

{{AccessManagerAdapter}}
Amxx marked this conversation as resolved.
Show resolved Hide resolved
14 changes: 3 additions & 11 deletions contracts/access/manager/AccessManaged.sol
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,12 @@ abstract contract AccessManaged is Context, IAccessManaged {
_;
}

/**
* @dev Returns the current authority.
*/
/// @inheritdoc IAccessManaged
function authority() public view virtual returns (address) {
return _authority;
}

/**
* @dev Transfers control to a new authority. The caller must be the current authority.
*/
/// @inheritdoc IAccessManaged
function setAuthority(address newAuthority) public virtual {
address caller = _msgSender();
if (caller != authority()) {
Expand All @@ -78,11 +74,7 @@ abstract contract AccessManaged is Context, IAccessManaged {
_setAuthority(newAuthority);
}

/**
* @dev Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is
* being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs
* attacker controlled calls.
*/
/// @inheritdoc IAccessManaged
function isConsumingScheduledOp() public view returns (bytes4) {
return _consumingSchedule ? this.isConsumingScheduledOp.selector : bytes4(0);
}
Expand Down
Loading
Loading