EIP.tools

EIP.tools

⚠️ DraftStandards Track: ERC

ERC-7714: Simple Permissions Checks

Standardized interface for checking user permissions

Authors
Created2024-05-24
Discussion Linkhttps://ethereum-magicians.org/t/erc-7714-simple-permissions-checks/20495
Requires

Markdown

https://raw.githubusercontent.com/ethereum/ERCs/6f...
Pull Request#435PR closed (unmerged)

EIP-GPT summary

Contents
AbstractMotivationSpecificationMethodsisPermissioned(address)ERC-165 supportRationaleContract-level checkMandated Support for ERC-165Security ConsiderationsCopyright

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: bool

ERC-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 and related rights waived via CC0.

EIP.tools

EIP.tools

Search, read, and map Ethereum improvement proposals, ERCs, RIPs, and CAIPs from one focused interface.

Farcaster
by @apoorveth