Add ERC: Agent Onchain Metadata Extension (ERC-8004 Compatible) #1532
+149
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces an onchain metadata extension for ERC-8004 agent registries. It defines a set of standard snake_case keys (name, description, image, agent_account, x402_support, active, supported_trust, and endpoint/ / endpoint//version) stored via ERC-8004’s existing getMetadata / setMetadata functions. Each key maps directly to a specific field in the ERC-8004 registration JSON, so the full JSON payload can be mirrored onchain when desired.
The extension is fully compatible with ERC-8004: existing agents that don’t use onchain metadata continue to work unchanged via agentURI, and registries don’t need new contracts or storage layouts. When both onchain values and an agentURI JSON exist, clients following this ERC are required to treat the per-key onchain values as authoritative overrides of the corresponding JSON fields, while agentURI maintains compatibility with ERC-8004.