{"eip":7513,"title":"Smart NFT - A Component for Intent-Centric","description":"This proposal defines a new type of NFT that combines smart contract execution logic, granting NFTs executable capabilities.","authors":["MJ Tseng (@TsengMJ) \u003ctsngmj@gmail.com\u003e","Clay (@Clay2018) \u003cclay.uw@outlook.com\u003e","Jeffery.c \u003cjeffery.c@a3sprotocol.xyz\u003e","Johnny.c \u003cjohnny.c@a3sprotocol.xyz\u003e"],"status":"Draft","type":"Standards Track","category":"ERC","created":"2023-09-06","requires":[165,1155],"discussionsTo":"https://ethereum-magicians.org/t/nft-bound-modularized-contract/15696","repo":"ERCs","label":"ERC-7513","officialUrl":"https://eips.ethereum.org/EIPS/eip-7513","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-7513.md","url":"https://eips.huatuo.xyz/eip-7513/","tldr":{"en":"Proposes 'Smart NFTs': ERC-1155 tokens that each grant the right to execute a registered, verifier-audited piece of contract code, plus a proxy that batches several of them to fulfil a user's intent.","ja":"「Smart NFT」を提案する。各トークンが、登録済みでバリファイアーの監査を受けたコントラクトコードの実行権を付与する ERC-1155 トークンで、複数を束ねてユーザーのインテントを実現するプロキシも備える。","ko":"\"Smart NFT\"를 제안한다. 각 토큰이 등록되고 검증자의 감사를 거친 컨트랙트 코드를 실행할 권리를 주는 ERC-1155 토큰이며, 여러 개를 묶어 사용자의 인텐트를 수행하는 프록시도 있다.","zh":"提出\"Smart NFT\"：每个 ERC-1155 代币赋予执行一段已登记、经验证者审计的合约代码的权利，并配有一个代理，可以批量组合其中若干个来实现用户的意图。"},"tags":["nft","intents","erc1155","modules","execution"],"explainers":{"en":{"lang":"en","tldr":"Proposes 'Smart NFTs': ERC-1155 tokens that each grant the right to execute a registered, verifier-audited piece of contract code, plus a proxy that batches several of them to fulfil a user's intent.","tags":["nft","intents","erc1155","modules","execution"],"related":[1155,165,721],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-7513/","markdown":"## What problem does it solve?\n\nThe authors see three gaps. Users who want automation often hand their private keys to bots. Independent developers struggle to turn a useful contract into a product. And there is no standard on-chain way to transfer *ownership of code* itself.\n\nERC-7513 treats a piece of executable contract logic as an NFT. Holding the token is the permission to run the code, so no private key is shared. The code can be bought and sold like any other NFT, and several such modules can be chained to carry out a higher-level \"intent\".\n\n## How it works\n\nThere are three components:\n\n- **Smart-NFT**: the executable module. It must implement `execute(bytes data)`, taking all its parameters as one encoded `bytes` blob, and must call `validatePermission()` inside it. That check asks the Smart-Manager whether the module is verified and whether the caller may use it.\n- **Smart-Manager**: a registry that should itself be an [ERC-1155](/eip-1155/) contract. Developers `register(creationCode, totalSupply)`, which deploys the module, mints its token id, and marks it `UNVERIFIED`. Trusted verifiers call `auditTo(tokenId, isValid)` to move it to `VERIFIED` or `DENIED`. `isAccessible(caller, tokenId)` must check both that the caller holds the token and that the module is verified. The possible states are `UNREGISTERED`, `DEREGISTERED`, `UNVERIFIED`, `VERIFIED` and `DENIED`.\n- **Intent-Proxy**: `executeIntent(Action[])` where each `Action` is `{tokenId, executeParam}`. It lets a user run several Smart-NFTs in one call.\n\nERC-1155 was chosen because its \"shares\" model fits: owning at least one unit of a token id grants use of that module, and owning more adds nothing, much like owning two phones of the same model. It also means existing NFT marketplaces can trade the modules.\n\n## Sample code\n\nInterfaces from the spec:\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.20;\n\ninterface ISmartNFT {\n    function execute(bytes memory data) external payable returns (bool);\n    function validatePermission() external view returns (bool);\n}\n\ninterface ISmartManager {\n    enum VerificationStatus { UNREGISTERED, DEREGISTERED, UNVERIFIED, VERIFIED, DENIED }\n    function register(bytes calldata creationCode, uint256 totalSupply)\n        external returns (uint256 tokenId, address implAddr);\n    function auditTo(uint256 tokenId, bool isValid) external returns (bool);\n    function isAccessible(address caller, uint256 tokenId) external view returns (bool);\n    function verificationStatusOf(uint256 tokenId) external view returns (VerificationStatus);\n}\n\ninterface IIntentProxy {\n    struct Action { uint256 tokenId; bytes executeParam; }\n    function executeIntent(Action[] calldata actions) external payable returns (bool);\n}\n```\n\nUsing it from a client (ethers v6):\n\n```ts\nconst actions = [\n  { tokenId: 1n, executeParam: swapParams },   // e.g. a swap module\n  { tokenId: 2n, executeParam: stakeParams },  // then a staking module\n];\nawait intentProxy.executeIntent(actions);\n```\n\n## Things to know\n\n- Status is **Draft**.\n- Safety depends almost entirely on the **verifiers** who call `auditTo`. The spec does not define who they are or how they are chosen, and it acknowledges risks from malicious or mistaken verifiers.\n- How `validatePermission()` identifies the original caller when invoked via the Intent-Proxy is left to implementations.\n- The reference implementation is an external repository linked from the spec.\n"},"ja":{"lang":"ja","tldr":"「Smart NFT」を提案する。各トークンが、登録済みでバリファイアーの監査を受けたコントラクトコードの実行権を付与する ERC-1155 トークンで、複数を束ねてユーザーのインテントを実現するプロキシも備える。","tags":["nft","intents","erc1155","modules","execution"],"related":[1155,165,721],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-7513/","markdown":"## 何を解決するのか\n\n著者は 3 つの欠落を挙げています。自動化を望むユーザーが、秘密鍵をボットに渡してしまうことが多い。独立した開発者が、有用なコントラクトをプロダクトにするのに苦労している。そして、*コードの所有権*そのものを移転するための標準的なオンチェーンの方法がない。\n\nERC-7513 は、実行可能なコントラクトロジックを NFT として扱います。トークンを保有していることがコードを実行する許可となるため、秘密鍵を共有する必要がありません。コードは他の NFT と同じように売買でき、複数のモジュールを連結して、より高レベルの「インテント」を実行できます。\n\n## 仕組み\n\n3 つのコンポーネントがあります。\n\n- **Smart-NFT**: 実行可能なモジュール。`execute(bytes data)` を実装しなければならず、すべてのパラメーターを 1 つのエンコードされた `bytes` として受け取り、その内部で `validatePermission()` を呼ばなければなりません。このチェックは、モジュールが検証済みか、呼び出し元がそれを使えるかを Smart-Manager に問い合わせます。\n- **Smart-Manager**: レジストリで、それ自体が [ERC-1155](/eip-1155/) コントラクトであるべきです。開発者が `register(creationCode, totalSupply)` を呼ぶと、モジュールがデプロイされ、そのトークン ID がミントされ、`UNVERIFIED` として登録されます。信頼されたバリファイアーが `auditTo(tokenId, isValid)` を呼んで、`VERIFIED` または `DENIED` に移行させます。`isAccessible(caller, tokenId)` は、呼び出し元がトークンを保有していることと、モジュールが検証済みであることの両方を確認しなければなりません。取りうる状態は `UNREGISTERED`、`DEREGISTERED`、`UNVERIFIED`、`VERIFIED`、`DENIED` です。\n- **Intent-Proxy**: `executeIntent(Action[])` で、各 `Action` は `{tokenId, executeParam}` です。ユーザーが複数の Smart-NFT を 1 回の呼び出しで実行できます。\n\nERC-1155 が選ばれたのは、その「シェア」モデルが合うからです。あるトークン ID を 1 単位以上持っていればそのモジュールを使え、それ以上持っても何も増えません。同じ機種の携帯電話を 2 台持つのに似ています。また、既存の NFT マーケットプレイスでモジュールを取引できることにもなります。\n\n## サンプルコード\n\n仕様のインターフェース:\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.20;\n\ninterface ISmartNFT {\n    function execute(bytes memory data) external payable returns (bool);\n    function validatePermission() external view returns (bool);\n}\n\ninterface ISmartManager {\n    enum VerificationStatus { UNREGISTERED, DEREGISTERED, UNVERIFIED, VERIFIED, DENIED }\n    function register(bytes calldata creationCode, uint256 totalSupply)\n        external returns (uint256 tokenId, address implAddr);\n    function auditTo(uint256 tokenId, bool isValid) external returns (bool);\n    function isAccessible(address caller, uint256 tokenId) external view returns (bool);\n    function verificationStatusOf(uint256 tokenId) external view returns (VerificationStatus);\n}\n\ninterface IIntentProxy {\n    struct Action { uint256 tokenId; bytes executeParam; }\n    function executeIntent(Action[] calldata actions) external payable returns (bool);\n}\n```\n\nクライアントからの使い方（ethers v6）:\n\n```ts\nconst actions = [\n  { tokenId: 1n, executeParam: swapParams },   // e.g. a swap module\n  { tokenId: 2n, executeParam: stakeParams },  // then a staking module\n];\nawait intentProxy.executeIntent(actions);\n```\n\n## 知っておくべきこと\n\n- ステータスは **Draft** です。\n- 安全性は、ほぼ完全に `auditTo` を呼ぶ**バリファイアー**に依存します。仕様は、それが誰で、どのように選ばれるのかを定義しておらず、悪意あるまたは誤りのあるバリファイアーによるリスクを認めています。\n- Intent-Proxy 経由で呼び出されたとき、`validatePermission()` が元の呼び出し元をどう特定するかは、実装に委ねられています。\n- リファレンス実装は、仕様からリンクされた外部リポジトリにあります。\n"},"ko":{"lang":"ko","tldr":"\"Smart NFT\"를 제안한다. 각 토큰이 등록되고 검증자의 감사를 거친 컨트랙트 코드를 실행할 권리를 주는 ERC-1155 토큰이며, 여러 개를 묶어 사용자의 인텐트를 수행하는 프록시도 있다.","tags":["nft","intents","erc1155","modules","execution"],"related":[1155,165,721],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-7513/","markdown":"## 어떤 문제를 해결하나요?\n\n저자들은 세 가지 공백을 봅니다. 자동화를 원하는 사용자가 흔히 개인 키를 봇에 넘깁니다. 독립 개발자는 유용한 컨트랙트를 제품으로 만들기 어렵습니다. 그리고 *코드 자체의 소유권*을 이전하는 표준적인 온체인 방법이 없습니다.\n\nERC-7513은 실행 가능한 컨트랙트 로직 조각을 NFT로 취급합니다. 토큰을 보유하는 것이 곧 코드를 실행할 권한이므로 개인 키를 공유할 필요가 없습니다. 코드는 다른 NFT처럼 사고팔 수 있고, 이런 모듈 여러 개를 연결해 더 높은 수준의 \"인텐트\"를 수행할 수 있습니다.\n\n## 어떻게 동작하나요?\n\n세 가지 구성 요소가 있습니다.\n\n- **Smart-NFT**: 실행 가능한 모듈. `execute(bytes data)`를 구현해야 하며 모든 매개변수를 하나의 인코딩된 `bytes`로 받고, 그 안에서 `validatePermission()`을 호출해야 합니다. 이 검사는 Smart-Manager에게 모듈이 검증되었는지, 호출자가 사용할 수 있는지를 묻습니다.\n- **Smart-Manager**: 레지스트리이며 그 자체가 [ERC-1155](/eip-1155/) 컨트랙트여야 합니다. 개발자가 `register(creationCode, totalSupply)`를 호출하면 모듈이 배포되고, 토큰 ID가 민팅되며, `UNVERIFIED`로 표시됩니다. 신뢰받는 검증자가 `auditTo(tokenId, isValid)`를 호출해 `VERIFIED` 또는 `DENIED`로 바꿉니다. `isAccessible(caller, tokenId)`는 호출자가 토큰을 보유하고 있는지와 모듈이 검증되었는지를 모두 확인해야 합니다. 가능한 상태는 `UNREGISTERED`, `DEREGISTERED`, `UNVERIFIED`, `VERIFIED`, `DENIED`입니다.\n- **Intent-Proxy**: `executeIntent(Action[])`이며 각 `Action`은 `{tokenId, executeParam}`입니다. 사용자가 여러 Smart-NFT를 한 번의 호출로 실행할 수 있습니다.\n\nERC-1155가 선택된 이유는 \"지분(share)\" 모델이 잘 맞기 때문입니다. 토큰 ID 하나를 한 단위 이상 보유하면 해당 모듈을 쓸 수 있고, 더 많이 보유한다고 늘어나는 것은 없습니다. 같은 기종의 휴대폰을 두 대 갖는 것과 비슷합니다. 또한 기존 NFT 마켓플레이스에서 모듈을 거래할 수 있다는 뜻이기도 합니다.\n\n## 샘플 코드\n\n명세의 인터페이스:\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.20;\n\ninterface ISmartNFT {\n    function execute(bytes memory data) external payable returns (bool);\n    function validatePermission() external view returns (bool);\n}\n\ninterface ISmartManager {\n    enum VerificationStatus { UNREGISTERED, DEREGISTERED, UNVERIFIED, VERIFIED, DENIED }\n    function register(bytes calldata creationCode, uint256 totalSupply)\n        external returns (uint256 tokenId, address implAddr);\n    function auditTo(uint256 tokenId, bool isValid) external returns (bool);\n    function isAccessible(address caller, uint256 tokenId) external view returns (bool);\n    function verificationStatusOf(uint256 tokenId) external view returns (VerificationStatus);\n}\n\ninterface IIntentProxy {\n    struct Action { uint256 tokenId; bytes executeParam; }\n    function executeIntent(Action[] calldata actions) external payable returns (bool);\n}\n```\n\n클라이언트에서 사용하기(ethers v6):\n\n```ts\nconst actions = [\n  { tokenId: 1n, executeParam: swapParams },   // e.g. a swap module\n  { tokenId: 2n, executeParam: stakeParams },  // then a staking module\n];\nawait intentProxy.executeIntent(actions);\n```\n\n## 알아둘 점\n\n- 상태는 **Draft**입니다.\n- 안전성은 거의 전적으로 `auditTo`를 호출하는 **검증자**에게 달려 있습니다. 명세는 이들이 누구이고 어떻게 선정되는지 정의하지 않으며, 악의적이거나 실수하는 검증자로 인한 위험을 인정합니다.\n- Intent-Proxy를 통해 호출될 때 `validatePermission()`이 원래 호출자를 어떻게 식별하는지는 구현에 맡겨져 있습니다.\n- 레퍼런스 구현은 명세에 링크된 외부 저장소에 있습니다.\n"},"zh":{"lang":"zh","tldr":"提出\"Smart NFT\"：每个 ERC-1155 代币赋予执行一段已登记、经验证者审计的合约代码的权利，并配有一个代理，可以批量组合其中若干个来实现用户的意图。","tags":["nft","intents","erc1155","modules","execution"],"related":[1155,165,721],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-7513/","markdown":"## 它解决什么问题？\n\n作者看到了三个空白。想要自动化的用户常常把私钥交给机器人；独立开发者很难把一份有用的合约做成产品；而且没有标准的链上方式来转让*代码本身的所有权*。\n\nERC-7513 把一段可执行的合约逻辑视为 NFT。持有该代币就是运行该代码的许可，因此无需共享私钥。代码可以像其他 NFT 一样买卖，多个这样的模块可以串联起来，完成更高层次的\"意图\"。\n\n## 它如何运作\n\n有三个组件：\n\n- **Smart-NFT**：可执行模块。它必须实现 `execute(bytes data)`，把所有参数作为一个编码后的 `bytes` 接收，并且必须在其中调用 `validatePermission()`。该检查会询问 Smart-Manager：模块是否已验证，以及调用者是否可以使用它。\n- **Smart-Manager**：一个注册表，其自身应当是一个 [ERC-1155](/eip-1155/) 合约。开发者调用 `register(creationCode, totalSupply)`，这会部署模块、铸造其代币 ID，并将其标记为 `UNVERIFIED`。受信任的验证者调用 `auditTo(tokenId, isValid)`，把它转为 `VERIFIED` 或 `DENIED`。`isAccessible(caller, tokenId)` 必须同时检查调用者持有该代币，以及模块已验证。可能的状态有 `UNREGISTERED`、`DEREGISTERED`、`UNVERIFIED`、`VERIFIED` 和 `DENIED`。\n- **Intent-Proxy**：`executeIntent(Action[])`，其中每个 `Action` 是 `{tokenId, executeParam}`。它让用户在一次调用中运行多个 Smart-NFT。\n\n选择 ERC-1155 是因为它的\"份额\"模型很契合：拥有某个代币 ID 至少一个单位，就可以使用该模块，拥有更多也不会增加任何东西，就像拥有两部同型号的手机。这也意味着现有的 NFT 市场可以交易这些模块。\n\n## 示例代码\n\n规范中的接口：\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.20;\n\ninterface ISmartNFT {\n    function execute(bytes memory data) external payable returns (bool);\n    function validatePermission() external view returns (bool);\n}\n\ninterface ISmartManager {\n    enum VerificationStatus { UNREGISTERED, DEREGISTERED, UNVERIFIED, VERIFIED, DENIED }\n    function register(bytes calldata creationCode, uint256 totalSupply)\n        external returns (uint256 tokenId, address implAddr);\n    function auditTo(uint256 tokenId, bool isValid) external returns (bool);\n    function isAccessible(address caller, uint256 tokenId) external view returns (bool);\n    function verificationStatusOf(uint256 tokenId) external view returns (VerificationStatus);\n}\n\ninterface IIntentProxy {\n    struct Action { uint256 tokenId; bytes executeParam; }\n    function executeIntent(Action[] calldata actions) external payable returns (bool);\n}\n```\n\n从客户端使用（ethers v6）：\n\n```ts\nconst actions = [\n  { tokenId: 1n, executeParam: swapParams },   // e.g. a swap module\n  { tokenId: 2n, executeParam: stakeParams },  // then a staking module\n];\nawait intentProxy.executeIntent(actions);\n```\n\n## 需要注意\n\n- 状态为 **Draft**。\n- 安全性几乎完全取决于调用 `auditTo` 的**验证者**。规范没有定义他们是谁、如何选出，并承认恶意或出错的验证者会带来风险。\n- 通过 Intent-Proxy 调用时，`validatePermission()` 如何识别原始调用者，留给实现决定。\n- 参考实现位于规范中链接的外部仓库。\n"}}}
