IPermissionRegistry
Author: Flydexo - @Flydex0
PermissionRegistry stores the permissions of an operator on an account and the remaining usages of a permission on an account.
Functions
operatorPermissions
operatorPermissions - Getter for the granted permissions of an operator on an account
function operatorPermissions(address sender, address operator) external view returns (bytes32 permHash);
Parameters
Name | Type | Description |
---|---|---|
sender | address | The account address |
operator | address | The operator address |
remainingPermUsage
remainingPermUsage - Getter for the remaining usage of a permission on an account (usage + 1)
function remainingPermUsage(address sender, bytes32 permHash) external view returns (uint256 remainingUsage);
Parameters
Name | Type | Description |
---|---|---|
sender | address | The account address |
permHash | bytes32 | The permission hash |
setOperatorPermissions
setOperatorPermissions - Setter for the granted permissions of an operator on an account. Can only be called by the account modifying it's own operator permissions.
function setOperatorPermissions(address operator, bytes32 root) external;
Parameters
Name | Type | Description |
---|---|---|
operator | address | The operator address |
root | bytes32 | The permissions merkle root |
setRemainingPermUsage
setRemainingPermUsage - Setter for the remaining usage of a permission on an account. Can only be called by the account modifying it's own usage
function setRemainingPermUsage(bytes32 permHash, uint256 remainingUsage) external;
Parameters
Name | Type | Description |
---|---|---|
permHash | bytes32 | The permission hash |
remainingUsage | uint256 | The permission remaining usage (usage + 1) |
Events
OperatorMutated
OperatorMutated - Emitted when the granted permisssions for an operator on an account change
event OperatorMutated(address indexed operator, bytes32 indexed oldPermissions, bytes32 indexed newPermissions);