> 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/tr/gelistirici-kilavuzlari/verify-contracts.md).

# Sözleşmeleri Doğrula

Barındırılan Sourcify hizmeti üzerinden Rome'da Solidity sözleşme kaynağını doğrulayın — standart forge verify-contract ve hardhat-verify akışları, Via gezginindeki rozetler.

Rome, barındırılan bir [Sourcify](https://sourcify.dev) doğrulama hizmeti sunar. Bir sözleşmeyi doğruladığınızda kaynak kodu ve ABI bilgileri herkes tarafından yeniden üretilebilir hâle gelir ve Rome blok gezgininde (Via) **✓ Kaynak doğrulandı** rozetiyle görüntülenir.

Doğrulama, standart `forge verify-contract` ve `hardhat-verify` iş akışlarıyla çalışır; araçları Rome'un doğrulayıcısına yönlendirmeniz yeterlidir.

## Doğrulayıcı uç noktası

| Ortam             | Doğrulayıcı URL'si                        |
| ----------------- | ----------------------------------------- |
| Testnet ve Devnet | `https://verify.testnet.romeprotocol.xyz` |
| Mainnet (Rubicon) | `https://verify.mainnet.romeprotocol.xyz` |

Tek bir ortak örnek tüm Rome testnet/devnet zincirlerine hizmet verir — zinciri standart `--chain-id` bayrağıyla seçersiniz.

## Foundry

Dağıtım yaptıktan sonra (bkz. [Deploy Solidity Contracts](https://docs.rome.builders/tr/gelistirici-kilavuzlari/deploy-solidity.md)):

```bash
forge verify-contract <CONTRACT_ADDRESS> src/MyContract.sol:MyContract \
  --verifier sourcify \
  --verifier-url https://verify.testnet.romeprotocol.xyz/ \
  --chain-id <YOUR_CHAIN_ID> \
  --compiler-version 0.8.20
```

Constructor argüman alıyorsa, bayt kodunun eşleşmesi için bu argümanları da iletin:

```bash
  --constructor-args $(cast abi-encode "constructor(uint256)" 42)
```

Dağıtım sırasında da `forge create … --verify` veya `forge script … --verify` ile doğrulama yapabilirsiniz (Foundry, zincir kimliğini `--rpc-url`).

## Hardhat

`hardhat-verify` Hardhat 3 araç kutusuyla birlikte gelir. Sourcify sağlayıcısını Rome'un doğrulayıcısını kullanacak şekilde `hardhat.config.ts` dosyasında ayarlayın ve `hardhat verify`:

```typescript
export default defineConfig({
  // …eklentiler, solidity, ağlar…
  verify: {
    etherscan: { enabled: false },
    blockscout: { enabled: false },
    sourcify: {
      enabled: true,
      apiUrl: "https://verify.testnet.romeprotocol.xyz",   // Rubicon mainnet: "https://verify.mainnet.romeprotocol.xyz"
    },
  },
});
```

```bash
npx hardhat verify --network <your-network> <CONTRACT_ADDRESS> [constructor args…]
```

Doğrulama başarılı olduğunda doğrulayıcı, yayımlanan kaynak kodunu şu şekilde bağlar: `https://verify.testnet.romeprotocol.xyz/repo-ui/<CHAIN_ID>/<ADDRESS>`.

## Doğrulama durumunu kontrol etme

Gezgin, doğrulama durumunu doğrulayıcının API'sinden okur. Durumu doğrudan sorgulayabilirsiniz:

```bash
curl https://verify.testnet.romeprotocol.xyz/v2/contract/<CHAIN_ID>/<ADDRESS>
```

Doğrulanmış bir sözleşme, `match` alanını döndürür:

* **`exact_match`** — bayt kodu *ve* meta veri karması eşleşir (kusursuz, "tam" eşleşme).
* **`match`** — bayt kodu eşleşir; meta verilerde küçük farklılıklar vardır (yine de gerçek ve doğrulanmış bir eşleşmedir).
* `404` / `null` — doğrulanmamış.

## Notlar

* Rome'un doğrulayıcısında doğrulanan sözleşmeler, Rome Via'da (gezginde) sözleşme adlarıyla görünür.
* Yükseltilebilir proxy'lerde hem uygulamayı hem de proxy'yi doğrulayın.
* Doğrulama için yalnızca sözleşmenizin dağıtılmış bayt kodu ile gönderdiğiniz kaynak kodu ve derleyici ayarları gerekir — bunlar tüm EVM zincirlerinde kullanılan girdilerin aynısıdır.
* Yeni Rome zincirleri doğrulayıcıya otomatik olarak eklenir. Yeni bir zincire dağıtım yaptıysanız ve doğrulayıcı henüz zinciri bulamıyorsa biraz bekleyin veya bizimle iletişime geçin.


---

# 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/tr/gelistirici-kilavuzlari/verify-contracts.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.
