EIPs Explained

ERC-7845 · Draft · ERC · 2024-11-07

ERC-7845: Universal Orchestrator RPC

A JSON-RPC data model a wallet can use to ask any Orchestrator for chain-abstracted solutions ("send 5 USDC to Bob") and get back ready-to-sign transactions, whatever chains the assets sit on.

What problem does it solve?

The proposal imagines users saying things like "swap my tokens for USDC" or "send 10 OP to Alice" to a wallet, app, voice assistant or AI agent, and an Orchestrator service working out which transactions, on which chains, achieve it. As such orchestrators multiply, each one would otherwise invent its own request format, and wallets would need a custom integration for every one.

ERC-7845 standardizes the minimum shape of the request a wallet sends and the response it gets back. It does not standardize how an Orchestrator computes its answer.

How it works

Requests and responses use the Ethereum JSON-RPC envelope (id, jsonrpc, method). The suggested method name is orchestrator_findSolutions.

Request: params holds one or more Problems. A Problem has an optional chainId (defaults to 1) and a list of Actions:

Action field Meaning
from (required) The wallet address the action is for
towards (required) Targets: an Asset (symbol / address / chainId, all optional) or a Destination (address + chainId, used verbatim)
with Offerings the wallet will spend (symbol, address, amount, chainId); if empty, the Orchestrator may consider all assets
type e.g. transfer, swap, call; defaults to transfer
functionCallName / functionCallData Optional contract call
deadline Unix timestamp by which a solution is wanted

Everything is chain-abstracted by default: if no chainId is given for an asset, the Orchestrator may use that asset on any chain.

Response: result is a list of Solutions, in the same order as the Problems. Each has a user-friendly name, optional description and deadline, and a list of transactions (to, chainId, amount, optional calldata) for the wallet to sign and send. Gas estimation is left to the wallet.

Sample code

A request and response modeled on the spec's "send 5 USDC" example (addresses are placeholders):

{
  "id": 1234,
  "jsonrpc": "2.0",
  "method": "orchestrator_findSolutions",
  "params": [
    {
      "actions": [
        {
          "from": "0x1111111111111111111111111111111111111111",
          "towards": [{ "address": "0x2222222222222222222222222222222222222222", "chainId": 10 }],
          "with": [{ "symbol": "USDC", "amount": 5 }]
        }
      ]
    }
  ]
}
{
  "id": "1234",
  "jsonrpc": "2.0",
  "result": [
    {
      "name": "Send 5 USDC",
      "description": "Send 5 USDC to 0x2222...2222 on OP Mainnet",
      "transactions": [
        { "to": { "address": "0x3333333333333333333333333333333333333333", "chainId": 10 }, "chainId": 10, "amount": 0, "calldata": "0xa9059cbb..." }
      ]
    }
  ]
}

Things to know

  • Status: Draft. The text is not yet internally consistent: the interfaces define params as an array of Problems and towards as an array, while the spec's own examples wrap them in { "problems": [...] }, use a single towards object, and use value and a string to in transactions where the interface says amount and a Destination. Expect changes, and agree on the exact shape with your Orchestrator.
  • Treat solutions as untrusted. An Orchestrator can return wrong or malicious transactions; wallets should simulate them and check destinations and amounts before signing.
  • Orchestrators may favor their own business interests, and some may be unmaintained; the spec leaves reputation decisions to the wallet.
  • For on-chain, solver-side standardization of cross-chain orders, see ERC-7683.

#json-rpc #wallets #chain-abstraction #intents

Details

Authors
Kieran Goodary (@IAmKio), Pillar Wallet (@pillarwallet), Luke Wickens (@lbw33), Rana Khoury (@RanaBug)
Status
Draft
Type
Standards Track / ERC
Created
2024-11-07

Machine-readable: Markdown · JSON