Skip to content

MeltedMindz/erc-service-object

Repository files navigation

ERC Service Objects

Foundry CI Solidity License: CC0-1.0

This repository contains an Ethereum ERC candidate package for Service Objects: an ERC-721 extension for service manifests, service operators, and payment routes.

The current recommended submission shape is deliberately small:

  • serviceManifest(tokenId) -> (uri, manifestHash)
  • serviceOperator(tokenId) -> (operator, expiresAt)
  • servicePaymentRoute(tokenId) -> (revenueRecipient, paymentURI, paymentManifestHash, routeNonce)

The repository also includes supporting research and a richer reference implementation with optional receipt and service-account ideas. Those are not recommended as mandatory base ERC scope.

What This ERC Does Not Do

This ERC does not define service discovery, reputation, validation, payment settlement, endpoint execution, smart account behavior, MCP, x402, escrow, revenue splitting, or any specific offchain service protocol.

Primary Documents

Repository Layout

interfaces/      Solidity interfaces for the first-pass package
src/             ERC-721 reference implementation and examples
script/          Deployment and interface-id scripts
test/            Foundry tests
docs/            ERC drafts, review reports, schemas, and submission material
docs/diagrams/   Mermaid source and exported architecture diagram

Setup

Requirements:

From a clean clone:

git submodule update --init --recursive
npm install
forge test
forge fmt --check

Useful commands:

forge test -vvv
npm run docs:links
forge snapshot --snap .gas-snapshot
forge script script/InterfaceIds.s.sol:InterfaceIds

Deployment example:

forge script script/Deploy.s.sol:Deploy \
  --rpc-url $RPC_URL \
  --account deployer \
  --broadcast

Never commit private keys or populated .env files.

Reference Implementation

The current reference implementation is intentionally more complete than the recommended minimal ERC submission. It demonstrates:

  • ERC-721 service token behavior
  • service manifest and payment manifest commitments
  • operator and revenue recipient separation
  • route nonce invalidation
  • ERC-1271-compatible receipt verification through OpenZeppelin SignatureChecker
  • optional receipt anchoring
  • ERC-4906 metadata update events

Core files:

Current first-pass interface IDs:

  • IERCServiceObject: 0x4850f8e0
  • IERCServiceObjectController: 0xf2e87b1d

Recommended reduced base interface ID:

  • IERCServiceObject: 0xf94c99e5

Minimal Service Lifecycle

  1. Mint a service token with service and payment manifest hashes.
  2. Owner assigns a service operator with optional expiry.
  3. Owner publishes or updates the payment route.
  4. Client reads the route and verifies offchain payment offers against it.
  5. Indexers reconstruct current state from service events.

Public Review Status

This is a pre-submission ERC candidate under review as ERC-8278. Public discussion is live on Ethereum Magicians, and the draft pull request is open against ethereum/ERCs.

License

CC0-1.0. See LICENSE.

About

ERC candidate for service object manifests, operators, and payment routes

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors