{"eip":927,"title":"Generalised authorisations","description":"This EIP specifies a generic authorisation mechanism, which can be used to implement a variety of authorisation patterns, replacing approvals in ERC20, operators in ERC777, and bespoke authorisation patterns in a variety of other types of contract.","authors":["Nick Johnson \u003cnick@ethereum.org\u003e"],"status":"Stagnant","type":"Standards Track","category":"ERC","created":"2018-03-12","requires":[926],"repo":"ERCs","label":"ERC-927","officialUrl":"https://eips.ethereum.org/EIPS/eip-927","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-927.md","url":"https://eips.huatuo.xyz/eip-927/","tldr":{"en":"A proposed single authorization interface, canCall(owner, caller, callee, func), that any contract could use instead of reinventing ERC-20 approvals or ERC-777 operators. Stagnant.","ja":"ERC-20 の approve や ERC-777 のオペレーターを再発明する代わりに、あらゆるコントラクトが使える単一の認可インターフェース canCall(owner, caller, callee, func) の提案。Stagnant。","ko":"ERC-20의 approve나 ERC-777의 operator를 다시 만드는 대신, 모든 컨트랙트가 쓸 수 있는 단일 인가 인터페이스 canCall(owner, caller, callee, func)을 제안. Stagnant.","zh":"提议的单一授权接口 canCall(owner, caller, callee, func)，任何合约都可以用它，而不必重新发明 ERC-20 的 approve 或 ERC-777 的 operator。处于 Stagnant 状态。"},"tags":["authorization","access-control","permissions","stagnant"],"explainers":{"en":{"lang":"en","tldr":"A proposed single authorization interface, canCall(owner, caller, callee, func), that any contract could use instead of reinventing ERC-20 approvals or ERC-777 operators. Stagnant.","tags":["authorization","access-control","permissions","stagnant"],"related":[926,20,777,137],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-927/","markdown":"## What problem does it solve?\n\nMany contracts let a third party act on a user's behalf. Examples include ERC-20 `approve`/`transferFrom`, ERC-777 operators, and ENS name controllers. Each standard designed its own version of this \"Alice lets Bob do X\" pattern. The versions are incompatible with each other, and users have to manage permissions separately in every contract.\n\nERC-927, by Nick Johnson, proposes **one generic mechanism** that all such contracts could share. It is inspired by DappHub's `ds-auth` and by OAuth.\n\n## How it works\n\nAuthorizations are stored by a per-user **provider** contract. Users register their provider in the address-metadata registry from [ERC-926](/eip-926/), which lives at a well-known address. The provider answers one question:\n\n```solidity\nfunction canCall(address owner, address caller, address callee, bytes4 func)\n    external view returns (bool);\n```\n\n| Parameter | Meaning |\n| --- | --- |\n| `owner` | The user whose resource is being acted on. An approved call is treated as made by this address. |\n| `caller` | Who is making the call right now (`msg.sender`). |\n| `callee` | The contract being called, such as the token. |\n| `func` | The 4-byte selector of the function being called. |\n\nFlow: when Bob calls `transferFrom(alice, ...)` on a token, the token looks up Alice's provider in the ERC-926 registry. It then calls `canCall(alice, bob, address(this), msg.sig)` and reverts if the answer is `false`.\n\nProviders **should** also offer a standard way to manage permissions:\n\n```solidity\nfunction authoriseCaller(address owner, address caller, address callee, bytes4 func);\nfunction revokeCaller(address owner, address caller, address callee, bytes4 func);\n```\n\n`func == 0` means \"all functions on `callee`\". Only the owner, or someone the owner has authorized, may change the owner's settings.\n\n## Sample code\n\nHow a token might check permission before acting for someone else (illustrative):\n\n```solidity\ninterface IMetadataRegistry { function provider(address addr) external view returns (address); }\ninterface IAuthProvider {\n    function canCall(address owner, address caller, address callee, bytes4 func) external view returns (bool);\n}\n\nmodifier authorised(address owner) {\n    if (msg.sender != owner) {\n        address p = REGISTRY.provider(owner);   // ERC-926 lookup\n        require(p != address(0) \u0026\u0026\n                IAuthProvider(p).canCall(owner, msg.sender, address(this), msg.sig),\n                \"not authorised\");\n    }\n    _;\n}\n\nfunction transferFrom(address from, address to, uint256 v) external authorised(from) { /* ... */ }\n```\n\n## Things to know\n\n- **This proposal is Stagnant and was never adopted.** Its dependency [ERC-926](/eip-926/) is Stagnant too, and no registry or provider became standard.\n- The spec has no reference implementation (\"Example implementation TBD\"). The `provider(address)` lookup shown above is the registry function defined in ERC-926. `REGISTRY` stands for the registry's well-known address, which the spec does not give.\n- Permissions are per function selector, not per amount. On its own it cannot express \"Bob may spend up to 100 tokens\" the way an ERC-20 allowance does.\n- In practice, the ecosystem moved toward signature-based approvals ([ERC-2612](/eip-2612/) permit) and smart-contract accounts with their own permission modules, rather than one global authorization registry.\n"},"ja":{"lang":"ja","tldr":"ERC-20 の approve や ERC-777 のオペレーターを再発明する代わりに、あらゆるコントラクトが使える単一の認可インターフェース canCall(owner, caller, callee, func) の提案。Stagnant。","tags":["authorization","access-control","permissions","stagnant"],"related":[926,20,777,137],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-927/","markdown":"## 何を解決するのか\n\n多くのコントラクトは、第三者がユーザーに代わって動作することを許可します。たとえば ERC-20 の `approve`/`transferFrom`、ERC-777 のオペレーター、ENS の名前コントローラーなどです。それぞれの標準が、この「Alice が Bob に X を許す」というパターンを独自に設計しました。それらは互いに互換性がなく、ユーザーはコントラクトごとに別々に権限を管理しなければなりません。\n\nNick Johnson による ERC-927 は、そうしたすべてのコントラクトが共有できる**汎用の仕組みを 1 つ**提案します。DappHub の `ds-auth` と OAuth に着想を得ています。\n\n## 仕組み\n\n認可は、ユーザーごとの**プロバイダー**コントラクトに保存されます。ユーザーは、よく知られたアドレスに置かれた [ERC-926](/eip-926/) のアドレスメタデータレジストリに、自分のプロバイダーを登録します。プロバイダーは次の 1 つの問いに答えます。\n\n```solidity\nfunction canCall(address owner, address caller, address callee, bytes4 func)\n    external view returns (bool);\n```\n\n| パラメータ | 意味 |\n| --- | --- |\n| `owner` | 操作の対象となるリソースを持つユーザー。承認された呼び出しは、このアドレスから行われたものとして扱われます。 |\n| `caller` | 現在呼び出しを行っている人（`msg.sender`）。 |\n| `callee` | 呼び出されるコントラクト（トークンなど）。 |\n| `func` | 呼び出される関数の 4 バイトのセレクタ。 |\n\n流れ: Bob がトークンの `transferFrom(alice, ...)` を呼ぶと、トークンは ERC-926 レジストリから Alice のプロバイダーを探します。続いて `canCall(alice, bob, address(this), msg.sig)` を呼び、答えが `false` なら revert します。\n\nプロバイダーは、権限を管理する標準的な方法も提供する**べき**です。\n\n```solidity\nfunction authoriseCaller(address owner, address caller, address callee, bytes4 func);\nfunction revokeCaller(address owner, address caller, address callee, bytes4 func);\n```\n\n`func == 0` は「`callee` のすべての関数」を意味します。所有者の設定を変更できるのは、所有者本人か、所有者が認可した人だけです。\n\n## サンプルコード\n\nトークンが他人のために動作する前に権限を確認する方法の例です。\n\n```solidity\ninterface IMetadataRegistry { function provider(address addr) external view returns (address); }\ninterface IAuthProvider {\n    function canCall(address owner, address caller, address callee, bytes4 func) external view returns (bool);\n}\n\nmodifier authorised(address owner) {\n    if (msg.sender != owner) {\n        address p = REGISTRY.provider(owner);   // ERC-926 の参照\n        require(p != address(0) \u0026\u0026\n                IAuthProvider(p).canCall(owner, msg.sender, address(this), msg.sig),\n                \"not authorised\");\n    }\n    _;\n}\n\nfunction transferFrom(address from, address to, uint256 v) external authorised(from) { /* ... */ }\n```\n\n## 知っておくべきこと\n\n- **この提案は Stagnant で、採用されることはありませんでした。** 依存先の [ERC-926](/eip-926/) も Stagnant で、標準になったレジストリやプロバイダーはありません。\n- 仕様にはリファレンス実装がありません（「Example implementation TBD」）。上に示した `provider(address)` の参照は、ERC-926 で定義されたレジストリ関数です。`REGISTRY` はレジストリのよく知られたアドレスを表しますが、仕様にはそのアドレスは示されていません。\n- 権限は関数セレクタ単位であり、金額単位ではありません。それだけでは、ERC-20 の allowance のように「Bob は 100 トークンまで使ってよい」を表現できません。\n- 実際には、エコシステムは 1 つのグローバルな認可レジストリではなく、署名ベースの承認（[ERC-2612](/eip-2612/) の permit）や、独自の権限モジュールを持つスマートコントラクトアカウントへ移行しました。\n"},"ko":{"lang":"ko","tldr":"ERC-20의 approve나 ERC-777의 operator를 다시 만드는 대신, 모든 컨트랙트가 쓸 수 있는 단일 인가 인터페이스 canCall(owner, caller, callee, func)을 제안. Stagnant.","tags":["authorization","access-control","permissions","stagnant"],"related":[926,20,777,137],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-927/","markdown":"## 어떤 문제를 해결하나요?\n\n많은 컨트랙트는 제3자가 사용자를 대신해 동작하도록 허용합니다. ERC-20의 `approve`/`transferFrom`, ERC-777의 operator, ENS 이름 컨트롤러가 그 예입니다. 각 표준은 이 \"Alice가 Bob에게 X를 허용한다\"는 패턴을 저마다 설계했습니다. 이 버전들은 서로 호환되지 않으며, 사용자는 컨트랙트마다 따로 권한을 관리해야 합니다.\n\nNick Johnson이 제안한 ERC-927은 이런 컨트랙트가 모두 공유할 수 있는 **하나의 범용 메커니즘**을 제안합니다. DappHub의 `ds-auth`와 OAuth에서 영감을 얻었습니다.\n\n## 어떻게 동작하나요?\n\n인가 정보는 사용자별 **프로바이더(provider)** 컨트랙트에 저장됩니다. 사용자는 잘 알려진 주소에 있는 [ERC-926](/eip-926/)의 주소 메타데이터 레지스트리에 자신의 프로바이더를 등록합니다. 프로바이더는 한 가지 질문에 답합니다.\n\n```solidity\nfunction canCall(address owner, address caller, address callee, bytes4 func)\n    external view returns (bool);\n```\n\n| 파라미터 | 의미 |\n| --- | --- |\n| `owner` | 자원에 대한 작업이 이루어지는 대상 사용자. 승인된 호출은 이 주소가 한 것으로 취급됩니다. |\n| `caller` | 지금 호출을 하는 주체(`msg.sender`). |\n| `callee` | 호출되는 컨트랙트(예: 토큰). |\n| `func` | 호출되는 함수의 4바이트 셀렉터. |\n\n흐름: Bob이 토큰의 `transferFrom(alice, ...)`를 호출하면, 토큰은 ERC-926 레지스트리에서 Alice의 프로바이더를 찾습니다. 그런 다음 `canCall(alice, bob, address(this), msg.sig)`를 호출하고, 답이 `false`이면 revert합니다.\n\n프로바이더는 권한을 관리하는 표준적인 방법도 제공**해야 합니다**.\n\n```solidity\nfunction authoriseCaller(address owner, address caller, address callee, bytes4 func);\nfunction revokeCaller(address owner, address caller, address callee, bytes4 func);\n```\n\n`func == 0`은 \"`callee`의 모든 함수\"를 뜻합니다. 소유자의 설정은 소유자 본인이나 소유자가 인가한 사람만 변경할 수 있습니다.\n\n## 샘플 코드\n\n토큰이 다른 사람을 대신해 동작하기 전에 권한을 확인하는 방식의 예시입니다.\n\n```solidity\ninterface IMetadataRegistry { function provider(address addr) external view returns (address); }\ninterface IAuthProvider {\n    function canCall(address owner, address caller, address callee, bytes4 func) external view returns (bool);\n}\n\nmodifier authorised(address owner) {\n    if (msg.sender != owner) {\n        address p = REGISTRY.provider(owner);   // ERC-926 조회\n        require(p != address(0) \u0026\u0026\n                IAuthProvider(p).canCall(owner, msg.sender, address(this), msg.sig),\n                \"not authorised\");\n    }\n    _;\n}\n\nfunction transferFrom(address from, address to, uint256 v) external authorised(from) { /* ... */ }\n```\n\n## 알아둘 점\n\n- **이 제안은 Stagnant 상태이며 채택된 적이 없습니다.** 의존하는 [ERC-926](/eip-926/)도 Stagnant이며, 표준이 된 레지스트리나 프로바이더는 없습니다.\n- 명세에는 레퍼런스 구현이 없습니다(\"Example implementation TBD\"). 위에 나온 `provider(address)` 조회는 ERC-926에서 정의한 레지스트리 함수입니다. `REGISTRY`는 레지스트리의 잘 알려진 주소를 가리키지만, 명세에는 그 주소가 나와 있지 않습니다.\n- 권한은 함수 셀렉터 단위이지 금액 단위가 아닙니다. 그것만으로는 ERC-20 allowance처럼 \"Bob이 최대 100 토큰까지 쓸 수 있다\"를 표현할 수 없습니다.\n- 실제로 생태계는 하나의 전역 인가 레지스트리가 아니라, 서명 기반 승인([ERC-2612](/eip-2612/) permit)과 자체 권한 모듈을 가진 스마트 컨트랙트 계정 쪽으로 옮겨 갔습니다.\n"},"zh":{"lang":"zh","tldr":"提议的单一授权接口 canCall(owner, caller, callee, func)，任何合约都可以用它，而不必重新发明 ERC-20 的 approve 或 ERC-777 的 operator。处于 Stagnant 状态。","tags":["authorization","access-control","permissions","stagnant"],"related":[926,20,777,137],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-927/","markdown":"## 它解决什么问题？\n\n许多合约允许第三方代表用户行事。例子包括 ERC-20 的 `approve`/`transferFrom`、ERC-777 的 operator，以及 ENS 名称控制器。每个标准都为这种\"Alice 允许 Bob 做 X\"的模式设计了自己的版本。这些版本彼此不兼容，用户必须在每个合约中分别管理权限。\n\nNick Johnson 提出的 ERC-927 建议建立**一种通用机制**，让所有此类合约共用。它受到 DappHub 的 `ds-auth` 和 OAuth 的启发。\n\n## 它如何运作\n\n授权信息存储在每个用户各自的**提供者（provider）**合约中。用户在 [ERC-926](/eip-926/) 的地址元数据注册表中登记自己的提供者，该注册表位于一个众所周知的地址。提供者回答一个问题：\n\n```solidity\nfunction canCall(address owner, address caller, address callee, bytes4 func)\n    external view returns (bool);\n```\n\n| 参数 | 含义 |\n| --- | --- |\n| `owner` | 其资源被操作的用户。被批准的调用会被视为由该地址发出。 |\n| `caller` | 当前发起调用的人（`msg.sender`）。 |\n| `callee` | 被调用的合约，例如代币合约。 |\n| `func` | 被调用函数的 4 字节选择器。 |\n\n流程：当 Bob 对某个代币调用 `transferFrom(alice, ...)` 时，代币合约会在 ERC-926 注册表中查找 Alice 的提供者。然后调用 `canCall(alice, bob, address(this), msg.sig)`，如果答案为 `false` 就 revert。\n\n提供者**应当**同时提供管理权限的标准方式：\n\n```solidity\nfunction authoriseCaller(address owner, address caller, address callee, bytes4 func);\nfunction revokeCaller(address owner, address caller, address callee, bytes4 func);\n```\n\n`func == 0` 表示\"`callee` 上的所有函数\"。只有所有者本人或所有者授权过的人才能更改该所有者的设置。\n\n## 示例代码\n\n代币在代表他人行事之前可能如何检查权限（示意）：\n\n```solidity\ninterface IMetadataRegistry { function provider(address addr) external view returns (address); }\ninterface IAuthProvider {\n    function canCall(address owner, address caller, address callee, bytes4 func) external view returns (bool);\n}\n\nmodifier authorised(address owner) {\n    if (msg.sender != owner) {\n        address p = REGISTRY.provider(owner);   // ERC-926 查询\n        require(p != address(0) \u0026\u0026\n                IAuthProvider(p).canCall(owner, msg.sender, address(this), msg.sig),\n                \"not authorised\");\n    }\n    _;\n}\n\nfunction transferFrom(address from, address to, uint256 v) external authorised(from) { /* ... */ }\n```\n\n## 需要注意\n\n- **该提案处于 Stagnant 状态，从未被采纳。** 它所依赖的 [ERC-926](/eip-926/) 同样是 Stagnant，没有任何注册表或提供者成为标准。\n- 规范中没有参考实现（\"Example implementation TBD\"）。上面所示的 `provider(address)` 查询是 ERC-926 中定义的注册表函数。`REGISTRY` 代表注册表那个众所周知的地址，规范并未给出该地址。\n- 权限是按函数选择器划分的，而不是按数额。单靠它无法像 ERC-20 的 allowance 那样表达\"Bob 最多可以花 100 个代币\"。\n- 实际上，生态系统转向了基于签名的授权（[ERC-2612](/eip-2612/) permit）和带有自身权限模块的智能合约账户，而不是一个全局的授权注册表。\n"}}}
