Multi-Chain Deployment
ERC-1066-x402 is designed to be network-agnostic, providing a unified intent and status layer across heterogeneous blockchains.
Overview
The system achieves multi-chain support through three key components: a global status specification, on-chain adapters, and gateway adapters.
Global Status Spec
Standardized status IDs (e.g., 84 for Insufficient Funds) used across all chains
On-Chain Adapters
Smart contracts (EVM), programs (Solana), or modules (Sui) that map runtime-specific errors
Gateway Adapters
Off-chain middleware handling chain-specific RPC calls and simulation
Architecture
The gateway automatically determines the chain type and routes requests to the appropriate adapter. Each adapter handles chain-specific validation and status code extraction.
Network-Agnostic Design
Chain-Specific Mappings
EVM (Ethereum, L2s)
- Encoding:
bytes1 - Mechanism:
viewfunctions returning status codes - Verification:
eth_call(readContract)
Solana (Anchor)
- Encoding:
u16 - Mechanism:
ProgramError::Custom(status) - Verification:
simulateTransaction. Gateway parses simulation logs to find custom error code
Sui (Move)
- Encoding:
u64 - Mechanism:
abort status - Verification:
dryRunTransactionBlock. Gateway extracts abort code from transaction effects
Intent Routing
When an agent sends an intent to the Gateway, the following flow occurs:
- 1Agent sends POST request with intent and chainId
- 2Gateway determines ChainType (EVM, Solana, Sui) from chainId
- 3Gateway routes to appropriate adapter (EVM/Solana/Sui)
- 4Adapter performs chain-specific simulation/dry-run
- 5Adapter extracts error code/status from chain response
- 6Adapter maps chain-specific code to global status ID (e.g., 0x54)
- 7Gateway returns HTTP response with status code and headers
Real-World Deployments
ERC-1066-x402 is deployed and verified on multiple networks: