Skip to main content

IPermissionCondition

Description

An interface to be implemented to support custom permission logic.

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.

Implementation

external function isGranted

Checks if a call is permitted.

function isGranted(address _where, address _who, bytes32 _permissionId, bytes _data) external view returns (bool isPermitted)
InputTypeDescription
_whereaddressThe address of the target contract.
_whoaddressThe address (EOA or contract) for which the permissions are checked.
_permissionIdbytes32The permission identifier.
_databytesOptional data passed to the PermissionCondition implementation.
Output
isPermittedboolReturns true if the call is permitted.
© 2024