Abstract
The following standard provides a generic method for checking whether a given account has permissions on a contract
This can be used for permissions such as token blacklists, minimum token holdings, vaults with allowlists built in, and any other permissions relevant to smart contract execution.
Motivation
While there has been standards focused on defining permissions for ERC20 token transfers (e.g. ERC-1404), there is no standard that enables any permission for any arbitrary contract to be retrieved.
Specification
Methods
isPermissioned(address)
Returns true if the user is permissioned to interact with the contract.
- name: isPermissioned
type: function
stateMutability: view
inputs:
- name: user
type: address
outputs:
- name: status
type: boolERC-165 support
Smart contracts implementing this Vault standard MUST implement the ERC-165 supportsInterface function.
Contracts MUST return the constant value true if 0x78d77ecb is passed through the interfaceID argument.
Rationale
Contract-level check
The standard only supports a contract-level check, where permission for a user is either granted on the contract level or not. Contracts may implement more granular permissions, e.g. for token transfers on an ERC-20 implementation where a user can receive tokens but not send them. In this case, it is up to the contracts to decide how to expose these permissions to integrations. This can be done by implementing additional permission checks that are not standardized.
Mandated Support for ERC-165
Implementing support for ERC-165 is mandated because it simplifies integrations, which can check in a gas efficient manner whether the permissions standard is implemented by a contract.
Security Considerations
Users should not assume having a permission ensures their calls will be guaranteed to succeed.
Copyright
Copyright and related rights waived via CC0.
