IPermissionRegistry

Git Source

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

NameTypeDescription
senderaddressThe account address
operatoraddressThe 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

NameTypeDescription
senderaddressThe account address
permHashbytes32The 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

NameTypeDescription
operatoraddressThe operator address
rootbytes32The 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

NameTypeDescription
permHashbytes32The permission hash
remainingUsageuint256The 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);