# Lightbulb Demo

The lightbulb [demo](https://vea-lightbulb.vercel.app/) demonstrates a simple dapp integrated with Vea. The switch lives on Arbitrum Goerli and the Lightbulb lives on a different chain, either Chiado or Goerli, and they communicate with Vea.

[Try it out](https://vea-lightbulb.vercel.app/)! Don't have Arbitrum Goerli eth? No problem, there's a [faucet](https://faucet.triangleplatform.com/arbitrum/goerli) for that.

## User flow

### 1. Hit The Switch (Arbitrum Goerli)

<figure><img src="/files/B1ODQghtznAGfwQgRr5s" alt=""><figcaption></figcaption></figure>

### 2. Wait for Vea

<figure><img src="/files/bNlfRim3RQhy5E3u1cGX" alt=""><figcaption></figcaption></figure>

The status of the Vea bridging process and whether your messages have been bridged can be tracked in [VeaScan](https://veascan.io/). You can find the messageId associated with the switch transaction in the event log.

<figure><img src="/files/Xz1Gg6G5QlvGjvM47djN" alt=""><figcaption><p>Switch Transaction event log</p></figcaption></figure>

When the Vea devnet has bridged your message, you can find your message in a recently bridged 'snapshot'.

<figure><img src="/files/4dz8EmfBLj9tdoSWNR7o" alt=""><figcaption><p>VeaScan successfully bridged message.</p></figcaption></figure>

### 3. Wait For Relayers

Now that the message to turn on the lightbulb is ready, we can relay it manually, or we can wait for relayers. For the demo lightbulb deployment, we have relayers setup to run 5 minutes after bridging. For your own lightbulb deployment and other Vea integrations, you will need to relay the transactions yourself.

<figure><img src="/files/ElPhbTAAEbluyboLmuix" alt=""><figcaption></figcaption></figure>

## The Final Result

<figure><img src="/files/zW2wvP1VHPoCQymdWe6k" alt=""><figcaption></figcaption></figure>


---

# 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.vea.ninja/build-xchain-dapps/lightbulb-demo.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.
