> For the complete documentation index, see [llms.txt](https://docs.rome.builders/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rome.builders/zh/zi-yuan/faq.md).

# 常见问题

关于 Rome Protocol 的常见问题——Rome 是桥还是 rollup、Solidity 兼容性、预言机、gas 代币以及与 Solana 的互操作性。

## 常规

**什么是 Rome Protocol？** Rome 将 EVM 与 Solana 融为一个市场。Rome 在 Solana 内运行 EVM 链，因此任何 EVM 协议都可以一次部署，向 Solana 钱包开放，同时 Solidity 合约也能直接调用 Solana 程序。请参阅 [什么是 Rome？](https://docs.rome.builders/zh/kuai-su-ru-men/what-is-rome.md)

**Rome 是桥吗？** Rome EVM 本身不是桥：它在 Solana 内运行，因此 EVM 合约与 Solana 程序共享状态，并在同一笔交易中完成结算。若要在 Rome 与其他链之间转移资产，可使用 [Rome Bridge](https://docs.rome.builders/zh/rome-shang-de-ying-yong/bridge-api.md) （通过 CCTP 转移 USDC，以及从 Solana 钱包转移 SOL 和 USDC）；在主网和测试网上， [Solgate](https://docs.rome.builders/zh/rome-shang-de-ying-yong/solgate.md) 则可实现 Solana 资产与 AggLayer EVM 链之间的双向连接。

**Rome 是 Rollup 吗？** Rome EVM 链（Rubicon 和 Hadrian）不是。区块索引器 Hercules 会为钱包和区块浏览器生成兼容以太坊的区块，但 EVM 执行是在 Solana 程序内完成的，而非运行在独立的 Rollup 链上。 [Rome ZK EVM](https://docs.rome.builders/zh/rome-zk-evm/zk-evm.md) 则是另一款产品：运营方运行 Rollup，将批次提交至 Solana，并在那里结算已证明的状态根。

**Ostia 是 Rollup 吗？它与 Rome ZK EVM 有何不同？** Ostia 并非像 Rome ZK EVM Rollup 那样的 Rollup：它不会向 Solana 或任何其他链提交批次。Ostia 是运行于 Canton 上的 ZK EVM。其区块在 Canton 上排序并结算：每个区块都使用 ZisK 生成证明，然后连同其中包含的 Canton 操作，一并作为一笔 Canton 交易提交。 [Rome ZK EVM](https://docs.rome.builders/zh/rome-zk-evm/zk-evm.md) 则是另一款产品：运营方运行 Rollup，将批次提交至 Solana，并在那里结算已证明的状态根。Ostia 已在 Canton DevNet 上开放；请参阅 [Canton ZK EVM](https://docs.rome.builders/zh/canton-zk-evm/canton-zk-evm.md).

## 开发

**我可以使用现有的 Solidity 合约吗？** 可以。标准 Solidity 合约无需修改即可部署到 Rome。如果合约使用 Chainlink 预言机，Oracle Gateway 会提供相同的 `AggregatorV3Interface`。有一点对用户来说是新的，但对合约而言不是：在包装器能够转移钱包中的代币之前，该钱包需要先向包装器授权一次（`approve_spl` ，通过 Helper 预编译合约调用）。如果合约使用 `transferFrom` 拉取包装代币，则每位用户都必须先完成此操作。请参阅 [每个钱包只需授权一次](https://docs.rome.builders/zh/he-xin-gai-nian/token-interop.md#one-time-grant-per-wallet).

**应该使用哪个 Solidity 版本？** 建议使用 0.8.28（与 Rome Solidity SDK 版本一致）。更早的版本也能使用。

**可以使用 Hardhat 或 Foundry 吗？** 两者都可以。使用 Rome RPC URL 和链 ID 配置网络。请参阅 [部署 Solidity 合约](https://docs.rome.builders/zh/kai-fa-zhe-zhi-nan/deploy-solidity.md).

**可以使用 MetaMask 吗？** 可以。在 MetaMask 中将 Rome 添加为自定义网络，并填写相应的 RPC URL 和链 ID。请参阅 [快速入门](https://docs.rome.builders/zh/kuai-su-ru-men/quickstart.md).

**一笔交易会消耗多少 Gas？** 请向链查询：像标准工具一样使用 `eth_estimateGas`，切勿将 21,000 硬编码。写入操作的大部分成本来自创建 Solana 账户，例如从未使用过的收款地址、新代币账户或已部署的合约，估算值会将这些成本计入其中。在 Hadrian 上的测量显示，向从未使用过的地址进行原生转账，估算 Gas 为 1,086,961；向现有地址转账，估算值为 21,000，实际消耗为 10,001。Rome 按交易实际消耗的 Gas 收费；在这些测量中，实际消耗从未超过估算值。调用 Solana 程序时，请留出余量（SDK 会增加 1.3 倍余量），如果估算本身回滚，则应设置 Gas 上限。请参阅 [JSON-RPC 支持](https://docs.rome.builders/zh/can-kao/json-rpc.md).

**如何从 Solidity 调用 Solana 程序？** 通过 Rome Solidity SDK 使用 CPI 预编译合约（`0xFF...08`）。请参阅 [从 EVM 调用 Solana](https://docs.rome.builders/zh/kai-fa-zhe-zhi-nan/call-solana-from-evm.md).

## 性能

**交易最终确认需要多长时间？** 交易通常会在一个 Solana 时隙内得到确认，耗时不到一秒。这表示交易在 Rome 链上得到确认，并非在 Solana 上最终确认；后者需要更长时间。

**计算预算是多少？** 每笔原子交易约为 140 万计算单位。超出此额度的操作会使用迭代模式（拆分为多笔 Solana 交易）。请参阅 [计算预算](https://docs.rome.builders/zh/he-xin-gai-nian/compute-budget.md).

## 代币

**Rome 使用哪种 Gas 代币？** 每条链都可以选择自己的 Gas 代币——可以是任意 SPL 代币，价格通过 Meteora 池确定。公共链（Rubicon 和 Hadrian）使用 USDC 作为 Gas 代币。Hadrian 上使用的是测试 USDC；而 [Rubicon](https://docs.rome.builders/zh/wang-luo/rubicon.md) 上使用的是真正的 USDC。

**ERC-20 代币在 Rome 上如何运作？** Rome 上的 ERC-20 代币是 SPL 代币的封装代币。对于钱包地址， `balanceOf()` 会读取 Solana 上的 SPL 代币账户。对于合约地址，封装合约会在自己的账本中记录余额，因为合约持有的代币存放在封装合约的代币账户中。 `allowance()` 保存在 EVM 存储中，与 Solana 委托权限分开；完成一次性授权后，封装合约会以该用户的 SPL 委托权限转移其代币。请参阅 [代币互操作](https://docs.rome.builders/zh/he-xin-gai-nian/token-interop.md).

**Solana 端的存款或跨链转账失败，并提示“SOL 不足”，但我的钱包里有资金——这是为什么？** Rome 的公共测试网 Hadrian 在 Solana Devnet 上结算，因此你的 Solana 钱包必须切换到匹配的网络模式（Rubicon 在 Solana 主网上结算）。在 Phantom 中，打开“设置”→“开发者设置”→启用“测试网模式”，并将网络设为 Devnet，然后断开并重新连接两个钱包，再重试。如果存款后没有显示代币余额，请手动将该代币导入钱包。

## 基础设施

**我需要运行自己的节点吗？** 不需要——连接到公共链的 RPC 即可（请参阅 [网络](https://docs.rome.builders/zh/wang-luo/networks.md)）。运行自己的链则意味着需要运行 Proxy 和 Hercules。

**Rome 需要哪些数据库？** PostgreSQL，由 Hercules 用于区块索引，并由 Proxy 用于区块查询。

**我可以在本地运行 Rome 吗？** 对于 Rome 的 EVM 链（Rubicon 和 Hadrian），目前没有可直接使用的本地环境，也没有公开提供的本地套件。Ostia 可以在你自己的机器上运行：请参阅 [运行自己的 Ostia](https://docs.rome.builders/zh/canton-zk-evm/run-it-locally.md)。对于 Rubicon 和 Hadrian，请基于公共链进行开发—— [快速入门](https://docs.rome.builders/zh/kuai-su-ru-men/quickstart.md) 可在几分钟内将合约部署到 Hadrian（测试网）。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.rome.builders/zh/zi-yuan/faq.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
