> 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/ko/getting-started/quickstart.md).

# 빠른 시작

5분 이내에 Rome에 첫 Solidity 계약을 배포하세요.

5분 이내에 Rome에 첫 Solidity 계약을 배포하세요. 이 가이드는 [**Hadrian**](/ko/networks/hadrian.md), 퍼블릭 테스트넷 체인입니다. [Rubicon](/ko/networks/rubicon.md) 는 메인넷 체인으로, 가스는 실제 USDC입니다. 먼저 테스트 체인에서 모든 것을 시도하세요.

## 사전 요구 사항

* [Node.js](https://nodejs.org/) v22.13+
* [MetaMask](https://metamask.io/) 브라우저 확장 프로그램
* 로 설정된 Solana 지갑 **Devnet**, 단, Solana에서 자금을 조달한 경우에만 해당합니다(2단계). Solana 지갑에서 컨트랙트를 호출하려면 Solana v1 트랜잭션에 서명할 수 있는 지갑이 필요하며, 이는 다음에서 다룹니다 [컨트랙트를 Solana 사용자에게 공개하기](/ko/developer-guides/open-to-solana-users.md).

## 1. MetaMask에 Hadrian 추가

수동으로 추가하세요(설정 → 네트워크 → 네트워크 추가):

| 필드       | 값                                               |
| -------- | ----------------------------------------------- |
| 네트워크 이름  | Rome Hadrian                                    |
| RPC URL  | `https://hadrian.testnet.romeprotocol.xyz/`     |
| 체인 ID    | `200010`                                        |
| 통화 기호    | `USDC`                                          |
| 블록 익스플로러 | `https://via-hadrian.testnet.romeprotocol.xyz/` |

## 2. 지갑에 자금 충전

가스는 체인의 가스 토큰으로 지불되며, Hadrian에서는 USDC입니다. Hadrian에서는 Circle의 Solana Devnet USDC로 뒷받침되며(민트 `4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU`), 따라서 devnet SOL은 가스가 아닙니다. Rome에는 faucet이 없습니다. Hadrian에 USDC를 넣는 방법은 두 가지입니다:

**Solana에서** — 다음에서 Solana Devnet USDC를 받으세요 [Circle 퍼셋](https://faucet.circle.com/) (Solana Devnet을 선택) 그리고 다음에서 Solana 수수료용 devnet SOL을 조금 받으세요 [Solana faucet](https://faucet.solana.com/), Solana 지갑을 Devnet으로 설정한 상태에서. 그런 다음 다음을 사용하세요 [Rome Bridge](/ko/rome/bridge-api.md) 대상은 Hadrian으로, 경로는 Solana로 설정하고, 수신자는 EVM 지갑 주소로 하세요. 브리지는 해당 EVM 지갑에 Hadrian에서 클레임 트랜잭션에 서명하도록 요청하며, 이를 통해 USDC가 가스로 전환됩니다.

**EVM 체인에서 브리징해서** — 다음에서 Ethereum Sepolia에서 테스트 USDC를 민트하세요 [Circle 퍼셋](https://faucet.circle.com/), 그런 다음 다음을 사용해 Rome으로 가져오세요 [Rome Bridge](/ko/rome/bridge-api.md) (CCTP). 소스 측 트랜잭션을 위해 약간의 Sepolia ETH가 필요합니다 — 다음을 참조하세요 [수전](/ko/resources/faucets.md) 각 faucet마다

**얼마나 필요한가요?** Rome에서의 쓰기 작업은 Ethereum에서의 직관보다 더 비용이 많이 듭니다. 가스의 대부분이 Solana 계정 생성에 쓰이기 때문입니다: 한 번도 사용된 적 없는 수신자, 새 토큰 계정, 배포된 컨트랙트. 다음을 사용하세요 `eth_estimateGas`는 표준 도구가 수행하며, 21,000을 하드코딩하지 마세요. 추정치에는 계정 생성이 포함되며, Rome은 트랜잭션이 실제로 사용한 가스를 청구합니다(Hadrian 측정에서는 추정치를 넘은 적이 없었습니다). 그리고 SDK의 `submitRomeTx` 은 여유분으로 추정치를 1.3배로 늘리며, 사용된 가스만 청구되므로 추가 비용은 들지 않습니다. 최소한 다음 정도를 충전하세요 **0.5 USDC 상당의 가스**; 1 USDC면 넉넉한 여유가 생깁니다. 다음의 숫자는 [JSON-RPC 지원](/ko/reference/json-rpc.md) 개별 쓰기 작업의 비용을 보여줍니다.

자금이 충전된 지갑임에도 Solana 측 입금이 "insufficient SOL" 경고와 함께 실패하면, Solana 지갑을 Testnet Mode / Devnet으로 설정하세요(다음을 참조 [FAQ](/ko/resources/faq.md)).

## 3. Hardhat 프로젝트 만들기

```bash
mkdir rome-hello && cd rome-hello
npx hardhat --init
```

프롬프트가 나타나면 기본값을 수락하세요 — Hardhat 3, 현재 디렉터리, 그리고 TypeScript + Node Test Runner + viem 템플릿 — 그리고 의존성을 설치하도록 하세요. 이 템플릿에는 예제 `Counter` 테스트가 포함된 컨트랙트가 제공되며, 이 가이드에는 영향을 주지 않습니다.

## 4. Rome용으로 Hardhat 구성

생성된 파일을 편집하세요 `hardhat.config.ts` 그리고 내부에 Rome 네트워크를 추가하세요 `defineConfig({ ... })`:

```typescript
  networks: {
    hadrian: {
      type: "http",
      chainType: "l1",
      chainId: 200010,
      url: "https://hadrian.testnet.romeprotocol.xyz/",
      accounts: [configVariable("PRIVATE_KEY")],
    },
  },
```

`configVariable("PRIVATE_KEY")` 환경에서 확인되므로, MetaMask 개인 키를 내보내세요:

```bash
export PRIVATE_KEY="0xYOUR_PRIVATE_KEY"
```

(임시 키를 넘어서는 용도라면, 툴박스에 포함된 암호화된 keystore를 사용하는 것이 좋습니다: `npx hardhat keystore set PRIVATE_KEY`.)

## 5. 컨트랙트 작성

생성 `contracts/HelloRome.sol`:

```solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.28;

contract HelloRome {
    string public greeting = "Hello from Solana!";
    uint256 public counter;

    event Greeted(address indexed sender, uint256 count);

    function greet() external returns (string memory) {
        counter++;
        emit Greeted(msg.sender, counter);
        return greeting;
    }

    function setGreeting(string calldata _greeting) external {
        greeting = _greeting;
    }
}
```

## 6. 배포

생성 `scripts/deploy.ts`:

```typescript
import hardhat from "hardhat";

async function main() {
  const { viem } = await hardhat.network.connect();
  const publicClient = await viem.getPublicClient();

  const hello = await viem.deployContract("HelloRome");
  console.log("HelloRome deployed to:", hello.address);

  const hash = await hello.write.greet();
  await publicClient.waitForTransactionReceipt({ hash });

  console.log("Counter:", (await hello.read.counter()).toString());
  console.log("Greeting:", await hello.read.greeting());
}

main().catch((error) => {
  console.error(error);
  process.exitCode = 1;
});
```

Hadrian에 배포:

```bash
npx hardhat run scripts/deploy.ts --network hadrian
```

예상 출력(주소는 다를 수 있습니다):

```
HelloRome deployed to: 0x09c437e305eeb698e1776cff23ca16c1bb25aabd
Counter: 1
Greeting: Hello from Solana!
```

배포된 주소를 다음에서 여세요 [익스플로러](https://via-hadrian.testnet.romeprotocol.xyz/) 트랜잭션 뒤의 Solana instructions를 확인할 수 있습니다. 이제 Solidity 컨트랙트가 Solana에서 실행 중입니다.

## 다음 단계

* [Solidity 배포](/ko/developer-guides/deploy-solidity.md) — Hardhat 및 Foundry 배포 심화
* [EVM에서 Solana 호출](/ko/developer-guides/call-solana-from-evm.md) — CPI를 통해 Solidity에서 Solana 프로그램 호출
* [아키텍처](/ko/getting-started/architecture.md) — Rome이 Solana 내부에서 EVM을 실행하는 방식

## 일반적인 오류

| 오류             | 원인                                  | 해결                                                                              |
| -------------- | ----------------------------------- | ------------------------------------------------------------------------------- |
| `자금 부족`        | 가스 한도에 가스 가격을 곱한 금액만큼의 가스 토큰이 부족합니다 | 다음을 사용해 최소 0.5 USDC 상당의 가스를 충전하세요(2단계 참조) [Rome Bridge](/ko/rome/bridge-api.md) |
| `nonce가 너무 낮음` | 트랜잭션 nonce 불일치                      | 계정을 초기화하세요(MetaMask → 설정 → 고급 → 활동 지우기)                                         |
| `실행이 되돌려졌습니다`  | 컨트랙트 실행 실패                          | 컨트랙트 로직을 확인하세요. 다음을 사용하세요 `eth_call` 디버깅하기 위해                                   |
| 연결 시간 초과       | RPC에 연결할 수 없음                       | RPC URL을 확인하세요                                                                  |


---

# 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/ko/getting-started/quickstart.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.
