{"eip":7694,"title":"Solana Storage Router","description":"Cross-chain storage router protocol incorporating storage router for Solana","authors":["Avneet Singh (@sshmatrix)","0xc0de4c0ffee (@0xc0de4c0ffee)"],"status":"Draft","type":"Standards Track","category":"ERC","created":"2024-04-18","requires":[3668,7700],"discussionsTo":"https://ethereum-magicians.org/t/erc-7694-solana-storage-router/19706","repo":"ERCs","label":"ERC-7694","officialUrl":"https://eips.ethereum.org/EIPS/eip-7694","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-7694.md","url":"https://eips.huatuo.xyz/eip-7694/","tldr":{"en":"Adds a Solana target to the CCIP-Store storage router, so an Ethereum contract can tell clients to write data to a Solana program and later read it back through a CCIP-Read gateway.","ja":"CCIP-Store のストレージルーターに Solana をターゲットとして追加し、Ethereum のコントラクトがクライアントに Solana プログラムへのデータ書き込みを指示し、後から CCIP-Read ゲートウェイ経由で読み戻せるようにする。","ko":"CCIP-Store 스토리지 라우터에 Solana 대상을 추가해, 이더리움 컨트랙트가 클라이언트에게 Solana 프로그램에 데이터를 쓰도록 지시하고 나중에 CCIP-Read 게이트웨이로 다시 읽을 수 있게 한다.","zh":"为 CCIP-Store 存储路由器增加 Solana 目标，让以太坊合约可以指示客户端把数据写入 Solana 程序，之后再通过 CCIP-Read 网关读回。"},"tags":["cross-chain","solana","ccip","storage","ens"],"explainers":{"en":{"lang":"en","tldr":"Adds a Solana target to the CCIP-Store storage router, so an Ethereum contract can tell clients to write data to a Solana program and later read it back through a CCIP-Read gateway.","tags":["cross-chain","solana","ccip","storage","ens"],"related":[7700,3668,5559],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-7694/","markdown":"## What problem does it solve?\n\nStoring data on Ethereum L1 is expensive. [EIP-7700](/eip-7700/) (CCIP-Store) defines \"storage routers\": a contract reverts with a special error telling the client to write the data somewhere else, such as an L2 or an off-chain database. Reading it back uses [EIP-3668](/eip-3668/) (CCIP-Read).\n\nThe authors argue that L2s and databases both have centralizing elements, and that a chain with its own independent consensus is an attractive alternative. ERC-7694 adds a fourth router pointing at **Solana**, so chain-agnostic protocols (ENS is the example given) can use Solana blockspace for storage.\n\n## How it works\n\n**Writing.** Instead of storing a value, the Ethereum contract reverts with:\n\n```solidity\nerror StorageRoutedToSolana(bytes32 programId, bytes32 account);\n```\n\n- `programId`: the Solana program (contract) address, hex-encoded.\n- `account`: the Solana manager wallet that is allowed to write on behalf of the user.\n\nA client that understands this error converts the arguments to Solana types and sends the same call to the Solana program using a Solana wallet connected as `account`. The Solana program stores the data keyed by node and account.\n\n**Type mapping.** The spec fixes a bijective mapping between EVM and SVM types, for example `uint64 ↔ u64`, `bytes32 ↔ PubKey`, `bytes ↔ Vec\u003cu8\u003e`, `string ↔ String`, `address ↔ [u8; 20]`. `uint256` maps to a `u256` that Solana programs typically implement via a Rust crate. Since Solana uses base58, hex `bytes32` values are converted accordingly.\n\n**Reading.** An Ethereum contract cannot query Solana directly, so an EIP-3668-compliant HTTP gateway reads the Solana program, converts the result back to EVM types, ABI-encodes it and returns it through the usual CCIP-Read `OffchainLookup` flow. Gateway URL arguments follow the `/`-delimited format from EIP-7700.\n\n## Sample code\n\nA contract routing a write to Solana:\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\ncontract SolanaRoutedRecords {\n    error StorageRoutedToSolana(bytes32 programId, bytes32 account);\n\n    mapping(bytes32 =\u003e bytes32) public solanaProgram;\n    mapping(bytes32 =\u003e bytes32) public solanaManager;\n\n    function setValue(bytes32 node, bytes32 key, bytes32 value) external {\n        // Clients that support ERC-7694 catch this revert and replay\n        // setValue(node, key, value) on the Solana program instead.\n        revert StorageRoutedToSolana(solanaProgram[node], solanaManager[node]);\n    }\n}\n```\n\nClient side (pseudocode):\n\n```ts\ntry { await contract.setValue(node, key, value); }\ncatch (e) {\n  const { programId, account } = decodeStorageRoutedToSolana(e);\n  // convert bytes32 -\u003e PubKey, then call program.setValue(node, key, value)\n  // with a Solana wallet whose public key equals `account`\n}\n```\n\n## Things to know\n\n- **Status: Draft**, and it depends on [EIP-7700](/eip-7700/), which is also a Draft.\n- Clients must support both Ethereum and Solana wallets; a plain Ethereum wallet cannot complete the write.\n- Reads trust the HTTP gateway to translate Solana data faithfully, unless the application adds its own verification.\n- The spec's Security Considerations section is empty (\"None\"), so integrators should do their own review of gateway trust and manager-account authorization.\n- The earlier [ERC-5559](/eip-5559/) (write deferral, Stagnant) explored the same revert-and-redirect pattern.\n"},"ja":{"lang":"ja","tldr":"CCIP-Store のストレージルーターに Solana をターゲットとして追加し、Ethereum のコントラクトがクライアントに Solana プログラムへのデータ書き込みを指示し、後から CCIP-Read ゲートウェイ経由で読み戻せるようにする。","tags":["cross-chain","solana","ccip","storage","ens"],"related":[7700,3668,5559],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-7694/","markdown":"## 何を解決するのか\n\nEthereum L1 へのデータ保存は高価です。[EIP-7700](/eip-7700/)（CCIP-Store）は「ストレージルーター」を定義しています。コントラクトが特別なエラーで revert し、L2 やオフチェーンのデータベースなど別の場所にデータを書き込むようクライアントに伝えます。読み戻しには [EIP-3668](/eip-3668/)（CCIP-Read）を使います。\n\n著者らは、L2 とデータベースのどちらにも中央集権的な要素があり、独立したコンセンサスを持つチェーンは魅力的な代替手段だと主張しています。ERC-7694 は **Solana** を指す 4 つ目のルーターを追加し、チェーンに依存しないプロトコル（例として ENS が挙げられています）が Solana のブロックスペースをストレージに使えるようにします。\n\n## 仕組み\n\n**書き込み。** Ethereum のコントラクトは値を保存する代わりに、次のエラーで revert します。\n\n```solidity\nerror StorageRoutedToSolana(bytes32 programId, bytes32 account);\n```\n\n- `programId`: Solana プログラム（コントラクト）のアドレス（16 進エンコード）。\n- `account`: ユーザーに代わって書き込みを許可された Solana のマネージャーウォレット。\n\nこのエラーを理解するクライアントは、引数を Solana の型に変換し、`account` として接続した Solana ウォレットを使って、同じ呼び出しを Solana プログラムに送ります。Solana プログラムは、ノードとアカウントをキーにしてデータを保存します。\n\n**型のマッピング。** 仕様は EVM と SVM の型の間に全単射のマッピングを定めています。たとえば `uint64 ↔ u64`、`bytes32 ↔ PubKey`、`bytes ↔ Vec\u003cu8\u003e`、`string ↔ String`、`address ↔ [u8; 20]` です。`uint256` は `u256` に対応し、Solana プログラムでは通常 Rust のクレートで実装されます。Solana は base58 を使うため、16 進の `bytes32` 値はそれに合わせて変換されます。\n\n**読み取り。** Ethereum のコントラクトは Solana を直接クエリできないため、EIP-3668 準拠の HTTP ゲートウェイが Solana プログラムを読み、結果を EVM の型に戻して ABI エンコードし、通常の CCIP-Read の `OffchainLookup` フローで返します。ゲートウェイ URL の引数は、EIP-7700 の `/` 区切り形式に従います。\n\n## サンプルコード\n\n書き込みを Solana にルーティングするコントラクト:\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\ncontract SolanaRoutedRecords {\n    error StorageRoutedToSolana(bytes32 programId, bytes32 account);\n\n    mapping(bytes32 =\u003e bytes32) public solanaProgram;\n    mapping(bytes32 =\u003e bytes32) public solanaManager;\n\n    function setValue(bytes32 node, bytes32 key, bytes32 value) external {\n        // Clients that support ERC-7694 catch this revert and replay\n        // setValue(node, key, value) on the Solana program instead.\n        revert StorageRoutedToSolana(solanaProgram[node], solanaManager[node]);\n    }\n}\n```\n\nクライアント側（疑似コード）:\n\n```ts\ntry { await contract.setValue(node, key, value); }\ncatch (e) {\n  const { programId, account } = decodeStorageRoutedToSolana(e);\n  // convert bytes32 -\u003e PubKey, then call program.setValue(node, key, value)\n  // with a Solana wallet whose public key equals `account`\n}\n```\n\n## 知っておくべきこと\n\n- **ステータス: Draft**。同じく Draft である [EIP-7700](/eip-7700/) に依存しています。\n- クライアントは Ethereum と Solana の両方のウォレットに対応する必要があります。通常の Ethereum ウォレットだけでは書き込みを完了できません。\n- 読み取りでは、アプリケーションが独自の検証を追加しない限り、Solana のデータを忠実に変換する HTTP ゲートウェイを信頼することになります。\n- 仕様の Security Considerations セクションは空（「None」）のため、導入する側はゲートウェイの信頼性とマネージャーアカウントの認可について、自身でレビューする必要があります。\n- 以前の [ERC-5559](/eip-5559/)（write deferral、Stagnant）も、同じ revert してリダイレクトするパターンを検討していました。\n"},"ko":{"lang":"ko","tldr":"CCIP-Store 스토리지 라우터에 Solana 대상을 추가해, 이더리움 컨트랙트가 클라이언트에게 Solana 프로그램에 데이터를 쓰도록 지시하고 나중에 CCIP-Read 게이트웨이로 다시 읽을 수 있게 한다.","tags":["cross-chain","solana","ccip","storage","ens"],"related":[7700,3668,5559],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-7694/","markdown":"## 어떤 문제를 해결하나요?\n\n이더리움 L1에 데이터를 저장하는 것은 비쌉니다. [EIP-7700](/eip-7700/)(CCIP-Store)은 \"스토리지 라우터\"를 정의합니다. 컨트랙트가 특별한 에러로 revert해서, 클라이언트에게 L2나 오프체인 데이터베이스 같은 다른 곳에 데이터를 쓰라고 알려 줍니다. 다시 읽을 때는 [EIP-3668](/eip-3668/)(CCIP-Read)을 사용합니다.\n\n저자들은 L2와 데이터베이스 모두 중앙화 요소가 있으며, 독립적인 합의를 가진 체인이 매력적인 대안이라고 주장합니다. ERC-7694는 **Solana**를 가리키는 네 번째 라우터를 추가해, 체인에 구애받지 않는 프로토콜(예시로 ENS가 언급됨)이 Solana 블록스페이스를 저장에 쓸 수 있게 합니다.\n\n## 어떻게 동작하나요?\n\n**쓰기.** 이더리움 컨트랙트는 값을 저장하는 대신 다음 에러로 revert합니다.\n\n```solidity\nerror StorageRoutedToSolana(bytes32 programId, bytes32 account);\n```\n\n- `programId`: Solana 프로그램(컨트랙트) 주소로, 16진수로 인코딩됩니다.\n- `account`: 사용자를 대신해 쓸 수 있도록 허용된 Solana 관리자 지갑.\n\n이 에러를 이해하는 클라이언트는 인자를 Solana 타입으로 변환하고, `account`로 연결된 Solana 지갑을 사용해 같은 호출을 Solana 프로그램에 보냅니다. Solana 프로그램은 노드와 계정을 키로 삼아 데이터를 저장합니다.\n\n**타입 매핑.** 명세는 EVM과 SVM 타입 사이의 전단사 매핑을 고정합니다. 예를 들어 `uint64 ↔ u64`, `bytes32 ↔ PubKey`, `bytes ↔ Vec\u003cu8\u003e`, `string ↔ String`, `address ↔ [u8; 20]`입니다. `uint256`은 `u256`에 대응하며, Solana 프로그램은 보통 Rust 크레이트로 이를 구현합니다. Solana는 base58을 쓰므로 16진수 `bytes32` 값은 그에 맞게 변환됩니다.\n\n**읽기.** 이더리움 컨트랙트는 Solana를 직접 조회할 수 없으므로, EIP-3668을 따르는 HTTP 게이트웨이가 Solana 프로그램을 읽고, 결과를 EVM 타입으로 되돌려 ABI 인코딩한 뒤, 일반적인 CCIP-Read `OffchainLookup` 흐름으로 반환합니다. 게이트웨이 URL 인자는 EIP-7700의 `/` 구분 형식을 따릅니다.\n\n## 샘플 코드\n\n쓰기를 Solana로 라우팅하는 컨트랙트:\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\ncontract SolanaRoutedRecords {\n    error StorageRoutedToSolana(bytes32 programId, bytes32 account);\n\n    mapping(bytes32 =\u003e bytes32) public solanaProgram;\n    mapping(bytes32 =\u003e bytes32) public solanaManager;\n\n    function setValue(bytes32 node, bytes32 key, bytes32 value) external {\n        // Clients that support ERC-7694 catch this revert and replay\n        // setValue(node, key, value) on the Solana program instead.\n        revert StorageRoutedToSolana(solanaProgram[node], solanaManager[node]);\n    }\n}\n```\n\n클라이언트 측(의사 코드):\n\n```ts\ntry { await contract.setValue(node, key, value); }\ncatch (e) {\n  const { programId, account } = decodeStorageRoutedToSolana(e);\n  // convert bytes32 -\u003e PubKey, then call program.setValue(node, key, value)\n  // with a Solana wallet whose public key equals `account`\n}\n```\n\n## 알아둘 점\n\n- **상태: Draft**이며, 마찬가지로 Draft인 [EIP-7700](/eip-7700/)에 의존합니다.\n- 클라이언트는 이더리움 지갑과 Solana 지갑을 모두 지원해야 합니다. 일반 이더리움 지갑만으로는 쓰기를 완료할 수 없습니다.\n- 읽기는 애플리케이션이 자체 검증을 추가하지 않는 한, HTTP 게이트웨이가 Solana 데이터를 충실하게 변환한다고 신뢰해야 합니다.\n- 명세의 Security Considerations 섹션은 비어 있어(\"None\"), 통합하는 쪽이 게이트웨이 신뢰와 관리자 계정 권한 부여에 대해 직접 검토해야 합니다.\n- 앞선 [ERC-5559](/eip-5559/)(쓰기 지연, Stagnant)도 같은 revert 후 리다이렉트 패턴을 탐구했습니다.\n"},"zh":{"lang":"zh","tldr":"为 CCIP-Store 存储路由器增加 Solana 目标，让以太坊合约可以指示客户端把数据写入 Solana 程序，之后再通过 CCIP-Read 网关读回。","tags":["cross-chain","solana","ccip","storage","ens"],"related":[7700,3668,5559],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-7694/","markdown":"## 它解决什么问题？\n\n在以太坊 L1 上存储数据成本很高。[EIP-7700](/eip-7700/)（CCIP-Store）定义了\"存储路由器\"：合约用一个特殊错误 revert，告诉客户端把数据写到别处，比如 L2 或链下数据库。读回时使用 [EIP-3668](/eip-3668/)（CCIP-Read）。\n\n作者认为 L2 和数据库都带有中心化因素，而拥有独立共识的链是更有吸引力的替代方案。ERC-7694 增加了第四种路由器，指向 **Solana**，使链无关的协议（文中以 ENS 为例）可以使用 Solana 的区块空间来存储数据。\n\n## 它如何运作\n\n**写入。** 以太坊合约不存储值，而是用下面的错误 revert：\n\n```solidity\nerror StorageRoutedToSolana(bytes32 programId, bytes32 account);\n```\n\n- `programId`：Solana 程序（合约）地址，十六进制编码。\n- `account`：被允许代表用户写入的 Solana 管理者钱包。\n\n理解该错误的客户端会把参数转换为 Solana 类型，并使用以 `account` 身份连接的 Solana 钱包，把同样的调用发送给 Solana 程序。Solana 程序以节点和账户为键存储数据。\n\n**类型映射。** 规范固定了 EVM 与 SVM 类型之间的双射映射，例如 `uint64 ↔ u64`、`bytes32 ↔ PubKey`、`bytes ↔ Vec\u003cu8\u003e`、`string ↔ String`、`address ↔ [u8; 20]`。`uint256` 映射到 `u256`，Solana 程序通常通过 Rust crate 实现它。由于 Solana 使用 base58，十六进制的 `bytes32` 值会据此转换。\n\n**读取。** 以太坊合约无法直接查询 Solana，因此由符合 EIP-3668 的 HTTP 网关读取 Solana 程序，把结果转换回 EVM 类型并做 ABI 编码，再通过常规的 CCIP-Read `OffchainLookup` 流程返回。网关 URL 参数沿用 EIP-7700 中以 `/` 分隔的格式。\n\n## 示例代码\n\n把写入路由到 Solana 的合约：\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\ncontract SolanaRoutedRecords {\n    error StorageRoutedToSolana(bytes32 programId, bytes32 account);\n\n    mapping(bytes32 =\u003e bytes32) public solanaProgram;\n    mapping(bytes32 =\u003e bytes32) public solanaManager;\n\n    function setValue(bytes32 node, bytes32 key, bytes32 value) external {\n        // Clients that support ERC-7694 catch this revert and replay\n        // setValue(node, key, value) on the Solana program instead.\n        revert StorageRoutedToSolana(solanaProgram[node], solanaManager[node]);\n    }\n}\n```\n\n客户端（伪代码）：\n\n```ts\ntry { await contract.setValue(node, key, value); }\ncatch (e) {\n  const { programId, account } = decodeStorageRoutedToSolana(e);\n  // convert bytes32 -\u003e PubKey, then call program.setValue(node, key, value)\n  // with a Solana wallet whose public key equals `account`\n}\n```\n\n## 需要注意\n\n- **状态：Draft**，并且依赖同样处于 Draft 状态的 [EIP-7700](/eip-7700/)。\n- 客户端必须同时支持以太坊钱包和 Solana 钱包；单靠普通的以太坊钱包无法完成写入。\n- 除非应用自行添加验证，否则读取要信任 HTTP 网关会如实转换 Solana 数据。\n- 规范的 Security Considerations 一节是空的（\"None\"），因此集成方应自行评估网关信任和管理者账户授权方面的风险。\n- 更早的 [ERC-5559](/eip-5559/)（写入延迟，Stagnant）也探索过同样的\"revert 并重定向\"模式。\n"}}}
