Skip to main content

Switch on

Connect to wallet

Connect to the DApp by clicking the "Connect to wallet" button:
Docusaurus with Keytar

Then select the user account. If you don't have a dedicated user account, go to the help page.

Once connected, the address and balance of the connected account is displayed:

Docusaurus with Keytar

Display bulb on mobile device

Click on the QR code area to display the QR code:

Docusaurus with Keytar

Scan the QR code and open encoded link. It is likely that the bulb is off, unless someone has already switched it on. Below is the display of the builb in off state:

Docusaurus with Keytar

It is also possible to display the bulb in a browser.

Select service duration

Use the slider to select the duration. The corresponding price is displayed. It is basically computed as the duration multiplied by the price per minute:

Session Price = Session Duration * Price per Minute

In the DApp the Price per Minute is 0.82ꜩ. Hence for a duration of 4 minutes, the session price is 4*0.82 = 3.32ꜩ:

Docusaurus with Keytar

Start Service

Once connected Click the "SWITCH ON" button. The

Docusaurus with Keytar

The transaction parameter may be displayed by clicking "Raw":

[{
"kind":"transaction"
"to":"KT1CxHBiCSvmXn9kXCbhPfdGDAggGG9ktQEX"
"amount":3333333
"mutez":true
"parameter":{
"entrypoint":"start"
"value":{
"prim":"Unit"
}
}
}]

We note that:

  • the amount sent to the contract is 3333333 in mutez (a mutez is 1 million tez)
  • Unit is the parameter value when no argument is required.

The bulb switches on when the transaction is validated:

Docusaurus with Keytar

The DApp displays the remaining time before the service stops:

Docusaurus with Keytar

Display bulb in a browser

If you don't have a mobile phone to display the bulb, it is still possible to display it in a browser:

  1. duplicate the DApp tab
  2. open 'More Tools/Development tools'
  3. switch on 'Mobile Device' menu

The bulb is then displayed:

Docusaurus with Keytar