# Example Usage and Deployment

## Example Usage and Deployment

1. **Deployment**: A script (e.g., `DeployGateway.sol`) deploys `Gateway.sol`, assigns `DEFAULT_ADMIN_ROLE` to a Gnosis Safe, plus `APPENDER_ROLE` to the aggregator account.
2. **Genesis Batch**: The aggregator calls `submitBatch` with `bytes32(0)` for `prevBatchHash`. This finalizes initialization.
3. **Normal Batches**: Each L2 block is compressed into a `BatchHeader`. The aggregator calls `submitBatch(header)` referencing the current `_lastCommitHash`.
4. **Fork Creation**: If needed, a user with `FORKER_ROLE` calls `forkChain(header, targetForkId)`. The system abandons irrelevant forks and increments `currentForkId`.
5. **Pause and Unpause**: If an emergency arises, an admin with `PAUSER_ROLE` calls `pause()`. No further commits/forks can happen. Once resolved, `unpause()` is invoked by the `UNPAUSER_ROLE`.


---

# Agent Instructions: 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:

```
GET https://docs.eclipse.xyz/architecture/eclipse-architecture/eclipse-l1-gateway/example-usage-and-deployment.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
