Skip to content

Commit 77738d7

Browse files
authored
Merge e6d7dfb into 467884a
2 parents 467884a + e6d7dfb commit 77738d7

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

ERCS/erc-7656.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
---
22
eip: 7656
33
title: Generalized Contract-Linked Services
4-
description: Define a factory for generic services linked to any contract type including ERC-4337 accounts and NFTs
4+
description: Define a factory for generic services linked to any contract type, including smart accounts and NFTs
55
author: Francesco Sullo (@sullof)
66
discussions-to: https://ethereum-magicians.org/t/variation-to-erc6551-to-deploy-any-kind-of-contract-linked-to-an-nft/19223
7-
status: Review
7+
status: Last Call
8+
last-call-deadline: 2025-09-30
89
type: Standards Track
910
category: ERC
1011
created: 2024-03-15
11-
requires: 20, 165, 721, 1155, 1167, 4337, 6551
12+
requires: 20, 165, 721, 1155, 1167, 4337
1213
---
1314

1415
## Abstract
@@ -17,7 +18,7 @@ This proposal defines a factory capable of deploying generic services linked to
1718

1819
## Motivation
1920

20-
Existing standards like [ERC-6551](./eip-6551.md) successfully bind smart accounts to NFTs, allowing registries to deploy accounts owned by specific token IDs. However, these standards have two key limitations:
21+
Existing projects, like TokenBound Account, successfully bind smart accounts to NFTs, allowing registries to deploy accounts owned by specific token IDs. However, these standards have two key limitations:
2122

2223
1. They often require deployed contracts to implement specific interfaces for handling assets and executing transactions, effectively mandating that the deployed contract must function as an account.
2324
2. They are restricted to NFTs, while many other contract types (particularly [ERC-4337](./eip-4337.md) accounts) could benefit from similar linking mechanisms to extend their functionalities.
@@ -30,7 +31,7 @@ This ERC proposes a more versatile factory specification that enables the deploy
3031

3132
- **Non-Invasive Enhancement**: Services can add functionality to existing smart accounts without modifying the underlying contract, maintaining compatibility with infrastructure like wallets and indexers.
3233

33-
- **Backward Compatibility**: Maintains compatibility with existing token-bound account standards (ERC-6551) while extending functionality to new use cases.
34+
- **Backward Compatibility**: Maintains compatibility with existing token-bound account standards while extending functionality to new use cases.
3435

3536
- **Flexible Implementation**: The `mode` parameter enables different linkage types (with or without token IDs) while ensuring consistent deterministic addressing.
3637

@@ -116,7 +117,7 @@ bytes12 constant NO_LINKED_ID = 0x000000000000000000000001;
116117
bytes12 constant LINKED_ID = 0x000000000000000000000000;
117118
```
118119

119-
- **LINKED_ID Mode (0x000000000000000000000000)**: Used when linking a service to an NFT or any contract that requires a token/entity ID. This mode ensures compatibility with [ERC-6551](./eip-6551.md), allowing seamless integration with existing token-bound account systems.
120+
- **LINKED_ID Mode (0x000000000000000000000000)**: Used when linking a service to an NFT or any contract that requires a token/entity ID. This mode ensures compatibility with existing token-bound account systems.
120121

121122
- **NO_LINKED_ID Mode (0x000000000000000000000001)**: Used when linking a service to a contract that doesn't require an ID parameter, such as an [ERC-4337](./eip-4337.md) account. In this case, the `linkedId` parameter is still present in the interface for consistency but SHOULD be set to zero if not used to store alternative data relevant to the service.
122123

@@ -139,6 +140,8 @@ ERC-1167 Footer (15 bytes)
139140
<linkedId (uint256)> (32 bytes)
140141
```
141142

143+
**Total bytecode size: 183 bytes**
144+
142145
Linked services SHOULD implement the `IERC7656Service` interface:
143146

144147
```solidity
@@ -174,31 +177,29 @@ The `mode` parameter uses 12 bytes instead of a simple boolean flag because the
174177

175178
### Deterministic Addressing
176179

177-
[ERC-7656](./eip-7656.md) follows the deterministic addressing pattern established by [ERC-6551](./eip-6551.md), appending immutable data to the contract bytecode rather than storing it in contract storage. This ensures that:
180+
[ERC-7656](./eip-7656.md) follows a deterministic addressing pattern, appending immutable data to the contract bytecode rather than storing it in contract storage. This ensures that:
178181

179182
1. Linked services have predictable addresses that can be computed off-chain
180183
2. The factory remains stateless, reducing gas costs
181184
3. Linked services can be deployed on-demand or even referenced before deployment
182185

183-
### Compatibility with [ERC-6551](./eip-6551.md)
184-
185-
The `LINKED_ID` mode (0x000000000000000000000000) maintains byte-for-byte compatibility with [ERC-6551](./eip-6551.md) token bound accounts. This intentional design ensures that applications built for [ERC-6551](./eip-6551.md) can work seamlessly with [ERC-7656](./eip-7656.md) services in this mode without requiring any modifications.
186-
187186
### Generic Linking Mechanism
188187

189188
Unlike standards that enforce specific interfaces or behaviors on linked contracts, [ERC-7656](./eip-7656.md) remains agnostic about the implementation details of linked services. This deliberate design choice allows developers maximum flexibility to create specialized services while maintaining a consistent deployment and ownership model.
190189

191190

192191
## Backwards Compatibility
193192

194-
[ERC-7656](./eip-7656.md) maintains compatibility with [ERC-6551](./eip-6551.md) when used with the `LINKED_ID` mode (0x000000000000000000000000). This ensures that existing applications and infrastructure supporting token-bound accounts can continue operating without modification.
193+
[ERC-7656](./eip-7656.md) maintains compatibility with token bound accounts when used with the `LINKED_ID` mode (0x000000000000000000000000). This ensures that existing applications and infrastructure supporting token-bound accounts can continue operating without modification.
195194

196195
For contracts using the `NO_LINKED_ID` mode (0x000000000000000000000001), specialized interfaces may be required, but the core factory mechanism remains consistent.
197196

198197

199198
## Reference Implementation
200199

201-
See [`ERC7656Factory.sol`](../assets/eip-7656/ERC7656Factory.sol) for an example implementation of `IERC7656Factory`. For convenience, the reference implementation will be deployed at `erc7656.eth` on primary mainnets and selected testnets.
200+
See [`ERC7656Factory.sol`](../assets/erc-7656/ERC7656Factory.sol) for an example implementation of `IERC7656Factory`.
201+
202+
For convenience, the bytecode of the reference implementation has been deployed at `0x76565d90eeB1ce12D05d55D142510dBA634a128F` on Ethereum mainnet, and will be later deployed at the same address to all primary mainnets and selected testnets.
202203

203204
An example of implementation of `IERC7656Service`:
204205

0 commit comments

Comments
 (0)