> 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/de/entwicklerleitfaden/verify-contracts.md).

# Verträge verifizieren

Rome betreibt einen gehosteten [Sourcify](https://sourcify.dev) Verifizierungsdienst. Sobald du einen Vertrag verifizierst, werden sein Quellcode und sein ABI öffentlich reproduzierbar und erscheinen mit einem **✓ Quelle verifiziert** Abzeichen im Rome-Block-Explorer (Via).

Die Verifizierung funktioniert mit dem Standard `forge verify-contract` und `hardhat-verify` Abläufen — du leitest sie einfach an den Verifier von Rome weiter.

## Verifier-Endpunkt

| Umgebung         | Verifier-URL                              |
| ---------------- | ----------------------------------------- |
| Testnet & Devnet | `https://verify.testnet.romeprotocol.xyz` |

Eine gemeinsame Instanz bedient jede Rome-Testnet-/Devnet-Chain — du wählst die Chain mit dem Standard `--chain-id` Flag.

## Foundry

Nach dem Deployen (siehe [Solidity-Verträge bereitstellen](/de/entwicklerleitfaden/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
```

Falls der Konstruktor Argumente angenommen hat, gib sie an, damit der Bytecode übereinstimmt:

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

Du kannst auch bereits beim Deployen verifizieren mit `forge create … --verify` oder `forge script … --verify` (Foundry leitet die Chain-ID aus `--rpc-url`).

## Hardhat

`hardhat-verify` wird mit dem Hardhat-3-Toolbox ausgeliefert. Richte seinen Sourcify-Provider auf den Verifier von Rome in `hardhat.config.ts` und führe aus `hardhat verify`:

```typescript
export default defineConfig({
  // …plugins, solidity, networks…
  verify: {
    etherscan: { enabled: false },
    blockscout: { enabled: false },
    sourcify: {
      enabled: true,
      apiUrl: "https://verify.testnet.romeprotocol.xyz",
    },
  },
});
```

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

Bei Erfolg verlinkt der Verifier den veröffentlichten Quellcode, z. B. `https://verify.testnet.romeprotocol.xyz/repo-ui/<CHAIN_ID>/<ADDRESS>`.

## Verifizierungsstatus prüfen

Der Explorer liest den Verifizierungsstatus aus der API des Verifiers. Du kannst ihn direkt abfragen:

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

Ein verifizierter Vertrag gibt ein `Übereinstimmung` Feld:

* **`exact_match`** — Bytecode *und* Metadaten-Hash stimmt überein (eine perfekte, "vollständige" Übereinstimmung).
* **`Übereinstimmung`** — Bytecode stimmt überein; Metadaten unterscheiden sich leicht (immer noch eine echte, verifizierte Übereinstimmung).
* `404` / `null` — nicht verifiziert.

## Hinweise

* Für die Verifizierung werden nur der bereitgestellte Bytecode deines Vertrags + der Quellcode und die Compiler-Einstellungen benötigt, die du einreichst — also dieselben Eingaben wie auf jeder EVM-Chain.
* Neue Rome-Chains werden automatisch beim Verifier aufgenommen; wenn du auf einer neuen Chain deployest und die Verifizierung sie noch nicht findet, warte einen Moment oder melde dich.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.rome.builders/de/entwicklerleitfaden/verify-contracts.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
