# 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="https://2506823371-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCngnZjkdxdaNW3B4P5QC%2Fuploads%2F0DZ6hIQbZ6Dx8dulVmCT%2Fimage.png?alt=media&#x26;token=70dca7e1-6869-491e-9972-ca18af375030" alt=""><figcaption></figcaption></figure>

### 2. Wait for Vea

<figure><img src="https://2506823371-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCngnZjkdxdaNW3B4P5QC%2Fuploads%2FnoydmMNBQIAIhW8Z6PQV%2Fimage.png?alt=media&#x26;token=ddf40f38-176a-480c-b230-f01b1e71f4f2" 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="https://2506823371-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCngnZjkdxdaNW3B4P5QC%2Fuploads%2FtQYeQWrvUmLKmcZm87nk%2Fimage.png?alt=media&#x26;token=3a97c115-23b1-4bf3-bc54-6fd4e62ef300" 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="https://2506823371-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCngnZjkdxdaNW3B4P5QC%2Fuploads%2FQoS5TKFzjLB82WcZZEu5%2Fimage.png?alt=media&#x26;token=2a353a74-f7b8-41f6-a58e-a956b156684f" 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="https://2506823371-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCngnZjkdxdaNW3B4P5QC%2Fuploads%2F0UHz6qrknfHKLRTlzYkC%2Fimage.png?alt=media&#x26;token=a76a4644-4b02-42f1-91b7-0d73513a2c70" alt=""><figcaption></figcaption></figure>

## The Final Result

<figure><img src="https://2506823371-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCngnZjkdxdaNW3B4P5QC%2Fuploads%2FsUlJ0ccVMpyb0lY1bYaG%2Fimage.png?alt=media&#x26;token=02c7ffdd-5284-4988-a335-1ca40bea228b" alt=""><figcaption></figcaption></figure>
