Skip to main content

Dispensing an Item

Next, you’ll need to dispense your items into the Space you created. The Lamina1 Metaverse Asset Dispenser (L1MAD) is basically a server that handles these interactions on behalf of the Space and its users. When a given user reaches a number of points, the Space performs an API request to the L1MAD, which will then lookup and validate the achievement based on the logic defined in the Space Registry. 

If all is valid, then the L1MAD will mint the asset to the user. To do this, the L1MAD has a wallet that has a privileged role in the Space Registry contract, allowing it to execute higher security functions. Furthermore, the Creator of the assets has to set the Space Registry as an allowed minter.

The Lamina1 Metaverse Asset Dispenser allows developers to make in-Space events that trigger the dispensation of assets, making them available to the user for collection. Once you have done these configurations, you can call the API within Unity to populate your in-Space collection modals.

Each collection modal then calls the following information from the smart contract:

  • Asset: laser-red.png
  • Name: Red Laser
  • Creator: @enoonmai

Getting this process to work also requires some situational data, which should be added by the game developer depending on the circumstances in which the item is collected:

  • Collection Event: Game Over
  • Subtitle: You earned [###] points before you were defeated. This score unlocks a new laser from the LAMINA1 arsenal. Quick! Re-stock and continue.
  • CTA Buttons: Reject / Claim

Right now, the smart contract to register new Spaces is only open to a handful of early launch partners. We will open it up and alongside additional documentation when we’re ready for people to start freely deploying and launching Spaces on the Lamina1 Hub.