> For the complete documentation index, see [llms.txt](https://commun-platform.gitbook.io/commun-platform-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://commun-platform.gitbook.io/commun-platform-docs/platform-architecture/register-spot.md).

# Register Spot

<figure><img src="https://3166323360-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fu5y89IdHTbbfqeGDEz5I%2Fuploads%2FQTBMNzrbax8dmwjGQfae%2Fimage.png?alt=media&amp;token=02aa7392-61e8-4de1-9363-0d3462ed2cfa" alt=""><figcaption></figcaption></figure>

The spot will be registered by Commun. Basically, a spot device is registered when it is manufactured.

## Flow

1. Commun receives the ECDSA public key of the spot device from the spot device.
2. Calculate EOA from the ECDSA public key of the spot device.
3. Registers the EOA with `SpotRegistry::register()` with the following information.

   ```
   {
     "spotOwner": "SPOT_OWNER_EOA(OPTION)",
     "spotAddress": "SPOT_EOA",
     "spotInfo": {
        "name": "SPOT_NAME",
        "description": "SPOT_DESCRIPTION",
        "imageUrl": "SPOT_IMAGE_URL",
        "url": "SPOT_URL(WEB_SITE)",
        "provider": "SPOT_PROVIDER(OFFICE_NAME)",
        "latitude": "SPOT_DESCRIPTION",
        "longitude": "SPOT_DESCRIPTION",
        "extra": "SPOT_DESCRIPTION"
     }
   }
   ```

`SpotRegistry::register()` creates a new `SpotResolver` contract. It provides the ability for visitors to resolve smart contracts that work by spot signatures. Smart contracts are managed by an ID called `PoV ID`. SpotResolver creates the first PoV contract when it is created. The `PoV ID` of that PoV contract is `0x0`.

## Check

If the registration is successful, `SpotRegistry::getResolver()` returns something other than `address(0)`.
