# NullRouter

This **NullRouter** is the simplest `Router` implementation, it doesn’t bridge at all but simply routes messages on the same chain. It immediately delivers the payload to the target contract, otherwise it rejects the call.

All routers support the null route, allowing integrators to also have access to same-chain routing.

{% @mermaid/diagram content="sequenceDiagram
    participant SourceContract
    participant NullRouter
    participant DestContract

    SourceContract->>NullRouter: send(message)
    NullRouter-->>NullRouter: revert if message.chainId != block.chainid
    NullRouter-->>DestContract: Invoke onMessageReceived method

" %}

***

#### Events

| Event                | Parameters        | Description                                                                                    |
| -------------------- | ----------------- | ---------------------------------------------------------------------------------------------- |
| `MessageBroadcasted` | `Message message` | Emitted when a valid same-chain message is delivered; mirrors the interface’s broadcast event. |

***

#### Errors

| Error                        | When It’s Thrown                                                       |
| ---------------------------- | ---------------------------------------------------------------------- |
| `UnsupportedBridgingRoute()` | If `message.chainId` ≠ `block.chainid`, i.e. it is a cross-chain call. |
